On Wed, 6 Feb 2002, Matthew Dharm wrote:
> Martin --
>
> What you've found is an issue I'm still trying to find the best solution
> to.
>
> The Linux-SCSI people (now on the CC:) have rejected the idea of making all
> INQUIRYs 36-bytes. Apparently, there are some HBA drivers which want to
> snoop the INQUIRY data in the vendor-specific area for some reason.
>
> Of course, your fix to limit all INQUIRYs processed by the usb-storage
> layer prevents userspace applications from issuing a longer INQUIRY. I've
> run across a few apps that look for a device based on 36-byte INQUIRY
> commands, and then send a longer INQUIRY reuest only after identifying a
> device that it knows supports such things.
>
> I'm thinking that the best solution is to have the SCSI layer send a
> 36-byte INQUIRY to probe if the low-level driver has the 'emulation' flag
> set.... that will also nicely cover the IEEE1394 people, who have been
> facing the same problem.
>
> Of course, I don't know if the linux-SCSI people will accept that idea.
It is not a to snoop or not to snoop issue. Some drivers are snooping
under Linux SCSI since the SCSI is late regarding latest SCSI
specifications. The sym driver does not snoop INQUIRY data under FreeBSD
but does snoop under Linux.
On paper, performing some short INQUIRY prior to a normal INQUIRY should
not harm. Just it will change behaviour and may confuse drivers that snoop
the INQUIRY data. Please do it first in development kernel so that this
will allow time to fix any side effect without breaking stable kernel.
For my part, if I had a device that fails INQUIRY I would try to get
reimbursed and if not possible I would break it into pieces and throw it
far away. Software is hard to maintain. Any additional code or complexity
adds possible bugs for a long time.
G�rard.
> Matt
>
> On Thu, Feb 07, 2002 at 12:52:52AM +0100, Martin Wilck wrote:
> >
> > Hi,
> >
> > I recently bought the above device (07c4/a400/113).
> > It is a CompactFlash + Microdrive Reader.
> > Seems to be so new that it is in no hardware darta base yet.
> >
> > Couldn't get it to work on Linux first
> > (nor with bulk transport nor with datafab transport).
> >
> > After some playing with usb-robot and usb-snoopy,
> > I found the problem: the INQUIRY command passed
> > to the device (with bulk transport) requests 255 bytes
> > of information. This causes the device to go crazy, because
> > it has only 36 bytes to deliver, and I get only timeouts after that.
> >
> > By changing the transfer length of the INQUIRY command to the
> > minimum value 36, I got all my problems solved.
> >
> > I just put
> >
> > if (srb->cmnd[0] == INQUIRY)
> > srb->cmnd[4] = 36;
> >
> > at the head of usb_stor_transparent_scsi_command().
> >
> > Of course that is the Wrong Thing (TM) in general.
> >
> > But it might be worthwile to consider requesting 36 bytes only in the
> > first place, and then examine the "Additional Length" field in the data
> > returned to see if it is >32. If yes, the INQUIRY could be repeated
> > with a larger transfer length.
> >
> > If desired, I can try to write a reasonable patch for that.
> >
> > Martin
> >
> > PS: I haven't analyzed what goes wrong with the datafab transport
> > protocol, but it was more or less disastrous. The INQUIRY went fine,
> > but any attempt to load sd_mod resulted in kernel OOPSes.
> >
> > Anyway if Bulk works, no need to use datafab-specific transport,
> > right?
> >
> > PS2:�During my testing with USB-Snoopy, I saw that the Win2k driver
> > (native) sends SCSI command 0x23 to the device (unsuccessfully,
> > the device signals ILLEGAL REQUEST).
> > What command is that? I found it in no command reference.
> >
> > --
> > Martin Wilck <[EMAIL PROTECTED]>
> > Physicist & Linux system engineer at FSC <[EMAIL PROTECTED]>
> >
>
> --
> Matthew Dharm Home: [EMAIL PROTECTED]
> Maintainer, Linux USB Mass Storage Driver
>
> Why am I talking to a toilet brush?
> -- CEO
> User Friendly, 4/30/1998
>
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel