public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: mark_k@iname.com
Cc: linux-usb@vger.kernel.org
Subject: Re: USB2 Link USB-SCSI converter and LUNs
Date: Tue, 19 Oct 2021 15:01:40 +0200	[thread overview]
Message-ID: <YW7BtIHwVH3n13yH@kroah.com> (raw)
In-Reply-To: <trinity-7db5ef0c-99a3-4fa0-a1d7-1e57c80cc4ff-1634648008985@3c-app-mailcom-lxa13>

On Tue, Oct 19, 2021 at 02:53:29PM +0200, mark_k@iname.com wrote:
> On Tuesday, October 19, 2021 at 12:18 PM "Greg KH" <gregkh@linuxfoundation.org> wrote:
> > On Tue, Oct 19, 2021 at 12:15:09PM +0200, mark_k@iname.com wrote:
> > > I have a Core Micro Systems USB2 Link USB-SCSI converter (07B4:0380).
> > >
> > > Adding an entry to unusual_devs.h should get it to work, just needing
> > > USB_PR_BULK. That should at least allow the connected device with SCSI ID 0
> > > to be accessed.
> >
> > Why do you need any quirk at all for this?
> 
> My mistake, sorry. Its interface descriptor has
>   bInterfaceClass 0xFF
>   bInterfaceSubClass 0x06
>   bInterfaceProtocol 0x50
> so an entry with USB_SC_DEVICE, USB_PR_DEVICE would work.

Again, why is a quirk needed at all?

> > > I'm just wondering, how does the usb-storage driver handle these cases:
> > >
> > >  - (What it thinks are) LUNs are not contiguous. Suppose the user has two
> > >    SCSI devices in the chain, one with ID 0 the other with ID 3. Would it
> > >    scan LUNs (which map to separate targets) 1, 2, 4, 5 and 6? Or would it
> > >    give up on getting no response from LUN 1?
> > >
> > >  - "LUN" 0 is not present. E.g. where the connected SCSI devices have IDs 1
> > >    and 3.
> > >
> > >  - When different "LUNs" are completely different devices (e.g. one a
> > >    CD-ROM, another a hard disk, another a tape drive).
> > >
> >
> > That should all be up to the scsi layer in the kernel.  If this device
> > is not following the standard, how is it supposed to work at all?
> >
> > Does it require custom drivers for other operating systems?
> 
> My guess is that (with quirk entry) it will work when there is a SCSI
> device with ID 0. If all other devices in the chain have contiguous IDs
> they could be accessible too.
> 
> I can tell Windows to use its built-in mass storage driver and that works
> to access the device with ID 0 only. I haven't yet checked with more than
> one SCSI device in the chain.

Does this work properly with Linux in this way with no quirk as well?

And how do you know that the device will work with additional scsi
devices?

> It could/should be possible to properly support multiple targets and LUNs
> by using a similar method to the SCM USB-SCSI converters. (Those, after a
> special intitialisation request, take the target ID from the *upper* 4 bits
> of CBW byte 13.)

Are you sure this device actually supports this?  If so, what operating
system does it work on?

thanks,

greg k-h

  reply	other threads:[~2021-10-19 13:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 10:15 USB2 Link USB-SCSI converter and LUNs mark_k
2021-10-19 11:18 ` Greg KH
2021-10-19 12:53   ` mark_k
2021-10-19 13:01     ` Greg KH [this message]
2021-10-19 16:37       ` mark_k
2021-10-19 17:25         ` Alan Stern
2021-10-19 14:32 ` Alan Stern
2021-10-19 16:49   ` mark_k

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=YW7BtIHwVH3n13yH@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mark_k@iname.com \
    /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