diff options
author | John Baldwin <jhb@FreeBSD.org> | 2007-02-23 16:25:08 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2007-02-23 16:25:08 +0000 |
commit | a96255b62d488d4d2f532e64a74cc99571aacbd8 (patch) | |
tree | e93bd90cb35a83882bef6ca2e41bbf03c4c5a077 /sys/dev/ata/atapi-cd.c | |
parent | 37e80fcac22c6734bcdb79e160bc1eac56740c4c (diff) |
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.
Notes
Notes:
svn path=/head/; revision=166909
Diffstat (limited to 'sys/dev/ata/atapi-cd.c')
-rw-r--r-- | sys/dev/ata/atapi-cd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index 0dd7cd8e9bf9..beb7667a9324 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; } |