Re: SATA Problem: port is slow to respond

2007-03-28 Thread Rodney Padgett
Tejun Heo htejun at gmail.com writes:

 
 Sigmund Scheinbar wrote:
  Tejun Heo wrote:
  Please apply the attached patch over 2.6.20.1 and report how it works.
  
  I'm afraid that something went wrong while patching:
 
 Sorry, it was generated against the wrong tree.  Regenerated patch attached.
 
  BTW.: I'm just curious, what's the purpose of this patch, it looks to
  me like it is just going to ignore the problem? Or do you think that the
  hardware is faulty?
 
 ATAPI devices use error conditions regularly to report all sorts of
 things including media not present.  In some variants of ahci's, this
 sets seemingly unrelated error bits - JMBs set interface error and
 sb600s seem to set internal error.  These errors when interpreted
 literally require device reset to recover from thus ATAPI devices never
 get through device ready check.  So, the patch makes ahci driver
 suppress those spurious errors.
 
I had the same problem with kernel 2.6.20.3 (from kernel.org) on the same
machine (HP dc5750). I applied your patch, and the cd drive now works! dmesg
shows no errors logged, and I can access the drive without any problem.

Thanks,

Rod.

-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: SATA Problem: port is slow to respond

2007-02-27 Thread Tejun Heo
Hello,

Sigmund Scheinbar wrote:
 The following messages appear while booting/in dmesg [1]: 
 
 [...]
 ata2: port is slow to respond, please be patient (Status 0x80)
 ata2: port failed to respond (30 secs, Status 0x80)
 ata2: softreset failed (device not ready)
 ata2: softreset failed, retrying in 5 secs
 ata2: port is slow to respond, please be patient (Status 0x80)
 ata2: port failed to respond (30 secs, Status 0x80)
 ata2: COMRESET failed (device not ready)
 ata2: hardreset failed, retrying in 5 secs
 ata2: port is slow to respond, please be patient (Status 0x80)
 ata2: port failed to respond (30 secs, Status 0x80)
 ata2: COMRESET failed (device not ready)
 ata2: reset failed, giving up

It seems whatever device connected to that ata2 went out for lunch and
never returned.

 A further issue which -  imho is coupled w/ this one - is that my 
 cd/dvd+rw (also sata) combo drive does not work: 
 firstly there is no indication in dmesg that it was found and 
 secondly it behaves like dead: it does not open if i press the 
 button and it does not blink; it can be opened until
 these message appear on the screen. I need to unplug and the replug
 it after shutting down/reboot so that on the next bootup the bios 
 is able to find it (else it would still behave like dead)! 
 The drive itself is ok i guess (a least it works fine on a differen OS).

Is it happen to be a samsung one?

 [8.5.] PCI information ('lspci -vvv' as root)
 
 http://wieland.homelinux.org/hp_dc5750/lspci-vvv.txt

Your webserver is timing out.

 Also it seems that the System is not capeable of recongnizing 
 the HDD:
 hdparm -i /dev/sda
 HDIO_GET_IDENTITY failed: Inappropriate ioctl for device

This will work from 2.6.21; however, hdparm -I works now and is the
preferred way to get ID data.

 I tried several kernel version in the meantime, starting w/
 the standard debian testing i386 kernel, then tried different 
 vanilla versions 2.6.18.6, 2.6.19, 2.6.19.3 which are all 
 affected in the same way. However 2.6.20 behaves 
 differtly: there is another error message which scrolls over
 the screen so fast that i'm not able to read it, the only 
 thing i was able to catch that it also concerns (s)ata, looking like
 'ata2.0: [...] failed [...]' 

Any chance you can post dmesg from 2.6.20?  Does it fail to detect the
device your root partition resides?

-- 
tejun
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: SATA Problem: port is slow to respond

2007-02-27 Thread Tejun Heo
Please apply the attached patch over 2.6.20.1 and report how it works.

Thanks.

-- 
tejun
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 6d93240..2d7d97d 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -80,6 +80,7 @@ enum {
 	board_ahci_pi		= 1,
 	board_ahci_vt8251	= 2,
 	board_ahci_ign_iferr	= 3,
+	board_ahci_ign_interr	= 4,
 
 	/* global controller registers */
 	HOST_CAP		= 0x00, /* host capabilities */
@@ -168,6 +169,7 @@ enum {
 	AHCI_FLAG_NO_NCQ		= (1  24),
 	AHCI_FLAG_IGN_IRQ_IF_ERR	= (1  25), /* ignore IRQ_IF_ERR */
 	AHCI_FLAG_HONOR_PI		= (1  26), /* honor PORTS_IMPL */
+	AHCI_FLAG_IGN_SERR_INTERNAL	= (1  27), /* ignore SERR_INTERNAL */
 };
 
 struct ahci_cmd_hdr {
@@ -353,6 +355,17 @@ static const struct ata_port_info ahci_port_info[] = {
 		.udma_mask	= 0x7f, /* udma0-6 ; FIXME */
 		.port_ops	= ahci_ops,
 	},
+	/* board_ahci_ign_interr */
+	{
+		.sht		= ahci_sht,
+		.flags		= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
+  ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
+  ATA_FLAG_SKIP_D2H_BSY |
+  AHCI_FLAG_IGN_SERR_INTERNAL,
+		.pio_mask	= 0x1f, /* pio0-4 */
+		.udma_mask	= 0x7f, /* udma0-6 ; FIXME */
+		.port_ops	= ahci_ops,
+	},
 };
 
 static const struct pci_device_id ahci_pci_tbl[] = {
@@ -392,8 +405,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
 	{ PCI_VDEVICE(JMICRON, 0x2366), board_ahci_ign_iferr }, /* JMB366 */
 
 	/* ATI */
-	{ PCI_VDEVICE(ATI, 0x4380), board_ahci }, /* ATI SB600 non-raid */
-	{ PCI_VDEVICE(ATI, 0x4381), board_ahci }, /* ATI SB600 raid */
+	{ PCI_VDEVICE(ATI, 0x4380), board_ahci_ign_interr }, /* SB600 non-raid */
+	{ PCI_VDEVICE(ATI, 0x4381), board_ahci_ign_interr }, /* SB600 raid */
 
 	/* VIA */
 	{ PCI_VDEVICE(VIA, 0x3349), board_ahci_vt8251 }, /* VIA VT8251 */
@@ -454,9 +467,10 @@ static inline void __iomem *ahci_port_base(void __iomem *base,
 	return base + 0x100 + (port * 0x80);
 }
 
-static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg_in)
+static u32 ahci_scr_read(struct ata_port *ap, unsigned int sc_reg_in)
 {
 	unsigned int sc_reg;
+	u32 serr;
 
 	switch (sc_reg_in) {
 	case SCR_STATUS:	sc_reg = 0; break;
@@ -467,12 +481,13 @@ static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg_in)
 		return 0xU;
 	}
 
-	return readl(ap-ioaddr.scr_addr + (sc_reg * 4));
+	serr = readl(ap-ioaddr.scr_addr + (sc_reg * 4));
+	if (ap-flags  AHCI_FLAG_IGN_SERR_INTERNAL)
+		serr = ~SERR_INTERNAL;
+	return serr;
 }
 
