On Mon, 14 Mar 2005, Guilhem Lavaux wrote:
> Ok. A new log is attached (gzipped). I have also attached
> 'before_unplugging' which the file named uhci/0000:00:1d.0 in debugfs
> before I unplug the usb key the first time.
>
> 'after_plugging.after_rmmod' is after having removed and inserted again
> the driver and the key.
Can you send the file contents from before you rmmod uhci-hcd the first
time?
> > Another thing I don't understand is why there isn't a five-second delay
> > here before usb-storage scans your device. Did you do anything to shorten
> > that delay?
> >
>
> I haven't done a single thing. But just a quick note: this device is
> USB2 and I had no problems at all with USB2.
There's still something weird about the timing in your log. Several of
the delays there should last for 5 seconds, but the timestamps are all the
same. Here's another patch to try and track it down:
--- a/drivers/usb/core/hub.c Fri Mar 4 09:52:25 2005
+++ b/drivers/usb/core/hub.c Mon Mar 14 16:01:31 2005
@@ -1376,8 +1376,13 @@
dev_err(hub->intfdev,
"cannot reset port %d (err = %d)\n",
port1, status);
- else
+ else {
status = hub_port_wait_reset(hub, port1, udev, delay);
+ if (status)
+ dev_dbg(hub->intfdev,
+ "port_wait_reset: err = %d\n",
+ status);
+ }
/* return on disconnect or reset */
switch (status) {
@@ -2191,6 +2196,8 @@
* or stall; some devices are flakey.
*/
for (j = 0; j < 3; ++j) {
+ dev_dbg(&udev->dev, "delay = %d, HZ = %d\n",
+ (i ? HZ * USB_CTRL_GET_TIMEOUT : HZ), HZ);
r = usb_control_msg(udev, usb_rcvaddr0pipe(),
USB_REQ_GET_DESCRIPTOR, USB_DIR_IN,
USB_DT_DEVICE << 8, 0,
Use that instead of the previous patch.
> My fault. My first message should have been "I plug on another port". As
> a consequence I have made tests on nearly all ports of my computer. The
> result is quite disturbing: the first problem seems to happen on all
> port and whatever the device is but the second problem depends on the
> context. Basically I have two ports for each bus now I have made a few
> tests.
>
> 1) * freebox plugged
> * plug the key on the same bus => FAILURE
> * I unplug the key and the freebox.
> * I plug the key again and it works
> * I plug back the freebox, it works.
> * I unplug the key and plug it again, it works.
> I can do whatever I want on the bus now and it looks like working.
>
> * rmmod uhci_hcd, modprobe uhci_hcd and the problem reappears.
>
> * If I let the freebox unplugged at the startup time it does not change
> the result.
>
> I have checked on 2 buses and it gives the same result.
>
> If I try to plug an USB printer and the key on the same bus I get no
> problem.
>
> So I conclude there must be something special with the freebox device
> which pollute the bus state.
If that were true then you would never be able to use the freebox and the
key on the same bus. But the sixth and seventh lines of results above
show that you can.
Part of the problem may be this timing issue. Another part may be related
to the fact that the ehci-hcd driver gets loaded while uhci-hcd is in the
middle of initializing the freebox. If you can arrange to load ehci-hcd
first (or not at all) maybe that will help.
> >>Mar 13 17:30:37 taniquetil kernel: usb 1-1: new full speed USB device using
> >>uhci_hcd and address 3
> >>Mar 13 17:30:37 taniquetil kernel: usb 1-1: ep0 maxpacket = 8
> >>Mar 13 17:30:37 taniquetil kernel: uhci_hcd 0000:00:1d.0:
> >>uhci_result_control: failed with status 440000
> >>Mar 13 17:30:37 taniquetil kernel: [d9ba5300] link (19ba51e2) element
> >>(1f102880)
> >>Mar 13 17:30:37 taniquetil kernel: Element != First TD
> >>Mar 13 17:30:37 taniquetil kernel: 0: [df102840] link (1f102880) e3
> >>Length=7 MaxLen=7 DT0 EndPt=0 Dev=3, PID=2d(SETUP) (buf=1f5e7c40)
> >>Mar 13 17:30:37 taniquetil kernel: 1: [df102880] link (1f1028c0) e0 SPD
> >>Stalled CRC/Timeo Length=7ff MaxLen=7 DT1 EndPt=0 Dev=3, PID=69(IN)
> >>(buf=1f5e7640)
> >
> >
> > This doesn't look like the same kind of error as above. If you unplug the
> > key, rmmod uhci-hcd, modprobe it again, and then reinsert the key will it
> > work? Or does the key only work if it is plugged in at the time you
> > modprobe uhci-hcd?
>
> As said above, unplugging and plugging the key on the same port does not
> work. However if remove uhci_hcd and insert it again the key is detected
> and works.
Maybe we should try to concentrate on just one thing. After running the
tests above, try unplugging both the Iomega drive and the freebox. Leave
just the key and see what happens when uhci-hcd is loaded, both with and
without ehci-hcd present.
Alan Stern
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel