RT73 disconnects when disconnecting USB Disk

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=4555

Skylight

13-01-2008 13:55:04

Hi,

as mentioned in this thread

http//rt2x00.serialmonkey.com/phpBB2/v ... 7&start=45

my connection regularly disconnects when disconnecting (an unmounted USB disk)

NOTE the connection works fine after unmounting the disk and still leaving it plugged in. Right after pulling it out, the connection goes down.

I attached a debug file (hopefully without duplicates D ) and an output of lsusb when both, the disk and the usb wireless device are connected.
I have an Asus WL167-g, and the disk is a Trekstor 80 GB portable USB disk.
The disconnection happens right after at 1446 in the log.

The USB Wlan Stick is connected at the back of my computer, and the disk on the 2 USB ports on top of it (as of my architecture), so they are not connected side by side.
There are some other USB devices (inlcuding a hub) connected. I have to try out, if that has any effect on the disconnects.

thanks for your help, and tell me if you need more information

Vern

13-01-2008 19:37:22

Hi Skylight,

Very timely turnaround. If you oculd, please do this as root
[quote3op1u3zs](lsusb -t;lsusb -v) 2>&1|gzip >/tmp/lsusb.txt.gz[/quote3op1u3zs]
and attach lsusb.txt.gz to a post here. If I can't figure out topology from that, I'll be asking for a drawing. Actually, if you could provide - say - ASCII art, that would be nice.

BTW, if you have it, could you use gzip? It gives a better compression, and fits better with my tools, than zip.

Thanks,

Skylight

14-01-2008 17:22:39

here is the log

wasn't actually root, because I'm using Ubuntu and it wouldn't take a "sudo" , but I hope that does it.

I'm not sure what you mean by timely tournaround, but I hope you were kidding about the ASCII art D

thx

Vern

14-01-2008 17:34:49

Hi Skylight,

