diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/pata_it8213.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c index 092af531aa09..f0bf77ad371f 100644 --- a/drivers/ata/pata_it8213.c +++ b/drivers/ata/pata_it8213.c | |||
@@ -92,18 +92,17 @@ static void it8213_set_piomode (struct ata_port *ap, struct ata_device *adev) | |||
92 | { 2, 1 }, | 92 | { 2, 1 }, |
93 | { 2, 3 }, }; | 93 | { 2, 3 }, }; |
94 | 94 | ||
95 | if (pio > 2) | 95 | if (pio > 1) |
96 | control |= 1; /* TIME1 enable */ | 96 | control |= 1; /* TIME */ |
97 | if (ata_pio_need_iordy(adev)) /* PIO 3/4 require IORDY */ | 97 | if (ata_pio_need_iordy(adev)) /* PIO 3/4 require IORDY */ |
98 | control |= 2; /* IORDY enable */ | 98 | control |= 2; /* IE */ |
99 | /* Bit 2 is set for ATAPI on the IT8213 - reverse of ICH/PIIX */ | 99 | /* Bit 2 is set for ATAPI on the IT8213 - reverse of ICH/PIIX */ |
100 | if (adev->class != ATA_DEV_ATA) | 100 | if (adev->class != ATA_DEV_ATA) |
101 | control |= 4; | 101 | control |= 4; /* PPE */ |
102 | 102 | ||
103 | pci_read_config_word(dev, idetm_port, &idetm_data); | 103 | pci_read_config_word(dev, idetm_port, &idetm_data); |
104 | 104 | ||
105 | /* Enable PPE, IE and TIME as appropriate */ | 105 | /* Set PPE, IE, and TIME as appropriate */ |
106 | |||
107 | if (adev->devno == 0) { | 106 | if (adev->devno == 0) { |
108 | idetm_data &= 0xCCF0; | 107 | idetm_data &= 0xCCF0; |
109 | idetm_data |= control; | 108 | idetm_data |= control; |
@@ -122,7 +121,7 @@ static void it8213_set_piomode (struct ata_port *ap, struct ata_device *adev) | |||
122 | pci_write_config_byte(dev, 0x44, slave_data); | 121 | pci_write_config_byte(dev, 0x44, slave_data); |
123 | } | 122 | } |
124 | 123 | ||
125 | idetm_data |= 0x4000; /* Ensure SITRE is enabled */ | 124 | idetm_data |= 0x4000; /* Ensure SITRE is set */ |
126 | pci_write_config_word(dev, idetm_port, idetm_data); | 125 | pci_write_config_word(dev, idetm_port, idetm_data); |
127 | } | 126 | } |
128 | 127 | ||