diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/Kconfig | 8 | ||||
-rw-r--r-- | drivers/ide/setup-pci.c | 46 |
2 files changed, 3 insertions, 51 deletions
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 8982c0932438..5fbd06b7893d 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -435,14 +435,6 @@ config BLK_DEV_IDEDMA_PCI | |||
435 | bool | 435 | bool |
436 | select BLK_DEV_IDEPCI | 436 | select BLK_DEV_IDEPCI |
437 | 437 | ||
438 | config BLK_DEV_IDEDMA_FORCED | ||
439 | bool "Force enable legacy 2.0.X HOSTS to use DMA" | ||
440 | depends on BLK_DEV_IDEDMA_PCI | ||
441 | help | ||
442 | This is an old piece of lost code from Linux 2.0 Kernels. | ||
443 | |||
444 | Generally say N here. | ||
445 | |||
446 | # TODO: remove it | 438 | # TODO: remove it |
447 | config IDEDMA_ONLYDISK | 439 | config IDEDMA_ONLYDISK |
448 | bool "Enable DMA only for disks " | 440 | bool "Enable DMA only for disks " |
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index 1129f8c30840..f620da42e157 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
@@ -145,27 +145,13 @@ static int ide_setup_pci_baseregs (struct pci_dev *dev, const char *name) | |||
145 | } | 145 | } |
146 | 146 | ||
147 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | 147 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI |
148 | |||
149 | #ifdef CONFIG_BLK_DEV_IDEDMA_FORCED | ||
150 | /* | ||
151 | * Long lost data from 2.0.34 that is now in 2.0.39 | ||
152 | * | ||
153 | * This was used in ./drivers/block/triton.c to do DMA Base address setup | ||
154 | * when PnP failed. Oh the things we forget. I believe this was part | ||
155 | * of SFF-8038i that has been withdrawn from public access... :-(( | ||
156 | */ | ||
157 | #define DEFAULT_BMIBA 0xe800 /* in case BIOS did not init it */ | ||
158 | #define DEFAULT_BMCRBA 0xcc00 /* VIA's default value */ | ||
159 | #define DEFAULT_BMALIBA 0xd400 /* ALI's default value */ | ||
160 | #endif /* CONFIG_BLK_DEV_IDEDMA_FORCED */ | ||
161 | |||
162 | /** | 148 | /** |
163 | * ide_get_or_set_dma_base - setup BMIBA | 149 | * ide_get_or_set_dma_base - setup BMIBA |
164 | * @hwif: Interface | 150 | * @hwif: Interface |
165 | * | 151 | * |
166 | * Fetch the DMA Bus-Master-I/O-Base-Address (BMIBA) from PCI space: | 152 | * Fetch the DMA Bus-Master-I/O-Base-Address (BMIBA) from PCI space. |
167 | * If need be we set up the DMA base. Where a device has a partner that | 153 | * Where a device has a partner that is already in DMA mode we check |
168 | * is already in DMA mode we check and enforce IDE simplex rules. | 154 | * and enforce IDE simplex rules. |
169 | */ | 155 | */ |
170 | 156 | ||
171 | static unsigned long ide_get_or_set_dma_base (ide_hwif_t *hwif) | 157 | static unsigned long ide_get_or_set_dma_base (ide_hwif_t *hwif) |
@@ -173,12 +159,6 @@ static unsigned long ide_get_or_set_dma_base (ide_hwif_t *hwif) | |||
173 | unsigned long dma_base = 0; | 159 | unsigned long dma_base = 0; |
174 | struct pci_dev *dev = hwif->pci_dev; | 160 | struct pci_dev *dev = hwif->pci_dev; |
175 | 161 | ||
176 | #ifdef CONFIG_BLK_DEV_IDEDMA_FORCED | ||
177 | int second_chance = 0; | ||
178 | |||
179 | second_chance_to_dma: | ||
180 | #endif /* CONFIG_BLK_DEV_IDEDMA_FORCED */ | ||
181 | |||
182 | if (hwif->mmio) | 162 | if (hwif->mmio) |
183 | return hwif->dma_base; | 163 | return hwif->dma_base; |
184 | 164 | ||
@@ -192,26 +172,6 @@ second_chance_to_dma: | |||
192 | } | 172 | } |
193 | } | 173 | } |
194 | 174 | ||
195 | #ifdef CONFIG_BLK_DEV_IDEDMA_FORCED | ||
196 | /* FIXME - should use pci_assign_resource surely */ | ||
197 | if ((!dma_base) && (!second_chance)) { | ||
198 | unsigned long set_bmiba = 0; | ||
199 | second_chance++; | ||
200 | switch(dev->vendor) { | ||
201 | case PCI_VENDOR_ID_AL: | ||
202 | set_bmiba = DEFAULT_BMALIBA; break; | ||
203 | case PCI_VENDOR_ID_VIA: | ||
204 | set_bmiba = DEFAULT_BMCRBA; break; | ||
205 | case PCI_VENDOR_ID_INTEL: | ||
206 | set_bmiba = DEFAULT_BMIBA; break; | ||
207 | default: | ||
208 | return dma_base; | ||
209 | } | ||
210 | pci_write_config_dword(dev, 0x20, set_bmiba|1); | ||
211 | goto second_chance_to_dma; | ||
212 | } | ||
213 | #endif /* CONFIG_BLK_DEV_IDEDMA_FORCED */ | ||
214 | |||
215 | if (dma_base) { | 175 | if (dma_base) { |
216 | u8 simplex_stat = 0; | 176 | u8 simplex_stat = 0; |
217 | dma_base += hwif->channel ? 8 : 0; | 177 | dma_base += hwif->channel ? 8 : 0; |