-
-static void ahci_scr_write (struct ata_port *ap, unsigned int sc_reg_in,
-			   u32 val)
+static void ahci_scr_write(struct ata_port *ap, unsigned int sc_reg_in, u32 val)
 {
 	unsigned int sc_reg;
 


SATA Problem: port is slow to respond

2007-02-16 Thread Sigmund Scheinbar
[1.] One line summary of the problem:

SATA Problem: port is slow to respond

[2.] Full description of the problem/report:

The following messages appear while booting/in dmesg [1]: 

[...]
ata2: port is slow to respond, please be patient (Status 0x80)
ata2: port failed to respond (30 secs, Status 0x80)
ata2: softreset failed (device not ready)
ata2: softreset failed, retrying in 5 secs
ata2: port is slow to respond, please be patient (Status 0x80)
ata2: port failed to respond (30 secs, Status 0x80)
ata2: COMRESET failed (device not ready)
ata2: hardreset failed, retrying in 5 secs
ata2: port is slow to respond, please be patient (Status 0x80)
ata2: port failed to respond (30 secs, Status 0x80)
ata2: COMRESET failed (device not ready)
ata2: reset failed, giving up
scsi2 : ahci
[...]

This of course means extra long booting time :(
[1] http://wieland.homelinux.org/hp_dc5750/dmesg_2.6.19.3.txt

A further issue which -  imho is coupled w/ this one - is that my 
cd/dvd+rw (also sata) combo drive does not work: 
firstly there is no indication in dmesg that it was found and 
secondly it behaves like dead: it does not open if i press the 
button and it does not blink; it can be opened until
these message appear on the screen. I need to unplug and the replug
it after shutting down/reboot so that on the next bootup the bios 
is able to find it (else it would still behave like dead)! 
The drive itself is ok i guess (a least it works fine on a differen OS).

I found a debian bug report where the problem (but unfortunately 
not a solution that worked for me) is described:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=391867

[3.] Keywords (i.e., modules, networking, kernel):

SATA, ATA

[4.] Kernel version (from /proc/version):

Linux version 2.6.19.3 ([EMAIL PROTECTED]) (gcc version 4.1.2 20061115 
(prerelease) (Debian 4.1.1-21)) #2 SMP Thu Feb 15 02:59:14 CET 2007

[8.1.] Software (add the output of the ver_linux script here)

http://wieland.homelinux.org/hp_dc5750/ver_linux.txt

[8.2.] Processor information (from /proc/cpuinfo):

http://wieland.homelinux.org/hp_dc5750/proc_cpuinfo.txt

[8.3.] Module information (from /proc/modules):

http://wieland.homelinux.org/hp_dc5750/proc_modules.txt

[8.4.] Loaded driver and hardware information (/proc/ioports, /proc/iomem)

http://wieland.homelinux.org/hp_dc5750/proc_iomem.txt
http://wieland.homelinux.org/hp_dc5750/proc_ioports.txt

[8.5.] PCI information ('lspci -vvv' as root)

http://wieland.homelinux.org/hp_dc5750/lspci-vvv.txt

[8.6.] SCSI information (from /proc/scsi/scsi)

http://wieland.homelinux.org/hp_dc5750/proc_scsi_scsi.txt

[X.] Other notes, patches, fixes, workarounds:

Also it seems that the System is not capeable of recongnizing 
the HDD:
hdparm -i /dev/sda
HDIO_GET_IDENTITY failed: Inappropriate ioctl for device

On lkml I found similar report, but no solution:
http://lkml.org/lkml/2007/1/2/107

A user on an German mailinglist suggest to uses pata_atiixp 
instead of atiixp but yet again this does not work for me: 
http://lists.opensuse.org/archive/opensuse-mobile-de/
2007-01/msg1.html

All the information i collection can be found at:
http://wieland.homelinux.org/hp_dc5750/

I tried several kernel version in the meantime, starting w/
the standard debian testing i386 kernel, then tried different 
vanilla versions 2.6.18.6, 2.6.19, 2.6.19.3 which are all 
affected in the same way. However 2.6.20 behaves 
differtly: there is another error message which scrolls over
the screen so fast that i'm not able to read it, the only 
thing i was able to catch that it also concerns (s)ata, looking like
'ata2.0: [...] failed [...]' 

Greetings,
Sigmund
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html