Skip to contentSkip to conversation

sata_nv: ck804 has borked hardreset too

PATCH Applied Tejun Heo 3 participants 3 messages Feb 1, 2009 – Feb 3, 2009 libata

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 sata_nv: ck804 has borked hardreset too

While playing with nvraid, I found out that rmmoding and insmoding often trigger hardreset failure on the first port (the second one was always okay). Seriously, how diverse can you get with hardreset behaviors? Anyways, make ck804 use noclassify variant too.

---
Robert, ISTR that a user was reporting probing problem on ck804, I think the user could have been seeing this. The behavior on my motherboard is very curious. The problem is always with the first port. If booted from cdrom, it always fails. If booted from harddrive, the initial probing works fine but from the second time on, it fails. Argh...

 drivers/ata/sata_nv.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/ata/sata_nv.c +6 -1
index c49ad0e..444af04 100644
@@ -436,11 +436,16 @@ static struct ata_port_operations nv_nf2_ops = {
 	.hardreset		= nv_noclassify_hardreset,
 };
 
-/* CK804 finally gets hardreset right */
+/* For initial probing after boot and hot plugging, hardreset mostly
+ * works fine on CK804 but curiously, reprobing on the initial port by
+ * rescanning or rmmod/insmod fails to acquire the initial D2H Reg FIS
+ * in somewhat undeterministic way.  Use noclassify hardreset.
+ */
 static struct ata_port_operations nv_ck804_ops = {
 	.inherits		= &nv_common_ops,
 	.freeze			= nv_ck804_freeze,
 	.thaw			= nv_ck804_thaw,
+	.hardreset		= nv_noclassify_hardreset,
 	.host_stop		= nv_ck804_host_stop,
 };
 
#1 lore raw
Quoted 5 lines · Tejun Heo

While playing with nvraid, I found out that rmmoding and insmoding often trigger hardreset failure on the first port (the second one was always okay). Seriously, how diverse can you get with hardreset behaviors? Anyways, make ck804 use noclassify variant too.

Quoted 8 lines

---
Robert, ISTR that a user was reporting probing problem on ck804, I think the user could have been seeing this. The behavior on my motherboard is very curious. The problem is always with the first port. If booted from cdrom, it always fails. If booted from harddrive, the initial probing works fine but from the second time on, it fails. Argh...

Yeah, it's amazing how their controllers can be messed up with hardreset in so many varying and creative ways. One only hopes their newer AHCI based controllers have fewer bugs..

I saw another problem recently on CK804, where an error occurs on a DVD drive (due to a scratched disc or something). This was in Windows, using the default Microsoft IDE driver. It would either blue-screen the machine with a machine check exception or just cause a hard lockup. People have reported this in Linux as well, it seems like the controller fails to respond to register accesses and triggers a northbridge transaction timeout MCE. Obviously not a driver problem, then.. Ended up switching the optical drives to the Silicon Image controller on this board because the CK804 controller just wasn't reliable with them.

Applied
#2 lore raw
In reply to Tejun Heo
Quoted 14 lines · Tejun Heo

While playing with nvraid, I found out that rmmoding and insmoding often trigger hardreset failure on the first port (the second one was always okay). Seriously, how diverse can you get with hardreset behaviors? Anyways, make ck804 use noclassify variant too.

---
Robert, ISTR that a user was reporting probing problem on ck804, I think the user could have been seeing this. The behavior on my motherboard is very curious. The problem is always with the first port. If booted from cdrom, it always fails. If booted from harddrive, the initial probing works fine but from the second time on, it fails. Argh...

Quoted 3 lines
 drivers/ata/sata_nv.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

applied