(atapi_cb): Fix test for the presence of sense data. An incorrect condition

was being tested, which would result in a system hang in some configurations.

PR:		kern/112119
Reviewed by:	scottl
MFC after:	3 days
This commit is contained in:
thomas 2007-04-30 09:26:43 +00:00
parent a1cdcb2c5b
commit 334e2e141a

View File

@ -616,7 +616,7 @@ atapi_action(struct cam_sim *sim, union ccb *ccb)
/* /*
* no retries are to be performed at the ATA level; any retries * no retries are to be performed at the ATA level; any retries
* will be done by CAM . * will be done by CAM.
*/ */
request->retries = 0; request->retries = 0;
@ -729,7 +729,7 @@ atapi_cb(struct ata_request *request)
* issued a REQUEST SENSE automatically and that operation * issued a REQUEST SENSE automatically and that operation
* returned without error. * returned without error.
*/ */
if (request->u.atapi.saved_cmd != 0 && request->error == 0) { if (request->u.atapi.sense.key != 0 && request->error == 0) {
bcopy (&request->u.atapi.sense, &csio->sense_data, sizeof(struct atapi_sense)); bcopy (&request->u.atapi.sense, &csio->sense_data, sizeof(struct atapi_sense));
csio->ccb_h.status |= CAM_AUTOSNS_VALID; csio->ccb_h.status |= CAM_AUTOSNS_VALID;
} }