Missing remove event
I installed Debian Sarge on a Toshiba 2805 laptop with 2.6.8-2-686 and acpi=off. This card loads the prism54 driver.
I get "add" pci events for my cardbus Netgear WG511v1 card. But only sometimes do I also get a "remove" event -- so if I remove the card I have to reboot to get the card operational again.
The laptop was running Debian Sid in the past and I was able to remove and add the wireless card without rebooting.
Can you offer any tips on how to track down why I'm not getting any remove events?
Another curious thing is I see a remove firmware event right after the add firmware event.
The card insert triggers the "add pci" event and loads the prism54 driver. I assume that's what triggers the "add net" event for the card which ifup's eth1. The ifup triggers the "add firmware" event. But soon after that I also see a "remove firmware" event.
Why is there a remove firmware event?
Thanks,
$ dpkg -l | grep hotplug ii hotplug 0.0.20040329-2 Linux Hotplug Scripts
Dec 28 15:38:35 localhost default.hotplug[2750]: add pci Dec 28 15:38:36 localhost default.hotplug[2780]: add net Dec 28 15:38:36 localhost pci.agent[2750]: prism54: loaded successfully Dec 28 15:38:36 localhost kernel: Loaded prism54 driver, version 1.2 Dec 28 15:38:36 localhost kernel: PCI: Enabling device 0000:06:00.0 (0000 -> 0002) Dec 28 15:38:36 localhost net.ifup[2792]: Invoking ifup eth1=hotplug Dec 28 15:38:36 localhost dhclient: Internet Software Consortium DHCP Client 2.0pl5 Dec 28 15:38:36 localhost dhclient: Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. Dec 28 15:38:36 localhost dhclient: All rights reserved. Dec 28 15:38:36 localhost dhclient: Dec 28 15:38:36 localhost dhclient: Please contribute if you find this software useful. Dec 28 15:38:36 localhost dhclient: For info, please visit http://www.isc.org/dhcp-contrib.html Dec 28 15:38:36 localhost dhclient: Dec 28 15:38:36 localhost dhclient: sit0: unknown hardware address type 776 Dec 28 15:38:36 localhost default.hotplug[2816]: add firmware Dec 28 15:38:36 localhost kernel: eth1: islpci_open() Dec 28 15:38:36 localhost kernel: eth1: resetting device... Dec 28 15:38:36 localhost kernel: eth1: uploading firmware... Dec 28 15:38:37 localhost default.hotplug[2827]: remove firmware Dec 28 15:38:37 localhost kernel: eth1: firmware uploaded done, now triggering reset... Dec 28 15:38:38 localhost dhclient: sit0: unknown hardware address type 776 Dec 28 15:38:38 localhost kernel: NET: Registered protocol family 17 Dec 28 15:38:38 localhost dhclient: Listening on LPF/eth1/00:09:5b:e6:c8:a5 Dec 28 15:38:38 localhost dhclient: Sending on LPF/eth1/00:09:5b:e6:c8:a5 Dec 28 15:38:38 localhost dhclient: Sending on Socket/fallback/fallback-net Dec 28 15:38:38 localhost dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 5 Dec 28 15:38:43 localhost dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 10 Dec 28 15:38:43 localhost dhclient: DHCPOFFER from 192.168.1.1 Dec 28 15:38:45 localhost dhclient: DHCPREQUEST on eth1 to 255.255.255.255 port 67 Dec 28 15:38:45 localhost dhclient: DHCPACK from 192.168.1.1 Dec 28 15:38:45 localhost dhclient: bound to 192.168.1.3 -- renewal in 600 seconds. Dec 28 15:38:47 localhost kernel: eth1: no IPv6 routers present
Signature · 14 lines
Bill Moseley [email protected] ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · Bill Moseley
I installed Debian Sarge on a Toshiba 2805 laptop with 2.6.8-2-686 and acpi=off. This card loads the prism54 driver.
I get "add" pci events for my cardbus Netgear WG511v1 card. But only sometimes do I also get a "remove" event -- so if I remove the card I have to reboot to get the card operational again.
What does:
cat /proc/net/dev
and:
ls -l /sys/class/net
show in that case?
Quoted 2 lines
The laptop was running Debian Sid in the past and I was able to remove and add the wireless card without rebooting.
Does it work if you rmmod the network driver?
Quoted 4 lines
Another curious thing is I see a remove firmware event right after the add firmware event.
Why is there a remove firmware event?
Firmware loading is implemented as a "fake kernel device". It gets created, sends an uevent, userspace copies the fw to the kernel and the "firmware device" is removed after that, which sends another event. The event is not used for anything, it's just the logic the driver core works.
Kay
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 2 lines · Kay Sievers
What does:
cat/proc/net/dev
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
lo: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
eth0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
sit0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
eth1: 58118 291 0 0 0 0 0 0 30980 340 0 0 0 0 0 0Quoted 3 lines
and:
ls -l/sys/class/net
show in that case?
drwxr-xr-x 3 root root 0 2005-12-28 22:22 eth0 drwxr-xr-x 4 root root 0 2005-12-28 22:24 eth1 drwxr-xr-x 3 root root 0 2005-12-28 22:22 lo drwxr-xr-x 3 root root 0 2005-12-28 22:22 sit0
It's as if the card was not removed, it seems.
Perhaps a red herring, but as I mentioned, I'm not using ACPI[1]. For a minute I thought the problem was related to not having the apm module loaded -- because when I first posted apm was not loaded and card ejects were not generating events. And just a minute ago apm was loaded and card eject events where happening.
But after trying a few times it seems unrelated to having apm loaded or not. Seems a bit random. Debugging is a bit slow, having to reboot each time. So I don't have a huge sample size.
Dec 28 22:19:02 localhost kernel: eth1: hot unplug detected Dec 28 22:19:02 localhost kernel: eth1: removing device Dec 28 22:19:02 localhost kernel: eth1: islpci_close () Dec 28 22:19:02 localhost dhclient: receive_packet failed on eth1: Network is down Dec 28 22:19:03 localhost default.hotplug[3337]: remove net Dec 28 22:19:03 localhost net.agent[3337]: Invoking ifdown eth1 Dec 28 22:19:03 localhost default.hotplug[3356]: remove pci
Quoted 1 line
Does it work if you rmmod the network driver?
Well, I did a rmmod prism54 once today and rmmod hung -- rmmod was eathing 95% CPU and I couldn't kill -9 it. Clearly getting in a confused state.
[1] The reason I'm not using ACPI is because my wireless card doesn't seem to work with acpi. With acpi enabled I get this when trying to run the card:
ACPI: PCI interrupt 0000:06:00.0[A]: no GSI
eth1 could not install IRQ handler
prism54: probe of 0000:06:00.0 failed with -5BTW -- I did flash the laptop's bios today, just to make sure it was up to date. Just in case.
Signature · 14 lines
Bill Moseley [email protected] ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 1 line · Kay Sievers
Does it work if you rmmod the network driver?
I just tried this again, and it didn't hang, but I couldn't bring the card back up:
Removing the card from the slot did nothing, but then a rmmod prism54 results in what seems like a normal remove:
Dec 28 22:45:33 localhost kernel: eth1: removing device Dec 28 22:45:33 localhost kernel: eth1: islpci_close () Dec 28 22:45:33 localhost dhclient: receive_packet failed on eth1: Network is down Dec 28 22:45:33 localhost default.hotplug[2926]: remove net Dec 28 22:45:33 localhost kernel: Unloaded prism54 driver Dec 28 22:45:33 localhost net.agent[2926]: Invoking ifdown eth1
Then plugging the card back in nothing happens. Manually running modprobe prism54 goes through much of the same logging, but the lights never come on on the wireless card:
Dec 28 22:46:21 localhost moseley: before insert
Then the manual "modeprobe prism54":
Dec 28 22:46:43 localhost kernel: Loaded prism54 driver, version 1.2 Dec 28 22:46:43 localhost kernel: PCI: cache line size of 32 is not supported by device 0000:06:00.0 Dec 28 22:46:43 localhost default.hotplug[2953]: add net Dec 28 22:46:43 localhost net.ifup[2965]: Invoking ifup eth1=hotplug Dec 28 22:46:44 localhost dhclient: Internet Software Consortium DHCP Client 2.0pl5 Dec 28 22:46:44 localhost dhclient: Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. Dec 28 22:46:44 localhost dhclient: All rights reserved. Dec 28 22:46:44 localhost dhclient: Dec 28 22:46:44 localhost dhclient: Please contribute if you find this software useful. Dec 28 22:46:44 localhost dhclient: For info, please visit http://www.isc.org/dhcp-contrib.html Dec 28 22:46:44 localhost dhclient: Dec 28 22:46:44 localhost dhclient: sit0: unknown hardware address type 776 Dec 28 22:46:44 localhost kernel: eth1: islpci_open() Dec 28 22:46:44 localhost kernel: eth1: resetting device... Dec 28 22:46:44 localhost kernel: eth1: uploading firmware... Dec 28 22:46:44 localhost default.hotplug[2985]: add firmware Dec 28 22:46:44 localhost default.hotplug[2996]: remove firmware Dec 28 22:46:44 localhost kernel: eth1: firmware uploaded done, now triggering reset... Dec 28 22:46:45 localhost kernel: eth1: device soft reset timed out Dec 28 22:46:45 localhost kernel: eth1: timeout waiting for mgmt response 1000, triggering device Dec 28 22:46:46 localhost kernel: eth1: timeout waiting for mgmt response Dec 28 22:46:46 localhost kernel: eth1: timeout waiting for mgmt response 1000, triggering device Dec 28 22:46:47 localhost kernel: eth1: timeout waiting for mgmt response Dec 28 22:46:47 localhost kernel: eth1: timeout waiting for mgmt response 1000, triggering device Dec 28 22:46:48 localhost kernel: eth1: timeout waiting for mgmt response Dec 28 22:46:48 localhost kernel: eth1: timeout waiting for mgmt response 1000, triggering device Dec 28 22:46:49 localhost kernel: eth1: timeout waiting for mgmt response Dec 28 22:46:49 localhost kernel: eth1: mgmt tx queue is still full Dec 28 22:46:49 localhost last message repeated 14 times Dec 28 22:46:49 localhost kernel: eth1: mgt_commit has failed. Restart the device Dec 28 22:46:50 localhost dhclient: sit0: unknown hardware address type 776 Dec 28 22:46:50 localhost dhclient: Listening on LPF/eth1/00:30:b4:00:00:00 Dec 28 22:46:50 localhost dhclient: Sending on LPF/eth1/00:30:b4:00:00:00
Signature · 14 lines
Bill Moseley [email protected] ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Is there anything else I could provide that might help debug this?
Does the udev system get hotplug events differently? That is, would it make any difference if I switch to using udev?
Thanks, and have a happy new year!
Quoted 77 lines · Bill Moseley
Quoted 1 line · Kay Sievers
Does it work if you rmmod the network driver?
I just tried this again, and it didn't hang, but I couldn't bring the card back up:
Removing the card from the slot did nothing, but then a rmmod prism54 results in what seems like a normal remove:
Dec 28 22:45:33 localhost kernel: eth1: removing device Dec 28 22:45:33 localhost kernel: eth1: islpci_close () Dec 28 22:45:33 localhost dhclient: receive_packet failed on eth1: Network is down Dec 28 22:45:33 localhost default.hotplug[2926]: remove net Dec 28 22:45:33 localhost kernel: Unloaded prism54 driver Dec 28 22:45:33 localhost net.agent[2926]: Invoking ifdown eth1Then plugging the card back in nothing happens. Manually running modprobe prism54 goes through much of the same logging, but the lights never come on on the wireless card:
Dec 28 22:46:21 localhost moseley: before insertThen the manual "modeprobe prism54":
Dec 28 22:46:43 localhost kernel: Loaded prism54 driver, version 1.2 Dec 28 22:46:43 localhost kernel: PCI: cache line size of 32 is not supported by device 0000:06:00.0 Dec 28 22:46:43 localhost default.hotplug[2953]: add net Dec 28 22:46:43 localhost net.ifup[2965]: Invoking ifup eth1=hotplug Dec 28 22:46:44 localhost dhclient: Internet Software Consortium DHCP Client 2.0pl5 Dec 28 22:46:44 localhost dhclient: Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. Dec 28 22:46:44 localhost dhclient: All rights reserved. Dec 28 22:46:44 localhost dhclient: Dec 28 22:46:44 localhost dhclient: Please contribute if you find this software useful. Dec 28 22:46:44 localhost dhclient: For info, please visit http://www.isc.org/dhcp-contrib.html Dec 28 22:46:44 localhost dhclient: Dec 28 22:46:44 localhost dhclient: sit0: unknown hardware address type 776 Dec 28 22:46:44 localhost kernel: eth1: islpci_open() Dec 28 22:46:44 localhost kernel: eth1: resetting device... Dec 28 22:46:44 localhost kernel: eth1: uploading firmware... Dec 28 22:46:44 localhost default.hotplug[2985]: add firmware Dec 28 22:46:44 localhost default.hotplug[2996]: remove firmware Dec 28 22:46:44 localhost kernel: eth1: firmware uploaded done, now triggering reset... Dec 28 22:46:45 localhost kernel: eth1: device soft reset timed out Dec 28 22:46:45 localhost kernel: eth1: timeout waiting for mgmt response 1000, triggering device Dec 28 22:46:46 localhost kernel: eth1: timeout waiting for mgmt response Dec 28 22:46:46 localhost kernel: eth1: timeout waiting for mgmt response 1000, triggering device Dec 28 22:46:47 localhost kernel: eth1: timeout waiting for mgmt response Dec 28 22:46:47 localhost kernel: eth1: timeout waiting for mgmt response 1000, triggering device Dec 28 22:46:48 localhost kernel: eth1: timeout waiting for mgmt response Dec 28 22:46:48 localhost kernel: eth1: timeout waiting for mgmt response 1000, triggering device Dec 28 22:46:49 localhost kernel: eth1: timeout waiting for mgmt response Dec 28 22:46:49 localhost kernel: eth1: mgmt tx queue is still full Dec 28 22:46:49 localhost last message repeated 14 times Dec 28 22:46:49 localhost kernel: eth1: mgt_commit has failed. Restart the device Dec 28 22:46:50 localhost dhclient: sit0: unknown hardware address type 776 Dec 28 22:46:50 localhost dhclient: Listening on LPF/eth1/00:30:b4:00:00:00 Dec 28 22:46:50 localhost dhclient: Sending on LPF/eth1/00:30:b4:00:00:00Signature · 14 lines
Bill Moseley [email protected] ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Signature · 14 lines
Bill Moseley [email protected] ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 4 lines · Bill Moseley
Is there anything else I could provide that might help debug this?
Does the udev system get hotplug events differently? That is, would it make any difference if I switch to using udev?
That's very unlikely to change anything. It looks more like a driver or bus driver issue.
Quoted 17 lines · Bill Moseley
Quoted 16 lines · Kay Sievers
Quoted 1 line
Does it work if you rmmod the network driver?
I just tried this again, and it didn't hang, but I couldn't bring the card back up:
Removing the card from the slot did nothing, but then a rmmod prism54 results in what seems like a normal remove:
Dec 28 22:45:33 localhost kernel: eth1: removing device Dec 28 22:45:33 localhost kernel: eth1: islpci_close () Dec 28 22:45:33 localhost dhclient: receive_packet failed on eth1: Network is down Dec 28 22:45:33 localhost default.hotplug[2926]: remove net Dec 28 22:45:33 localhost kernel: Unloaded prism54 driver Dec 28 22:45:33 localhost net.agent[2926]: Invoking ifdown eth1
Quoted 3 lines
Quoted 3 lines
Then plugging the card back in nothing happens. Manually running modprobe prism54 goes through much of the same logging, but the lights never come on on the wireless card:
You may ask the driver maintainer if there is a way to work around this, or a known issue. It doesn't look like a hotplug or driver core thing.
Kay
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · Kay Sievers
Quoted 4 lines · Bill Moseley
Is there anything else I could provide that might help debug this?
Does the udev system get hotplug events differently? That is, would it make any difference if I switch to using udev?
That's very unlikely to change anything. It looks more like a driver or bus driver issue.
By driver do you mean prism54? I guess not because it looks more like /sbin/hotplug just isn't being run when the card is pulled out in some cases.
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Then plugging the card back in nothing happens. Manually running modprobe prism54 goes through much of the same logging, but the lights never come on on the wireless card:
You may ask the driver maintainer if there is a way to work around this, or a known issue. It doesn't look like a hotplug or driver core thing.
Unfortunately, it's a black box to me. I was assuming that since it wasn't detecting the card removal that it also wasn't then detecting the card insertion and that there was something else missing than just reloading the drivers (such as powering up the slot??).
Is there something else to watch besides /sbin/hotplug to see if the kernel is detecting the card removal? Something more low-level I can check to see what's happening (or not happening) when the card is ejected?
Sorry for the basic questions. The hardware has worked so well in the past I haven't had the need to understand how all the parts fit together. ;)
Thanks,
Signature · 14 lines
Bill Moseley [email protected] ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 11 lines · Bill Moseley
Quoted 8 lines · Kay Sievers
Quoted 4 lines · Bill Moseley
Is there anything else I could provide that might help debug this?
Does the udev system get hotplug events differently? That is, would it make any difference if I switch to using udev?
That's very unlikely to change anything. It looks more like a driver or bus driver issue.
By driver do you mean prism54?
Yes, that's the first place to ask for already known issues.
Quoted 3 lines
I guess not because it looks more like
/sbin/hotplugjust isn't being run when the card is pulled out in some cases.
It's the driver, or the bus driver that causes this event. If hotplug doesn't run, it's very likey an issue inside the kernel.
Quoted 13 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Then plugging the card back in nothing happens. Manually running modprobe prism54 goes through much of the same logging, but the lights never come on on the wireless card:
You may ask the driver maintainer if there is a way to work around this, or a known issue. It doesn't look like a hotplug or driver core thing.
Unfortunately, it's a black box to me. I was assuming that since it wasn't detecting the card removal that it also wasn't then detecting the card insertion and that there was something else missing than just reloading the drivers (such as powering up the slot??).
Quoted 4 lines
Is there something else to watch besides
/sbin/hotplugto see if the kernel is detecting the card removal? Something more low-level I can check to see what's happening (or not happening) when the card is ejected?
No, not from userspace. As /proc and /sys showed, the device remains in the kernel, even whern it's physically removed. So you very likely need to look _in_ the kernel for the problem.
Quoted 3 lines
Sorry for the basic questions. The hardware has worked so well in the past I haven't had the need to understand how all the parts fit together. ;)
Yeah, no wonder, it's pretty complex and today no single person can understand everything that's going on all over the place on modern operating systems.
Kay
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel