All of lore.kernel.org
 help / color / mirror / Atom feed
* [PVUSB] usbbusname is changing after rebooting
@ 2009-05-18 15:35 Sergey
  2009-05-19  2:04 ` Noboru Iwamatsu
  2009-09-04 17:17 ` Neobiker
  0 siblings, 2 replies; 4+ messages in thread
From: Sergey @ 2009-05-18 15:35 UTC (permalink / raw)
  To: xen-devel

Hello, all!
Hello, Noboru!

Hotplug rule for PVUSB consists of
<usbbusname>:<domid>:<vusb number>:<port number>

I noticed that usbbusname sometimes changes from time to time after host 
rebooting.
For example, yesterday i had it as "6-1", today it is "2-1".

I saw the topic about usbbusname on replugging.
http://lists.xensource.com/archives/html/xen-devel/2009-04/msg00400.html
Replugging doesn't change the usbbusname, but what about host rebooting?

 I suppose, usb bus number is assigned during booting and may vary each 
time.
To identify usb device correctly i have to see dmesg after rebooting. 
It's quite inconvinient, imho.

What do you think about another method of USB naming like 
VendorId:ProductId of usb devices to be grabbed by domU?
It seems that HVM guests use this method by means of the parameter 
'usbdevice'.

Thank you.

Sergey.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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

* Re: [PVUSB] usbbusname is changing after rebooting
  2009-05-18 15:35 [PVUSB] usbbusname is changing after rebooting Sergey
@ 2009-05-19  2:04 ` Noboru Iwamatsu
  2009-09-04 17:17 ` Neobiker
  1 sibling, 0 replies; 4+ messages in thread
From: Noboru Iwamatsu @ 2009-05-19  2:04 UTC (permalink / raw)
  To: tsv.devel; +Cc: xen-devel

Hi,

 > Replugging doesn't change the usbbusname, but what about host rebooting?

usb bus number is assigned in order of the host controller registration.
This order is normally defined by the PCI device number of that host 
controller.

So, when you change the host controller's PCI device number (e.g. 
changing BIOS setting, or, adding new PCI devices), the usbbusname of 
that host controller might be changed.

 > What do you think about another method of USB naming like
 > VendorId:ProductId of usb devices to be grabbed by domU?
 > It seems that HVM guests use this method by means of the parameter
 > 'usbdevice'.

It seems that qemu-compatible rule would be nice, but if you connect
two or more same devices (they all have same Ids), can this rule 
properly control which device is assigned to which domain?

As you pointed out, current hotplug-rule is not friendly:-)
However, originally the usbdevice naming scheme of the linux kernel is 
quite complex thing.
We might have to solve this complexity by xend or other user-space programs.

Regards,

Noboru

Sergey wrote:
> Hello, all!
> Hello, Noboru!
> 
> Hotplug rule for PVUSB consists of
> <usbbusname>:<domid>:<vusb number>:<port number>
> 
> I noticed that usbbusname sometimes changes from time to time after host 
> rebooting.
> For example, yesterday i had it as "6-1", today it is "2-1".
> 
> I saw the topic about usbbusname on replugging.
> http://lists.xensource.com/archives/html/xen-devel/2009-04/msg00400.html
> Replugging doesn't change the usbbusname, but what about host rebooting?
> 
> I suppose, usb bus number is assigned during booting and may vary each 
> time.
> To identify usb device correctly i have to see dmesg after rebooting. 
> It's quite inconvinient, imho.
> 
> What do you think about another method of USB naming like 
> VendorId:ProductId of usb devices to be grabbed by domU?
> It seems that HVM guests use this method by means of the parameter 
> 'usbdevice'.
> 
> Thank you.
> 
> Sergey.
> 
> 

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

