From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RRPuk-0005Wl-Qk for qemu-devel@nongnu.org; Fri, 18 Nov 2011 09:59:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RRPuf-0008U8-7m for qemu-devel@nongnu.org; Fri, 18 Nov 2011 09:59:38 -0500 Received: from mail-gy0-f173.google.com ([209.85.160.173]:55801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RRPue-0008TM-VG for qemu-devel@nongnu.org; Fri, 18 Nov 2011 09:59:33 -0500 Received: by ghbg16 with SMTP id g16so761525ghb.4 for ; Fri, 18 Nov 2011 06:59:32 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 18 Nov 2011 15:59:24 +0100 Message-Id: <1321628364-15122-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [SeaBIOS PATCH] usb: fix boot paths List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: seabios@seabios.org Cc: qemu-devel@nongnu.org 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. --- src/boot.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/boot.c b/src/boot.c index 946850d..434bf80 100644 --- a/src/boot.c +++ b/src/boot.c @@ -205,9 +205,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); } -- 1.7.7.1