Dave
>From your summary of events, it looks to me as if you
have something in your bootup scripts that is
loading the prism2_usb module manually and
then bringing up the hardware (i.e. firmware upload,
autojoin etc etc), and that this is happening ahead
of the hotplug (or more likely coldplug of the pci bus)
events.
Hence you have 'linkstatus=CONNECTED' and a 'add net'
hotplug event right at the start of your sequence.
Then what look to me to be more regular hotplug events
start to appear, such as adding ehci_hcd & uhci_hcd,
followed by hotplug events related to the things on
the usb bus that the hubs 'discover' - which in your
case is really just your prism card. So a hotplug
event 'add usb entry /proc/bus/usb/002/002'
is issued.
My guess is that the hotplug event
with DEVPATH=/devices/pci0000:00/0000:00:10.0/usb2/2-0:1.0
looks up (from /sys/$DEVPATH) vendorString and other
attributes in the usb.agent script. The fact that
this lookup is happening AFTER your prism card is already
with 'linkstatus=CONNECTED' could be your downfall!
[What I don't understand is how you get two 'net.agent'
related hotplug events. In my understanding you should only
ever get one of these when the prism2_usb driver first
'claims' the prism card - but I don't think its that important to this discussion.]
By inserting a sleep in wlan.agent you are effectively
stalling the init of card until after the hotplug events
have occured, and thus until after that card-corrupting
attributes lookup.
In my system, I have nothing in my boot scripts to try and bring up the card - I rely purely on hotplug. Thus the prism_usb driver is not even loaded until the hotplug event caused by the hub discovering it (the 'add usb entry /devices/pci0000.../usb2/2-1' event in your log ... which leads to 'Setup prism2_usb for USB product 2001/3700/132', which is hotplug attempting to load the module). I then have a script that gets run due to the 'net.agent' hotplug event that does all the wlanctl-ng stuff to get the card going (a script in if-pre-up.d on my Ubuntu(debian) based system).
This all means my card is brought up somewhat later than in
your sequence, but I still have a potential race between the
'natural' hotplug event and the coldplug (usb.rc) script
(not to mention the race between it and hald starting up).
Overall, the easiest workaround, is to put a sleep in somewhere to delay the card being setup. If you make the sleep long enough, you can even restore hald (make it sleep past hald starting).
Karl
>
> From: Dave Jenkins <[email protected]>
> Date: 2005/06/02 Thu PM 02:31:38 BST
> To: [email protected], [email protected]
> Subject: Re: Re: [lwlan-user] Reliable unreliability with D-Link DWL-122 USB
>
> Karl,
>
> Thanks again for your helpful and detailed comments. Latest finding
> below...
>
> --- [email protected] wrote:
> <heavy snippage>
> > - enabling hotplug debug messages
> > - Turn off usb.rc coldplug simply by disabling the
> > execute permissions on the file
>
> Removing execute permissions on /etc/hotplug/usb.rc did not change the
> behaviour, I still got the usual hang. hal is still disabled, too.
>
> I have enabled hotplug debug messages. I'm not familiar with USB
> initialisation so I can only make limited sense of what's happening. I
> will post a heavily abridged excerpt from the log if anyone wants to
> see the gory detail. Here's a summary of what happens.
>
> usbcore registers drivers hub and prism2_usb
> ehci_hcd registers bus no. 1 (USB 2.0) (6 ports)
> uhci_hcd registers bus nos. 2,3,4 (2 ports each)
> [ I have 6 USB ports. The DWL-122 is the only device attached. ]
> usb 2-1: new full speed USB device using uhci_hcd and address 2
> write to prism2 card firmware
> linkstatus=CONNECTED
>
> default.hotplug: invoke /etc/hotplug/net.agent (1st time)
> default.hotplug: add module p80211
> wlan.agent: WLAN startup
> default.hotplug: add module & driver prism2_usb
> wlan.agent: WLAN p80211 starting
> wland: daemon init, netlink socket opened and bound successfully
>
> default.hotplug: add module & driver ehci_hcd
> default.hotplug: add usb_host usb1,2,3,4;
> default.hotplug: add various usb entries under /devices
> default.hotplug: invoke /etc/hotplug/usb.agent (1st time)
> default.hotplug: add module & driver uhci_hcd
> default.hotplug: invoke /etc/hotplug/usb.agent (2nd time)
>
> wlan.agent: WLAN register on wlan0 (prism2_usb) ; wlan0 registered.
> default.hotplug: add usb entry /devices/pci0000.../usb2/2-1
> default.hotplug: invoke /etc/hotplug/usb.agent (3rd time)
> default.hotplug: add usb entry /proc/bus/usb/002/002
> default.hotplug: invoke /etc/hotplug/usb.agent (4th time)
> default.hotplug: add net entry /class/net/wlan0
> default.hotplug: invoke /etc/hotplug/net.agent (2nd time)
>
> usb.agent: Setup 0x00 0x00 for USB product 0/0/206 (4 times)
> usb.agent: Setup prism2_usb for USB product 2001/3700/132
> default.hotplug: add usb entry /devices/pci0000.../usb2
> default.hotplug: invoke /etc/hotplug/usb.agent (5th time)
> usb.agent: Setup 0x00 0x00 for USB product 2001/3700/132
> wlan.agent: WLAN wlan0 brought up successfully; layer 3+ up
>
> [At this point I log in, load a couple of web pages -> hang]
>
> kernel: NETDEV WATCHDOG: wlan0: transmit timed out
> kernel: usb_unlink_urb() is deprecated; Badness; wlan0 rx pipe reset.
>
> The usb.agent script on my Fedora Core 3 system does not appear to look
> at anything under /proc, but does read files under /sys/$DEVPATH where
> $DEVPATH can be among the following:
>
> DEVPATH=/bus/usb/drivers/prism2_usb
> DEVPATH=/class/net/wlan0
> DEVPATH=/class/usb_host/usb1 to usb4
> DEVPATH=/module/prism2_usb
> DEVPATH=/devices/pci0000:00/0000:00:10.0/usb2
> DEVPATH=/devices/pci0000:00/0000:00:10.0/usb2/2-0:1.0 etc.
>
> Following Karl's suggestion in another post, I tried putting a long
> sleep in /etc/hotplug/wlan.agent, and so far this seems to work -
> thanks!
>
> Cheers,
>
> Dave
-----------------------------------------
Email provided by http://www.ntlhome.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.