From nobody@FreeBSD.org  Sun Feb 10 02:37:06 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 10B6216A417
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 10 Feb 2008 02:37:06 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id BC49B13C44B
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 10 Feb 2008 02:37:05 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m1A2Ytvh056632
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 10 Feb 2008 02:34:55 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m1A2YtLX056631;
	Sun, 10 Feb 2008 02:34:55 GMT
	(envelope-from nobody)
Message-Id: <200802100234.m1A2YtLX056631@www.freebsd.org>
Date: Sun, 10 Feb 2008 02:34:55 GMT
From: Rick Voland <rpvoland@spamcop.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: scsi_sg incompatible with scanners
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         120487
>Category:       kern
>Synopsis:       [sg] scsi_sg incompatible with scanners
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-scsi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 10 02:40:00 UTC 2008
>Closed-Date:    Tue May 07 16:45:05 UTC 2013
>Last-Modified:  Tue May 07 16:45:05 UTC 2013
>Originator:     Rick Voland
>Release:        FreeBSD 6.3-RELEASE
>Organization:
>Environment:
FreeBSD brian.local.bsd 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Mon Jan 21 08:23:32 CST 2008     root@brian.local.bsd:/usr/obj/usr/src/sys/BRIAN  i386
>Description:
My scanners are not detected in the dmesg output when I use the new
scsi_sg device added to my usual SMP kernel.  I added the following line
to my usual kernel:

device                sg              # pass-through device for Linux

The sg* devices were only created when I used the new (sg) kernel and
the scanners were turned off.  When the scanners were turned on, the new
(sg) kernel did not detect the scanners in the dmesg output.

I normally use an Adaptec AHA-1542CP for these external SCSI devices.
The scanners are correctly identified and pass* devices created with my
usual (lacking sg) kernel.  The sg* devices were only created with the
new (sg) kernel when the scanners were turned off.

For diagnosis only, I moved these external scanners to my DPT PM2044UW
PCI SCSI controller.  The scanners were not detected on this controller
when I booted with the new (sg) kernel, nor were the sg* or pass* devices
created.

In all cases, the SCSI devices were correctly enumerated by the SCSI
controllers prior to the FreeBSD boot selection menu.  All SCSI devices
had appropriately unique SCSI ID numbers.  One scanner works fine already
in FreeBSD with SANE, but the other has no driver in SANE, so I hope to
use the sg* devices for the Linux version of Vuescan (www.hamrick.com)
which loads fine but does not yet see the scanners.

1) I could find no documentation for the scsi_sg devices, so I assume
that one line above is the correct way to make the sg* devices available.

2) It is odd that the sg* devices are only created when the scanners are
not detected, and this is true for both SCSI controllers.


>How-To-Repeat:
Boot FreeBSD with kernel containing scsi_sg device and scanners turned on
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-scsi 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Feb 10 04:31:22 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120487 

From: Scott Long <scottl@samsco.org>
To: bug-followup@FreeBSD.org, rpvoland@spamcop.net
Cc:  
Subject: Re: kern/120487: [sg] scsi_sg incompatible with scanners
Date: Sun, 10 Feb 2008 13:48:37 -0700

 Please post the output of "camcontrol devlist -v" with then scanner 
 connected and the sg device compiled in.
 
 Scott

