[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH V4 3/7] libxl: add pvusb API



On 06/17/2015 12:03 AM, Jürgen Groß wrote:
On 06/16/2015 06:51 PM, Ross Philipson wrote:
On 06/16/2015 12:39 PM, George Dunlap wrote:
On 06/16/2015 05:32 PM, Ian Jackson wrote:
I have just discovered that the value used in /dev/disk/by-path is not
from sysfs, or at least, not directly.

udev cobbles it together with a bunch of string mangling, from
information mostly from sysfs.  There is no corresponding thing for
usb devices.

So Linux, the kernel, does not actually provide a stable device name
string.  This is obviously absurd, but I think fixing it is out of
scope.

I suggest we provide a facility to allow a user to specify a fnmatch
glob pattern to be applied to the sysfs path.  That way when they see
their device is
   /devices/pci0000:00/0000:00:1d.7/usb1/1-1
they can write
   /devices/pci0000:00/0000:00:1d.7/usb*/*-1
which will match exactly and only the right thing.

What about Juergen's system that has two usbN directories in a single
pci node?

Quoting:
---
Hmm, perhaps. On my system I've got:

/sys/devices/pci0000:00/0000:00:14.0/usb3/
/sys/devices/pci0000:00/0000:00:14.0/usb4/

So two busses on one pci bus address. Are usb3 and usb4 always in this
order or are they sometimes just numbered the other way round?
---

Assuming that usb3 and usb4 are actually distinct busses, and they might
both have something plugged into port; in which case a glob like this:

devices/pci0000:00/0000:00:14.0/usb*/*-1

Might match both of the following:

/sys/devices/pci0000:00/0000:00:14.0/usb3/3-1
/sys/devices/pci0000:00/0000:00:14.0/usb4/4-1

Is that an xHCI host controller? If so that might be how the system
represents the 2 logical (USB2/USB3) root hubs - each as its own
separate bus.

See my other reply: this is the case. So Ian's suggestion would still
work.

Ack, saw it, thanks.



Juergen



--
Ross Philipson

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.