summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-cam.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ata/atapi-cam.c')
-rw-r--r--sys/dev/ata/atapi-cam.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/ata/atapi-cam.c b/sys/dev/ata/atapi-cam.c
index bce8625..25a579d 100644
--- a/sys/dev/ata/atapi-cam.c
+++ b/sys/dev/ata/atapi-cam.c
@@ -576,9 +576,10 @@ atapi_action(struct cam_sim *sim, union ccb *ccb)
struct scsi_inquiry *inq = (struct scsi_inquiry *) &request->u.atapi.ccb[0];
if (inq->byte2 == 0 && inq->page_code == 0 &&
- inq->length > SHORT_INQUIRY_LENGTH) {
+ scsi_2btoul(inq->length) > SHORT_INQUIRY_LENGTH) {
bzero(buf, len);
- len = inq->length = SHORT_INQUIRY_LENGTH;
+ len = SHORT_INQUIRY_LENGTH;
+ scsi_ulto2b(len, inq->length);
}
break;
}
OpenPOWER on IntegriCloud