From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH V4 3/7] libxl: add pvusb API Date: Tue, 16 Jun 2015 12:21:09 +0100 Message-ID: References: <1433906441-3280-1-git-send-email-cyliu@suse.com> <1433906441-3280-4-git-send-email-cyliu@suse.com> <21887.64856.265751.921367@mariner.uk.xensource.com> <21888.1191.40486.530231@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21888.1191.40486.530231@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Wei Liu , Ian Campbell , Chunyan Liu , "xen-devel@lists.xen.org" , Jim Fehlig , Simon Cao List-Id: xen-devel@lists.xenproject.org On Tue, Jun 16, 2015 at 12:12 PM, Ian Jackson wrote: > George Dunlap writes ("Re: [Xen-devel] [PATCH V4 3/7] libxl: add pvusb API"): >> The "busid" we're talking about here will identify a device at a >> particular *port* in the USB topology; the busid will take whatever is >> plugged into that particular port. So in the example in my other >> thread, the Yubikey "busid" is 2-3.1.2; but if I were to unplug the >> yubikey and plud my mouse into that port, the mouse would then be at >> 2-3.1.2. > > What you have just said contradicts Juergen's assertion that the busid > is not stable across reboots. > > I think perhaps the difficulty is that the very first number, the usb > controller number, may not be stable, because it depends on the order > of device discovery. I wasn't considering reboots when I made my statement. According to a comment on the libusb mailing list: "The operating system does not guarantee that bus numbers will remain fixed across reboots. Usually they will (if the computer's hardware hasn't been changed), but it isn't guaranteed." [1] I just used "lsusb -v" to scan through all the devices I have connected; some of them do have a field called "iSerial", but as most of these are '0' and the ones that are non-zero are between 1 and 3, I doubt that will be much use in most cases. I don't immediately see anything that might be a unique identifier. -George [1] http://sourceforge.net/p/libusb/mailman/libusb-devel/thread/20080324215139.22289.qmail@cdy.org/