aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ata_piix.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-08-10 03:59:16 -0400
committerTejun Heo <htejun@gmail.com>2006-08-10 03:59:16 -0400
commit2a88d1ac8dca898a7fb602ddd581bf4d2977509d (patch)
treee399e827ba74349c544f8765b3bf67522a3e7ada /drivers/scsi/ata_piix.c
parentc4b01f1de254820175fe2d02b4cf7c0fab335846 (diff)
[PATCH] libata: replace ap->hard_port_no with ap->port_no
Replace ap->hard_port_no with ap->port_no. Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/scsi/ata_piix.c')
-rw-r--r--drivers/scsi/ata_piix.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
index 40ecab5793e3..501755a606ed 100644
--- a/drivers/scsi/ata_piix.c
+++ b/drivers/scsi/ata_piix.c
@@ -487,7 +487,7 @@ static void piix_pata_cbl_detect(struct ata_port *ap)
487 goto cbl40; 487 goto cbl40;
488 488
489 /* check BIOS cable detect results */ 489 /* check BIOS cable detect results */
490 mask = ap->hard_port_no == 0 ? PIIX_80C_PRI : PIIX_80C_SEC; 490 mask = ap->port_no == 0 ? PIIX_80C_PRI : PIIX_80C_SEC;
491 pci_read_config_byte(pdev, PIIX_IOCFG, &tmp); 491 pci_read_config_byte(pdev, PIIX_IOCFG, &tmp);
492 if ((tmp & mask) == 0) 492 if ((tmp & mask) == 0)
493 goto cbl40; 493 goto cbl40;
@@ -513,7 +513,7 @@ static int piix_pata_prereset(struct ata_port *ap)
513{ 513{
514 struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); 514 struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
515 515
516 if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->hard_port_no])) { 516 if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->port_no])) {
517 ata_port_printk(ap, KERN_INFO, "port disabled. ignoring.\n"); 517 ata_port_printk(ap, KERN_INFO, "port disabled. ignoring.\n");
518 ap->eh_context.i.action &= ~ATA_EH_RESET_MASK; 518 ap->eh_context.i.action &= ~ATA_EH_RESET_MASK;
519 return 0; 519 return 0;
@@ -550,7 +550,7 @@ static int piix_sata_prereset(struct ata_port *ap)
550 struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); 550 struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
551 struct piix_host_priv *hpriv = ap->host_set->private_data; 551 struct piix_host_priv *hpriv = ap->host_set->private_data;
552 const unsigned int *map = hpriv->map; 552 const unsigned int *map = hpriv->map;
553 int base = 2 * ap->hard_port_no; 553 int base = 2 * ap->port_no;
554 unsigned int present = 0; 554 unsigned int present = 0;
555 int port, i; 555 int port, i;
556 u16 pcs; 556 u16 pcs;
@@ -601,7 +601,7 @@ static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev)
601 unsigned int pio = adev->pio_mode - XFER_PIO_0; 601 unsigned int pio = adev->pio_mode - XFER_PIO_0;
602 struct pci_dev *dev = to_pci_dev(ap->host_set->dev); 602 struct pci_dev *dev = to_pci_dev(ap->host_set->dev);
603 unsigned int is_slave = (adev->devno != 0); 603 unsigned int is_slave = (adev->devno != 0);
604 unsigned int master_port= ap->hard_port_no ? 0x42 : 0x40; 604 unsigned int master_port= ap->port_no ? 0x42 : 0x40;
605 unsigned int slave_port = 0x44; 605 unsigned int slave_port = 0x44;
606 u16 master_data; 606 u16 master_data;
607 u8 slave_data; 607 u8 slave_data;
@@ -619,10 +619,10 @@ static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev)
619 /* enable PPE, IE and TIME */ 619 /* enable PPE, IE and TIME */
620 master_data |= 0x0070; 620 master_data |= 0x0070;
621 pci_read_config_byte(dev, slave_port, &slave_data); 621 pci_read_config_byte(dev, slave_port, &slave_data);
622 slave_data &= (ap->hard_port_no ? 0x0f : 0xf0); 622 slave_data &= (ap->port_no ? 0x0f : 0xf0);
623 slave_data |= 623 slave_data |=
624 (timings[pio][0] << 2) | 624 (timings[pio][0] << 2) |
625 (timings[pio][1] << (ap->hard_port_no ? 4 : 0)); 625 (timings[pio][1] << (ap->port_no ? 4 : 0));
626 } else { 626 } else {
627 master_data &= 0xccf8; 627 master_data &= 0xccf8;
628 /* enable PPE, IE and TIME */ 628 /* enable PPE, IE and TIME */
@@ -652,9 +652,9 @@ static void piix_set_dmamode (struct ata_port *ap, struct ata_device *adev)
652{ 652{
653 unsigned int udma = adev->dma_mode; /* FIXME: MWDMA too */ 653 unsigned int udma = adev->dma_mode; /* FIXME: MWDMA too */
654 struct pci_dev *dev = to_pci_dev(ap->host_set->dev); 654 struct pci_dev *dev = to_pci_dev(ap->host_set->dev);
655 u8 maslave = ap->hard_port_no ? 0x42 : 0x40; 655 u8 maslave = ap->port_no ? 0x42 : 0x40;
656 u8 speed = udma; 656 u8 speed = udma;
657 unsigned int drive_dn = (ap->hard_port_no ? 2 : 0) + adev->devno; 657 unsigned int drive_dn = (ap->port_no ? 2 : 0) + adev->devno;
658 int a_speed = 3 << (drive_dn * 4); 658 int a_speed = 3 << (drive_dn * 4);
659 int u_flag = 1 << drive_dn; 659 int u_flag = 1 << drive_dn;
660 int v_flag = 0x01 << drive_dn; 660 int v_flag = 0x01 << drive_dn;