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.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c
index c5ddd937dbf2..e61cb1fd57b2 100644
--- a/drivers/ata/pata_hpt37x.c
+++ b/drivers/ata/pata_hpt37x.c
@@ -304,15 +304,16 @@ static unsigned long hpt370a_filter(struct ata_device *adev, unsigned long mask)
304 304
305/** 305/**
306 * hpt37x_pre_reset - reset the hpt37x bus 306 * hpt37x_pre_reset - reset the hpt37x bus
307 * @ap: ATA port to reset 307 * @link: ATA link to reset
308 * @deadline: deadline jiffies for the operation 308 * @deadline: deadline jiffies for the operation
309 * 309 *
310 * Perform the initial reset handling for the 370/372 and 374 func 0 310 * Perform the initial reset handling for the 370/372 and 374 func 0
311 */ 311 */
312 312
313static int hpt37x_pre_reset(struct ata_port *ap, unsigned long deadline) 313static int hpt37x_pre_reset(struct ata_link *link, unsigned long deadline)
314{ 314{
315 u8 scr2, ata66; 315 u8 scr2, ata66;
316 struct ata_port *ap = link->ap;
316 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 317 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
317 static const struct pci_bits hpt37x_enable_bits[] = { 318 static const struct pci_bits hpt37x_enable_bits[] = {
318 { 0x50, 1, 0x04, 0x04 }, 319 { 0x50, 1, 0x04, 0x04 },
@@ -337,7 +338,7 @@ static int hpt37x_pre_reset(struct ata_port *ap, unsigned long deadline)
337 pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37); 338 pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37);
338 udelay(100); 339 udelay(100);
339 340
340 return ata_std_prereset(ap, deadline); 341 return ata_std_prereset(link, deadline);
341} 342}
342 343
343/** 344/**
@@ -352,7 +353,7 @@ static void hpt37x_error_handler(struct ata_port *ap)
352 ata_bmdma_drive_eh(ap, hpt37x_pre_reset, ata_std_softreset, NULL, ata_std_postreset); 353 ata_bmdma_drive_eh(ap, hpt37x_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
353} 354}
354 355
355static int hpt374_pre_reset(struct ata_port *ap, unsigned long deadline) 356static int hpt374_pre_reset(struct ata_link *link, unsigned long deadline)
356{ 357{
357 static const struct pci_bits hpt37x_enable_bits[] = { 358 static const struct pci_bits hpt37x_enable_bits[] = {
358 { 0x50, 1, 0x04, 0x04 }, 359 { 0x50, 1, 0x04, 0x04 },
@@ -360,6 +361,7 @@ static int hpt374_pre_reset(struct ata_port *ap, unsigned long deadline)
360 }; 361 };
361 u16 mcr3, mcr6; 362 u16 mcr3, mcr6;
362 u8 ata66; 363 u8 ata66;
364 struct ata_port *ap = link->ap;
363 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 365 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
364 366
365 if (!pci_test_config_bits(pdev, &hpt37x_enable_bits[ap->port_no])) 367 if (!pci_test_config_bits(pdev, &hpt37x_enable_bits[ap->port_no]))
@@ -387,7 +389,7 @@ static int hpt374_pre_reset(struct ata_port *ap, unsigned long deadline)
387 pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37); 389 pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37);
388 udelay(100); 390 udelay(100);
389 391
390 return ata_std_prereset(ap, deadline); 392 return ata_std_prereset(link, deadline);
391} 393}
392 394
393/** 395/**
@@ -642,7 +644,6 @@ static struct scsi_host_template hpt37x_sht = {
642 */ 644 */
643 645
644static struct ata_port_operations hpt370_port_ops = { 646static struct ata_port_operations hpt370_port_ops = {
645 .port_disable = ata_port_disable,
646 .set_piomode = hpt370_set_piomode, 647 .set_piomode = hpt370_set_piomode,
647 .set_dmamode = hpt370_set_dmamode, 648 .set_dmamode = hpt370_set_dmamode,
648 .mode_filter = hpt370_filter, 649 .mode_filter = hpt370_filter,
@@ -671,9 +672,8 @@ static struct ata_port_operations hpt370_port_ops = {
671 .irq_handler = ata_interrupt, 672 .irq_handler = ata_interrupt,
672 .irq_clear = ata_bmdma_irq_clear, 673 .irq_clear = ata_bmdma_irq_clear,
673 .irq_on = ata_irq_on, 674 .irq_on = ata_irq_on,
674 .irq_ack = ata_irq_ack,
675 675
676 .port_start = ata_port_start, 676 .port_start = ata_sff_port_start,
677}; 677};
678 678
679/* 679/*
@@ -681,7 +681,6 @@ static struct ata_port_operations hpt370_port_ops = {
681 */ 681 */
682 682
683static struct ata_port_operations hpt370a_port_ops = { 683static struct ata_port_operations hpt370a_port_ops = {
684 .port_disable = ata_port_disable,
685 .set_piomode = hpt370_set_piomode, 684 .set_piomode = hpt370_set_piomode,
686 .set_dmamode = hpt370_set_dmamode, 685 .set_dmamode = hpt370_set_dmamode,
687 .mode_filter = hpt370a_filter, 686 .mode_filter = hpt370a_filter,
@@ -710,9 +709,8 @@ static struct ata_port_operations hpt370a_port_ops = {
710 .irq_handler = ata_interrupt, 709 .irq_handler = ata_interrupt,
711 .irq_clear = ata_bmdma_irq_clear, 710 .irq_clear = ata_bmdma_irq_clear,
712 .irq_on = ata_irq_on, 711 .irq_on = ata_irq_on,
713 .irq_ack = ata_irq_ack,
714 712
715 .port_start = ata_port_start, 713 .port_start = ata_sff_port_start,
716}; 714};
717 715
718/* 716/*
@@ -721,7 +719,6 @@ static struct ata_port_operations hpt370a_port_ops = {
721 */ 719 */
722 720
723static struct ata_port_operations hpt372_port_ops = { 721static struct ata_port_operations hpt372_port_ops = {
724 .port_disable = ata_port_disable,
725 .set_piomode = hpt372_set_piomode, 722 .set_piomode = hpt372_set_piomode,
726 .set_dmamode = hpt372_set_dmamode, 723 .set_dmamode = hpt372_set_dmamode,
727 .mode_filter = ata_pci_default_filter, 724 .mode_filter = ata_pci_default_filter,
@@ -750,9 +747,8 @@ static struct ata_port_operations hpt372_port_ops = {
750 .irq_handler = ata_interrupt, 747 .irq_handler = ata_interrupt,
751 .irq_clear = ata_bmdma_irq_clear, 748 .irq_clear = ata_bmdma_irq_clear,
752 .irq_on = ata_irq_on, 749 .irq_on = ata_irq_on,
753 .irq_ack = ata_irq_ack,
754 750
755 .port_start = ata_port_start, 751 .port_start = ata_sff_port_start,
756}; 752};
757 753
758/* 754/*
@@ -761,7 +757,6 @@ static struct ata_port_operations hpt372_port_ops = {
761 */ 757 */
762 758
763static struct ata_port_operations hpt374_port_ops = { 759static struct ata_port_operations hpt374_port_ops = {
764 .port_disable = ata_port_disable,
765 .set_piomode = hpt372_set_piomode, 760 .set_piomode = hpt372_set_piomode,
766 .set_dmamode = hpt372_set_dmamode, 761 .set_dmamode = hpt372_set_dmamode,
767 .mode_filter = ata_pci_default_filter, 762 .mode_filter = ata_pci_default_filter,
@@ -790,9 +785,8 @@ static struct ata_port_operations hpt374_port_ops = {
790 .irq_handler = ata_interrupt, 785 .irq_handler = ata_interrupt,
791 .irq_clear = ata_bmdma_irq_clear, 786 .irq_clear = ata_bmdma_irq_clear,
792 .irq_on = ata_irq_on, 787 .irq_on = ata_irq_on,
793 .irq_ack = ata_irq_ack,
794 788
795 .port_start = ata_port_start, 789 .port_start = ata_sff_port_start,
796}; 790};
797 791
798/** 792/**