(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:
parent
97e49dd4b5
commit
e651554bf6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169115
@ -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
|
||||
* will be done by CAM .
|
||||
* will be done by CAM.
|
||||
*/
|
||||
request->retries = 0;
|
||||
|
||||
@ -729,7 +729,7 @@ atapi_cb(struct ata_request *request)
|
||||
* issued a REQUEST SENSE automatically and that operation
|
||||
* 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));
|
||||
csio->ccb_h.status |= CAM_AUTOSNS_VALID;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user