Bug 115228

Summary: repeated unloading of ohci1394 locks the PowerBook pismo
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Leah Cunningham <leah>
Component: KernelAssignee: Olaf Hering <ohering>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: stefan-r-nvbz
Version: Beta 4   
Target Milestone: ---   
Hardware: Other   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: build-pismo-ohci1394.sh
config-2.6.18rc2-pismo-minimal.txt

Description Leah Cunningham 2005-09-04 16:17:51 UTC
I will check this with beta 4 as soon as I can get it to download.  When I have
powersaved and pbbuttonsd running with suspend to memory set for closing the
screen, it works fine when we are on battery power and will recover.  When on AC
power, however, suspend appears sucessful, but cannot be recovered from.  When
trying to recover from suspend, best that happens is getting a bunch of iptables
messages on a black screen, but it is not possible to interrupt with keyboard,
etc.  Let me know what information you need regarding this.
Comment 1 Olaf Hering 2005-09-05 09:30:00 UTC
does it work better if you unload ohci1394? my pismo locks up during system if
its loaded. that worked better with sles9...
Comment 2 Leah Cunningham 2005-09-05 21:44:13 UTC
If I remove ohci1394 and ieee1394 it does work.  On battery this isn't required.
Comment 3 Leah Cunningham 2005-09-05 22:58:29 UTC
Oddly, probably related, I can reliably hang the system after running this
script a few times, regardless of if power is on or off.  It always hangs on
removing ohci1394 but sometimes takes a couple runs to reproduce it.

#!/bin/bash
echo "rmmod ohci1394"
rmmod ohci1394
echo "rmmod ieee1394"
rmmod ieee1394
echo "modprobe ohci1394"
modprobe ohci1394
echo "modprobe ieee1394"
modprobe ieee1394
Comment 4 Leah Cunningham 2005-09-05 22:59:37 UTC
Er, AC on or off, not power on or off, btw.
Comment 5 Thomas Renninger 2005-09-06 17:14:27 UTC
Puhh, I can't help here.
this is a USB problem -> assigning to olh
CC'ing pavel          -> kernel/suspend
Comment 6 Pavel Machek 2005-09-06 20:35:32 UTC
Well, if it is broken even on insmod/rmmod, no wonder it breaks during suspend.
Why it depends on AC available I have no idea... perhaps timing is slightly changed?
Comment 7 Olaf Hering 2005-09-26 13:10:40 UTC
this happens also with vanilla 2.6.13 and a minimal config.
Comment 8 Olaf Hering 2005-09-27 10:55:51 UTC
works ok on a G4 and a pegasos.
Comment 9 Olaf Hering 2006-03-23 13:30:35 UTC
bug still present in 2.6.16.
Comment 10 Stefan Richter 2006-06-10 21:09:12 UTC
Does the controller of affected machines match PCI_DEVICE_ID_APPLE_UNI_N_FW == 0x0018? (Can be checked with "lspci; lcpci -n".)
Comment 11 Olaf Hering 2006-06-11 09:38:05 UTC
yes, its 00:0e.0 Class 0c00: 106b:0018 (rev 01)
Comment 12 Stefan Richter 2006-06-18 11:03:31 UTC
What if you allow for a pause between modprobe and rmmod?

for ((i=0; i<9; i++)); do echo load; modprobe ohci1394; echo OK; sleep 9; echo unload; modprobe -r ohci1394; echo OK; sleep 1; done

If this avoids the bug, then it is not specific to the PowerBook but actually the same as this upstream bug: http://bugzilla.kernel.org/show_bug.cgi?id=6706
Comment 13 Olaf Hering 2006-07-23 11:52:21 UTC
Created attachment 94270 [details]
build-pismo-ohci1394.sh

if I load sungem first, then a few insmod/rmmod cycles are possible. 
Same is true for current Linus tree. if config_sungem=y, the second modprobe dies due to machine check in ohci1394_pci_probe() -> ohci_soft_reset().
if config_sungem=n, the first rmmod hangs the system as usual.
Comment 14 Olaf Hering 2006-07-23 11:52:50 UTC
Created attachment 94271 [details]
config-2.6.18rc2-pismo-minimal.txt
Comment 15 Stefan Richter 2006-10-22 11:41:23 UTC
The upstream bug is fixed for me on x86 by 2.6.19-rc2, perhaps already by 2.6.18. "for ((i=0; i<9; i++));do echo $i; echo load; modprobe ohci1394 && echo unload && modprobe -r ohci1394 || break;done" works.

Could you test 2.6.18 and if necessary 2.6.19-rc2, without and with CONFIG_SUNGEM?
Comment 16 Stefan Richter 2006-11-05 10:28:22 UTC
A new related upstream bug was filed:
http://bugzilla.kernel.org/show_bug.cgi?id=7431
"ohci1394 Oops after a rmmod/modprobe cycle"
> When I 'rmmod ohci1394' and then 'modprobe ohci1394', I get a "Bus error"
> message from modprobe and my backlight is set to full brightness.
Comment 17 Stefan Richter 2006-11-05 17:58:25 UTC
Proposed patch: http://bugzilla.kernel.org/attachment.cgi?id=9407&action=view
Please test.
Comment 18 Olaf Hering 2006-11-06 16:58:23 UTC
makes no difference
Comment 19 Olaf Hering 2007-09-27 12:10:11 UTC
the insmod/rmmod loop works ok with firewire-ohci with 2.6.23-rc8