Ben,
this sequence of commands will hang the final rmmod.
init=/bin/bash --login
mount proc
modprove -v ohci1394
rmmod ohci1394
modprobe -v ohci1394
rmmod ohci1394 -> hangs
It is stuck here:
rmmod D 0FF7D030 0 4518 1 4517 (NOTLB)
Call trace:
[c000a188] __switch_to+0x48/0x70
[c0171588] schedule+0x2b0/0x5d0
[c0171b28] wait_for_completion+0x7c/0xec
[e90492fc] nodemgr_remove_host+0x70/0x108 [ieee1394]
[e904606c] __unregister_host+0xd8/0x10c [ieee1394]
[e9046170] highlevel_remove_host+0x9c/0x15c [ieee1394]
[e9044e7c] hpsb_remove_host+0x8c/0xdc [ieee1394]
[e9065c80] ohci1394_pci_remove+0xd8/0x418 [ohci1394]
[c00b487c] pci_device_remove+0x60/0x64
[c00e8a68] device_release_driver+0x84/0x88
[c00e8b1c] bus_remove_driver+0xb0/0x12c
[c00e9270] driver_unregister+0x1c/0xa0
[c00b4ac4] pci_unregister_driver+0x20/0x88
[e9068698] ohci1394_cleanup+0x44/0x1054 [ohci1394]
[c00352f8] sys_delete_module+0x1d0/0x2a8
knodemgrd_0 exits on the first rmmod, but leaves nodemgr_serialize
in down state. This patch fixes it for me.
Signed-off-by: Olaf Hering <[email protected]>
diff -purN linux-2.6.9-rc2-bk6.orig/drivers/ieee1394/nodemgr.c linux-2.6.9-rc2-bk6/drivers/ieee1394/nodemgr.c
--- linux-2.6.9-rc2-bk6.orig/drivers/ieee1394/nodemgr.c 2004-09-13 07:32:54.000000000 +0200
+++ linux-2.6.9-rc2-bk6/drivers/ieee1394/nodemgr.c 2004-09-23 23:59:28.523829697 +0200
@@ -1490,7 +1490,10 @@ static int nodemgr_host_thread(void *__h
}
if (hi->kill_me)
+ {
+ up(&nodemgr_serialize);
break;
+ }
/* Pause for 1/4 second in 1/16 second intervals,
* to make sure things settle down. */
@@ -1515,7 +1518,10 @@ static int nodemgr_host_thread(void *__h
/* Check the kill_me again */
if (hi->kill_me)
+ {
+ up(&nodemgr_serialize);
goto caught_signal;
+ }
}
if (!nodemgr_check_irm_capability(host, reset_cycles)) {
--
USB is for mice, FireWire is for men!
sUse lINUX ag, nÜRNBERG
Ben,
sw-suspend does not work with our kernel.
khpsbpkt will die because down_interruptible returns -EINTR on suspend.
As a result, hpsb packet delivery will not work anymore after resume.
knodemgrd_0 D 00000000 0 5291 1 5170 (L-TLB)
c30cbe98 00000046 00000010 00000000 ab7b5340 000f4221 c0c54ae0 c5490aa0
c5490bf0 c30ca000 c30cbf04 c30cbeb4 c30cbeec c03053be 00000000 c5490aa0
c0119c00 00000000 00000000 c0c54aec c6e08000 c89e758b 00000001 c5490aa0
Call Trace:
[<c03053be>] wait_for_completion+0x6e/0xa0
[<c0119c00>] default_wake_function+0x0/0x10
[<c89e758b>] hpsb_packet_received+0x6b/0x70 [ieee1394]
[<c0119c00>] default_wake_function+0x0/0x10
[<c89e6c99>] hpsb_send_packet_and_wait+0x49/0x60 [ieee1394]
[<c89e7dad>] hpsb_make_readpacket+0x6d/0x80 [ieee1394]
[<c89e8189>] hpsb_read+0x49/0xd0 [ieee1394]
[<c89e81a1>] hpsb_read+0x61/0xd0 [ieee1394]
[<c89eb953>] nodemgr_bus_read+0x53/0x90 [ieee1394]
[<c89f05f0>] csr1212_parse_bus_info_block+0xb0/0x130 [ieee1394]
[<c89f0d9e>] csr1212_parse_csr+0x1e/0x90 [ieee1394]
[<c89ed353>] nodemgr_node_scan_one+0x63/0x1e0 [ieee1394]
[<c89ed529>] nodemgr_node_scan+0x59/0x60 [ieee1394]
[<c89edba4>] nodemgr_host_thread+0x144/0x180 [ieee1394]
[<c89eda60>] nodemgr_host_thread+0x0/0x180 [ieee1394]
[<c0104255>] kernel_thread_helper+0x5/0x10
diff -purN linux-2.6.9-rc3/drivers/ieee1394/ieee1394_core.c linux-2.6.9-rc3.bug45851/drivers/ieee1394/ieee1394_core.c
--- linux-2.6.9-rc3/drivers/ieee1394/ieee1394_core.c 2004-09-30 05:04:23.000000000 +0200
+++ linux-2.6.9-rc3.bug45851/drivers/ieee1394/ieee1394_core.c 2004-10-02 10:14:09.408062417 +0200
@@ -1030,15 +1030,19 @@ static int hpsbpkt_thread(void *__hi)
daemonize("khpsbpkt");
- while (!down_interruptible(&khpsbpkt_sig)) {
- if (khpsbpkt_kill)
+ while (1) {
+ if (down_interruptible(&khpsbpkt_sig)) {
+ if (current->flags & PF_FREEZE) {
+ refrigerator(0);
+ continue;
+ }
+ printk("khpsbpkt: received unexpected signal?!\n" );
break;
-
- if (current->flags & PF_FREEZE) {
- refrigerator(0);
- continue;
}
+ if (khpsbpkt_kill)
+ break;
+
while ((skb = skb_dequeue(&hpsbpkt_queue)) != NULL) {
packet = (struct hpsb_packet *)skb->data;
--
USB is for mice, FireWire is for men!
sUse lINUX ag, nÜRNBERG
Hi.
On Sat, 2004-10-02 at 18:31, Olaf Hering wrote:
> sw-suspend does not work with our kernel.
> khpsbpkt will die because down_interruptible returns -EINTR on suspend.
> As a result, hpsb packet delivery will not work anymore after resume.
I've applied the fix to the suspend2 tree fwiw.
Nigel
--
Nigel Cunningham
Pastoral Worker
Christian Reformed Church of Tuggeranong
PO Box 1004, Tuggeranong, ACT 2901
Many today claim to be tolerant. True tolerance, however, can cope with others
being intolerant.