From: Rick Voland <rpvoland@spamcop.net>
To: Scott Long <scottl@samsco.org>
Cc: bug-followup@FreeBSD.org, rpvoland@spamcop.net
Subject: Re: kern/120487: [sg] scsi_sg incompatible with scanners
Date: Sun, 10 Feb 2008 18:32:53 -0600

 So, the scanners are detected both ways.  I looked, but didn't see the 
 pass* and sg* devices yesterday with sg in the kernel.
 
 #with sg in kernel and scanners turned on
 
 $ sudo camcontrol devlist -v
 Password:
 scbus0 on dpt0 bus 0:
 <SEAGATE ST318417W 0105>           at scbus0 target 0 lun 0 (da0,sg0,pass0)
 <SEAGATE ST36530W 1206>            at scbus0 target 1 lun 0 (da1,sg1,pass1)
 <PLEXTOR CD-ROM PX-32CS 1.01>      at scbus0 target 3 lun 0 (sg2,pass2,cd0)
 <  >                               at scbus0 target -1 lun -1 ()
 scbus1 on aha1 bus 0:
 <Minolta #2883 1.02>               at scbus1 target 2 lun 0 (sg3,pass3)
 <HP C5110A 3701>                   at scbus1 target 3 lun 0 (sg4,pass4)
 <YAMAHA CRW6416S 1.0d>             at scbus1 target 4 lun 0 (sg5,pass5,cd1)
 <CWS ORB2 -SE U ID 5 D42>          at scbus1 target 5 lun 0 (da2,sg6,pass6)
 <  >                               at scbus1 target -1 lun -1 ()
 scbus-1 on xpt0 bus 0:
 <  >                               at scbus-1 target -1 lun -1 (xpt0)
 $
 
 
 ##############################################
 #without sg in kernel, with scanners turned on
 
 $ sudo camcontrol devlist -v
 Password:
 scbus0 on dpt0 bus 0:
 <SEAGATE ST318417W 0105>           at scbus0 target 0 lun 0 (da0,pass0)
 <SEAGATE ST36530W 1206>            at scbus0 target 1 lun 0 (da1,pass1)
 <PLEXTOR CD-ROM PX-32CS 1.01>      at scbus0 target 3 lun 0 (pass2,cd0)
 <  >                               at scbus0 target -1 lun -1 ()
 scbus1 on aha2 bus 0:
 <Minolta #2883 1.02>               at scbus1 target 2 lun 0 (pass3)
 <HP C5110A 3701>                   at scbus1 target 3 lun 0 (pass4)
 <YAMAHA CRW6416S 1.0d>             at scbus1 target 4 lun 0 (pass5,cd1)
 <CWS ORB2 -SE U ID 5 D42>          at scbus1 target 5 lun 0 (da2,pass6)
 <  >                               at scbus1 target -1 lun -1 ()
 scbus-1 on xpt0 bus 0:
 <  >                               at scbus-1 target -1 lun -1 (xpt0)
 $
 
 ----
 

From: Scott Long <scottl@samsco.org>
To: Rick Voland <rpvoland@spamcop.net>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/120487: [sg] scsi_sg incompatible with scanners
Date: Mon, 11 Feb 2008 09:54:40 -0700

 Because of the experimental nature of the sg driver, I decided to not
 have its presence announced on the console like it is for other devices.
 
 So now that your scanner has been associated with an sg device node, 
 does it work?
 
 Scott

From: Rick Voland <rpvoland@spamcop.net>
To: Scott Long <scottl@samsco.org>
Cc: Rick Voland <rpvoland@spamcop.net>, bug-followup@FreeBSD.org
Subject: Re: kern/120487: [sg] scsi_sg incompatible with scanners
Date: Mon, 11 Feb 2008 22:40:13 -0600

 Vuescan-8.4.56 loads the GUI but does not recognize either scanner. 
 xsane correctly recognizes the HP-5p scanner even with sg in the kernel.
 
 I tried loading
 none   /compat/linux/proc linprocfs  rw   0   0
 
 or
 
 none  /proc   linprocfs   rw      0     0
 
 
 ---------
 
 I can boot Redhat 9 Linux and run an older copy of vuescan on this same 
 computer if that would be helpful.
 

From: Rick Voland <rpvoland@spamcop.net>
To: Scott Long <scottl@samsco.org>
Cc: Rick Voland <rpvoland@spamcop.net>, bug-followup@FreeBSD.org
Subject: Re: kern/120487: [sg] scsi_sg incompatible with scanners
Date: Sun, 02 Mar 2008 19:19:22 -0600

 I confirmed today that Vuescan-8.4.62 (latest, released Feb 28, 2008) 
 works on my copy of Redhat 9 on this same computer, and recognizes both 
 of my SCSI scanners.
 
 My copy of Redhat 9 uses kernel version 2.4.20-31.9smp.
 
 I copied the contents of /proc/scsi/scsi from Redhat 9 into a text file 
 so I can insert that file into FreeBSD (but haven't done this yet).
 
 
 
 
State-Changed-From-To: open->feedback 
State-Changed-By: sbruno 
State-Changed-When: Tue May 7 16:00:01 UTC 2013 
State-Changed-Why:  
Can you retest this on newer stable/9 releases if you get a chance? 

There's quite a bit of change in sg since the original report 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120487 
State-Changed-From-To: feedback->closed 
State-Changed-By: sbruno 
State-Changed-When: Tue May 7 16:44:11 UTC 2013 
State-Changed-Why:  
Submitter no longer can test the issue. 

http://lists.freebsd.org/pipermail/freebsd-scsi/2013-May/005892.html 


http://www.freebsd.org/cgi/query-pr.cgi?pr=120487 
>Unformatted:
