From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] pata_hpt37x: unify ->pre_reset methods
Date: Thu, 19 Nov 2009 19:12:24 +0100 [thread overview]
Message-ID: <200911191912.24663.bzolnier@gmail.com> (raw)
We can use the same ->pre_reset method for all HPT37x chipsets now.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/ata/pata_hpt37x.c | 23 ++---------------------
1 file changed, 2 insertions(+), 21 deletions(-)
Index: b/drivers/ata/pata_hpt37x.c
===================================================================
--- a/drivers/ata/pata_hpt37x.c
+++ b/drivers/ata/pata_hpt37x.c
@@ -360,7 +360,7 @@ static int hpt374_fn1_cable_detect(struc
* @link: ATA link to reset
* @deadline: deadline jiffies for the operation
*
- * Perform the initial reset handling for the 370/372 and 374 func 0
+ * Perform the initial reset handling for the HPT37x.
*/
static int hpt37x_pre_reset(struct ata_link *link, unsigned long deadline)
@@ -381,25 +381,6 @@ static int hpt37x_pre_reset(struct ata_l
return ata_sff_prereset(link, deadline);
}
-static int hpt374_fn1_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);
-
- return ata_sff_prereset(link, deadline);
-}
-
/**
* hpt370_set_piomode - PIO setup
* @ap: ATA interface
@@ -646,7 +627,7 @@ static struct ata_port_operations hpt372
static struct ata_port_operations hpt374_fn1_port_ops = {
.inherits = &hpt372_port_ops,
.cable_detect = hpt374_fn1_cable_detect,
- .prereset = hpt374_fn1_pre_reset,
+ .prereset = hpt37x_pre_reset,
};
/**
next reply other threads:[~2009-11-19 18:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-19 18:12 Bartlomiej Zolnierkiewicz [this message]
2009-11-19 18:24 ` [PATCH 2/2] pata_hpt37x: unify ->pre_reset methods Alan Cox
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=200911191912.24663.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--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.