Blame seabios-usb_fix_boot_paths.patch
|
Justin M. Forbes |
696046 |
commit a3fea015398d7c41db5b5d348fe3f6d76236b6be
|
|
Justin M. Forbes |
696046 |
Author: Paolo Bonzini <pbonzini@redhat.com>
|
|
Justin M. Forbes |
696046 |
Date: Fri Nov 18 15:59:24 2011 +0100
|
|
Justin M. Forbes |
696046 |
|
|
Justin M. Forbes |
696046 |
usb: fix boot paths
|
|
Justin M. Forbes |
696046 |
|
|
Justin M. Forbes |
696046 |
The fw paths for USB devices that SeaBIOS computes are off-by-one,
|
|
Justin M. Forbes |
696046 |
because QEMU builds those paths with a numbering that starts from one
|
|
Justin M. Forbes |
696046 |
(see usb_fill_port and usb_hub_initfn in QEMU). Fix that so that
|
|
Justin M. Forbes |
696046 |
the numbering agrees.
|
|
Justin M. Forbes |
696046 |
|
|
Justin M. Forbes |
696046 |
diff --git a/src/boot.c b/src/boot.c
|
|
Justin M. Forbes |
696046 |
index 119f290..93928d3 100644
|
|
Justin M. Forbes |
696046 |
--- a/src/boot.c
|
|
Justin M. Forbes |
696046 |
+++ b/src/boot.c
|
|
Justin M. Forbes |
696046 |
@@ -191,9 +191,9 @@ int bootprio_find_usb(struct pci_device *pci, u64 path)
|
|
Justin M. Forbes |
696046 |
for (i=56; i>0; i-=8) {
|
|
Justin M. Forbes |
696046 |
int port = (path >> i) & 0xff;
|
|
Justin M. Forbes |
696046 |
if (port != 0xff)
|
|
Justin M. Forbes |
696046 |
- p += snprintf(p, desc+sizeof(desc)-p, "/hub@%x", port);
|
|
Justin M. Forbes |
696046 |
+ p += snprintf(p, desc+sizeof(desc)-p, "/hub@%x", port+1);
|
|
Justin M. Forbes |
696046 |
}
|
|
Justin M. Forbes |
696046 |
- snprintf(p, desc+sizeof(desc)-p, "/*@%x", (u32)(path & 0xff));
|
|
Justin M. Forbes |
696046 |
+ snprintf(p, desc+sizeof(desc)-p, "/*@%x", (u32)(path & 0xff)+1);
|
|
Justin M. Forbes |
696046 |
return find_prio(desc);
|
|
Justin M. Forbes |
696046 |
}
|
|
Justin M. Forbes |
696046 |
|