aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_efar.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-12-09 01:14:38 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-12-09 01:14:38 -0500
commitbcd6acd51f3d4d1ada201e9bc5c40a31d6d80c71 (patch)
tree2f6dffd2d3e4dd67355a224de7e7a960335a92fd /drivers/ata/pata_efar.c
parent11c34c7deaeeebcee342cbc35e1bb2a6711b2431 (diff)
parent3ff6a468b45b5dfeb0e903e56f4eb27d34b2437c (diff)
Merge commit 'origin/master' into next
Conflicts: include/linux/kvm.h
Diffstat (limited to 'drivers/ata/pata_efar.c')
-rw-r--r--drivers/ata/pata_efar.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c
index 2a6412f5d117..b2e71e6473ed 100644
--- a/drivers/ata/pata_efar.c
+++ b/drivers/ata/pata_efar.c
@@ -2,6 +2,7 @@
2 * pata_efar.c - EFAR PIIX clone controller driver 2 * pata_efar.c - EFAR PIIX clone controller driver
3 * 3 *
4 * (C) 2005 Red Hat 4 * (C) 2005 Red Hat
5 * (C) 2009 Bartlomiej Zolnierkiewicz
5 * 6 *
6 * Some parts based on ata_piix.c by Jeff Garzik and others. 7 * Some parts based on ata_piix.c by Jeff Garzik and others.
7 * 8 *
@@ -118,12 +119,12 @@ static void efar_set_piomode (struct ata_port *ap, struct ata_device *adev)
118 int shift = 4 * ap->port_no; 119 int shift = 4 * ap->port_no;
119 u8 slave_data; 120 u8 slave_data;
120 121
121 idetm_data &= 0xCC0F; 122 idetm_data &= 0xFF0F;
122 idetm_data |= (control << 4); 123 idetm_data |= (control << 4);
123 124
124 /* Slave timing in separate register */ 125 /* Slave timing in separate register */
125 pci_read_config_byte(dev, 0x44, &slave_data); 126 pci_read_config_byte(dev, 0x44, &slave_data);
126 slave_data &= 0x0F << shift; 127 slave_data &= ap->port_no ? 0x0F : 0xF0;
127 slave_data |= ((timings[pio][0] << 2) | timings[pio][1]) << shift; 128 slave_data |= ((timings[pio][0] << 2) | timings[pio][1]) << shift;
128 pci_write_config_byte(dev, 0x44, slave_data); 129 pci_write_config_byte(dev, 0x44, slave_data);
129 } 130 }
@@ -200,7 +201,7 @@ static void efar_set_dmamode (struct ata_port *ap, struct ata_device *adev)
200 master_data &= 0xFF4F; /* Mask out IORDY|TIME1|DMAONLY */ 201 master_data &= 0xFF4F; /* Mask out IORDY|TIME1|DMAONLY */
201 master_data |= control << 4; 202 master_data |= control << 4;
202 pci_read_config_byte(dev, 0x44, &slave_data); 203 pci_read_config_byte(dev, 0x44, &slave_data);
203 slave_data &= (0x0F + 0xE1 * ap->port_no); 204 slave_data &= ap->port_no ? 0x0F : 0xF0;
204 /* Load the matching timing */ 205 /* Load the matching timing */
205 slave_data |= ((timings[pio][0] << 2) | timings[pio][1]) << (ap->port_no ? 4 : 0); 206 slave_data |= ((timings[pio][0] << 2) | timings[pio][1]) << (ap->port_no ? 4 : 0);
206 pci_write_config_byte(dev, 0x44, slave_data); 207 pci_write_config_byte(dev, 0x44, slave_data);
@@ -251,7 +252,7 @@ static int efar_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
251 static const struct ata_port_info info = { 252 static const struct ata_port_info info = {
252 .flags = ATA_FLAG_SLAVE_POSS, 253 .flags = ATA_FLAG_SLAVE_POSS,
253 .pio_mask = ATA_PIO4, 254 .pio_mask = ATA_PIO4,
254 .mwdma_mask = ATA_MWDMA2, 255 .mwdma_mask = ATA_MWDMA12_ONLY,
255 .udma_mask = ATA_UDMA4, 256 .udma_mask = ATA_UDMA4,
256 .port_ops = &efar_ops, 257 .port_ops = &efar_ops,
257 }; 258 };