From owner-freebsd-current Mon Aug 10 11:52:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA16243 for freebsd-current-outgoing; Mon, 10 Aug 1998 11:52:20 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from pinhead.parag.codegen.com (ppp-asfm08--162.sirius.net [205.134.241.162]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA16221 for ; Mon, 10 Aug 1998 11:52:16 -0700 (PDT) (envelope-from parag@pinhead.parag.codegen.com) Received: from pinhead.parag.codegen.com (localhost.parag.codegen.com [127.0.0.1]) by pinhead.parag.codegen.com (8.8.8/8.8.8) with ESMTP id LAA00615 for ; Mon, 10 Aug 1998 11:51:55 -0700 (PDT) (envelope-from parag@pinhead.parag.codegen.com) Message-Id: <199808101851.LAA00615@pinhead.parag.codegen.com> X-Mailer: exmh version 2.0.2 2/24/98 To: freebsd-current@FreeBSD.ORG Subject: A couple of low-level (non-CAM) SCSI subsystem problems X-Face: =O'Kj74icvU|oS*<7gS/8'\Pbpm}okVj*@UC!IgkmZQAO!W[|iBiMs*|)n*`X ]pW%m>Oz_mK^Gdazsr.Z0/JsFS1uF8gBVIoChGwOy{EK=<6g?aHE`[\S]C]T0Wm X-URL: http://www.codegen.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 10 Aug 1998 11:51:54 -0700 From: Parag Patel Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I just moved my UMAX 600S scanner from my Mac to FreeBSD 3.0-CURRENT without CAM. It works with the latest sane-0.74 code (which is not yet a port - 0.73 does not work properly for this scanner). Anyway, I started getting a lot (20-50) of these errors from the SCSI subsystem in the kernel whenever it scans an image: uk1: unknown error category from host adapter code After some debug-printfs, this is due to a select-timeout (XS_SELTIMEOUT) presumably because the scanner is busy moving its scan head back to the top or doing other house-keeping, and it isn't sending back a proper busy code. A quick-n-dirty patch to scsi/scsi_ioctl.c seems to eliminate this message without causing any other effects: =================================================================== RCS file: /src/freebsd/src/sys/scsi/scsi_ioctl.c,v retrieving revision 1.31 diff -c -r1.31 scsi_ioctl.c *** scsi_ioctl.c 1998/06/07 17:12:49 1.31 --- scsi_ioctl.c 1998/08/10 18:23:41 *************** *** 121,126 **** --- 121,127 ---- break; case XS_TIMEOUT: + case XS_SELTIMEOUT: SC_DEBUG(xs->sc_link,SDEV_DB3,("timeout\n")); screq->retsts = SCCMD_TIMEOUT; break; =================================================================== Is this OK, or is there a better fix (ie switch to CAM)? The second problem is during boot-up. If the scanner is powered on during boot, FreeBSD seems to think the scanner is at every SCSI address. However, if I leave it powered offduring boot, then do a "scsi -r" after the system is running, it probes the scanner properly (at SCSI ID 4) with no bogus extra LUNs. ahc0: rev 0x00 int a irq 19 on pci0.6.0 ahc0: aic7880 Wide Channel, SCSI Id=7, 16 SCBs ahc0: waiting for scsi devices to settle scbus0 at ahc0 bus 0 sd0 at scbus0 target 0 lun 0 sd0: type 0 fixed SCSI 2 sd0: Direct-Access 4134MB (8467200 512 byte sectors) ahc0:A:1: refuses WIDE negotiation. Using 8bit transfers sd1 at scbus0 target 1 lun 0 sd1: type 0 fixed SCSI 2 sd1: Direct-Access 3067MB (6281856 512 byte sectors) ahc0:A:4: refuses WIDE negotiation. Using 8bit transfers ahc0:A:4: refuses synchronous negotiation. Using asynchronous transfers uk0 at scbus0 target 4 lun 0 uk0: type 6 fixed SCSI 2 uk0: Unknown uk1 at scbus0 target 4 lun 1 uk1: type 6 fixed SCSI 2 uk1: Unknown uk2 at scbus0 target 4 lun 2 uk2: type 6 fixed SCSI 2 uk2: Unknown uk3 at scbus0 target 4 lun 3 uk3: type 6 fixed SCSI 2 uk3: Unknown uk4 at scbus0 target 4 lun 4 uk4: type 6 fixed SCSI 2 uk4: Unknown uk5 at scbus0 target 4 lun 5 uk5: type 6 fixed SCSI 2 uk5: Unknown uk6 at scbus0 target 4 lun 6 uk6: type 6 fixed SCSI 2 uk6: Unknown uk7 at scbus0 target 4 lun 7 uk7: type 6 fixed SCSI 2 uk7: Unknown ahc0:A:6: refuses WIDE negotiation. Using 8bit transfers uk8 at scbus0 target 6 lun 0 uk8: type 4 removable SCSI 2 uk8: Unknown Perhaps the workaround is to simply switch to CAM? Since CAM isn't the default yet, I was wondering if I should send-pr these two problems or not. Thanks in advance! -- Parag Patel To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message