From 08c49306d3c44abd90a8698cf5098bba7ddb1eae Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Thu, 19 Nov 2009 19:12:24 +0100 Subject: [PATCH] --- yaml --- r: 172851 b: refs/heads/master c: ab81a505ae6be069be5b67acd7e1bab3cfb53968 h: refs/heads/master i: 172849: 37f5e39a92f883f55e249bdef6eabfe4201cadaa 172847: f574b53da5413ee7a16d7cdb4d1b535aec3d97c8 v: v3 --- [refs] | 2 +- trunk/drivers/ata/pata_hpt37x.c | 23 ++--------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/[refs] b/[refs] index 9bb8ba8e6de4..8e6d9a95c739 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9e87be9edd9114b65a9cf4f93a60b5d9134a972e +refs/heads/master: ab81a505ae6be069be5b67acd7e1bab3cfb53968 diff --git a/trunk/drivers/ata/pata_hpt37x.c b/trunk/drivers/ata/pata_hpt37x.c index 378a8f862e82..0921e8b30a08 100644 --- a/trunk/drivers/ata/pata_hpt37x.c +++ b/trunk/drivers/ata/pata_hpt37x.c @@ -360,7 +360,7 @@ static int hpt374_fn1_cable_detect(struct ata_port *ap) * @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_link *link, unsigned long deadline) 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_port_ops = { 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, }; /**