diff options
Diffstat (limited to 'sys/dev/ata/atapi-cd.c')
-rw-r--r-- | sys/dev/ata/atapi-cd.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index a64cfeb..f9fcf97 100644 --- a/sys/dev/ata/atapi-cd.c +++ b/sys/dev/ata/atapi-cd.c @@ -691,13 +691,11 @@ acd_geom_access(struct g_provider *pp, int dr, int dw, int de) 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; int timeout = 60, track; - if (!(request = ata_alloc_request())) + if (!(request = ata_alloc_request(dev))) return ENOMEM; /* wait if drive is not finished loading the medium */ while (timeout--) { - bzero(request, sizeof(struct ata_request)); - request->dev = dev; bcopy(ccb, request->u.atapi.ccb, 16); request->flags = ATA_R_ATAPI; request->timeout = 5; @@ -857,11 +855,10 @@ acd_strategy(struct bio *bp) ccb[7] = count>>8; ccb[8] = count; - if (!(request = ata_alloc_request())) { + if (!(request = ata_alloc_request(dev))) { g_io_deliver(bp, ENOMEM); return; } - request->dev = dev; request->bio = bp; bcopy(ccb, request->u.atapi.ccb, (atadev->param.config & ATA_PROTO_MASK) == @@ -1221,10 +1218,9 @@ acd_get_progress(device_t dev, int *finished) struct ata_request *request; int8_t dummy[8]; - if (!(request = ata_alloc_request())) + if (!(request = ata_alloc_request(dev))) return ENOMEM; - request->dev = dev; bcopy(ccb, request->u.atapi.ccb, 16); request->data = dummy; request->bytecount = sizeof(dummy); |