Date: Wed, 15 Jul 1998 10:40:07 -0600 (MDT) From: "Justin T. Gibbs" <gibbs@narnia.plutotech.com> To: Cory Kempf <ckempf@enigami.com> Cc: scsi@FreeBSD.ORG Subject: Re: Can I say NO to LUNs? Message-ID: <199807151640.KAA03157@narnia.plutotech.com> In-Reply-To: <199807151253.IAA16379@singularity.enigami.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <199807151253.IAA16379@singularity.enigami.com> you wrote:
> My scanner doesn't seem to support LUNs. Is there a way that I can
> say not to poke at them?
Does poking them crash your system? Or are you simply complaining about
the verbosity of the messages poking them creates? If a device hangs
the system up because it doesn't properly report that it doesn't support
high luns, we can add a quirk entry for that device. In the case of you
scanner, it does behave in a mostly correct fashion and we can simply
change the code to shut up about the failure.
Here are some sample patches that should do this:
--
Justin
==== //depot/cam/sys/cam/cam_xpt.c#119 - /a/perforce/src/sys/cam/cam_xpt.c ====
*** /tmp/tmp.3143.0 Wed Jul 15 10:39:12 1998
--- /a/perforce/src/sys/cam/cam_xpt.c Wed Jul 15 10:36:10 1998
***************
*** 3400,3406 ****
break;
}
}
! } else if (cam_periph_error(done_ccb, 0, SF_RETRY_UA,
&softc->saved_ccb) == ERESTART) {
return;
} else if ((done_ccb->ccb_h.status & CAM_SIM_QFRZN) != 0) {
--- 3400,3409 ----
break;
}
}
! } else if (cam_periph_error(done_ccb, 0,
! done_ccb->ccb_h.target_lun > 0
! ? SF_RETRY_UA|SF_QUIET_IR
! : SF_RETRY_UA,
&softc->saved_ccb) == ERESTART) {
return;
} else if ((done_ccb->ccb_h.status & CAM_SIM_QFRZN) != 0) {
==== //depot/cam/sys/cam/scsi/scsi_all.c#43 - /a/perforce/src/sys/cam/scsi/scsi_all.c ====
*** /tmp/tmp.3143.1 Wed Jul 15 10:39:12 1998
--- /a/perforce/src/sys/cam/scsi/scsi_all.c Wed Jul 15 10:34:52 1998
***************
*** 2110,2117 ****
error = 0;
break;
- case SSD_KEY_NOT_READY:
case SSD_KEY_ILLEGAL_REQUEST:
case SSD_KEY_DATA_PROTECT:
case SSD_KEY_VOLUME_OVERFLOW:
case SSD_KEY_BLANK_CHECK: /* should be filtered out by
--- 2110,2121 ----
error = 0;
break;
case SSD_KEY_ILLEGAL_REQUEST:
+ if ((sense_flags & SF_QUIET_IR) != 0)
+ print_sense = FALSE;
+
+ /* FALLTHROUGH */
+ case SSD_KEY_NOT_READY:
case SSD_KEY_DATA_PROTECT:
case SSD_KEY_VOLUME_OVERFLOW:
case SSD_KEY_BLANK_CHECK: /* should be filtered out by
==== //depot/cam/sys/cam/scsi/scsi_all.h#30 - /a/perforce/src/sys/cam/scsi/scsi_all.h ====
*** /tmp/tmp.3143.2 Wed Jul 15 10:39:12 1998
--- /a/perforce/src/sys/cam/scsi/scsi_all.h Wed Jul 15 10:34:46 1998
***************
*** 599,604 ****
--- 599,605 ----
#define SF_RETRY_UA 0x01
#define SF_NO_PRINT 0x02
+ #define SF_QUIET_IR 0x04 /* Be quiet about Illegal Request reponses */
void scsi_print_inquiry(struct scsi_inquiry_data *inq_data);
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807151640.KAA03157>
