PATCH: Add enablebits support to the triflex driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Alan Cox <[email protected]>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.14-mm1/drivers/scsi/pata_triflex.c linux-2.6.14-mm1/drivers/scsi/pata_triflex.c
--- linux.vanilla-2.6.14-mm1/drivers/scsi/pata_triflex.c	2005-11-07 13:06:24.000000000 +0000
+++ linux-2.6.14-mm1/drivers/scsi/pata_triflex.c	2005-11-07 14:45:02.000000000 +0000
@@ -44,10 +44,21 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_triflex"
-#define DRV_VERSION "0.2"
+#define DRV_VERSION "0.2.1"
 
 static void triflex_phy_reset(struct ata_port *ap)
 {
+	struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
+	static struct pci_bits triflex_enable_bits[] = {
+		{ 0x80, 0x01, 0x01 },
+		{ 0x80, 0x02, 0x02 }
+	};
+
+	if (!pci_test_config_bits(pdev, &triflex_enable_bits[ap->hard_port_no])) {
+		ata_port_disable(ap);
+		printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id);
+		return;
+	}
 	ap->cbl = ATA_CBL_PATA40;
 	ata_port_probe(ap);
 	ata_bus_reset(ap);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux