Re: Boot fails on Intel SATA controller

2007-08-06 Thread Quel Qun
The kernel compiles and boots after applying this patch to 2.6.23-rc1.
--
Eric

 -- Original message --
From: Tejun Heo [EMAIL PROTECTED]
 Please test the attached patch.
 
 -- 
 tejun


---BeginMessage---
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 60e78be..7158a06 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1911,7 +1911,8 @@ int ata_dev_configure(struct ata_device *dev)
 	dev-flags |= ATA_DFLAG_FLUSH_EXT;
 			}
 
-			if (ata_id_hpa_enabled(dev-id))
+			if (!(dev-horkage  ATA_HORKAGE_BROKEN_HPA) 
+			ata_id_has_hpa(id)  ata_id_hpa_enabled(dev-id))
 dev-n_sectors = ata_hpa_resize(dev);
 
 			/* config NCQ */
@@ -3789,6 +3790,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
 	{ FUJITSU MHV2080BH,	00840028,	ATA_HORKAGE_NONCQ, },
 	{ ST9160821AS,	3.CLF,	ATA_HORKAGE_NONCQ, },
 	{ SAMSUNG HD401LJ,	ZZ100-15,	ATA_HORKAGE_NONCQ, },
+	{ HDS724040KLSA80,	KFAOA20N,	ATA_HORKAGE_BROKEN_HPA, },
 
 	/* Devices with NCQ limits */
 
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 41978a5..a67bb90 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -303,6 +303,7 @@ enum {
 	ATA_HORKAGE_NODMA	= (1  1),	/* DMA problems */
 	ATA_HORKAGE_NONCQ	= (1  2),	/* Don't use NCQ */
 	ATA_HORKAGE_MAX_SEC_128	= (1  3),	/* Limit max sects to 128 */
+	ATA_HORKAGE_BROKEN_HPA	= (1  4),	/* Broken HPA */
 };
 
 enum hsm_task_states {
---End Message---


Re: Boot fails on Intel SATA controller

2007-08-04 Thread Tejun Heo
Please test the attached patch.

-- 
tejun
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 60e78be..7158a06 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1911,7 +1911,8 @@ int ata_dev_configure(struct ata_device *dev)
 	dev-flags |= ATA_DFLAG_FLUSH_EXT;
 			}
 
-			if (ata_id_hpa_enabled(dev-id))
+			if (!(dev-horkage  ATA_HORKAGE_BROKEN_HPA) 
+			ata_id_has_hpa(id)  ata_id_hpa_enabled(dev-id))
 dev-n_sectors = ata_hpa_resize(dev);
 
 			/* config NCQ */
@@ -3789,6 +3790,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
 	{ FUJITSU MHV2080BH,	00840028,	ATA_HORKAGE_NONCQ, },
 	{ ST9160821AS,	3.CLF,	ATA_HORKAGE_NONCQ, },
 	{ SAMSUNG HD401LJ,	ZZ100-15,	ATA_HORKAGE_NONCQ, },