* Re: [PVUSB] usbbusname is changing after rebooting
  2009-05-18 15:35 [PVUSB] usbbusname is changing after rebooting Sergey
  2009-05-19  2:04 ` Noboru Iwamatsu
@ 2009-09-04 17:17 ` Neobiker
  2009-09-07  9:20   ` Sergey Tovpeko
  1 sibling, 1 reply; 4+ messages in thread
From: Neobiker @ 2009-09-04 17:17 UTC (permalink / raw)
  To: xen-devel


Hi Sergey,

i thought i had trouble with that too, until i figured out that the USB-Bus
only seemed to have changed, when i changed the connected Device e.g. from
USB-Printer to USB-Stick. The Printer uses the UHCI Controller (3-1), versus
the USB-Stick connected to the EHCI Controller (5-1). Besides this the USB
ports are stable on my Debian Lenny System. 

So in my summary, the USB-Bus don't changes if you don't switch from UHCI to
EHCI according to the connected device.

regards 
Neobiker 


Sergey-53 wrote:
> 
> Hello, all!
> Hello, Noboru!
> 
> Hotplug rule for PVUSB consists of
> <usbbusname>:<domid>:<vusb number>:<port number>
> 
> I noticed that usbbusname sometimes changes from time to time after host 
> rebooting.
> For example, yesterday i had it as "6-1", today it is "2-1".
> 
> I saw the topic about usbbusname on replugging.
> http://lists.xensource.com/archives/html/xen-devel/2009-04/msg00400.html
> Replugging doesn't change the usbbusname, but what about host rebooting?
> 
>  I suppose, usb bus number is assigned during booting and may vary each 
> time.
> To identify usb device correctly i have to see dmesg after rebooting. 
> It's quite inconvinient, imho.
> 
> What do you think about another method of USB naming like 
> VendorId:ProductId of usb devices to be grabbed by domU?
> It seems that HVM guests use this method by means of the parameter 
> 'usbdevice'.
> 
> Thank you.
> 
> Sergey.
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
> 
> 

-- 
View this message in context: http://www.nabble.com/-PVUSB--usbbusname-is-changing-after-rebooting-tp23599966p25298424.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

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

* Re: [PVUSB] usbbusname is changing after rebooting
  2009-09-04 17:17 ` Neobiker
@ 2009-09-07  9:20   ` Sergey Tovpeko
  0 siblings, 0 replies; 4+ messages in thread
From: Sergey Tovpeko @ 2009-09-07  9:20 UTC (permalink / raw)
  To: Neobiker; +Cc: xen-devel

Hi, Neobiker!

Usbbusnumber is the combination of 'usb host controller' number and 'hub 
port' number.
I'm not USB expert, but as i understood, 'USB host controller' number is 
assigned during computer booting by 'usb core driver'. And on my machine 
I see that the same USB host controller may get different number on 
rebooting. I suppose here is a race between controllers on device 
probing process. But i don't have any technical referencies of this.
It's my notion only. And, perhaps it's the question of PCI devices 
detection process, because USB host controller is part of a PCI device.

And, in your case, you have to different usb host controllers and they 
have got different numbers.
UHCI is the USB 1.0 standard  with low data throughput, this enough for 
printers. USB stick requires more  speed for data transfer, and USB 2.0 
(EHCI controller) is granted for it.
I suppose, you're lucky and you have the stable numbers for each 
controllers.

Sergey.
> Hi Sergey,
>
> i thought i had trouble with that too, until i figured out that the USB-Bus
> only seemed to have changed, when i changed the connected Device e.g. from
> USB-Printer to USB-Stick. The Printer uses the UHCI Controller (3-1), versus
> the USB-Stick connected to the EHCI Controller (5-1). Besides this the USB
> ports are stable on my Debian Lenny System. 
>
> So in my summary, the USB-Bus don't changes if you don't switch from UHCI to
> EHCI according to the connected device.
>
> regards 
> Neobiker 
>
>
> Sergey-53 wrote:
>   
>> Hello, all!
>> Hello, Noboru!
>>
>> Hotplug rule for PVUSB consists of
>> <usbbusname>:<domid>:<vusb number>:<port number>
>>
>> I noticed that usbbusname sometimes changes from time to time after host 
>> rebooting.
>> For example, yesterday i had it as "6-1", today it is "2-1".
>>
>> I saw the topic about usbbusname on replugging.
>> http://lists.xensource.com/archives/html/xen-devel/2009-04/msg00400.html
>> Replugging doesn't change the usbbusname, but what about host rebooting?
>>
>>  I suppose, usb bus number is assigned during booting and may vary each 
>> time.
>> To identify usb device correctly i have to see dmesg after rebooting. 
>> It's quite inconvinient, imho.
>>
>> What do you think about another method of USB naming like 
>> VendorId:ProductId of usb devices to be grabbed by domU?
>> It seems that HVM guests use this method by means of the parameter 
>> 'usbdevice'.
>>
>> Thank you.
>>
>> Sergey.
>>
>>
>> -- 
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>>
>>
>>     
>
>   

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

end of thread, other threads:[~2009-09-07  9:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-18 15:35 [PVUSB] usbbusname is changing after rebooting Sergey
2009-05-19  2:04 ` Noboru Iwamatsu
2009-09-04 17:17 ` Neobiker
2009-09-07  9:20   ` Sergey Tovpeko

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.