Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pata_efar: fix PIO2 underclocking

Fix the PIO mode 2 using mode 0 timings -- this driver should enable the
fast timing bank starting with PIO2, just like the PIIX/ICH drivers do.
Also, fix/rephrase some comments while at it.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

authored by

Sergei Shtylyov and committed by
Jeff Garzik
5f33b3bc 45bc955b

+8 -9
+8 -9
drivers/ata/pata_efar.c
··· 22 22 #include <linux/ata.h> 23 23 24 24 #define DRV_NAME "pata_efar" 25 - #define DRV_VERSION "0.4.4" 25 + #define DRV_VERSION "0.4.5" 26 26 27 27 /** 28 28 * efar_pre_reset - Enable bits ··· 98 98 { 2, 1 }, 99 99 { 2, 3 }, }; 100 100 101 - if (pio > 2) 102 - control |= 1; /* TIME1 enable */ 101 + if (pio > 1) 102 + control |= 1; /* TIME */ 103 103 if (ata_pio_need_iordy(adev)) /* PIO 3/4 require IORDY */ 104 - control |= 2; /* IE enable */ 105 - /* Intel specifies that the PPE functionality is for disk only */ 104 + control |= 2; /* IE */ 105 + /* Intel specifies that the prefetch/posting is for disk only */ 106 106 if (adev->class == ATA_DEV_ATA) 107 - control |= 4; /* PPE enable */ 107 + control |= 4; /* PPE */ 108 108 109 109 pci_read_config_word(dev, idetm_port, &idetm_data); 110 110 111 - /* Enable PPE, IE and TIME as appropriate */ 112 - 111 + /* Set PPE, IE, and TIME as appropriate */ 113 112 if (adev->devno == 0) { 114 113 idetm_data &= 0xCCF0; 115 114 idetm_data |= control; ··· 128 129 pci_write_config_byte(dev, 0x44, slave_data); 129 130 } 130 131 131 - idetm_data |= 0x4000; /* Ensure SITRE is enabled */ 132 + idetm_data |= 0x4000; /* Ensure SITRE is set */ 132 133 pci_write_config_word(dev, idetm_port, idetm_data); 133 134 } 134 135