patch-2.2.13 linux/drivers/isdn/hisax/gazel.c

Next file: linux/drivers/isdn/hisax/hfc_2bds0.c
Previous file: linux/drivers/isdn/hisax/elsa_ser.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.12/linux/drivers/isdn/hisax/gazel.c linux/drivers/isdn/hisax/gazel.c
@@ -1,4 +1,4 @@
-/* $Id: gazel.c,v 2.5 1999/08/11 21:01:26 keil Exp $
+/* $Id: gazel.c,v 2.6 1999/08/22 20:27:03 calle Exp $
 
  * gazel.c     low level stuff for Gazel isdn cards
  *
@@ -6,6 +6,12 @@
  *              based on source code from Karsten Keil
  *
  * $Log: gazel.c,v $
+ * Revision 2.6  1999/08/22 20:27:03  calle
+ * backported changes from kernel 2.3.14:
+ * - several #include "config.h" gone, others come.
+ * - "struct device" changed to "struct net_device" in 2.3.14, added a
+ *   define in isdn_compat.h for older kernel versions.
+ *
  * Revision 2.5  1999/08/11 21:01:26  keil
  * new PCI codefix
  *
@@ -23,6 +29,7 @@
  * Initial revision
  *
  */
+#include <linux/config.h>
 #define __NO_VERSION__
 #include "hisax.h"
 #include "isac.h"
@@ -30,12 +37,9 @@
 #include "isdnl1.h"
 #include "ipac.h"
 #include <linux/pci.h>
-#ifndef COMPAT_HAS_NEW_PCI
-#include <linux/bios32.h>
-#endif
 
 extern const char *CardType[];
-const char *gazel_revision = "$Revision: 2.5 $";
+const char *gazel_revision = "$Revision: 2.6 $";
 
 #define R647      1
 #define R685      2
@@ -566,11 +570,7 @@
 	return (0);
 }
 
-#ifdef COMPAT_HAS_NEW_PCI
 static struct pci_dev *dev_tel __initdata = NULL;
-#else
-static  int pci_index __initdata = 0;
-#endif
 
 static int
 setup_gazelpci(struct IsdnCardState *cs)
@@ -582,42 +582,19 @@
 	printk(KERN_WARNING "Gazel: PCI card automatic recognition\n");
 
 	found = 0;
-#ifdef COMPAT_HAS_NEW_PCI
 	if (!pci_present()) {
 		printk(KERN_WARNING "Gazel: No PCI bus present\n");
 		return 1;
 	}
-#endif
 	seekcard = GAZEL_R685;
 	for (nbseek = 0; nbseek < 3; nbseek++) {
-#ifdef COMPAT_HAS_NEW_PCI
 		if ((dev_tel = pci_find_device(GAZEL_MANUFACTURER, seekcard, dev_tel))) {
 
 			pci_irq = dev_tel->irq;
-			pci_ioaddr0 = get_pcibase(dev_tel, 1);
-			pci_ioaddr1 = get_pcibase(dev_tel, 2);
-			found = 1;
-		}
-#else
-		for (; pci_index < 0xff; pci_index++) {
-			u_char pci_bus, pci_device_fn;
-			
-			if (pcibios_find_device(GAZEL_MANUFACTURER, seekcard,
-				pci_index, &pci_bus, &pci_device_fn)
-				!= PCIBIOS_SUCCESSFUL)
-				break;
-			/* get IRQ */
-			pcibios_read_config_byte(pci_bus, pci_device_fn,
-				PCI_INTERRUPT_LINE, &pci_irq);
-			/* get IO address */
-			pcibios_read_config_dword(pci_bus, pci_device_fn,
-				PCI_BASE_ADDRESS_1, &pci_ioaddr0);
-			pcibios_read_config_dword(pci_bus, pci_device_fn,
-				PCI_BASE_ADDRESS_2, &pci_ioaddr1);
+			pci_ioaddr0 = dev_tel->base_address[ 1];
+			pci_ioaddr1 = dev_tel->base_address[ 2];
 			found = 1;
-			break;
 		}
-#endif /* COMPAT_HAS_NEW_PCI */
 		if (found)
 			break;
 		else {
@@ -629,9 +606,6 @@
 					seekcard = GAZEL_DJINN_ITOO;
 					break;
 			}
-#ifndef COMPAT_HAS_NEW_PCI
-			pci_index = 0;
-#endif
 		}
 	}
 	if (!found) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)