diff options
author | sos <sos@FreeBSD.org> | 2003-11-28 19:01:28 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2003-11-28 19:01:28 +0000 |
commit | 9bcba46103bb735c3d96d29b2f58c40d3ffeeccb (patch) | |
tree | 3b4a8f6b8ab04b09777278a31796f9447ffa82dd /sys/dev | |
parent | 73c251c926015bb7a04ec55aacdabd690f0873b6 (diff) | |
download | FreeBSD-src-9bcba46103bb735c3d96d29b2f58c40d3ffeeccb.zip FreeBSD-src-9bcba46103bb735c3d96d29b2f58c40d3ffeeccb.tar.gz |
Workaround for errata on early versions of the sii3112.
Approved by: re@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ata/ata-all.h | 1 | ||||
-rw-r--r-- | sys/dev/ata/ata-chipset.c | 8 | ||||
-rw-r--r-- | sys/dev/ata/ata-dma.c | 8 | ||||
-rw-r--r-- | sys/dev/ata/ata-pci.h | 1 |
4 files changed, 13 insertions, 5 deletions
diff --git a/sys/dev/ata/ata-all.h b/sys/dev/ata/ata-all.h index daf2b3d..18cf778 100644 --- a/sys/dev/ata/ata-all.h +++ b/sys/dev/ata/ata-all.h @@ -246,6 +246,7 @@ struct ata_dma { struct ata_dmaentry *dmatab; /* DMA transfer table */ bus_addr_t mdmatab; /* bus address of dmatab */ u_int32_t alignment; /* DMA engine alignment */ + u_int32_t boundary; /* DMA engine boundary */ u_int32_t max_iosize; /* DMA engine max IO size */ u_int32_t cur_iosize; /* DMA engine current IO size */ int flags; diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c index 1e03b34..9c03dc3 100644 --- a/sys/dev/ata/ata-chipset.c +++ b/sys/dev/ata/ata-chipset.c @@ -1576,8 +1576,10 @@ ata_sii_ident(device_t dev) struct ata_pci_controller *ctlr = device_get_softc(dev); struct ata_chip_id *idx; static struct ata_chip_id ids[] = - {{ ATA_SII3112, 0x00, SIIMEMIO, 0, ATA_SA150, "SiI 3112" }, - { ATA_SII3112_1, 0x00, SIIMEMIO, 0, ATA_SA150, "SiI 3112" }, + {{ ATA_SII3112, 0x02, SIIMEMIO, 0, ATA_SA150, "SiI 3112" }, + { ATA_SII3112_1, 0x02, SIIMEMIO, 0, ATA_SA150, "SiI 3112" }, + { ATA_SII3112, 0x00, SIIMEMIO, SIIBUG, ATA_SA150, "SiI 3112" }, + { ATA_SII3112_1, 0x00, SIIMEMIO, SIIBUG, ATA_SA150, "SiI 3112" }, { ATA_SII0680, 0x00, SIIMEMIO, SIISETCLK, ATA_UDMA6, "SiI 0680" }, { ATA_CMD649, 0x00, 0, SIIINTR, ATA_UDMA5, "CMD 649" }, { ATA_CMD648, 0x00, 0, SIIINTR, ATA_UDMA4, "CMD 648" }, @@ -1684,6 +1686,8 @@ ata_sii_mio_allocate(device_t dev, struct ata_channel *ch) if (ctlr->chip->max_dma >= ATA_SA150) ch->flags |= ATA_NO_SLAVE; ctlr->dmainit(ch); + if (ctlr->chip->cfg2 & SIIBUG) + ch->dma->boundary = 8 * 1024; return 0; } diff --git a/sys/dev/ata/ata-dma.c b/sys/dev/ata/ata-dma.c index a052f08..1637f20 100644 --- a/sys/dev/ata/ata-dma.c +++ b/sys/dev/ata/ata-dma.c @@ -74,7 +74,8 @@ ata_dmainit(struct ata_channel *ch) ch->dma->load = ata_dmaload; ch->dma->unload = ata_dmaunload; ch->dma->alignment = 2; - ch->dma->max_iosize = 64*1024; + ch->dma->max_iosize = 64 * 1024; + ch->dma->boundary = 64 * 1024; } } @@ -106,9 +107,10 @@ ata_dmaalloc(struct ata_channel *ch) BUS_DMA_ALLOCNOW, NULL, NULL, &ch->dma->cdmatag)) goto error; - if (bus_dma_tag_create(ch->dma->dmatag, ch->dma->alignment, 64*1024, + if (bus_dma_tag_create(ch->dma->dmatag,ch->dma->alignment,ch->dma->boundary, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, - NULL, NULL, MAXPHYS, ATA_DMA_ENTRIES, MAXSEGSZ, + NULL, NULL, ch->dma->max_iosize, + ATA_DMA_ENTRIES, ch->dma->boundary, BUS_DMA_ALLOCNOW, NULL, NULL, &ch->dma->ddmatag)) goto error; diff --git a/sys/dev/ata/ata-pci.h b/sys/dev/ata/ata-pci.h index cbbe022..3c10660 100644 --- a/sys/dev/ata/ata-pci.h +++ b/sys/dev/ata/ata-pci.h @@ -255,6 +255,7 @@ struct ata_pci_controller { #define SIIMEMIO 1 #define SIIINTR 0x01 #define SIISETCLK 0x02 +#define SIIBUG 0x04 #define SIS_SOUTH 1 #define SISSATA 2 |