diff options
author | mav <mav@FreeBSD.org> | 2010-07-10 15:36:27 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2010-07-10 15:36:27 +0000 |
commit | 4895e1982dab6f0e5df6b297363fe7dcfb922dbd (patch) | |
tree | 0bbfb763aff8cb85b464369c13b5b5ebffa87f95 /sys/dev/ata/chipsets/ata-siliconimage.c | |
parent | e4e2e8edd34de4dc993090a450bec0770bc1b0f3 (diff) | |
download | FreeBSD-src-4895e1982dab6f0e5df6b297363fe7dcfb922dbd.zip FreeBSD-src-4895e1982dab6f0e5df6b297363fe7dcfb922dbd.tar.gz |
If ata_sata_phy_reset() failed and ata_generic_reset() is not called, mark
channel as having no devices connected. This improves hot-unplug operation
on legacy-emulating SATA controllers.
Diffstat (limited to 'sys/dev/ata/chipsets/ata-siliconimage.c')
-rw-r--r-- | sys/dev/ata/chipsets/ata-siliconimage.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/ata/chipsets/ata-siliconimage.c b/sys/dev/ata/chipsets/ata-siliconimage.c index 48c9565..31d1878 100644 --- a/sys/dev/ata/chipsets/ata-siliconimage.c +++ b/sys/dev/ata/chipsets/ata-siliconimage.c @@ -364,8 +364,12 @@ ata_sii_status(device_t dev) static void ata_sii_reset(device_t dev) { + struct ata_channel *ch = device_get_softc(dev); + if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); + else + ch->devices = 0; } static int |