Properly use the sense key info
This commit is contained in:
parent
17d5388342
commit
c1d9ed7049
@ -802,7 +802,8 @@ ata_usbchannel_end_transaction(struct ata_request *request)
|
||||
/* XXX SOS convert the request from the format used, only BBB for now*/
|
||||
|
||||
/* ATA/ATAPI IDENTIFY needs special treatment */
|
||||
if (request->u.atapi.ccb[0] == ATAPI_INQUIRY) {
|
||||
if ((request->flags & ATA_R_ATAPI) &&
|
||||
(request->u.atapi.ccb[0] == ATAPI_INQUIRY)) {
|
||||
struct ata_device *atadev = device_get_softc(request->dev);
|
||||
struct atapi_inquiry *inquiry = (struct atapi_inquiry *)request->data;
|
||||
u_int16_t *ptr;
|
||||
@ -823,7 +824,8 @@ ata_usbchannel_end_transaction(struct ata_request *request)
|
||||
*ptr = ntohs(*ptr);
|
||||
request->result = 0;
|
||||
}
|
||||
if (request->u.atapi.ccb[0] == ATAPI_REQUEST_SENSE)
|
||||
if ((request->flags & ATA_R_ATAPI) &&
|
||||
(request->u.atapi.ccb[0] == ATAPI_REQUEST_SENSE))
|
||||
request->u.atapi.sense_key = request->u.atapi.sense_data.sense_key << 4;
|
||||
return ATA_OP_FINISHED;
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ afd_sense(device_t dev)
|
||||
while ((error = afd_test_ready(dev)) && timeout--) {
|
||||
DELAY(100000);
|
||||
}
|
||||
if (error == ENODEV)
|
||||
if (error == EBUSY)
|
||||
return 1;
|
||||
|
||||
/* The IOMEGA Clik! doesn't support reading the cap page, fake it */
|
||||
|
Loading…
x
Reference in New Issue
Block a user