Thanks for the ole' college try, but you have to be root, otherwise you won't get all the information. Try 'su', then enter the root password. (Remember to use the 'exit' command when you're done.

[quote1i4n2os5]I'm not sure what you mean by timely tournaround, but I hope you were kidding about the ASCII art[/quote1i4n2os5]
I need some means of visualizing the *physical* layout. The output of any drawing tool will do. It's what I'll be trying to do from your lsusb output.

Skylight

14-01-2008 19:45:37

ok, here it is D

Vern

14-01-2008 20:43:30

Hi Skylight,

The "-t" part is important, too. Could you also supply the result of "lsusb -t" (as root)?

Thanks,

Skylight

15-01-2008 16:42:58

well, that's easy

cannot open /proc/bus/usb/devices, No such file or directory (2)

was also part of my upload

doesn't look good, does it? ?

Vern

15-01-2008 20:14:51

Hi Skylight,

If "lsusb -t" doesn't work, then I think you have other problems. Could you fix things so that that works? Then we can take a better look at this.

Thanks,

Skylight

16-01-2008 16:45:09

Hi Skylight,

If "lsusb -t" doesn't work, then I think you have other problems. Could you fix things so that that works? Then we can take a better look at this.

Thanks,[/quote3uawsmn6]

well, of course, just tell me how D

I just found, that it's a known bug

https//bugs.launchpad.net/ubuntu/+sour ... bug/159189

so maybe there is nothing we can do about it at the moment

Skylight

21-01-2008 09:35:29

just that I understand it right

it seems to me, that the incorrect "lsusb -t" command is not a problem of my specific computer, but a result of the current Ubuntu version, isn't it?

is there no other way of getting the information?

thanks

Skylight

21-01-2008 16:59:12

I got it working by a workaround from here

https//bugs.launchpad.net/ubuntu/gutsy ... viewstatus

attached the file

hope you will find it useful

Vern

21-01-2008 22:21:07

Hi Skylight,

Thanks for the fixed lsusb stuff. Unfortunately, I can't match its depiction with what's physically possible.

I guess I need to see a physical depiction of cables on Bus #5 - the EHCI controller cable from host to hub cable from hub to device(s). etc. If ASCII art is not doable for you, try hand drawing a picture, scanning it, then compress the resulting jpeg file and attach it to a posting here.

An alternative, if you wish, is to try attaching the Ralink device to one of your other USB ports.

Thanks,

defcon

23-01-2008 01:28:14

I have this same exact issue with the Ralink RT73 802.11abg WLAN Driver 1.0.3.6 CVS 2008011002 driver, when I insert a flash drive, mp3 player or anything my wireless disconnects and I must modprobe -r rt73 ; modprobe rt73 ; /etc/init.d/network restart

defcon

23-01-2008 01:45:26

attached is my (lsusb -t;lsusb -v) 2>&1|gzip >/tmp/lsusb.txt.gz as well as my dmesg, because I have the same issue with mp3 players and flash drives

defcon

23-01-2008 01:46:44

also I can have any device plugged in any additional usb port with the same issue.
Thanks guys for the help!

Skylight

24-01-2008 14:40:21

As I am not a good drawer I have made a Visio drawing of my architecture.

As you can see, there goes a cable from my PC to a 4 way hub, where there is a bluetooth dongle (0a120001) and a gamepad, via a 3 to 1 conversion box for playstation gamepads, connected (0f30010a and 0f30001c). Also directly connected to my PC there is the USB Wlan Stick (0b051723) and an Ideazon Keyboard (10380310).

There is indeed a strange thing my USB Wlan Stick appears always on the bus of the usb hub, although it is not connected to the hub directly, but on any other usb port on my computer.

I think the problem lies within the hub and or the gamepad converter. It might also be a power problem, as it is only a passive hub with no additional power source. I will try to make some tests without having the hub connected.

I hope this is helpful for you, although the drawing might not contain all the necessary information. Please keep asking.

thanks

---
edit, here is a link

[urltvk5nsuy]http://img244.imageshack.us/img244/7039/architecture172cf9.jpg[/urltvk5nsuy]

Vern

25-01-2008 18:27:33

Hi Skylight,

Thanks for the drawing. I suspect that all your USB cables do not go to the same receptacle on your computer, as seems to be implied by your depiction.

I did a llittle grepping and googling myself with results as depicted in the attached gzipped .odg file, which you can view with OpenOffice Draw, or equivalent.

It looks like - as a practical matter - Bus# ( as given by lsusb -t) is equivalent to a root hub; and so it turns out that your WLAN adapter and IDE adapter are both attached to - and downstream of - the same hub. If I'm right, then the fact that "lsusb -t" shows five bus numbers means you have five root hubs. I can't infer from that what the actual connectivity between root hub and physical receptacle on your computer is.

Your log shows the driver's queue of pending requests grows until there is no more queue slots available, at which time it packs it in. It looks like this happens when the IDE device is being disconnected.

A solution approach would be to treat the growing queue as a back pressure indicator, suspend further I/O attempts for a reasonable period until the queue size shrinks below some minimum, then resume operations - with a failsafe in case the queue "never" shrinks.

This looks to be straightforward, but non- trivial. So in the meantime, a workaround may be to ensure that the WLAN adapter is all by itself on an unused bus; in your case bus #1, 2, 3, or 4.

In defcon's case, this would be bus #1, 2, or 3.

Please post the results of that experiment here.

Thanks,

defcon

25-01-2008 21:16:28

I have tried alternate usb ports and I have the same issue

Skylight

26-01-2008 08:03:19

Hi Vern,

thanks for your advice. I made some testing with strange results. First of all, I have unplugged the hub, and still got the same results. So it is, at least not solely, the reason for the errors.
But I think the real problem is, that no regardless in which usb port (total of 6) I plug in my Wlan Stick, it ALWAYS seems to be on bus #5, and the same happens to my disk. That could result in the problems you described. Is there a way to manually override that strange behaviour?

thanks for your time

Vern

26-01-2008 19:22:41

Hi Skylight,

Hoo boy. It looks like only one of the five USB busses reported is actually connected to the receptacles on your PC - assuming my understanding of this stuff is more or less OK. This means that the adapter is always downstream of your one and only effective root hub; and that there is always a temporary service suspension to all downstream devices whenever one of them is physically unplugged.

I guess the solution approach outlined previously could be tried; but to be honest, it will be a while. Right now, it seems ARM and big endian machine operations are more urgent. I'll bump this thread if I get a chance to do a fix.

Thanks again,

Skylight

25-02-2008 17:34:13

Hi there,

any news on this one? Is it possible that it will work in Hardy or with the new kernel? I heard that rt73 then will work out of the box. Or will my problem persist?

thanks!

Vern

26-02-2008 04:57:35

the real problem is, that no regardless in which usb port (total of 6) I plug in my Wlan Stick, it ALWAYS seems to be on bus #5,[/quoteqrmd9eds] I believe all the ports are downstream of the same hub, which is inside your PC. If the kernel root hub driver is updated, there may be a fix, in whatever you're referring to as the new kernel. I don't know what "Hardy" is.

Attacking the problem from the driver perspective is not something I plan to do at this time.

Skylight

26-02-2008 17:50:41

Hardy is Ubuntu 8.04

thanks for your help