diff options
author | mav <mav@FreeBSD.org> | 2009-10-23 14:56:29 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2009-10-23 14:56:29 +0000 |
commit | b54a1191707a03952b2aa4dfa508db2d4721a4ad (patch) | |
tree | 2fe50f63f79c766ba090a4786bbbc6d156c2d191 /sys | |
parent | 2dcc53599c6a7af58c845d0d3796bcde7e21b437 (diff) | |
download | FreeBSD-src-b54a1191707a03952b2aa4dfa508db2d4721a4ad.zip FreeBSD-src-b54a1191707a03952b2aa4dfa508db2d4721a4ad.tar.gz |
MFp4:
Do not differentiate 12/16 bytes ATAPI CCB formats when it is not needed.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ata/ata-queue.c | 6 | ||||
-rw-r--r-- | sys/dev/ata/atapi-cd.c | 4 | ||||
-rw-r--r-- | sys/dev/ata/atapi-fd.c | 4 | ||||
-rw-r--r-- | sys/dev/ata/atapi-tape.c | 5 |
4 files changed, 4 insertions, 15 deletions
diff --git a/sys/dev/ata/ata-queue.c b/sys/dev/ata/ata-queue.c index 8756884..8856884 100644 --- a/sys/dev/ata/ata-queue.c +++ b/sys/dev/ata/ata-queue.c @@ -150,15 +150,11 @@ ata_atapicmd(device_t dev, u_int8_t *ccb, caddr_t data, int count, int flags, int timeout) { struct ata_request *request = ata_alloc_request(); - struct ata_device *atadev = device_get_softc(dev); int error = ENOMEM; if (request) { request->dev = dev; - if ((atadev->param.config & ATA_PROTO_MASK) == ATA_PROTO_ATAPI_12) - bcopy(ccb, request->u.atapi.ccb, 12); - else - bcopy(ccb, request->u.atapi.ccb, 16); + bcopy(ccb, request->u.atapi.ccb, 16); request->data = data; request->bytecount = count; request->transfersize = min(request->bytecount, 65534); diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index aee8374..941c101 100644 --- a/sys/dev/ata/atapi-cd.c +++ b/sys/dev/ata/atapi-cd.c @@ -863,9 +863,7 @@ acd_strategy(struct bio *bp) } request->dev = dev; request->bio = bp; - bcopy(ccb, request->u.atapi.ccb, - (atadev->param.config & ATA_PROTO_MASK) == - ATA_PROTO_ATAPI_12 ? 16 : 12); + bcopy(ccb, request->u.atapi.ccb, 16); request->data = bp->bio_data; request->bytecount = count * blocksize; request->transfersize = min(request->bytecount, 65534); diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c index b8434b3..5baeab9 100644 --- a/sys/dev/ata/atapi-fd.c +++ b/sys/dev/ata/atapi-fd.c @@ -240,9 +240,7 @@ afd_strategy(struct bio *bp) } request->dev = dev; request->bio = bp; - bcopy(ccb, request->u.atapi.ccb, - (atadev->param.config & ATA_PROTO_MASK) == - ATA_PROTO_ATAPI_12 ? 16 : 12); + bcopy(ccb, request->u.atapi.ccb, 16); request->data = bp->bio_data; request->bytecount = count * fdp->sectorsize; request->transfersize = min(request->bytecount, 65534); diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c index dd74461..5b4da81 100644 --- a/sys/dev/ata/atapi-tape.c +++ b/sys/dev/ata/atapi-tape.c @@ -373,7 +373,6 @@ static void ast_strategy(struct bio *bp) { device_t dev = bp->bio_dev->si_drv1; - struct ata_device *atadev = device_get_softc(dev); struct ast_softc *stp = device_get_ivars(dev); struct ata_request *request; u_int32_t blkcount; @@ -426,9 +425,7 @@ ast_strategy(struct bio *bp) } request->dev = dev; request->driver = bp; - bcopy(ccb, request->u.atapi.ccb, - (atadev->param.config & ATA_PROTO_MASK) == - ATA_PROTO_ATAPI_12 ? 16 : 12); + bcopy(ccb, request->u.atapi.ccb, 16); request->data = bp->bio_data; request->bytecount = blkcount * stp->blksize; request->transfersize = min(request->bytecount, 65534); |