linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ata_piix: implement ignore_PCS driver option
@ 2006-02-12 10:08 Tejun Heo
  2006-02-12 10:17 ` [PATCH] ata_piix: add information message about PCS Tejun Heo
  2006-02-12 19:19 ` [PATCH] ata_piix: implement ignore_PCS driver option Jeff Garzik
  0 siblings, 2 replies; 3+ messages in thread
From: Tejun Heo @ 2006-02-12 10:08 UTC (permalink / raw)
  To: Jeff Garzik, linux-ide; +Cc: jfs, kmannth, 0602

On some configurations, ICH5 SATA incorrectly reports 0 for PCS even
when ports are active and operational.  This patch adds a driver
parameter which, when set, causes ata_piix ignore PCS value and
proceed with device probing.

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

---

This patch is against
the current upstream (bef4a456b8dc8b3638f4d49a25a89e1467da9483)
+ http://article.gmane.org/gmane.linux.ide/7967
+ http://article.gmane.org/gmane.linux.ide/7968 (2 patches)
+ http://article.gmane.org/gmane.linux.ide/7970

 drivers/scsi/ata_piix.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

Index: work1/drivers/scsi/ata_piix.c
===================================================================
--- work1.orig/drivers/scsi/ata_piix.c	2006-02-12 18:48:31.000000000 +0900
+++ work1/drivers/scsi/ata_piix.c	2006-02-12 18:48:31.000000000 +0900
@@ -330,6 +330,11 @@ MODULE_LICENSE("GPL");
 MODULE_DEVICE_TABLE(pci, piix_pci_tbl);
 MODULE_VERSION(DRV_VERSION);
 
+static int ignore_PCS = 0;
+module_param(ignore_PCS, int, 0444);
+MODULE_PARM_DESC(ignore_PCS, "ignore PCS register to force device probing, "
+			     "useful on some ICH5 SATA setups (0=off, 1=on)");
+
 /**
  *	piix_pata_cbl_detect - Probe host controller cable detect info
  *	@ap: Port for which cable detect info is desired
@@ -428,6 +433,12 @@ static int piix_sata_probe (struct ata_p
 	pci_read_config_byte(pdev, ICH5_PCS, &pcs);
 	orig_mask = (int) pcs & 0xff;
 
+	if (ignore_PCS) {
+		printk(KERN_INFO "ata%u: ignoring PIIX PCS (0x%x)\n",
+		       ap->id, pcs);
+		return 1;
+	}
+
 	/* TODO: this is vaguely wrong for ICH6 combined mode,
 	 * where only two of the four SATA ports are mapped
 	 * onto a single ATA channel.  It is also vaguely inaccurate

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

end of thread, other threads:[~2006-02-12 19:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-12 10:08 [PATCH] ata_piix: implement ignore_PCS driver option Tejun Heo
2006-02-12 10:17 ` [PATCH] ata_piix: add information message about PCS Tejun Heo
2006-02-12 19:19 ` [PATCH] ata_piix: implement ignore_PCS driver option 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).