From: Paolo Bonzini Date: Fri, 18 Nov 2011 14:59:24 +0000 (+0100) Subject: usb: fix boot paths X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=seabios.git;a=commitdiff_plain;h=2762de0867345d059ab70690f98144921f8e151b usb: fix boot paths The fw paths for USB devices that SeaBIOS computes are off-by-one, because QEMU builds those paths with a numbering that starts from one (see usb_fill_port and usb_hub_initfn in QEMU). Fix that so that the numbering agrees. --- diff --git a/src/boot.c b/src/boot.c index 119f290..93928d3 100644 --- a/src/boot.c +++ b/src/boot.c @@ -191,9 +191,9 @@ int bootprio_find_usb(struct pci_device *pci, u64 path) for (i=56; i>0; i-=8) { int port = (path >> i) & 0xff; if (port != 0xff) - p += snprintf(p, desc+sizeof(desc)-p, "/hub@%x", port); + p += snprintf(p, desc+sizeof(desc)-p, "/hub@%x", port+1); } - snprintf(p, desc+sizeof(desc)-p, "/*@%x", (u32)(path & 0xff)); + snprintf(p, desc+sizeof(desc)-p, "/*@%x", (u32)(path & 0xff)+1); return find_prio(desc); }