All of lore.kernel.org
 help / color / mirror / Atom feed
* PATCH: Add enablebits to via driver
@ 2005-11-08 14:15 Alan Cox
  2005-11-09  6:08 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2005-11-08 14:15 UTC (permalink / raw)
  To: linux-kernel, jgarzik

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.14-mm1/drivers/scsi/pata_via.c linux-2.6.14-mm1/drivers/scsi/pata_via.c
--- linux.vanilla-2.6.14-mm1/drivers/scsi/pata_via.c	2005-11-07 13:06:24.000000000 +0000
+++ linux-2.6.14-mm1/drivers/scsi/pata_via.c	2005-11-07 14:46:43.000000000 +0000
@@ -61,7 +61,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_via"
-#define DRV_VERSION "0.1"
+#define DRV_VERSION "0.1.1"
 
 /*
  *	The following comes directly from Vojtech Pavlik's ide/pci/via82cxxx
@@ -148,6 +148,19 @@
  
 static void via_phy_reset(struct ata_port *ap)
 {
+	struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
+	
+	/* Note: When we add VIA 6410 remember it doesn't have enable bits */
+	static struct pci_bits via_enable_bits[] = {
+		{ 0x40, 0x02, 0x02 },
+		{ 0x40, 0x01, 0x01 }
+	};
+
+	if (!pci_test_config_bits(pdev, &via_enable_bits[ap->hard_port_no])) {
+		ata_port_disable(ap);
+		printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id);
+		return;
+	}
 	ap->cbl = via_cable_detect(ap);
 	ata_bus_reset(ap);
 	ata_port_probe(ap);


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

* Re: PATCH: Add enablebits to via driver
  2005-11-08 14:15 PATCH: Add enablebits to via driver Alan Cox
@ 2005-11-09  6:08 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2005-11-09  6:08 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

applied


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

end of thread, other threads:[~2005-11-09  6:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-08 14:15 PATCH: Add enablebits to via driver Alan Cox
2005-11-09  6:08 ` Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.