On Wed, 29 Mar 2000, Richard Henderson wrote:
> Attached is a patch that cures the oops, but that's all. If things
> had been working properly, this surely wouldn't be needed. Of course,
> the overruns should probably be prevented by some means...
Btw. I guess hc_reset would need to return error status. It's obviously of
no use to continue if things break there.
> num_ports = readl (&ohci->regs->roothub.a) & 0xff;
I just compared the definition of readl on alpha agains the others:
sparc64/i386:
extern __inline__ unsigned int _readl(unsigned long addr)
alpha:
extern unsigned long _readl(unsigned long addr);
I guess this could give some clue. Maybe there are places where ohci
driver expects unsigned int (garbage in the upper bits etc.). However
based on the log it starts going bad from the very beginning. Maybe a
print-out of the OHCI registers would help to determine if it's pointing
to the correct location at all.
--- linux-2.3.99-pre3/drivers/usb/usb-ohci.c Fri Mar 24 01:02:18 2000
+++ linux/drivers/usb/usb-ohci.c Wed Mar 29 14:51:45 2000
@@ -1475,7 +1475,7 @@
/* reset the HC not the BUS */
-static void hc_reset (ohci_t * ohci)
+static int hc_reset (ohci_t * ohci)
{
int timeout = 30;
int smm_timeout = 50; /* 0,5 sec */
@@ -1487,7 +1487,7 @@
wait_ms (10);
if (--smm_timeout == 0) {
err("USB HC TakeOver failed!");
- break;
+ return -1;
}
}
}
@@ -1501,11 +1501,12 @@
while ((readl (&ohci->regs->cmdstatus) & 0x01) != 0) { /* 10us Reset */
if (--timeout == 0) {
err("USB HC reset timed out!");
- return;
+ return -1;
}
udelay (1);
}
ohci->disabled = 0;
+ return 0;
}
/*-------------------------------------------------------------------------*/
@@ -1707,7 +1708,12 @@
INIT_LIST_HEAD (&ohci->ohci_hcd_list);
list_add (&ohci->ohci_hcd_list, &ohci_hcd_list);
- hc_reset (ohci);
+ if (hc_reset (ohci) < 0) {
+ hc_release_ohci (ohci);
+ return -ENODEV;
+ }
+
writel (ohci->hc_control = OHCI_USB_RESET, &ohci->regs->control);
wait_ms (10);
usb_register_bus (ohci->bus);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]