* [PATCH] pata_hpt3x2n: add enablebits checking
@ 2009-11-27 18:55 Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; only message in thread
From: Bartlomiej Zolnierkiewicz @ 2009-11-27 18:55 UTC (permalink / raw)
To: linux-ide; +Cc: linux-kernel, Sergei Shtylyov
There shouldn't be any problems with it as IDE hpt366 host driver
has been supporting enablebits checking for years.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ata/pata_hpt3x2n.c | 9 +++++++++
1 file changed, 9 insertions(+)
Index: b/drivers/ata/pata_hpt3x2n.c
===================================================================
--- a/drivers/ata/pata_hpt3x2n.c
+++ b/drivers/ata/pata_hpt3x2n.c
@@ -153,8 +153,17 @@ static int hpt3x2n_cable_detect(struct a
static int hpt3x2n_pre_reset(struct ata_link *link, unsigned long deadline)
{
+ static const struct pci_bits hpt37x_enable_bits[] = {
+ { 0x50, 1, 0x04, 0x04 },
+ { 0x54, 1, 0x04, 0x04 }
+ };
+
struct ata_port *ap = link->ap;
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+
+ if (!pci_test_config_bits(pdev, &hpt37x_enable_bits[ap->port_no]))
+ return -ENOENT;
+
/* Reset the state machine */
pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37);
udelay(100);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-11-27 18:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-27 18:55 [PATCH] pata_hpt3x2n: add enablebits checking Bartlomiej Zolnierkiewicz
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).