diff options
author | jhb <jhb@FreeBSD.org> | 2001-08-10 06:37:05 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-08-10 06:37:05 +0000 |
commit | 2ff1c253cdbfd553e53fca698ea48f0fedd1ed13 (patch) | |
tree | a43614b25c6b04cbe646ec4432f620996c2b3993 /sys/dev | |
parent | bb40f57a7caad930203ee3bf5e653cd8d69e1019 (diff) | |
download | FreeBSD-src-2ff1c253cdbfd553e53fca698ea48f0fedd1ed13.zip FreeBSD-src-2ff1c253cdbfd553e53fca698ea48f0fedd1ed13.tar.gz |
- Remove asleep(), await(), and M_ASLEEP.
- Callers of asleep() and await() have been converted to calling tsleep().
The only caller outside of M_ASLEEP was the ata driver, which called both
asleep() and await() with spl-raised, so there was no need for the
asleep() and await() pair. M_ASLEEP was unused.
Reviewed by: jasone, peter
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ata/ata-all.c | 3 | ||||
-rw-r--r-- | sys/dev/ata/atapi-all.c | 6 |
2 files changed, 2 insertions, 7 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 89e9901..01ebc46 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -970,14 +970,13 @@ out: switch (flags) { case ATA_WAIT_INTR: scp->active |= ATA_WAIT_INTR; - asleep((caddr_t)scp, PRIBIO, "atacmd", 10 * hz); ATA_OUTB(scp->r_io, ATA_CMD, command); /* enable interrupt */ if (scp->flags & ATA_QUEUED) ATA_OUTB(scp->r_altio, ATA_ALTSTAT, ATA_A_4BIT); - if (await(PRIBIO, 10 * hz)) { + if (tsleep((caddr_t)scp, PRIBIO, "atacmd", 10 * hz) != 0) { ata_printf(scp, device, "ata_command: timeout waiting for intr\n"); scp->active &= ~ATA_WAIT_INTR; error = -1; diff --git a/sys/dev/ata/atapi-all.c b/sys/dev/ata/atapi-all.c index ac15c7e..b7d902b 100644 --- a/sys/dev/ata/atapi-all.c +++ b/sys/dev/ata/atapi-all.c @@ -199,10 +199,6 @@ atapi_queue_cmd(struct atapi_softc *atp, int8_t *ccb, caddr_t data, s = splbio(); - /* if not using callbacks, prepare to sleep for this request */ - if (!callback) - asleep((caddr_t)request, PRIBIO, "atprq", 0); - /* append onto controller queue and try to start controller */ #ifdef ATAPI_DEBUG ata_printf(atp->controller, atp->unit, "queueing %s ", @@ -222,7 +218,7 @@ atapi_queue_cmd(struct atapi_softc *atp, int8_t *ccb, caddr_t data, } /* wait for request to complete */ - await(PRIBIO, 0); + tsleep((caddr_t)request, PRIBIO, "atprq", 0); splx(s); error = request->error; if (error) |