+	{ HDS724040KLSA80,	KFAOA20N,	ATA_HORKAGE_BROKEN_HPA, },
 
 	/* Devices with NCQ limits */
 
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 41978a5..a67bb90 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -303,6 +303,7 @@ enum {
 	ATA_HORKAGE_NODMA	= (1  1),	/* DMA problems */
 	ATA_HORKAGE_NONCQ	= (1  2),	/* Don't use NCQ */
 	ATA_HORKAGE_MAX_SEC_128	= (1  3),	/* Limit max sects to 128 */
+	ATA_HORKAGE_BROKEN_HPA	= (1  4),	/* Broken HPA */
 };
 
 enum hsm_task_states {


Re: Boot fails on Intel SATA controller

2007-08-03 Thread Tejun Heo
Quel Qun wrote:
 ATA device, with non-removable media
 powers-up in standby; SET FEATURES subcmd spins-up.
 Model Number:   HDS724040KLSA80 
 Serial Number:  KRFS11RAGT2EZC
 Firmware Revision:  KFAOA20N
 Standards:
 Used: ATA/ATAPI-7 T13 1532D revision 1 
 Supported: 7 6 5 4 
 Configuration:
 Logical max current
 cylinders   16383   16383
 heads   16  16
 sectors/track   63  63
 --
 CHS current addressable sectors:   16514064
 LBAuser addressable sectors:  268435455
 LBA48  user addressable sectors:  781422768
 device size with M = 1024*1024:  381554 MBytes
 device size with M = 1000*1000:  400088 MBytes (400 GB)
 Capabilities:
 LBA, IORDY(can be disabled)
 Standby timer values: spec'd by Standard, no device specific minimum
 R/W multiple sector transfer: Max = 16  Current = 8
 Advanced power management level: unknown setting (0x)
 Recommended acoustic management value: 128, current value: 128
 DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
  Cycle time: min=120ns recommended=120ns
 PIO: pio0 pio1 pio2 pio3 pio4 
  Cycle time: no flow control=240ns  IORDY flow control=120ns
 Commands/features:
 Enabled Supported:
*SMART feature set
 Security Mode feature set
*Power Management feature set
*Write cache
*Look-ahead
*Host Protected Area feature set

This is weird.  HPA is supported  enabled but
read_native_max_address_ext times out.  Can you post the result of
'hdparm --Istdout /dev/sda'?

-- 
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: Boot fails on Intel SATA controller

2007-08-02 Thread Quel Qun

 -- Original message --
From: Tejun Heo [EMAIL PROTECTED]
 Quel Qun wrote:
   -- Original message --
  From: Tejun Heo [EMAIL PROTECTED]
  Hello,
 
  Luiz Fernando N. Capitulino wrote:
   Hi there,
 
   A Mandriva user is reporting that his machine hangs while booting
  kernels 2.6.22.1 and 2.6.23-rc1.
 
   But boots fine with 2.6.21.
 

 Does the attached patch change anything?
 

Hi and thanks for answering.

2.6.23-rc1 boots if I comment out these two lines. The drive does have the two 
original dell special partitions that were on it when I received the computer 
(sda1 and sda3).

Here is some info I could gather about the disk. Let me know if you need 
anything else.

Boot log:

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)^M
ata1.00: ATA-7: HDS724040KLSA80, KFAOA20N, max UDMA/133^M
ata1.00: 781422768 sectors, multi 8: LBA48 ^M
ata1.00: configured for UDMA/133^M
scsi 0:0:0:0: Direct-Access ATA  HDS724040KLSA80  KFAO PQ: 0 ANSI: 5^M
Loading ata_piixACPI: PCI Interrupt :00:1f.1[A] - .ko module^M

The disk partitions:

# fdisk -l /dev/sda

Disk /dev/sda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot  Start End  Blocks   Id  System
/dev/sda1   1   6   48163+  de  Dell Utility
/dev/sda2   *   79440757786057  HPFS/NTFS
/dev/sda3   48283   48641 2883667+  db  CP/M / CTOS / ...
/dev/sda49441   48282   3119983655  Extended
/dev/sda59441   10068 5044378+   b  W95 FAT32
/dev/sda6   10069   10322 2040223+  83  Linux
/dev/sda7   10323   10462 1124518+  82  Linux swap / Solaris
/dev/sda8   10463   1173610233373+  83  Linux
/dev/sda9   11737   29948   146287858+  83  Linux
/dev/sda10  29949   48282   147267823+  83  Linux

Partition table entries are not in disk order

And the hdparm output:

# hdparm -I /dev/sda

/dev/sda:

ATA device, with non-removable media
powers-up in standby; SET FEATURES subcmd spins-up.
Model Number:   HDS724040KLSA80 
Serial Number:  KRFS11RAGT2EZC
Firmware Revision:  KFAOA20N
Standards:
Used: ATA/ATAPI-7 T13 1532D revision 1 
Supported: 7 6 5 4 
Configuration:
Logical max current
cylinders   16383   16383
heads   16  16
sectors/track   63  63
--
CHS current addressable sectors:   16514064
LBAuser addressable sectors:  268435455
LBA48  user addressable sectors:  781422768
device size with M = 1024*1024:  381554 MBytes
device size with M = 1000*1000:  400088 MBytes (400 GB)
Capabilities:
LBA, IORDY(can be disabled)
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16  Current = 8
Advanced power management level: unknown setting (0x)
Recommended acoustic management value: 128, current value: 128
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
 Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4 
 Cycle time: no flow control=240ns  IORDY flow control=120ns
Commands/features:
Enabled Supported:
   *SMART feature set
Security Mode feature set
   *Power Management feature set
   *Write cache
   *Look-ahead
   *Host Protected Area feature set
   *WRITE_BUFFER command
   *READ_BUFFER command
   *NOP cmd
   *DOWNLOAD_MICROCODE
Advanced Power Management feature set
Power-Up In Standby feature set
SET_FEATURES required to spinup after power up
Address Offset Reserved Area Boot
SET_MAX security extension
   *Automatic Acoustic Management feature set
   *48-bit Address feature set
   *Device Configuration Overlay feature set
   *Mandatory FLUSH_CACHE
   *FLUSH_CACHE_EXT
   *SMART error logging
   *SMART self-test
   *General Purpose Logging feature set
   *64-bit World wide name
   *SATA-I signaling speed (1.5Gb/s)
Security: 
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
not supported: enhanced erase
220min for SECURITY ERASE UNIT. 
Checksum: correct

Hope that helps,
--
kk1

---BeginMessage---
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index d8c6789..af5db69 100644
--- 

Re: Boot fails on Intel SATA controller

2007-08-01 Thread Tejun Heo
Hello,

Luiz Fernando N. Capitulino wrote:
  Hi there,
 
  A Mandriva user is reporting that his machine hangs while booting
 kernels 2.6.22.1 and 2.6.23-rc1.
 
  But boots fine with 2.6.21.
 
 Here is the 2.6.22 boot log:
 
 
 SCSI subsystem initialized
 Loading scsi_mod.ko module
 Loading libata.ko module
 ACPI: PCI Interrupt :00:1f.2[C] - Loading ahci.ko GSI 20 (level, low) -
 IRQ 18
 module
 input: ImPS/2 Logitech Wheel Mouse as /class/input/input1
 ahci :00:1f.2: AHCI 0001. 32 slots 4 ports 1.5 Gbps 0xf impl IDE mode
 ahci :00:1f.2: flags: 64bit ncq pm led slum part
 scsi0 : ahci
 scsi1 : ahci
 scsi2 : ahci
 scsi3 : ahci
 ata1: SATA max UDMA/133 cmd 0xf881ad00 ctl 0x bmdma 0x irq 18
 ata2: SATA max UDMA/133 cmd 0xf881ad80 ctl 0x bmdma 0x irq 18
 ata3: SATA max UDMA/133 cmd 0xf881ae00 ctl 0x bmdma 0x irq 18
 ata4: SATA max UDMA/133 cmd 0xf881ae80 ctl 0x bmdma 0x irq 18
 ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
 ata1.00: qc timeout (cmd 0x27)
 ata1.00: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (781422768)
 ata1.00: ATA-7: HDS724040KLSA80, KFAOA20N, max UDMA/133
 ata1.00: 781422768 sectors, multi 8: LBA48
 ata1.00: failed to set xfermode (err_mask=0x40)
 ata1: failed to recover some devices, retrying in 5 secs

What happens after this?

-- 
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: Boot fails on Intel SATA controller

2007-08-01 Thread Quel Qun

 -- Original message --
