diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-11-18 15:59:24 +0100 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2011-11-24 12:01:07 -0500 |
commit | a3fea015398d7c41db5b5d348fe3f6d76236b6be (patch) | |
tree | e647ff600b0f1a62d0338bab3271062dc186c361 | |
parent | e66fb31eac3e6be6aaab548c229af9bb1ba55c33 (diff) | |
download | seabios-a3fea015398d7c41db5b5d348fe3f6d76236b6be.zip seabios-a3fea015398d7c41db5b5d348fe3f6d76236b6be.tar.gz seabios-a3fea015398d7c41db5b5d348fe3f6d76236b6be.tar.bz2 |
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.
-rw-r--r-- | src/boot.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); } |