All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: linux-kernel@vger.kernel.org, jgarzik@pobox.com
Subject: PATCH: Add enablebits support to the triflex driver
Date: Tue, 08 Nov 2005 14:14:28 +0000	[thread overview]
Message-ID: <1131459268.25192.38.camel@localhost.localdomain> (raw)

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_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);


             reply	other threads:[~2005-11-08 13:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-08 14:14 Alan Cox [this message]
2005-11-09  6:08 ` PATCH: Add enablebits support to the triflex driver Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1131459268.25192.38.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.