From: Tejun Heo [EMAIL PROTECTED]
 Hello,
 
 Luiz Fernando N. Capitulino wrote:
   Hi there,
  
   A Mandriva user is reporting that his machine hangs while booting
  kernels 2.6.22.1 and 2.6.23-rc1.
  
   But boots fine with 2.6.21.
  
  ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
  ata1.00: qc timeout (cmd 0x27)
  ata1.00: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors 
  (781422768)
  ata1.00: ATA-7: HDS724040KLSA80, KFAOA20N, max UDMA/133
  ata1.00: 781422768 sectors, multi 8: LBA48
  ata1.00: failed to set xfermode (err_mask=0x40)
  ata1: failed to recover some devices, retrying in 5 secs
 
 What happens after this?
 
It basically retries a few times, then fails to boot. Here is a more complete 
log with 2.6.23-rc1:

ata1: SATA max UDMA/133 cmd 0xf881ad00 ctl 0x bmdma 0x irq 18^M
ata2: SATA max UDMA/133 cmd 0xf881ad80 ctl 0x bmdma 0x irq 18^M
ata3: SATA max UDMA/133 cmd 0xf881ae00 ctl 0x bmdma 0x irq 18^M
ata4: SATA max UDMA/133 cmd 0xf881ae80 ctl 0x bmdma 0x irq 18^M
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)^M
ata1.00: qc timeout (cmd 0x27)^M
ata1.00: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (781422768)^M
ata1.00: ATA-7: HDS724040KLSA80, KFAOA20N, max UDMA/133^M
ata1.00: 781422768 sectors, multi 8: LBA48 ^M
ata1.00: failed to set xfermode (err_mask=0x40)^M
ata1: failed to recover some devices, retrying in 5 secs^M
ata1: port is slow to respond, please be patient (Status 0x80)^M
ata1: COMRESET failed (errno=-16)^M
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)^M
ata1.00: qc timeout (cmd 0x27)^M
ata1.00: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (781422768)^M
ata1.00: configured for UDMA/133^M
ata1: EH pending after completion, repeating EH (cnt=4)^M
ata1: soft resetting port^M
ata1: failed to reset engine (errno=-95)6ata1: SATA link up 1.5 Gbps (SStatus 
113 SControl 300)^M
ata1.00: qc timeout (cmd 0xec)^M
ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)^M
ata1.00: revalidation failed (errno=-5)^M
ata1: failed to recover some devices, retrying in 5 secs^M
ata1: hard resetting port^M
ata1: port is slow to respond, please be patient (Status 0x80)^M
ata1: COMRESET failed (errno=-16)^M
ata1: hard resetting port^M
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)^M
ata1.00: qc timeout (cmd 0x27)^M
ata1.00: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (781422768)^M
ata1.00: failed to set xfermode (err_mask=0x40)^M
ata1: limiting SATA link speed to 1.5 Gbps^M
ata1.00: limiting speed to UDMA/133:PIO3^M
ata1: failed to recover some devices, retrying in 5 secs^M
ata1: hard resetting port^M
ata1: port is slow to respond, please be patient (Status 0x80)^M
ata1: COMRESET failed (errno=-16)^M
ata1: hard resetting port^M
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)^M
ata1.00: qc timeout (cmd 0x27)^M
ata1.00: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (781422768)^M
ata1.00: failed to set xfermode (err_mask=0x40)^M
ata1.00: disabled^M
ata1: EH pending after completion, repeating EH (cnt=3)^M
ata1: soft resetting port^M
ata1: failed to reset engine (errno=-95)6ata1: SATA link up 1.5 Gbps (SStatus 
113 SControl 310)^M
ata1: EH complete^M
ata2: SATA link down (SStatus 0 SControl 300)^M
ata3: SATA link down (SStatus 0 SControl 300)^M
ata4: SATA link down (SStatus 0 SControl 300)^M
Loading ata_piixACPI: PCI Interrupt :00:1f.1[A] - .ko module^M
GSI 16 (level, low) - IRQ 16^M
scsi4 : ata_piix^M
scsi5 : ata_piix^M
ata5: PATA max UDMA/100 cmd 0x000101f0 ctl 0x000103f6 bmdma 0x0001ffa0 irq 14^M
ata6: PATA max UDMA/100 cmd 0x00010170 ctl 0x00010376 bmdma 0x0001ffa8 irq 15^M
ata5.00: ATAPI: GCR-8483B, 1.09, max UDMA/33^M
ata5.01: ATAPI: PHILIPS DVD+/-RW DVD8631, GD30, max UDMA/33^M
ata5.00: configured for UDMA/33^M
ata5.01: configured for UDMA/33^M
scsi 4:0:0:0: CD-ROMHL-DT-ST CD-ROM GCR-8483B 1.09 PQ: 0 ANSI: 5^M
scsi 4:0:1:0: CD-ROMPHILIPS  DVD+-RW DVD8631  GD30 PQ: 0 ANSI: 5^M
Loading sd_mod.ko module^M
Loading jbd.ko module^MKernel panic - not syncing: Attempted to kill init!^M

