linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [linux-usb-devel] usb-storage / scsi : new scsi host on each plug
       [not found] <E1AEoQX-0005kQ-Cz@mail.holoclan.de>
@ 2003-10-29 15:24 ` Alan Stern
  2003-10-29 15:53   ` James Bottomley
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Stern @ 2003-10-29 15:24 UTC (permalink / raw)
  To: martin; +Cc: USB development list, SCSI development list

On Wed, 29 Oct 2003 martin@lorenz.eu.org wrote:

> Dear friends in the C-Source,
> 
> I am currently setting up my new toy, a Sharp PC-MM10, 
> banning the preinstalled XP and using a real System...
> 
> I compiled a 2.6.0-test9 kernel with USB compiled in or as module (same thing happens) and I experience the following problem:
> 
> 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)
> 
> I would like to provide more debug information and also help digging down the problem. I just need a hint, where to start searching. Is it the SCSI-driver, is it usb-storage or anywhere else?
> 
> greets and thanks
> martin

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.

Alan Stern


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-usb-devel] usb-storage / scsi : new scsi host on each plug
  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
  0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2003-10-29 15:53 UTC (permalink / raw)
  To: Alan Stern; +Cc: martin, USB development list, SCSI development list

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).

In 2.6 udev discovery should ensure these devices come back to the same
name.

James



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: usb-storage / scsi : new scsi host on each plug
  2003-10-29 15:53   ` James Bottomley
@ 2003-11-07  6:24     ` Douglas Gilbert
  0 siblings, 0 replies; 3+ messages in thread
From: Douglas Gilbert @ 2003-11-07  6:24 UTC (permalink / raw)
  To: James Bottomley
  Cc: Alan Stern, martin, USB development list, SCSI development list

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-11-07  6:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).