From: Douglas Gilbert <dougg@torque.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] SCSI core: always store >= 36 bytes of INQUIRY data
Date: Mon, 30 Oct 2006 11:40:42 -0500 [thread overview]
Message-ID: <45462B0A.3070909@torque.net> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0610281133100.2757-100000@netrider.rowland.org>
Alan Stern wrote:
> On Fri, 27 Oct 2006, Douglas Gilbert wrote:
>
>> Some more information on this subject: LLDs (including
>> pseudo ones like usb-storage) really should set the
>> Scsi_Cmnd::resid field to show, in the case of an
>> INQUIRY, when 36 bytes were requested, less bytes
>> were returned.
>
> Indeed. usb-storage does do this. However the devices addressed by this
> patch do send 36 bytes of data, all apparently plausible, just as you
> say directly-attached ATA disks do. So checking the residue wouldn't
> help.
>
>> That OS from Redmond may have a hand here as well.
>> Directly attached ATA disks are found in SCSI scans and
>> respond to SCSI INQUIRY commands with plausible vendor,
>> model and revision strings but the additional length
>> field (byte 4 in the response) is set to 0. So code
>> could use that as a hint to stop sending further SCSI
>> commands and start sending ATA commands. ATA disks
>> behind USB and IEEE 1394 don't appear in SCSI scans
>> but do appear as "Physical Drives" and do respond
>> to SCSI INQUIRY commands properly.
>
> I don't understand this. What do you mean, they don't appear in SCSI
> scans? They _are_ detected by scsi_probe_lun(). But they probably don't
> show any special ATA signature in the INQUIRY data, since that data is
> generally determined by the firmware in the USB/1394 interface.
I'm not talking about linux!
For a code example look at sg_scan.c in sg3_utils version
1.22 in the sg_do_wscan() function, particularly the setting
of the 'dubious_scsi' field.
We have seen this before, especially with INQUIRY responses:
the quirks of that OS go some way to explaining why we see
some devices react they way they do.
36 byte INQUIRY responses (or greater) have been mandatory
since SCSI-2 (1992) and that means the additional length
field must be >= 31 . These devices don't give a hoot about
formal standards, only one informal one counts.
Doug Gilbert
next prev parent reply other threads:[~2006-10-30 16:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-26 21:11 [PATCH] SCSI core: always store >= 36 bytes of INQUIRY data Alan Stern
2006-10-27 21:43 ` Patrick Mansfield
2006-10-27 22:10 ` Douglas Gilbert
2006-10-28 15:41 ` Alan Stern
2006-10-30 16:40 ` Douglas Gilbert [this message]
2006-10-28 15:33 ` Alan Stern
2006-10-28 18:30 ` Patrick Mansfield
2006-10-30 15:20 ` Alan Stern
2006-10-30 16:32 ` Stefan Richter
2006-10-31 21:26 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45462B0A.3070909@torque.net \
--to=dougg@torque.net \
--cc=linux-scsi@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox