Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

[PATCH 2/2] pata_hpt37x: unify ->pre_reset methods

 
   Soft32 Home -> Linux -> Kernel RSS
Next:  [PATCH 00/28] Fixes for FS-Cache and CacheFiles  
Author Message
Bartlomiej Zolnierkiewicz

External


Since: Jan 12, 2005
Posts: 495



(Msg. 1) Posted: Thu Nov 19, 2009 1:20 pm
Post subject: [PATCH 2/2] pata_hpt37x: unify ->pre_reset methods
Archived from groups: linux>kernel (more info?)

We can use the same ->pre_reset method for all HPT37x chipsets now.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier.TakeThisOut@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,
};

/**
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.TakeThisOut@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Alan Cox

External


Since: Sep 11, 2004
Posts: 997



(Msg. 2) Posted: Thu Nov 19, 2009 1:20 pm
Post subject: Re: [PATCH 2/2] pata_hpt37x: unify ->pre_reset methods [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 19 Nov 2009 19:12:24 +0100
Bartlomiej Zolnierkiewicz <bzolnier DeleteThis @gmail.com> wrote:

> We can use the same ->pre_reset method for all HPT37x chipsets now.

Nice clean up

Acked-by: Alan Cox <alan DeleteThis @linux.intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo DeleteThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Display posts from previous:   
Related Topics:
[PATCH] pata_hpt37x: Fix 2.6.22 clock PLL regression - Just one version of Linux ago The PLL code broke - oh no! But set the right mode And fix up the code Makes the PLL....

[PATCH] drivers/ata/pata_hpt37x.c Remove unused static var.. - Remove unused static variable. drivers/ata/pata_hpt37x.c: In function 'hpt37x_init_one': drivers/ata/pata_hpt37x.c:935...

[PATCH] pata_hpt37x: Further improvements based on the IDE.. - Better DPLL use and calibration Signed-off-by: Alan Cox <alan@redhat.com> diff -u --new-file --recursive..

[PATCH 2/3] unify queue_delayed_work() and queue_delayed_w.. - Change queue_delayed_work() to use queue_delayed_work_on() to avoid the code duplication (saves 133 bytes). Q:..

[PATCH] unify flush_work/flush_work_keventd and rename it .. - flush_work(wq, work) doesn't need the first parameter, we can use cwq->wq (this was possible from the very beginnig,...

[PATCH 2/4]: [SPARC64]: Unify timer interrupt handler. - From 6f7ea1d2d56aa7c6cc0e1ae98d8e40eb9de27d16 Mon Sep 17 00:00:00 2001 From: David S. Miller..
       Soft32 Home -> Linux -> Kernel All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]