Bug 13501
Summary: | Resuming from Suspend To Ram (S3) Causes firewire disk to be redected. | ||
---|---|---|---|
Product: | Drivers | Reporter: | Hakan Bayindir (hbayindir) |
Component: | IEEE1394 | Assignee: | drivers_ieee1394 |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | alan, hbayindir, stefanr |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.26, 2.6.29, 2.6.30-RC8 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: |
dmesg output taken from 2.6.29 after a suspend and resume cycle
dmesg output taken from 2.6.30-rc8 after a suspend and resume cycle lspci -vvv output taken from 2.6.29 dmesg output of test case: resume with unmounted disk, no workarounds dmesg output of test case: resume with unmounted disk, w/workaround 0x20 dmesg output of test case: resume with mounted disk, w/workaround 0x20 dmesg output of test case: resume with unmounted disk, w/workaround 0x20 & debug level 7 |
Description
Hakan Bayindir
2009-06-10 18:51:37 UTC
Created attachment 21840 [details]
dmesg output taken from 2.6.29 after a suspend and resume cycle
Created attachment 21841 [details]
dmesg output taken from 2.6.30-rc8 after a suspend and resume cycle
Created attachment 21842 [details]
lspci -vvv output taken from 2.6.29
> - Was not happening before but I cannot remember the exact version.
> should be 24 or 25.
Do you remember whether you used the old drivers (ohci1394 + ieee1394 + sbp2) or the new drivers (firewire-ohci + -core + -sbp2) at the time when it still worked?
Thanks for the logs. What's going on is that the firewire drivers are able to re-attach the disk as the very same SCSI device like before suspend. But when the "Start Stop Unit" command to turn on the spindle motor is sent, it somehow fails and the kernel drops the existing SCSI device. I'm not yet sure why these latter two things happen.
Please try the following:
# echo 0x20 > /sys/module/firewire_sbp2/parameters/workarounds
Then unmount the disk and unplug the disk.
Plug it back in. (You don't need to mount it.)
Suspend and resume.
Check whether it still changed the SCSI device number after resume, and if so, whether it was with the same pattern of messages like in your attached logs.
Furthermore, if the 0x20 workaround ( = enable extra parameters in the SCSI Start Stop Unit command) does not work, please generate a debug log:
Attach the disk. (You don't need to mount it.)
# echo 7 > /sys/module/firewire_ohci/parameters/debug
Suspend and resume.
Attach the resulting dmesg here.
You can disable the debug logging again after that with:
# echo 0 > /sys/module/firewire_ohci/parameters/debug
Hi, Sorry for the late reply. I've ran the tests and found that the workaround didn't work either. I've executed following scenarios: - Disk unmounted, no workarounds enabled. - Disk unmounted, workaround 0x20 enabled. - Disk mounted, workaround 0x20 enabled. - Disk mounted, workaround 0x20 enabled with debug level 7. I also noted some strange behaviour of the disk which is not software related but related to design of the disk. When disk is plugged in it spins up briefly and then stops (self test and boot?), then spins up again. This is its behaviour since day one. It suggests me that disk waits a bit to become ready and kernel is too impatient about its command replies. I also tend to think that this was not happening before because firewire drives are scanned last and this behaviour was deterministic. Now firewire devices are probed first on boot and resume so on resume probing occurs before disk is ready (this brings another problem of changing resume device if the disk is not present but this is another matter). Created attachment 22036 [details]
dmesg output of test case: resume with unmounted disk, no workarounds
Created attachment 22037 [details]
dmesg output of test case: resume with unmounted disk, w/workaround 0x20
Created attachment 22038 [details]
dmesg output of test case: resume with mounted disk, w/workaround 0x20
Created attachment 22039 [details]
dmesg output of test case: resume with unmounted disk, w/workaround 0x20 & debug level 7
Correction: I've run the last test with disk unmounted, so the last case is - Disk unmounted, workaround 0x20 enabled with debug level 7. A similar report arrived at linux1394-user: http://marc.info/?t=125481515600002 Hardware: RaidSonic Icy Dock MB-559UEA-1S Kernel: 2.6.31 (worked with some 2.6.31-rc, but failed with 2.6.31-rc when tested again) |