patch-2.2.13 linux/drivers/isdn/hisax/bkm_a4t.c
Next file: linux/drivers/isdn/hisax/bkm_a8.c
Previous file: linux/drivers/isdn/hisax/avm_pci.c
Back to the patch index
Back to the overall index
- Lines: 117
- Date:
Tue Oct 19 17:14:00 1999
- Orig file:
v2.2.12/linux/drivers/isdn/hisax/bkm_a4t.c
- Orig date:
Tue Oct 19 17:10:37 1999
diff -u --recursive --new-file v2.2.12/linux/drivers/isdn/hisax/bkm_a4t.c linux/drivers/isdn/hisax/bkm_a4t.c
@@ -1,4 +1,4 @@
-/* $Id: bkm_a4t.c,v 1.6 1999/08/11 21:01:22 keil Exp $
+/* $Id: bkm_a4t.c,v 1.8 1999/09/04 06:20:05 keil Exp $
* bkm_a4t.c low level stuff for T-Berkom A4T
* derived from the original file sedlbauer.c
* derived from the original file niccy.c
@@ -7,6 +7,15 @@
* Author Roland Klabunde (R.Klabunde@Berkom.de)
*
* $Log: bkm_a4t.c,v $
+ * Revision 1.8 1999/09/04 06:20:05 keil
+ * Changes from kernel set_current_state()
+ *
+ * Revision 1.7 1999/08/22 20:26:55 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 1.6 1999/08/11 21:01:22 keil
* new PCI codefix
*
@@ -28,6 +37,7 @@
#define __NO_VERSION__
+#include <linux/config.h>
#include "hisax.h"
#include "isac.h"
#include "hscx.h"
@@ -35,13 +45,10 @@
#include "isdnl1.h"
#include "bkm_ax.h"
#include <linux/pci.h>
-#ifndef COMPAT_HAS_NEW_PCI
-#include <linux/bios32.h>
-#endif
extern const char *CardType[];
-const char *bkm_a4t_revision = "$Revision: 1.6 $";
+const char *bkm_a4t_revision = "$Revision: 1.8 $";
static inline u_char
@@ -281,11 +288,7 @@
return (0);
}
-#ifdef COMPAT_HAS_NEW_PCI
static struct pci_dev *dev_a4t __initdata = NULL;
-#else
-static int pci_index __initdata = 0;
-#endif
__initfunc(int
setup_bkm_a4t(struct IsdnCard *card))
@@ -295,9 +298,6 @@
u_int pci_memaddr = 0, found = 0;
I20_REGISTER_FILE *pI20_Regs;
#if CONFIG_PCI
-#ifndef COMPAT_HAS_NEW_PCI
- u_char pci_bus, pci_device_fn, pci_irq = 0;
-#endif
#endif
strcpy(tmp, bkm_a4t_revision);
@@ -308,7 +308,6 @@
return (0);
#if CONFIG_PCI
-#ifdef COMPAT_HAS_NEW_PCI
if (!pci_present()) {
printk(KERN_ERR "bkm_a4t: no PCI bus present\n");
return (0);
@@ -320,40 +319,14 @@
&sub_sys_id);
if (sub_sys_id == ((A4T_SUBSYS_ID << 16) | A4T_SUBVEN_ID)) {
found = 1;
- pci_memaddr = get_pcibase(dev_a4t, 0);
+ pci_memaddr = dev_a4t->base_address[ 0];
cs->irq = dev_a4t->irq;
}
}
-#else
- for (; pci_index < 0xff; pci_index++) {
- if (pcibios_find_device(I20_VENDOR_ID,
- I20_DEVICE_ID,
- pci_index,
- &pci_bus,
- &pci_device_fn) == PCIBIOS_SUCCESSFUL) {
- u_int sub_sys_id = 0;
-
- pcibios_read_config_dword(pci_bus, pci_device_fn,
- PCI_SUBSYSTEM_VENDOR_ID, &sub_sys_id);
- if (sub_sys_id == ((A4T_SUBSYS_ID << 16) | A4T_SUBVEN_ID)) {
- found = 1;
- pcibios_read_config_byte(pci_bus, pci_device_fn,
- PCI_INTERRUPT_LINE, &pci_irq);
- cs->irq = pci_irq;
- pcibios_read_config_dword(pci_bus, pci_device_fn,
- PCI_BASE_ADDRESS_0, &pci_memaddr);
- break;
- }
- }
- }
-#endif /* COMPAT_HAS_NEW_PCI */
if (!found) {
printk(KERN_WARNING "HiSax: %s: Card not found\n", CardType[card->typ]);
return (0);
}
-#ifndef COMPAT_HAS_NEW_PCI
- pci_index++;
-#endif
if (!cs->irq) { /* IRQ range check ?? */
printk(KERN_WARNING "HiSax: %s: No IRQ\n", CardType[card->typ]);
return (0);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)