[SeaBIOS] [PATCH 1/3] usb-uhci: Be sure to wrap pipe->iobase in GET_FLATPTR().

Kevin O'Connor kevin at koconnor.net
Fri Nov 18 04:23:15 CET 2011


Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
---
 src/usb-uhci.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/usb-uhci.c b/src/usb-uhci.c
index 242f3ba..a78dbca 100644
--- a/src/usb-uhci.c
+++ b/src/usb-uhci.c
@@ -248,13 +248,14 @@ wait_pipe(struct uhci_pipe *pipe, int timeout)
             return 0;
         if (check_tsc(end)) {
             warn_timeout();
+            u16 iobase = GET_FLATPTR(pipe->iobase);
             struct uhci_td *td = (void*)(el_link & ~UHCI_PTR_BITS);
             dprintf(1, "Timeout on wait_pipe %p (td=%p s=%x c=%x/%x)\n"
                     , pipe, (void*)el_link, GET_FLATPTR(td->status)
-                    , inw(pipe->iobase + USBCMD)
-                    , inw(pipe->iobase + USBSTS));
+                    , inw(iobase + USBCMD)
+                    , inw(iobase + USBSTS));
             SET_FLATPTR(pipe->qh.element, UHCI_PTR_TERM);
-            uhci_waittick(pipe->iobase);
+            uhci_waittick(iobase);
             return -1;
         }
         yield();
-- 
1.7.6.4




More information about the SeaBIOS mailing list