1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Workaround for errata on early versions of the sii3112.

Approved by: re@
This commit is contained in:
Søren Schmidt 2003-11-28 19:01:28 +00:00
parent d7be4a893c
commit b437f21e88
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123034
4 changed files with 13 additions and 5 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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;

View File

@ -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