linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ata_piix: ignore PCS on ICH5
@ 2006-08-22 12:06 Tejun Heo
  2006-08-23  2:04 ` Keith Owens
  2006-08-24  6:52 ` Jeff Garzik
  0 siblings, 2 replies; 3+ messages in thread
From: Tejun Heo @ 2006-08-22 12:06 UTC (permalink / raw)
  To: Jeff Garzik, kaos, stevenm, linux-ide

There have been a number of reports regarding some ICH5s failing to
detect devices since the PCS handling update.  Analysis shows that
these problems are caused by bogus PCS values from those controllers.

Before the PCS update, the driver didn't honor PCS regs exactly and
probed them in many cases PCS reports no device.  Now that PCS is
honored exactly, these hardware problems are visible.

This patch makes ICH5 ignore PCS.

Signed-off-by: Tejun Heo <htejun@gmail.com>
---

Keith Owens, Steve and Andre, please test this patch and report how
this works for you guys.  If possible, please test with several
different setups.  Some ICHs (7 and 8) suffer from long boot delays
due to ghost device if PCS is not honored and we want to make sure
that ICH5 doesn't have that problem.

ICH7 and 8's choke if the master device is ATAPI and the slave slot is
empty, so testing this case on ICH5 would be especially helpful.
e.g. If your ata_piix reports [P0 P1 IDE IDE], connect SATA ATAPI
device to SATA port 0 and don't connect anything to P1, boot and see
if things work okay.

This patch is against libata-dev#upstream-fixes and should apply to
2.6.18-rc4 and the current linus #master.

Thanks.

diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
index 01b3530..3b98f18 100644
--- a/drivers/scsi/ata_piix.c
+++ b/drivers/scsi/ata_piix.c
@@ -390,7 +390,8 @@ #endif
 	/* ich5_sata */
 	{
 		.sht		= &piix_sht,
-		.host_flags	= ATA_FLAG_SATA | PIIX_FLAG_CHECKINTR,
+		.host_flags	= ATA_FLAG_SATA | PIIX_FLAG_CHECKINTR |
+				  PIIX_FLAG_IGNORE_PCS,
 		.pio_mask	= 0x1f,	/* pio0-4 */
 		.mwdma_mask	= 0x07, /* mwdma0-2 */
 		.udma_mask	= 0x7f,	/* udma0-6 */

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

* Re: [PATCH] ata_piix: ignore PCS on ICH5
  2006-08-22 12:06 [PATCH] ata_piix: ignore PCS on ICH5 Tejun Heo
@ 2006-08-23  2:04 ` Keith Owens
  2006-08-24  6:52 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Keith Owens @ 2006-08-23  2:04 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Jeff Garzik, stevenm, linux-ide

Tejun Heo (on Tue, 22 Aug 2006 21:06:46 +0900) wrote:
>There have been a number of reports regarding some ICH5s failing to
>detect devices since the PCS handling update.  Analysis shows that
>these problems are caused by bogus PCS values from those controllers.
>
>Before the PCS update, the driver didn't honor PCS regs exactly and
>probed them in many cases PCS reports no device.  Now that PCS is
>honored exactly, these hardware problems are visible.
>
>This patch makes ICH5 ignore PCS.
>
>Signed-off-by: Tejun Heo <htejun@gmail.com>
>---
>
>Keith Owens, Steve and Andre, please test this patch and report how
>this works for you guys.  If possible, please test with several
>different setups.  Some ICHs (7 and 8) suffer from long boot delays
>due to ghost device if PCS is not honored and we want to make sure
>that ICH5 doesn't have that problem.
>
>ICH7 and 8's choke if the master device is ATAPI and the slave slot is
>empty, so testing this case on ICH5 would be especially helpful.
>e.g. If your ata_piix reports [P0 P1 IDE IDE], connect SATA ATAPI
>device to SATA port 0 and don't connect anything to P1, boot and see
>if things work okay.
>
>This patch is against libata-dev#upstream-fixes and should apply to
>2.6.18-rc4 and the current linus #master.
>
>Thanks.
>
>diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
>index 01b3530..3b98f18 100644
>--- a/drivers/scsi/ata_piix.c
>+++ b/drivers/scsi/ata_piix.c
>@@ -390,7 +390,8 @@ #endif
> 	/* ich5_sata */
> 	{
> 		.sht		= &piix_sht,
>-		.host_flags	= ATA_FLAG_SATA | PIIX_FLAG_CHECKINTR,
>+		.host_flags	= ATA_FLAG_SATA | PIIX_FLAG_CHECKINTR |
>+				  PIIX_FLAG_IGNORE_PCS,
> 		.pio_mask	= 0x1f,	/* pio0-4 */
> 		.mwdma_mask	= 0x07, /* mwdma0-2 */
> 		.udma_mask	= 0x7f,	/* udma0-6 */

I have already been running with ich5 locally patched to
PIIX_FLAG_IGNORE_PCS for several days, without any problems.  This
build also has Tejun Heo's patch index 19745a3..ad880b8.

ata_piix reports 'ata_piix 0000:00:1f.2: MAP [ P0 -- P1 -- ]'.  I
disconnected the drive on port 1 but the BIOS complained 'SATA Port 1
hard disk drive not found', so I had to disable P1 in the BIOS.  Linux
then complained, but it still booted.

[   11.494010] scsi1 : ata_piix
[   11.696977] ATA: abnormal status 0x7F on port 0xCCA7

It takes about 4 seconds from loading ata_piix to finishing its
processing, although some of that time is due to debug prints over a
9600 baud serial console.


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

* Re: [PATCH] ata_piix: ignore PCS on ICH5
  2006-08-22 12:06 [PATCH] ata_piix: ignore PCS on ICH5 Tejun Heo
  2006-08-23  2:04 ` Keith Owens
@ 2006-08-24  6:52 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2006-08-24  6:52 UTC (permalink / raw)
  To: Tejun Heo; +Cc: kaos, stevenm, linux-ide

applied

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

end of thread, other threads:[~2006-08-24  6:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-22 12:06 [PATCH] ata_piix: ignore PCS on ICH5 Tejun Heo
2006-08-23  2:04 ` Keith Owens
2006-08-24  6:52 ` Jeff Garzik

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).