patch-2.1.113 linux/drivers/block/ide-pci.c
Next file: linux/drivers/block/ide.c
Previous file: linux/drivers/block/ide-dma.c
Back to the patch index
Back to the overall index
- Lines: 50
- Date:
Thu Jul 30 20:06:52 1998
- Orig file:
v2.1.112/linux/drivers/block/ide-pci.c
- Orig date:
Thu Jul 16 18:09:24 1998
diff -u --recursive --new-file v2.1.112/linux/drivers/block/ide-pci.c linux/drivers/block/ide-pci.c
@@ -225,11 +225,14 @@
*/
__initfunc(static void ide_setup_pci_device (struct pci_dev *dev, ide_pci_device_t *d))
{
- unsigned int port, at_least_one_hwif_enabled = 0, no_autodma = 0, pciirq = 0;
+ unsigned int port, at_least_one_hwif_enabled = 0, autodma = 0, pciirq = 0;
unsigned short pcicmd = 0, tried_config = 0;
byte tmp = 0;
ide_hwif_t *hwif, *mate = NULL;
+#ifdef CONFIG_IDEDMA_AUTO
+ autodma = 1;
+#endif
check_if_enabled:
if (pci_read_config_word(dev, PCI_COMMAND, &pcicmd)) {
printk("%s: error accessing PCI regs\n", d->name);
@@ -249,7 +252,7 @@
printk("%s: device disabled (BIOS)\n", d->name);
return;
}
- no_autodma = 1; /* default DMA off if we had to configure it here */
+ autodma = 0; /* default DMA off if we had to configure it here */
goto check_if_enabled;
}
if (tried_config)
@@ -311,11 +314,11 @@
hwif->mate = mate;
mate->mate = hwif;
}
- if (no_autodma)
- hwif->no_autodma = 1;
#ifdef CONFIG_BLK_DEV_IDEDMA
if (IDE_PCI_DEVID_EQ(d->devid, DEVID_SIS5513))
- hwif->no_autodma = 1; /* too many SIS-5513 systems have troubles */
+ autodma = 0;
+ if (autodma)
+ hwif->autodma = 1;
if (IDE_PCI_DEVID_EQ(d->devid, DEVID_PDC20246) ||
((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && (dev->class & 0x80))) {
unsigned int extra = (!mate && IDE_PCI_DEVID_EQ(d->devid, DEVID_PDC20246)) ? 16 : 0;
@@ -324,8 +327,7 @@
/*
* Set up BM-DMA capability (PnP BIOS should have done this)
*/
-printk("%s: %s enabling Bus-Master DMA\n", hwif->name, d->name);
- hwif->no_autodma = 1; /* default DMA off if we had to configure it here */
+ hwif->autodma = 0; /* default DMA off if we had to configure it here */
(void) pci_write_config_word(dev, PCI_COMMAND, pcicmd | PCI_COMMAND_MASTER);
if (pci_read_config_word(dev, PCI_COMMAND, &pcicmd) || !(pcicmd & PCI_COMMAND_MASTER)) {
printk("%s: %s error updating PCICMD\n", hwif->name, d->name);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov