Skip to contentSkip to conversation

possible USB regression with 2.6.21-rc4: iPod doesn't work

DISCUSSION Tino Keitel 8 participants 24 messages Mar 21, 2007 – Mar 29, 2007

lore
Share & tools
lore
#0 lore raw

Hi folks,

I plugged my iPod nano 8 GB in and got this message with 2.6.21-rc4:

hub 1-0:1.0: over-current change on port 1

along with other USB error messages. I tried a hub with own power supply and a USB port on the computer. A full log is attached.

When I boot with 2.6.20, it works:

usb 1-5.1: new high speed USB device using ehci_hcd and address 13 usb 1-5.1: configuration #1 chosen from 2 choices
scsi5 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 13
usb-storage: waiting for device to settle before scanning
scsi 5:0:0:0: Direct-Access Apple iPod 1.62 PQ: 0
ANSI: 0
SCSI device sdc: 3964928 2048-byte hdwr sectors (8120 MB)

Is the over-current message an indication that the hardware does bad things, or is this a .21-rc4 bug?

Regards,
Tino

#1 lore raw

Am Mittwoch, 21. März 2007 21:47 schrieb Tino Keitel:

Quoted 2 lines

along with other USB error messages. I tried a hub with own power supply and a USB port on the computer. A full log is attached.

Your log basically shows a hub going berserk. Please post "lsusb -v" and your .config

Regards
Oliver

#2 lore raw
Quoted 7 lines · Oliver Neukum

Am Mittwoch, 21. März 2007 21:47 schrieb Tino Keitel:

Quoted 2 lines

along with other USB error messages. I tried a hub with own power supply and a USB port on the computer. A full log is attached.

Your log basically shows a hub going berserk. Please post "lsusb -v" and your .config

I didn't tried just the external hub. I also tried a USB port on the computer.

I'll collect the requested information this evening.

Regards,
Tino

#3 lore raw
Quoted 7 lines · Tino Keitel
Quoted 6 lines · Oliver Neukum

Am Mittwoch, 21. März 2007 21:47 schrieb Tino Keitel:

Quoted 2 lines

along with other USB error messages. I tried a hub with own power supply and a USB port on the computer. A full log is attached.

Your log basically shows a hub going berserk.

Or a bad USB transceiver. _Something_ is generating those overcurrent warnings, and it sure looks like a hardware malfunction.

Alan Stern

#4 lore raw
Quoted 5 lines · Alan Stern
Quoted 3 lines · Tino Keitel
Quoted 2 lines · Oliver Neukum

Am Mittwoch, 21. März 2007 21:47 schrieb Tino Keitel:

Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

along with other USB error messages. I tried a hub with own power supply and a USB port on the computer. A full log is attached.

Your log basically shows a hub going berserk.

Or a bad USB transceiver. _Something_ is generating those overcurrent warnings, and it sure looks like a hardware malfunction.

But it works with 2.6.20.

Regards,
Tino

#5 lore raw
Quoted 5 lines · Tino Keitel
Quoted 2 lines · Alan Stern

_Something_ is generating those overcurrent
warnings, and it sure looks like a hardware malfunction.

But it works with 2.6.20.

So can you bisect to find what caused the problem?

We've been afflicted with such strange overcurrent messages off and on for some time. Some hardware triggers them, while most doesn't, and the USB developers don't have any of the hardware that triggers it (that almost goes without saying).

It's been clear to me that _something_ the software does is making that more likely to happen.

One thing we've been lacking is anything like a usable clue as to what kind of changes would have that failure mode ... and thus, what kind of changes could remove it.

- Dave

#6 lore raw
Quoted 8 lines · David Brownell
Quoted 5 lines · Tino Keitel
Quoted 2 lines · Alan Stern

_Something_ is generating those overcurrent
warnings, and it sure looks like a hardware malfunction.

But it works with 2.6.20.

So can you bisect to find what caused the problem?

I never did use git-bisect, but maybe I find the time next week.

Regards,
Tino

#7 lore raw
Quoted 11 lines · Tino Keitel
Quoted 8 lines · David Brownell
Quoted 5 lines · Tino Keitel
Quoted 2 lines · Alan Stern

_Something_ is generating those overcurrent
warnings, and it sure looks like a hardware malfunction.

But it works with 2.6.20.

So can you bisect to find what caused the problem?

I never did use git-bisect, but maybe I find the time next week.

Instructions for bisecting:

<-- snip -->

# install git and cogito on your computer
# clone Linus' tree:
cg-clone \ 
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
# start bisecting:
cd linux-2.6
git bisect start
git bisect bad v2.6.21-rc4
git bisect good v2.6.20
# start round
cp /path/to/.config .
make oldconfig
make
# install kernel, check whether it's good or bad, then:
git bisect [bad|good]
# start next round

After at about 12 reboots, you'll have found the guilty commit ("... is first bad commit").

More information on git bisecting:
man git-bisect

<-- snip -->

Quoted 2 lines

Regards,
Tino

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#8 lore raw
In reply to David Brownell
Quoted 4 lines · David Brownell
Quoted 3 lines · Tino Keitel
Quoted 2 lines · Alan Stern

_Something_ is generating those overcurrent
warnings, and it sure looks like a hardware malfunction.

Quoted 9 lines
Quoted 1 line

But it works with 2.6.20.

So can you bisect to find what caused the problem?

We've been afflicted with such strange overcurrent messages off and on for some time. Some hardware triggers them, while most doesn't, and the USB developers don't have any of the hardware that triggers it (that almost goes without saying).

Generation 1 iPod Shuffle is notorious for high current draw. You should be able to get the 512MB model really really cheap by now.

#9 lore raw
Quoted 8 lines · Chuck Ebbert
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

_Something_ is generating those overcurrent
warnings, and it sure looks like a hardware malfunction.

But it works with 2.6.20.

Generation 1 iPod Shuffle is notorious for high current draw. You should be able to get the 512MB model really really cheap by now.

That's true but the 2.6.20 works, right? That's what we're looking at here.

The problem is in the device, true, but this is why Tino is the only one who can bisect and find what we did to aggravate the problem.

-- Pete

#10 lore raw
In reply to Oliver Neukum
Quoted 7 lines · Oliver Neukum

Am Mittwoch, 21. März 2007 21:47 schrieb Tino Keitel:

Quoted 2 lines

along with other USB error messages. I tried a hub with own power supply and a USB port on the computer. A full log is attached.

Your log basically shows a hub going berserk. Please post "lsusb -v" and your .config

Both files are attached.

Regards,
Tino

#11 lore raw

Am Donnerstag, 22. März 2007 20:17 schrieb Tino Keitel:

Quoted 10 lines · Oliver Neukum
Quoted 7 lines

Am Mittwoch, 21. März 2007 21:47 schrieb Tino Keitel:

Quoted 2 lines

along with other USB error messages. I tried a hub with own power supply and a USB port on the computer. A full log is attached.

Your log basically shows a hub going berserk. Please post "lsusb -v" and your .config

Both files are attached.

Please recompile
with CONFIG_USB_DEBUG
and without CONFIG_USB_SUSPEND

Regards
Oliver

#12 lore raw
Quoted 7 lines · Oliver Neukum

Am Donnerstag, 22. März 2007 20:17 schrieb Tino Keitel:

Quoted 6 lines · Oliver Neukum
Quoted 5 lines

Am Mittwoch, 21. März 2007 21:47 schrieb Tino Keitel:

Quoted 2 lines

along with other USB error messages. I tried a hub with own power supply and a USB port on the computer. A full log is attached.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Your log basically shows a hub going berserk. Please post "lsusb -v" and your .config

Both files are attached.

Please recompile
with CONFIG_USB_DEBUG
and without CONFIG_USB_SUSPEND

With CONFIG_USB_SUSPEND disabled, the iPod works. The dmesg output is attached.

Regards,
Tino

#13 lore raw
Quoted 6 lines · Tino Keitel
Quoted 3 lines

Please recompile
with CONFIG_USB_DEBUG
and without CONFIG_USB_SUSPEND

With CONFIG_USB_SUSPEND disabled, the iPod works. The dmesg output is attached.

In fact, both logs (with and without CONFIG_USB_SUSPEND) show the iPod working. Can you post a log with CONFIG_USB_DEBUG turned on that shows any errors?

Alan Stern

#14 lore raw
Quoted 6 lines · Alan Stern
Quoted 4 lines · Tino Keitel
Quoted 3 lines

Please recompile
with CONFIG_USB_DEBUG
and without CONFIG_USB_SUSPEND

Quoted 6 lines
Quoted 2 lines

With CONFIG_USB_SUSPEND disabled, the iPod works. The dmesg output is attached.

In fact, both logs (with and without CONFIG_USB_SUSPEND) show the iPod working. Can you post a log with CONFIG_USB_DEBUG turned on that shows any errors?

Attached is a dmesg output with CONFIG_USB_DEBUG and CONFIG_USB_SUSPEND enabled.

There are no messages from the iPod because, well, nothing happens when I plug it in. I tried it 3 times. The strange thing is: when I trigger a suspend or shutdown, then the "Do not disconnect" message shows up on the iPod, which means that the computer regognized it as a storage device.

Regards,
Tino

#15 lore raw
Quoted 5 lines · Tino Keitel

Attached is a dmesg output with CONFIG_USB_DEBUG and CONFIG_USB_SUSPEND enabled.

There are no messages from the iPod because, well, nothing happens when I plug it in. I tried it 3 times.

I don't understand. The dmesg log you attached shows the iPod was detected and recognized as scsi5 (sdc). Then some time later (can't tell how much later because you don't have CONFIG_PRINTK_TIME set) it was unplugged and plugged back in. The second time it was detected and recognized as scsi6 (also sdc). And then the log ends.

Why do you say there are no messages from the iPod? Grepping for "iPod" in the log shows that the string appears 4 times. If nothing happened when you plugged it in, how could the computer have known the device was an iPod?

Quoted 2 lines

The strange thing is: when I trigger
a suspend or shutdown,

You mean you suspend or shutdown the computer? Or the iPod?

Quoted 3 lines

then the "Do not disconnect" message shows up on
the iPod, which means that the computer regognized it as a storage device.

What's so strange about that? Isn't that exactly what's supposed to happen?

Alan Stern

#16 lore raw
Quoted 5 lines · Alan Stern
Quoted 3 lines · Tino Keitel

Attached is a dmesg output with CONFIG_USB_DEBUG and CONFIG_USB_SUSPEND enabled.

Quoted 8 lines
Quoted 2 lines

There are no messages from the iPod because, well, nothing happens when I plug it in. I tried it 3 times.

I don't understand. The dmesg log you attached shows the iPod was detected and recognized as scsi5 (sdc). Then some time later (can't tell how much later because you don't have CONFIG_PRINTK_TIME set) it was unplugged and plugged back in. The second time it was detected and recognized as scsi6 (also sdc). And then the log ends.

Not in the attached dmesg output from the above mail. There are not iPod related messages it it, but I plugged it in 2 times. I rebootet with the same kernel version without CONFIG_USB_SUSPEND right after this and the iPod was recognized at the first try.

Quoted 10 lines

Why do you say there are no messages from the iPod? Grepping for "iPod" in the log shows that the string appears 4 times. If nothing happened when you plugged it in, how could the computer have known the device was an iPod?

Quoted 2 lines

The strange thing is: when I trigger
a suspend or shutdown,

You mean you suspend or shutdown the computer? Or the iPod?

The computer.

Quoted 7 lines
Quoted 4 lines

then the "Do not disconnect" message shows up on
the iPod, which means that the computer regognized it as a storage device.

What's so strange about that? Isn't that exactly what's supposed to happen?

Well, it isn't recognized by a normal running system, only during shutdown/suspend.

Regards,
Tino

#17 lore raw
Quoted 9 lines · Tino Keitel
Quoted 8 lines
Quoted 2 lines

There are no messages from the iPod because, well, nothing happens when I plug it in. I tried it 3 times.

I don't understand. The dmesg log you attached shows the iPod was detected and recognized as scsi5 (sdc). Then some time later (can't tell how much later because you don't have CONFIG_PRINTK_TIME set) it was unplugged and plugged back in. The second time it was detected and recognized as scsi6 (also sdc). And then the log ends.

Quoted 4 lines

Not in the attached dmesg output from the above mail. There are not iPod related messages it it, but I plugged it in 2 times. I rebootet with the same kernel version without CONFIG_USB_SUSPEND right after this and the iPod was recognized at the first try.

