diff options
Diffstat (limited to 'drivers/ata/pata_efar.c')
| -rw-r--r-- | drivers/ata/pata_efar.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c index aca47e4e29ea..f0243ed206f7 100644 --- a/drivers/ata/pata_efar.c +++ b/drivers/ata/pata_efar.c | |||
| @@ -73,7 +73,7 @@ static DEFINE_SPINLOCK(efar_lock); | |||
| 73 | /** | 73 | /** |
| 74 | * efar_set_piomode - Initialize host controller PATA PIO timings | 74 | * efar_set_piomode - Initialize host controller PATA PIO timings |
| 75 | * @ap: Port whose timings we are configuring | 75 | * @ap: Port whose timings we are configuring |
| 76 | * @adev: um | 76 | * @adev: Device to program |
| 77 | * | 77 | * |
| 78 | * Set PIO mode for device, in host controller PCI config space. | 78 | * Set PIO mode for device, in host controller PCI config space. |
| 79 | * | 79 | * |
| @@ -85,9 +85,9 @@ static void efar_set_piomode (struct ata_port *ap, struct ata_device *adev) | |||
| 85 | { | 85 | { |
| 86 | unsigned int pio = adev->pio_mode - XFER_PIO_0; | 86 | unsigned int pio = adev->pio_mode - XFER_PIO_0; |
| 87 | struct pci_dev *dev = to_pci_dev(ap->host->dev); | 87 | struct pci_dev *dev = to_pci_dev(ap->host->dev); |
| 88 | unsigned int idetm_port= ap->port_no ? 0x42 : 0x40; | 88 | unsigned int master_port = ap->port_no ? 0x42 : 0x40; |
| 89 | unsigned long flags; | 89 | unsigned long flags; |
| 90 | u16 idetm_data; | 90 | u16 master_data; |
| 91 | u8 udma_enable; | 91 | u8 udma_enable; |
| 92 | int control = 0; | 92 | int control = 0; |
| 93 | 93 | ||
| @@ -113,20 +113,20 @@ static void efar_set_piomode (struct ata_port *ap, struct ata_device *adev) | |||
| 113 | 113 | ||
| 114 | spin_lock_irqsave(&efar_lock, flags); | 114 | spin_lock_irqsave(&efar_lock, flags); |
| 115 | 115 | ||
| 116 | pci_read_config_word(dev, idetm_port, &idetm_data); | 116 | pci_read_config_word(dev, master_port, &master_data); |
| 117 | 117 | ||
| 118 | /* Set PPE, IE, and TIME as appropriate */ | 118 | /* Set PPE, IE, and TIME as appropriate */ |
| 119 | if (adev->devno == 0) { | 119 | if (adev->devno == 0) { |
| 120 | idetm_data &= 0xCCF0; | 120 | master_data &= 0xCCF0; |
| 121 | idetm_data |= control; | 121 | master_data |= control; |
| 122 | idetm_data |= (timings[pio][0] << 12) | | 122 | master_data |= (timings[pio][0] << 12) | |
| 123 | (timings[pio][1] << 8); | 123 | (timings[pio][1] << 8); |
| 124 | } else { | 124 | } else { |
| 125 | int shift = 4 * ap->port_no; | 125 | int shift = 4 * ap->port_no; |
| 126 | u8 slave_data; | 126 | u8 slave_data; |
| 127 | 127 | ||
| 128 | idetm_data &= 0xFF0F; | 128 | master_data &= 0xFF0F; |
| 129 | idetm_data |= (control << 4); | 129 | master_data |= (control << 4); |
| 130 | 130 | ||
| 131 | /* Slave timing in separate register */ | 131 | /* Slave timing in separate register */ |
| 132 | pci_read_config_byte(dev, 0x44, &slave_data); | 132 | pci_read_config_byte(dev, 0x44, &slave_data); |
| @@ -135,8 +135,8 @@ static void efar_set_piomode (struct ata_port *ap, struct ata_device *adev) | |||
| 135 | pci_write_config_byte(dev, 0x44, slave_data); | 135 | pci_write_config_byte(dev, 0x44, slave_data); |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | idetm_data |= 0x4000; /* Ensure SITRE is set */ | 138 | master_data |= 0x4000; /* Ensure SITRE is set */ |
| 139 | pci_write_config_word(dev, idetm_port, idetm_data); | 139 | pci_write_config_word(dev, master_port, master_data); |
| 140 | 140 | ||
| 141 | pci_read_config_byte(dev, 0x48, &udma_enable); | 141 | pci_read_config_byte(dev, 0x48, &udma_enable); |
| 142 | udma_enable &= ~(1 << (2 * ap->port_no + adev->devno)); | 142 | udma_enable &= ~(1 << (2 * ap->port_no + adev->devno)); |
