aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Schmidt <sos@FreeBSD.org>2000-05-01 07:30:28 +0000
committerSøren Schmidt <sos@FreeBSD.org>2000-05-01 07:30:28 +0000
commitaf5bd99e9ae010bae45cd99c46e117bba4c1d4f6 (patch)
treec4c062685f3c195eccdabd66ace31eb2602b1bc4
parentde3958c2564ae10930c86101f5f9bc1fb1f26258 (diff)
Notes
-rw-r--r--sys/dev/ata/atapi-cd.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c
index 81c8ed4922ff..65b2ae50e0b3 100644
--- a/sys/dev/ata/atapi-cd.c
+++ b/sys/dev/ata/atapi-cd.c
@@ -1179,7 +1179,7 @@ acd_start(struct atapi_softc *atp)
devstat_start_transaction(cdp->stats);
atapi_queue_cmd(cdp->atp, ccb, bp->bio_data, count * cdp->block_size,
- (bp->bio_cmd == BIO_READ)?ATPR_F_READ : 0, 30, acd_done, bp);
+ bp->bio_cmd == BIO_READ ? ATPR_F_READ : 0, 30, acd_done,bp);
}
static int32_t
@@ -1358,14 +1358,10 @@ acd_select_slot(struct acd_softc *cdp)
static int32_t
acd_close_disk(struct acd_softc *cdp)
{
- int8_t ccb[16] = { ATAPI_CLOSE_TRACK, 0x01, 0x02, 0, 0, 0, 0, 0,
+ int8_t ccb[16] = { ATAPI_CLOSE_TRACK, 0, 0x02, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0 };
- int32_t error;
- error = atapi_queue_cmd(cdp->atp, ccb, NULL, 0, 0, 10, NULL, NULL);
- if (error)
- return error;
- return atapi_wait_ready(cdp->atp, 10*60);
+ return atapi_queue_cmd(cdp->atp, ccb, NULL, 0, 0, 5*60, NULL, NULL);
}
static int32_t
@@ -1451,14 +1447,10 @@ acd_open_track(struct acd_softc *cdp, struct cdr_track *track)
static int32_t
acd_close_track(struct acd_softc *cdp)
{
- int8_t ccb1[16] = { ATAPI_SYNCHRONIZE_CACHE, 0x02, 0, 0, 0, 0, 0, 0,
+ int8_t ccb[16] = { ATAPI_SYNCHRONIZE_CACHE, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0 };
- int32_t error;
- error = atapi_queue_cmd(cdp->atp, ccb1, NULL, 0, 0, 10, NULL, NULL);
- if (error)
- return error;
- return atapi_wait_ready(cdp->atp, 5*60);
+ return atapi_queue_cmd(cdp->atp, ccb, NULL, 0, 0, 60, NULL, NULL);
}
static int32_t