cam_periph recovered sense handling
Thomas Quinot
thomas at FreeBSD.ORG
Fri Sep 19 10:36:39 PDT 2003
When the cam_periph layer automagically recovers sense data by issuing a
REQUEST SENSE command, it must set the CAM_AUTOSNS_VALID bit in the
original CCB's status. Currently, it errouneously sets that bit in the
flags field instead. This causes an endless loop of REQUEST SENSE
actions, eventually leading to memory exhaustion. The following patch
resolves the problem for me; please review.
Thomas.
Index: cam_periph.c
===================================================================
RCS file: /home/ncvs/src/sys/cam/cam_periph.c,v
retrieving revision 1.52
diff -u -r1.52 cam_periph.c
--- cam_periph.c 10 Sep 2003 18:23:43 -0000 1.52
+++ cam_periph.c 19 Sep 2003 17:25:58 -0000
@@ -975,7 +975,7 @@
sense_key = saved_ccb->csio.sense_data.flags;
sense_key &= SSD_KEY;
if (sense_key != SSD_KEY_NO_SENSE) {
- saved_ccb->ccb_h.flags |=
+ saved_ccb->ccb_h.status |=
CAM_AUTOSNS_VALID;
xpt_print_path(saved_ccb->ccb_h.path);
printf("Recovered Sense\n");
--
Thomas.Quinot at Cuivre.FR.EU.ORG
More information about the freebsd-scsi
mailing list