Re: [linux-usb-devel] Re: 2.6.15-rc5-mm1

From: J.A. Magallon
Date: Tue Dec 13 2005 - 08:48:42 EST


On Mon, 12 Dec 2005 22:44:57 -0500 (EST), Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:

> On Mon, 12 Dec 2005, Andrew Morton wrote:
>
> > "J.A. Magallon" <jamagallon@xxxxxxx> wrote:
> > >
> > > > Sorry for the delay. I'm just compiling all rcs from rc2 to rc5 and will
> > > > try to boot whith them.
> > > >
> > > > For the rest of your questions:
> > > > - I have no /etc/udev/agents.d/usb/usbcore
> > > > - I have killed all the devfs compat scripts/rules (BTW, when will be finally
> > > > erradicated from udev ;) ?
> > > > - Distro: Mandriva Cooker, updated daily, udev-077 now (the hangs I reported
> > > > were with 075).
> > > >
> > > > More info soon...
> > > >
> > >
> > > No problems with plain rc5. It does not seem to _always_ happen on -mm1,
> > > I thing I even got a clean boot, but just one.
> > > Detailed oops screenshot is here:
> > >
> > > http://belly.cps.unizar.es/~magallon/oops/oops.jpg
> > >
> >
> > Thanks for that.
> >
> > Let's add the usb list..
>
> Uh-oh. Looks like this one was my fault... Clashing uses of a local
> variable. :-(
>
> Does this patch fix it?
>
> Alan Stern
>
>
>
> Index: usb-2.6/drivers/usb/core/message.c
> ===================================================================
> --- usb-2.6.orig/drivers/usb/core/message.c
> +++ usb-2.6/drivers/usb/core/message.c
> @@ -1387,11 +1387,11 @@ free_interfaces:
> if (dev->state != USB_STATE_ADDRESS)
> usb_disable_device (dev, 1); // Skip ep0
>
> - n = dev->bus_mA - cp->desc.bMaxPower * 2;
> - if (n < 0)
> + i = dev->bus_mA - cp->desc.bMaxPower * 2;
> + if (i < 0)
> dev_warn(&dev->dev, "new config #%d exceeds power "
> "limit by %dmA\n",
> - configuration, -n);
> + configuration, -i);
>
> if ((ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
> USB_REQ_SET_CONFIGURATION, 0, configuration, 0,
>

Bingo! This corrected the problem. I applied it to rc5-mm2 and booted nicely.
One less bug.

A side question. Are this messages dangerous ?

hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:1d.7[D] -> GSI 23 (level, low) -> IRQ 19
PCI: Setting latency timer of device 0000:00:1d.7 to 64
ehci_hcd 0000:00:1d.7: EHCI Host Controller
PCI: cache line size of 128 is not supported by device 0000:00:1d.7
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 5
ehci_hcd 0000:00:1d.7: irq 19, io mem 0xed200000
ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb 1-1: unable to read config index 0 descriptor/all
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
usb 1-1: can't read configurations, error -71
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
usb usb5: configuration #1 chosen from 1 choice
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 8 ports detected

lspci:
00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)


Thanks for all.

But don't be too happy, I have a couple things in the queue, like SMP
kernel not booting with 'nosmp' :).

--
J.A. Magallon <jamagallon()able!es> \ Software is like sex:
werewolf!able!es \ It's better when it's free
Mandriva Linux release 2006.1 (Cooker) for i586
Linux 2.6.15-rc5-mm2 (gcc 4.0.2 (4.0.2-1mdk for Mandriva Linux release 2006.1))

Attachment: signature.asc
Description: PGP signature