diff options
author | thomas <thomas@FreeBSD.org> | 2007-04-30 09:26:43 +0000 |
---|---|---|
committer | thomas <thomas@FreeBSD.org> | 2007-04-30 09:26:43 +0000 |
commit | 334e2e141a4465d79d8ca95774e37453e5b7528d (patch) | |
tree | 0ac312330c674b445546e500fcbc07c8b630ac13 /sys/dev/ata | |
parent | a1cdcb2c5b599264db74c66471edab1d472fe801 (diff) | |
download | FreeBSD-src-334e2e141a4465d79d8ca95774e37453e5b7528d.zip FreeBSD-src-334e2e141a4465d79d8ca95774e37453e5b7528d.tar.gz |
(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
Diffstat (limited to 'sys/dev/ata')
-rw-r--r-- | sys/dev/ata/atapi-cam.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ata/atapi-cam.c b/sys/dev/ata/atapi-cam.c index 4f2bd34..a6e580a 100644 --- a/sys/dev/ata/atapi-cam.c +++ b/sys/dev/ata/atapi-cam.c @@ -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; } |