summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2006-04-14 16:25:42 +0000
committersos <sos@FreeBSD.org>2006-04-14 16:25:42 +0000
commitb4a30aeb3478d044243fcc4598fd13ed2be38998 (patch)
tree48fd3bd5751fe88e821d2660930bda425d9b82d4 /sys/dev/ata
parent3f58a5d8d676a2b81cf45985b0ad9bb931fcc94b (diff)
downloadFreeBSD-src-b4a30aeb3478d044243fcc4598fd13ed2be38998.zip
FreeBSD-src-b4a30aeb3478d044243fcc4598fd13ed2be38998.tar.gz
Dont poll for ATA_IDLE on a detached channel in suspend.
Diffstat (limited to 'sys/dev/ata')
-rw-r--r--sys/dev/ata/ata-all.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index b68cbe9..e9cffe1 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -277,8 +277,8 @@ ata_suspend(device_t dev)
if (!dev || !(ch = device_get_softc(dev)))
return ENXIO;
- /* wait for the channel to be IDLE before entering suspend mode */
- while (1) {
+ /* wait for the channel to be IDLE or detached before suspending */
+ while (ch->r_irq) {
mtx_lock(&ch->state_mtx);
if (ch->state == ATA_IDLE) {
ch->state = ATA_ACTIVE;
OpenPOWER on IntegriCloud