[4939] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: ncr53c8xx 3.0 & scanner

daemon@ATHENA.MIT.EDU (Gerard Roudier)
Sat Oct 17 22:06:53 1998

Date: 	Sat, 17 Oct 1998 17:51:12 +0200 (MET DST)
From: Gerard Roudier <groudier@club-internet.fr>
To: Peter Daum <gator@cs.tu-berlin.de>
cc: linux-scsi@vger.rutgers.edu
In-Reply-To: <Pine.LNX.4.02A.9810162358570.4046-100000@swamp.bayern.net>



On Sat, 17 Oct 1998, Peter Daum wrote:

> Hi,
> 
> On Fri, 16 Oct 1998, Gerard Roudier wrote:
> 
> [...]
> > 
> > Just enter: scsiinfo -i /dev/sge
> > 
> > You should get an output like the following: (I got it from a hard drive)
> [...]
> > > opening the scsi generic devices is not allowed, no matter how
> > > the file permissions are set:
> > >    open("/dev/sge", O_RDONLY)              = -1 EACCES (Permission denied)
> 
> You obviously misunderstood me: All I can get from scsiinfo is a
> "permission denied" message; the line above was quoted from an

Obviously.

Looking into the sg driver code, it seems O_RDWR is required. This should  
explain the problem.

> That Adaptec utility program I was talking about probably also
> uses an inquiry command to find out the device capabilities.
> According to this program, the scanner itself says that tagged
> command queuing is unsupported.

For once, I trust 100% Adaptec. ;-)
But I want to be 100%++ sure that the INQUIRY data are not the cause of 
the problem.

I could only enable tags for Hard Disks as previous driver versions do, 
but there is nowadays other SCSI devices that are fast and may gain 
advantages of using tagged commands.

If you hack linux/drivers/scsi/sg.c so that it will accept a O_RDONLY 
open(), then this should be enough for scsiinfo to use SCSI ioctls and 
to retrieve the INQUIRY data from the device.
(search "open" and comment the check against O_RDWR)
 
Regards,
   Gerard.


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post