Sorry, I was reading the wrong file before! :-(

The lack of messages from the iPod seems to indicate that the hub isn't working right. You could try plugging the iPod into a different hub or directly into the computer. Or maybe into a different port of that hub.

Alan Stern

#18 lore raw

On Mon, Mar 26, 2007 at 17:15:53 -0400, Alan Stern wrote:

[...]

Quoted 3 lines

The lack of messages from the iPod seems to indicate that the hub isn't working right. You could try plugging the iPod into a different hub or directly into the computer. Or maybe into a different port of that hub.

I already tried all of the above options, with the same result. Note that all other USB devices (keyboard, mouse, hard disk with /home, DVB-T box etc.) work fine.

I'm currently bisecting.

Regards,
Tino

#19 lore raw
Quoted 8 lines · Tino Keitel

On Mon, Mar 26, 2007 at 17:15:53 -0400, Alan Stern wrote:

[...]

Quoted 3 lines

The lack of messages from the iPod seems to indicate that the hub isn't working right. You could try plugging the iPod into a different hub or directly into the computer. Or maybe into a different port of that hub.

Quoted 5 lines

I already tried all of the above options, with the same result. Note that all other USB devices (keyboard, mouse, hard disk with /home, DVB-T box etc.) work fine.

I'm currently bisecting.

Hi,

this is the bisect result:

$ git bisect good
1d619f128ba911cd3e6d6ad3475f146eb92f5c27 is first bad commit
commit 1d619f128ba911cd3e6d6ad3475f146eb92f5c27
Author: Marcelo Tosatti <[email protected]>
Date:   Sun Jan 21 19:45:59 2007 -0200

USB: switch ehci-hcd to new polling scheme

Switch ehci-hcd to use the new polling scheme, which reports root hub status changes via the interrupt handler, in an asynchronous fashion. Doing so disables polling for status changes (whose handler is
rh_timer_func).

Tested on a Geode GX machine, which is now capable of running at =~
5
timer interrupts per second (in the -rt tree), resulting in
significant
power savings.

:040000 040000 f8b11b3fe3cec62063d8da0f7be807341106f494
78c5a156897b3ad7aef27823d48a546fdda2c0d2 M drivers

Regards,
Tino

#20 lore raw

On Tue, Mar 27, 2007 at 00:21:24 +0200, Tino Keitel wrote:

[...]

Quoted 5 lines

this is the bisect result:

$ git bisect good
1d619f128ba911cd3e6d6ad3475f146eb92f5c27 is first bad commit
commit 1d619f128ba911cd3e6d6ad3475f146eb92f5c27

I just tested 2.6.21-rc5 with this commit reverted and the iPod was regognized with CONFIG_USB_SUSPEND enabled.

Regards,
Tino

#21 lore raw
Quoted 4 lines · Tino Keitel

On Tue, Mar 27, 2007 at 00:21:24 +0200, Tino Keitel wrote:

[...]

Quoted 8 lines
Quoted 5 lines

this is the bisect result:

$ git bisect good
1d619f128ba911cd3e6d6ad3475f146eb92f5c27 is first bad commit
commit 1d619f128ba911cd3e6d6ad3475f146eb92f5c27

I just tested 2.6.21-rc5 with this commit reverted and the iPod was regognized with CONFIG_USB_SUSPEND enabled.

It's hard to figure out what's going on with your system for several reasons. For one thing, you've mentioned at least 3 different peculiar behaviors. For another, you posted logs with lots of extra information that tends to hide the important parts. And also you have lots of USB devices, which makes it hard to see what's happening with the iPod.

So here's what I want you to do. To begin with, unplug _all_ your USB devices. Then do "dmesg -c >/dev/null" to clear the kernel log buffer.

After waiting a few seconds, plug the iPod in to the computer. After a few seconds, make a copy of /sys/class/usb_host/usb_host1/registers. Then unplug the iPod.

After waiting a few more seconds, plug in your hub. Wait a few seconds and then plug the iPod into the hub. After a few seconds, make another copy of /sys/class/usb_host/usb_host1/registers. Then unplug the iPod and the hub. Finally, get a copy of the dmesg log.

After having done all that, repeat it exactly but this time using a version of ehci-hcd with that patch reverted. Post everything and we'll see how it looks.

Alan Stern

#22 lore raw
In reply to Alan Stern

On Mon, Mar 26, 2007 at 17:15:53 -0400, Alan Stern wrote:

[...]

Quoted 3 lines

The lack of messages from the iPod seems to indicate that the hub isn't working right. You could try plugging the iPod into a different hub or directly into the computer. Or maybe into a different port of that hub.

Uh, I think I found the reason for the strange behaviour at shutdown/suspend. When I unload the usblp module, then the iPod is recognized.

Regards,
Tino

#23 lore raw
Quoted 4 lines · Tino Keitel

On Mon, Mar 26, 2007 at 17:15:53 -0400, Alan Stern wrote:

[...]

Quoted 8 lines
Quoted 3 lines

The lack of messages from the iPod seems to indicate that the hub isn't working right. You could try plugging the iPod into a different hub or directly into the computer. Or maybe into a different port of that hub.

Uh, I think I found the reason for the strange behaviour at shutdown/suspend. When I unload the usblp module, then the iPod is recognized.

And that's not the case with 2.6.20?

Signature · 3 lines
Bill Davidsen <[email protected]>
  "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot