patch-2.1.93 linux/drivers/block/trm290.c

Next file: linux/drivers/block/xd.c
Previous file: linux/drivers/block/sl82c105.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.92/linux/drivers/block/trm290.c linux/drivers/block/trm290.c
@@ -133,7 +133,6 @@
 #include <linux/init.h>
 #include <linux/hdreg.h>
 #include <linux/pci.h>
-#include <linux/bios32.h>
 #include <linux/delay.h>
 
 #include <asm/io.h>
@@ -213,13 +212,14 @@
 {
 	unsigned int cfgbase = 0;
 	unsigned long flags;
-	byte reg, progif;
+	byte reg;
+	struct pci_dev *dev = hwif->pci_dev;
 
 	hwif->chipset = ide_trm290;
-	if (!pcibios_read_config_byte(hwif->pci_bus, hwif->pci_fn, 0x09, &progif) && (progif & 5)
-	 && !pcibios_read_config_dword(hwif->pci_bus, hwif->pci_fn, 0x20, &cfgbase) && cfgbase)
+	cfgbase = dev->base_address[4];
+	if ((dev->class & 5) && cfgbase)
 	{
-		hwif->config_data = cfgbase & ~1;
+		hwif->config_data = cfgbase & PCI_BASE_ADDRESS_IO_MASK;
 		printk("TRM290: chip config base at 0x%04lx\n", hwif->config_data);
 	} else {
 		hwif->config_data = 0x3df0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov