All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	martin@lorenz.eu.org,
	USB development list <linux-usb-devel@lists.sourceforge.net>,
	SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: usb-storage / scsi : new scsi host on each plug
Date: Fri, 07 Nov 2003 16:24:16 +1000	[thread overview]
Message-ID: <3FAB3A90.402@torque.net> (raw)
In-Reply-To: <1067442814.1829.21.camel@mulgrave>

James Bottomley wrote:
> On Wed, 2003-10-29 at 09:24, Alan Stern wrote:
> 
>>>no matter which USB-storage-device I attach (tried CD-ROM, 
>>>Flash Card Reader and memory stick) I get a new scsi host
>>>every time i plug a device in.
>>>
>>>so when changing devices for several times I finally end up
>>>with /dev/scsi/host0 to 17 or more (diden't go on)
>>
>>This is a SCSI issue, not a USB one.  Maybe someone on the 
>>SCSI development list can enlighten us.  As far as I can tell, the host 
>>number is simply incremented every time a new host, of whatever sort, is 
>>added.  The numbers never get reused.
> 
> 
> This is really a design feature.  Not reusing hosts gives us time to
> clean up the old one before the new one is initialised (and prevents
> races where we could be trying to plug in a new host at the same time
> we're cleaning up the old one).

This "design feature" highlights the inadequacy of the
SCSI_IOCTL_GET_IDLUN ioctl which only allocates 8 bits for
the host number. Back to using the SCSI_IOCTL_GET_BUS_NUMBER
ioctl for mapping programs that want to work in both lk 2.4
and lk 2.6 . Since target port ids in iSCSI are url-like
(up to 255 chars) and luns can be 64 bits, a more robust
"GET_IDLUN" ioctl is needed at some stage.

Perhaps re-using host numbers after they are known to be
fully shut down would be saner.

Doug Gilbert




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

      reply	other threads:[~2003-11-07  6:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1AEoQX-0005kQ-Cz@mail.holoclan.de>
2003-10-29 15:24 ` [linux-usb-devel] usb-storage / scsi : new scsi host on each plug Alan Stern
2003-10-29 15:53   ` James Bottomley
2003-11-07  6:24     ` Douglas Gilbert [this message]

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=3FAB3A90.402@torque.net \
    --to=dougg@torque.net \
    --cc=James.Bottomley@steeleye.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=martin@lorenz.eu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.