Hi Michael,
> However, it makes my kernel crash (dereferencing a NULL pointer) in
> the isp1362_probe function, specifically in 'isp1362_write_addr'.
> After much fruitless hunting, I finally found that it's the
> _BUG_ON(!irqs_disabled()); that's doing it.
>
> ( I would have hoped that it would actually say something to
> the tune of 'hey, there's a bug here', but it just crashed. )
>
When debugging the kernel it's extremely helpful to have 'Verbose
BUG() reporting' (from the section 'Kernel hacking') enabled
(CONFIG_DEBUG_BUGVERBOSE=y) which would give you the source file name
and line number of the BUG() or BUG_ON() statement.
> I will try to hunt this down or disable the _BUG_ON, but I would
> greatly appreciate any suggestions you might have.
>
> I've attached my arch/arm/mach-lh7a40x/arch-oscar.c file, where I
> specify that I have this platform device.
>
Aaargh. It was some last minute cleanup that lead to this crash. I
only compiled with CONFIG_USB_DEBUG disabled after this change which
disables the BUG_ON() checking.
Lothar Wassmann
--- linux-2.6.11-mm2/drivers/usb/host/isp1362-hcd.c 2005-04-18
09:58:21.000000000 +0200
+++ work-2.6.11-karo/drivers/usb/host/isp1362-hcd.c 2005-04-18
10:07:00.000000000 +0200
@@ -2519,13 +2519,13 @@
while (!clkrdy && time_before_eq(jiffies, t)) {
spin_lock_irqsave(&isp1362_hcd->lock, flags);
clkrdy = isp1362_read_reg16(isp1362_hcd, HCuPINT) &
HCuPINT_CLKRDY;
+ isp1362_write_reg16(isp1362_hcd, HCuPINT, HCuPINT_CLKRDY);
spin_unlock_irqrestore(&isp1362_hcd->lock, flags);
if (!clkrdy) {
msleep(4);
}
}
- isp1362_write_reg16(isp1362_hcd, HCuPINT, HCuPINT_CLKRDY);
if (!clkrdy) {
ERR("Clock not ready after %lums\n", timeout);
ret = -ENODEV;
PS: We apologize for the inconvenience.