diff options
| author | Alexander Motin <mav@FreeBSD.org> | 2010-09-02 12:32:29 +0000 |
|---|---|---|
| committer | Alexander Motin <mav@FreeBSD.org> | 2010-09-02 12:32:29 +0000 |
| commit | a6c48c7c72eed385a78fc591e89346e80936d33a (patch) | |
| tree | eac0878f9e9c99ef42e06a4abef126e1cbaa8484 /sys/dev/ata | |
| parent | a250a687f75ef4acd6d863e68ea292c071b2ed28 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ata')
| -rw-r--r-- | sys/dev/ata/chipsets/ata-siliconimage.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/ata/chipsets/ata-siliconimage.c b/sys/dev/ata/chipsets/ata-siliconimage.c index ff22f070d2e5d..0fe4e1c03561e 100644 --- a/sys/dev/ata/chipsets/ata-siliconimage.c +++ b/sys/dev/ata/chipsets/ata-siliconimage.c @@ -365,7 +365,15 @@ ata_sii_status(device_t dev) static void ata_sii_reset(device_t dev) { + struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); struct ata_channel *ch = device_get_softc(dev); + int offset = ((ch->unit & 1) << 7) + ((ch->unit & 2) << 8); + uint32_t val; + + /* Apply R_ERR on DMA activate FIS errata workaround. */ + val = ATA_INL(ctlr->r_res2, 0x14c + offset); + if ((val & 0x3) == 0x1) + ATA_OUTL(ctlr->r_res2, 0x14c + offset, val & ~0x3); if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); |
