From owner-freebsd-scsi Wed Jul 15 09:46:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA12673 for freebsd-scsi-outgoing; Wed, 15 Jul 1998 09:46:00 -0700 (PDT) (envelope-from owner-freebsd-scsi@FreeBSD.ORG) Received: from narnia.plutotech.com (narnia.plutotech.com [206.168.67.130]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA12663 for ; Wed, 15 Jul 1998 09:45:55 -0700 (PDT) (envelope-from gibbs@narnia.plutotech.com) Received: (from gibbs@localhost) by narnia.plutotech.com (8.8.8/8.7.3) id KAA03157; Wed, 15 Jul 1998 10:40:07 -0600 (MDT) Date: Wed, 15 Jul 1998 10:40:07 -0600 (MDT) From: "Justin T. Gibbs" Message-Id: <199807151640.KAA03157@narnia.plutotech.com> To: Cory Kempf cc: scsi@FreeBSD.ORG Subject: Re: Can I say NO to LUNs? Newsgroups: pluto.freebsd.scsi In-Reply-To: <199807151253.IAA16379@singularity.enigami.com> User-Agent: tin/pre-1.4-971204 (UNIX) (FreeBSD/3.0-CURRENT (i386)) Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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