Loading ext3.ko module^M
Mounting /proc filesystem^M
Mounting sys

-
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: Boot fails on Intel SATA controller

2007-08-01 Thread Luiz Fernando N. Capitulino
Em Wed, 01 Aug 2007 23:36:07 +0900
Tejun Heo [EMAIL PROTECTED] escreveu:

| Quel Qun wrote:
|   -- Original message --
|  From: Tejun Heo [EMAIL PROTECTED]
|  Hello,
| 
|  Luiz Fernando N. Capitulino wrote:
|   Hi there,
| 
|   A Mandriva user is reporting that his machine hangs while booting
|  kernels 2.6.22.1 and 2.6.23-rc1.
| 
|   But boots fine with 2.6.21.
| 
|  ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
|  ata1.00: qc timeout (cmd 0x27)
|  ata1.00: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors 
(781422768)
|  ata1.00: ATA-7: HDS724040KLSA80, KFAOA20N, max UDMA/133
|  ata1.00: 781422768 sectors, multi 8: LBA48
|  ata1.00: failed to set xfermode (err_mask=0x40)
|  ata1: failed to recover some devices, retrying in 5 secs
|  What happens after this?
| 
|  It basically retries a few times, then fails to boot. Here is a more 
complete log with 2.6.23-rc1:
| 
| Does the attached patch change anything?

 Quel Qun, if you can't patch the kernel for some reason I can
generate a Mandriva kernel package with the patch for you.

 Just ask.

-- 
Luiz Fernando N. Capitulino
-
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: Boot fails on Intel SATA controller

2007-08-01 Thread Tejun Heo
Quel Qun wrote:
  -- Original message --
 From: Tejun Heo [EMAIL PROTECTED]
 Hello,

 Luiz Fernando N. Capitulino wrote:
  Hi there,

  A Mandriva user is reporting that his machine hangs while booting
 kernels 2.6.22.1 and 2.6.23-rc1.

  But boots fine with 2.6.21.

 ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
 ata1.00: qc timeout (cmd 0x27)
 ata1.00: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors 
 (781422768)
 ata1.00: ATA-7: HDS724040KLSA80, KFAOA20N, max UDMA/133
 ata1.00: 781422768 sectors, multi 8: LBA48
 ata1.00: failed to set xfermode (err_mask=0x40)
 ata1: failed to recover some devices, retrying in 5 secs
 What happens after this?

 It basically retries a few times, then fails to boot. Here is a more complete 
 log with 2.6.23-rc1:

Does the attached patch change anything?

-- 
tejun
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index d8c6789..af5db69 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1915,8 +1915,8 @@ int ata_dev_configure(struct ata_device *dev)
 	dev-flags |= ATA_DFLAG_FLUSH_EXT;
 			}
 
-			if (ata_id_hpa_enabled(dev-id))
-dev-n_sectors = ata_hpa_resize(dev);
+			//if (ata_id_hpa_enabled(dev-id))
+			//	dev-n_sectors = ata_hpa_resize(dev);
 
 			/* config NCQ */
 			ata_dev_config_ncq(dev, ncq_desc, sizeof(ncq_desc));