summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-cd.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2007-11-19 21:11:26 +0000
committersos <sos@FreeBSD.org>2007-11-19 21:11:26 +0000
commit23501674518a8954051b2bab17483baf2f2927c9 (patch)
tree41c6bcdf4cdd949e1b489dca51811e132d6c3a45 /sys/dev/ata/atapi-cd.c
parent3c82b6a5c7d5c1b0800e60202216524aac645532 (diff)
downloadFreeBSD-src-23501674518a8954051b2bab17483baf2f2927c9.zip
FreeBSD-src-23501674518a8954051b2bab17483baf2f2927c9.tar.gz
Dont fumble the ivars on reinit, avoids panic on suspend/resume om some systems that looses thier devices.
Patch by: jhb@
Diffstat (limited to 'sys/dev/ata/atapi-cd.c')
-rw-r--r--sys/dev/ata/atapi-cd.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c
index 22caf9b..df63fe1 100644
--- a/sys/dev/ata/atapi-cd.c
+++ b/sys/dev/ata/atapi-cd.c
@@ -157,12 +157,9 @@ acd_reinit(device_t dev)
{
struct ata_channel *ch = device_get_softc(device_get_parent(dev));
struct ata_device *atadev = device_get_softc(dev);
- struct acd_softc *cdp = device_get_ivars(dev);
if (((atadev->unit == ATA_MASTER) && !(ch->devices & ATA_ATAPI_MASTER)) ||
((atadev->unit == ATA_SLAVE) && !(ch->devices & ATA_ATAPI_SLAVE))) {
- device_set_ivars(dev, NULL);
- free(cdp, M_ACD);
return 1;
}
ATA_SETMODE(device_get_parent(dev), dev);
OpenPOWER on IntegriCloud