aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_hpt37x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_hpt37x.c')
-rw-r--r--drivers/ata/pata_hpt37x.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c
index 378a8f862e82..0921e8b30a08 100644
--- a/drivers/ata/pata_hpt37x.c
+++ b/drivers/ata/pata_hpt37x.c
@@ -360,7 +360,7 @@ static int hpt374_fn1_cable_detect(struct ata_port *ap)
360 * @link: ATA link to reset 360 * @link: ATA link to reset
361 * @deadline: deadline jiffies for the operation 361 * @deadline: deadline jiffies for the operation
362 * 362 *
363 * Perform the initial reset handling for the 370/372 and 374 func 0 363 * Perform the initial reset handling for the HPT37x.
364 */ 364 */
365 365
366static int hpt37x_pre_reset(struct ata_link *link, unsigned long deadline) 366static 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)
381 return ata_sff_prereset(link, deadline); 381 return ata_sff_prereset(link, deadline);
382} 382}
383 383
384static int hpt374_fn1_pre_reset(struct ata_link *link, unsigned long deadline)
385{
386 static const struct pci_bits hpt37x_enable_bits[] = {
387 { 0x50, 1, 0x04, 0x04 },
388 { 0x54, 1, 0x04, 0x04 }
389 };
390 struct ata_port *ap = link->ap;
391 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
392
393 if (!pci_test_config_bits(pdev, &hpt37x_enable_bits[ap->port_no]))
394 return -ENOENT;
395
396 /* Reset the state machine */
397 pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37);
398 udelay(100);
399
400 return ata_sff_prereset(link, deadline);
401}
402
403/** 384/**
404 * hpt370_set_piomode - PIO setup 385 * hpt370_set_piomode - PIO setup
405 * @ap: ATA interface 386 * @ap: ATA interface
@@ -646,7 +627,7 @@ static struct ata_port_operations hpt372_port_ops = {
646static struct ata_port_operations hpt374_fn1_port_ops = { 627static struct ata_port_operations hpt374_fn1_port_ops = {
647 .inherits = &hpt372_port_ops, 628 .inherits = &hpt372_port_ops,
648 .cable_detect = hpt374_fn1_cable_detect, 629 .cable_detect = hpt374_fn1_cable_detect,
649 .prereset = hpt374_fn1_pre_reset, 630 .prereset = hpt37x_pre_reset,
650}; 631};
651 632
652/** 633/**