[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#671689: [regression 3.2->3.3.4] sata_sil (on sil 3512) hotplug broken again



tags 671689 + upstream patch moreinfo
# regression
severity 671689 important
quit

Hi Michael,

Michael Schmitt wrote:

> sorry that it took so long, but now I have the time to test the
> hotplugging with a kernel >= 3.3 :)

Awesome, thanks for the logs.

[...]
> dmesg logs directly pasted here. So first, booted with powered down
> esata enclosure and now, poweron:
>
> [36997.268364] ata5: exception Emask 0x10 SAct 0x0 SErr 0x50000 action 0xe frozen
> [36997.268370] ata5: SError: { PHYRdyChg CommWake }
> [36997.268383] ata5: hard resetting link
> [37003.032028] ata5: link is slow to respond, please be patient (ready=-19)
> [37003.088037] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[...]
> [37003.151688] sd 4:0:0:0: [sdg] Attached SCSI disk
>
> Disk works.

As before.  Good.

[...]
> mounted.... and umount again, now powerdown.
>
> [37437.877977] ata5: exception Emask 0x10 SAct 0x0 SErr 0x10000 action 0xe frozen
> [37437.877982] ata5: SError: { PHYRdyChg }
> [37437.877995] ata5: hard resetting link
> [37438.600030] ata5: SATA link down (SStatus 0 SControl 310)
> [37443.604027] ata5: hard resetting link
[...]
> [37449.244062] ata5.00: detaching (SCSI 4:0:0:0)
> [37449.245755] sd 4:0:0:0: [sdg] Synchronizing SCSI cache
> [37449.245788] sd 4:0:0:0: [sdg]  Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
> [37449.245792] sd 4:0:0:0: [sdg] Stopping disk
> [37449.245800] sd 4:0:0:0: [sdg] START_STOP FAILED
> [37449.245802] sd 4:0:0:0: [sdg]  Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
>
> Drive gone... now, power-up again.

Ok.

> adrastea:~# dmesg
> adrastea:~#
>
> Nothing. I did clear the kernel-message log in between...

By contrast in 3.2.y you got the following:

	[ 4192.173127] sd 4:0:0:0: [sdg]  Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
	[ 4237.416151] ata5: exception Emask 0x10 SAct 0x0 SErr 0x50000 action 0xe frozen
	[ 4237.416157] ata5: SError: { PHYRdyChg CommWake }
	[ 4237.416172] ata5: hard resetting link

So it looks like the PHYRdyChg CommWake exception is not arriving for
some reason.

>                                                           so module
> modprobe-cycling...
>
> [38290.316274] sata_sil 0000:01:01.0: version 2.4
> [38290.319815] scsi7 : sata_sil
> [38290.319986] scsi8 : sata_sil
> [38290.320067] ata7: SATA max UDMA/100 mmio m512@0xbbeffc00 tf 0xbbeffc80 irq 21
> [38290.320071] ata8: SATA max UDMA/100 mmio m512@0xbbeffc00 tf 0xbbeffcc0 irq 21
> [38290.640039] ata7: SATA link up 1.5 Gbps (SStatus 113 SControl 310)

And a workaround.

[...]
> and the drve is back. So first, the modprobe-cycling does work with
> the neweset kernel 3.3. I guess there was some other hickup the last
> time that did prevent the module unloading. But the thing with
> "notswap broken" is definitely there. It works only ONE time and all
> subsequent hotplug (powerdown or disk pluggin, tested both at least
> 5 times in a row, two test-lines, with modprobe-cycling in between)
> events get ignored.
>
> Running 3.3.0-trunk-686-pae (3.3-1~experimental.1) right now. Oops,
> testing with 3.3.4-1~experimental.1 now, but I am sure it will
> happen there as well. I will report back after the next reboot. :)

Please test the attached patch, for example following the instructions
from [1].  (Found at [2].)

Thanks,
Jonathan

[1] http://kernel-handbook.alioth.debian.org/ch-common-tasks.html#s-common-official
or the corresponding page in the debian-kernel-handbook package
[2] http://thread.gmane.org/gmane.linux.ide/51860/focus=51881
From: Lin Ming <ming.m.lin@intel.com>
Date: Wed, 18 Apr 2012 09:29:47 +0800
Subject: libata: forbid port runtime pm by default, fixing regression

commit 0c8d32c27f5cf6e14ca14b4758d1e994eebd50fd upstream.

Forbid port runtime pm by default because it has known hotplug issue.
User can allow it by, for example

echo auto > /sys/devices/pci0000:00/0000:00:1f.2/ata2/power/control

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 drivers/ata/libata-transport.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/ata/libata-transport.c b/drivers/ata/libata-transport.c
index 74aaee30e264..c34190485377 100644
--- a/drivers/ata/libata-transport.c
+++ b/drivers/ata/libata-transport.c
@@ -294,6 +294,7 @@ int ata_tport_add(struct device *parent,
 	device_enable_async_suspend(dev);
 	pm_runtime_set_active(dev);
 	pm_runtime_enable(dev);
+	pm_runtime_forbid(dev);
 
 	transport_add_device(dev);
 	transport_configure_device(dev);
-- 
1.7.10.2


Reply to: