linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ata_piix 2.6.25 sata failure
@ 2008-05-13  7:56 Matthieu CASTET
  2008-05-15  7:41 ` Matthieu CASTET
  0 siblings, 1 reply; 4+ messages in thread
From: Matthieu CASTET @ 2008-05-13  7:56 UTC (permalink / raw)
  To: linux-kernel, linux-ide

Hi,

the 2.6.25 from debian fail to make work the second port. I got a "SATA 
link down (SStatus 61 Scontrol 30)" for ata2. ata1 got "SATA link up 3.0 
Gbps (SStatus 13 SControl 30)"
The 2.6.24 works [1]. But some previous kernel (IRRC 2.6.18) had the 
same problem, ie ata2 doesn't work.

My hardware is a intel ICH8[2]

Matthieu



[1]
scsi0 : ata_piix
scsi1 : ata_piix
ata1: SATA max UDMA/133 cmd 0x1f0 ctl 0x3f6 bmdma 0x11f0 irq 14
ata2: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0x11f8 irq 15
ata1.00: ATA-7: SAMSUNG HD080HJ/P, ZH100-43, max UDMA/100
ata1.00: 156301488 sectors, multi 16: LBA48
ata1.00: configured for UDMA/100
ata2.00: ATA-7: SAMSUNG HD160JJ/P, ZM100-46, max UDMA7
ata2.00: 312581808 sectors, multi 16: LBA48 NCQ (depth 0/32)
ata2.01: ATAPI: HL-DT-STDVD+-RW GSA-H31L, 1.05, max UDMA/100
ata2.00: configured for UDMA/133
ata2.01: configured for UDMA/100


[2]
00:1f.2 IDE interface: Intel Corporation 82801H (ICH8 Family) 4 port 
SATA IDE Controller (rev 02)
00:1f.2 0101: 8086:2820 (rev 02)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ata_piix 2.6.25 sata failure
  2008-05-13  7:56 ata_piix 2.6.25 sata failure Matthieu CASTET
@ 2008-05-15  7:41 ` Matthieu CASTET
  2008-05-15  7:57   ` Tejun Heo
  0 siblings, 1 reply; 4+ messages in thread
From: Matthieu CASTET @ 2008-05-15  7:41 UTC (permalink / raw)
  Cc: linux-kernel, linux-ide, Tejun Heo

Hi Tejun,

Matthieu CASTET wrote:
> Hi,
> 
> the 2.6.25 from debian fail to make work the second port. I got a "SATA 
> link down (SStatus 61 Scontrol 30)" for ata2. ata1 got "SATA link up 3.0 
> Gbps (SStatus 13 SControl 30)"
> The 2.6.24 works [1]. But some previous kernel (IRRC 2.6.18) had the 
> same problem, ie ata2 doesn't work.
> 
I saw you post a patch for macbook for correcting a bug with ata_ppiix.
But it doesn't seem the same problem. I don't get 0 but others values.

May be a problem occurs when merging the master and slave status register ?


Any idea how to debug this.

For information this happen on a HP Compaq dc7700p, and there no way on 
the bios to change the controller to ahci mode


Thanks

Matthieu


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ata_piix 2.6.25 sata failure
  2008-05-15  7:41 ` Matthieu CASTET
@ 2008-05-15  7:57   ` Tejun Heo
  2008-05-15 11:15     ` Matthieu CASTET
  0 siblings, 1 reply; 4+ messages in thread
From: Tejun Heo @ 2008-05-15  7:57 UTC (permalink / raw)
  To: Matthieu CASTET; +Cc: linux-kernel, linux-ide

[-- Attachment #1: Type: text/plain, Size: 894 bytes --]

Matthieu CASTET wrote:
> Hi Tejun,
> 
> Matthieu CASTET wrote:
>> Hi,
>>
>> the 2.6.25 from debian fail to make work the second port. I got a 
>> "SATA link down (SStatus 61 Scontrol 30)" for ata2. ata1 got "SATA 
>> link up 3.0 Gbps (SStatus 13 SControl 30)"
>> The 2.6.24 works [1]. But some previous kernel (IRRC 2.6.18) had the 
>> same problem, ie ata2 doesn't work.
>>
> I saw you post a patch for macbook for correcting a bug with ata_ppiix.
> But it doesn't seem the same problem. I don't get 0 but others values.
> 
> May be a problem occurs when merging the master and slave status register ?
> 
> 
> Any idea how to debug this.
> 
> For information this happen on a HP Compaq dc7700p, and there no way on 
> the bios to change the controller to ahci mode

Yeah, I wrote a patch for that yesterday and forgot to actually send it. 
  Can you please test the attached patch?

-- 
tejun

[-- Attachment #2: libata-force-hardreset-if-link-pm --]
[-- Type: text/plain, Size: 1512 bytes --]

From: Tejun Heo <teheo@suse.de>
Subject: libata: force hardreset if link is in powersave mode
References: 381795

Inhibiting link PM mode doesn't bring the link back online if it's
already in powersave mode.  If SRST is used in these cases, libata EH
thinks that the link is offline and fails detection.  Force hardreset
if link is in powersave mode.

Signed-off-by: Tejun Heo <teheo@suse.de>
---
 drivers/ata/libata-core.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

Index: linux-2.6.25/drivers/ata/libata-core.c
===================================================================
--- linux-2.6.25.orig/drivers/ata/libata-core.c
+++ linux-2.6.25/drivers/ata/libata-core.c
@@ -3960,6 +3960,7 @@ int ata_std_prereset(struct ata_link *li
 	struct ata_port *ap = link->ap;
 	struct ata_eh_context *ehc = &link->eh_context;
 	const unsigned long *timing = sata_ehc_deb_timing(ehc);
+	u32 sstatus;
 	int rc;
 
 	/* handle link resume */
@@ -3973,6 +3974,17 @@ int ata_std_prereset(struct ata_link *li
 	if (ap->flags & ATA_FLAG_PMP)
 		ehc->i.action |= ATA_EH_HARDRESET;
 
+	/* if link powersave is on, force hardreset */
+	if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0) {
+		u8 ipm = sstatus >> 8;
+
+		if (ipm == 2 || ipm == 6) {
+			ata_link_printk(link, KERN_INFO, "link in powersave "
+				"mode (ipm=%d), forcing hardreset\n", ipm);
+			ehc->i.action |= ATA_EH_HARDRESET;
+		}
+	}
+
 	/* if we're about to do hardreset, nothing more to do */
 	if (ehc->i.action & ATA_EH_HARDRESET)
 		return 0;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ata_piix 2.6.25 sata failure
  2008-05-15  7:57   ` Tejun Heo
@ 2008-05-15 11:15     ` Matthieu CASTET
  0 siblings, 0 replies; 4+ messages in thread
From: Matthieu CASTET @ 2008-05-15 11:15 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-kernel, linux-ide

Hi,

Tejun Heo wrote:
> Matthieu CASTET wrote:
>> Hi Tejun,
>>
>> Matthieu CASTET wrote:
>>
>>
>> Any idea how to debug this.
>>
>> For information this happen on a HP Compaq dc7700p, and there no way 
>> on the bios to change the controller to ahci mode
> 
> Yeah, I wrote a patch for that yesterday and forgot to actually send it. 
>  Can you please test the attached patch?
> 

thanks, it seems to work :

  ata_piix 0000:00:1f.2: version 2.12
  ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 18 (level, low) -> IRQ 18
  ata_piix 0000:00:1f.2: MAP [ P0 P2 P1 P3 ]
  PCI: Setting latency timer of device 0000:00:1f.2 to 64
  scsi0 : ata_piix
  scsi1 : ata_piix
  ata1: SATA max UDMA/133 cmd 0x1f0 ctl 0x3f6 bmdma 0x11f0 irq 14
  ata2: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0x11f8 irq 15
  ata1: link in powersave mode (ipm=2), forcing hardreset
  ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
  ata1.00: ATA-7: SAMSUNG HD080HJ/P, ZH100-43, max UDMA/100
  ata1.00: 156301488 sectors, multi 16: LBA48
  ata1.00: configured for UDMA/100
  ata2: link in powersave mode (ipm=2), forcing hardreset
  ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
  ata2.00: ATA-7: SAMSUNG HD160JJ/P, ZM100-46, max UDMA7
  ata2.00: 312581808 sectors, multi 16: LBA48 NCQ (depth 0/32)
  ata2.01: ATAPI: HL-DT-STDVD+-RW GSA-H31L, 1.05, max UDMA/100
  ata2.00: configured for UDMA/133
  ata2.01: configured for UDMA/100


Matthieu

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-05-15 11:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-13  7:56 ata_piix 2.6.25 sata failure Matthieu CASTET
2008-05-15  7:41 ` Matthieu CASTET
2008-05-15  7:57   ` Tejun Heo
2008-05-15 11:15     ` Matthieu CASTET

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).