summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-cd.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2007-02-23 16:25:08 +0000
committerjhb <jhb@FreeBSD.org>2007-02-23 16:25:08 +0000
commite21fb2b555d36a49b232ee191ef77f745b6c5280 (patch)
treee93bd90cb35a83882bef6ca2e41bbf03c4c5a077 /sys/dev/ata/atapi-cd.c
parent401f7aaf8a4b36c5409b47caeb111224c19cfa64 (diff)
downloadFreeBSD-src-e21fb2b555d36a49b232ee191ef77f745b6c5280.zip
FreeBSD-src-e21fb2b555d36a49b232ee191ef77f745b6c5280.tar.gz
Use 'pause' in several places rather than trying to tsleep() on NULL (which
triggers a KASSERT) or local variables. In the case of kern_ndis, the tsleep() actually used a common sleep address (curproc) making it susceptible to a premature wakeup.
Diffstat (limited to 'sys/dev/ata/atapi-cd.c')
-rw-r--r--sys/dev/ata/atapi-cd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c
index 0dd7cd8..beb7667 100644
--- a/sys/dev/ata/atapi-cd.c
+++ b/sys/dev/ata/atapi-cd.c
@@ -710,7 +710,7 @@ acd_geom_access(struct g_provider *pp, int dr, int dw, int de)
request->u.atapi.sense.key == 7) &&
request->u.atapi.sense.asc == 4 &&
request->u.atapi.sense.ascq == 1)
- tsleep(&timeout, PRIBIO, "acdld", hz / 2);
+ pause("acdld", hz / 2);
else
break;
}
@@ -1095,7 +1095,7 @@ acd_fixate(device_t dev, int multisession)
/* some drives just return ready, wait for the expected fixate time */
if ((error = acd_test_ready(dev)) != EBUSY) {
timeout = timeout / (cdp->cap.cur_write_speed / 177);
- tsleep(&error, PRIBIO, "acdfix", timeout * hz / 2);
+ pause("acdfix", timeout * hz / 2);
return acd_test_ready(dev);
}
@@ -1104,7 +1104,7 @@ acd_fixate(device_t dev, int multisession)
return error;
if ((error = acd_test_ready(dev)) != EBUSY)
return error;
- tsleep(&error, PRIBIO, "acdcld", hz / 2);
+ pause("acdcld", hz / 2);
}
return EIO;
}
OpenPOWER on IntegriCloud