Hard Lockup on 2.4.16 with Via ieee1394 (sbp2 mode)
Alan et al,
I've got a hard lockup on 2.4.16 when I insmod sbp2 for my external FW disk drive (ADS enclosure kit). I'm not using the official RH 2.4.9-13 RPM because the SRPM didn't build an SMP kernel and I had been having no problems with 2.4.16ctx-4 (that's with Jacques Gelinas' vserver patch). Anyhow, when I built a new kernel to support my new Via Firewire Card (SB-FW6306-3l), I built it with the nesc. ieee1394 support in modules. However:
cd /lib/modules/2.4.16-ctx4/kernel/drivers/ieee1394 insmod ieee1394
insmod ohci1394
insmod raw1394
insmod sbp2 (HARD LOCKUP)
I can rebuild again with SysRq patch if you think that'll help. I can also forward my kernel build ".config" file and my sysreport to Alan if he likes. (I've already sent a ticket to [email protected]. about the SMP kernel problems.)
TIA
Quoted 7 lines · Timothy Covell
lockup
...
sbp2
...
SMP
...
drivers/ieee1394/sbp2.c +2 -0
@@ -2773,7 +2773,9 @@ static void sbp2scsi_complete_command(st/* * Tell scsi stack that we're done with this command */ +spin_lock_irq (&io_request_lock);done (SCpnt); +spin_unlock_irq (&io_request_lock);return ; }
-
Hrm...
Does this apply to usb-storage also? Under what conditions do you need to hold the io_request_lock when calling the done function?
usb-storage calls it from task context, not from IRQ context.... if that makes any difference.
Matt
Quoted 28 lines · Andrew Morton
Quoted 7 lines · Timothy Covell
lockup
...
sbp2
...
SMP
...drivers/ieee1394/sbp2.c +2
-2@@ -2773,7 +2773,9 @@ static void sbp2scsi_complete_command(st/* * Tell scsi stack that we're done with this command */ +spin_lock_irq (&io_request_lock);done (SCpnt); +spin_unlock_irq (&io_request_lock);return ; } - -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 6 lines
Matthew Dharm Home: [email protected] Maintainer, Linux USB Mass Storage Driver Da. Am thinkink of carbonated borscht for lonk nights of coding. -- Pitr User Friendly, 7/24/1998
Quoted 6 lines · Matthew Dharm
Hrm...
Does this apply to usb-storage also? Under what conditions do you need to hold the
io_request_lockwhen calling the done function?
That's scsi_old_done(). I don't think scsi_done() cares whether io_request_lock is held or not.
And io_request_lock *must* be held by the caller of scsi_old_done() - it
assumes this. I think we'd have heard by now if usb was getting this
wrong. Looks like it's using scsi_done(), yes?
-
It should be using scsi_done()... it actually seems to use whatever was given as a done function at the queuecommand point, which is, I think, scsi_done().
Matt
Quoted 16 lines · Andrew Morton
Quoted 6 lines · Matthew Dharm
Hrm...
Does this apply to usb-storage also? Under what conditions do you need to hold the
io_request_lockwhen calling the done function?That's
scsi_old_done(). I don't thinkscsi_done()cares whetherio_request_lockis held or not.And
io_request_lock*must* be held by the caller ofscsi_old_done()- it
assumes this. I think we'd have heard by now if usb was getting this
wrong. Looks like it's usingscsi_done(), yes?-
Signature · 7 lines
Matthew Dharm Home: [email protected] Maintainer, Linux USB Mass Storage Driver Sir, for the hundreth time, we do NOT carry 600-round boxes of belt-fed suction darts! -- Salesperson to Greg User Friendly, 12/30/1997
Quoted 13 lines · you
Quoted 6 lines · Timothy Covell
lockup
...
sbp2
...
SMP
...
drivers/ieee1394/sbp2.c static void sbp2scsi_complete_command(st · line 2781
Quoted 9 lines
drivers/ieee1394/sbp2.c +2
-0@@ -2773,7 +2773,9 @@ static void sbp2scsi_complete_command(st/* * Tell scsi stack that we're done with this command */ +spin_lock_irq (&io_request_lock);done (SCpnt); +spin_unlock_irq (&io_request_lock);return ; }
That did the trick. I'm writing this on 2.4.16-ctx4 with this patch on SMP. It's amazing what a little spin lock will do. Thanks!
(Even if I had realized that this was fixed on 2.4.17, I had other issues with 2.4.17 which prevented me from wanting to run it.)