[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/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

 -George

_______________________________________________
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®.