patch-2.2.19 linux/drivers/isdn/hisax/gazel.c
Next file: linux/drivers/isdn/hisax/hfc_2bds0.c
Previous file: linux/drivers/isdn/hisax/fsm.c
Back to the patch index
Back to the overall index
- Lines: 130
- Date:
Sun Mar 25 11:37:32 2001
- Orig file:
v2.2.18/drivers/isdn/hisax/gazel.c
- Orig date:
Sun Mar 25 11:13:07 2001
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.18/drivers/isdn/hisax/gazel.c linux/drivers/isdn/hisax/gazel.c
@@ -1,35 +1,15 @@
-/* $Id: gazel.c,v 2.6 1999/08/22 20:27:03 calle Exp $
-
+/* $Id: gazel.c,v 2.11.6.3 2001/02/13 10:33:58 kai Exp $
+ *
* gazel.c low level stuff for Gazel isdn cards
*
* Author BeWan Systems
* 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
- *
- * Revision 2.4 1999/08/10 16:01:54 calle
- * struct pci_dev changed in 2.3.13. Made the necessary changes.
- *
- * Revision 2.3 1999/07/12 21:05:09 keil
- * fix race in IRQ handling
- * added watchdog for lost IRQs
- *
- * Revision 2.1 1999/07/08 21:26:17 keil
- * new card
- *
- * Revision 1.0 1999/28/06
- * Initial revision
+ * This file is (c) under GNU PUBLIC LICENSE
*
*/
#include <linux/config.h>
+#include <linux/init.h>
#define __NO_VERSION__
#include "hisax.h"
#include "isac.h"
@@ -37,21 +17,16 @@
#include "isdnl1.h"
#include "ipac.h"
#include <linux/pci.h>
+#include <linux/isdn_compat.h>
extern const char *CardType[];
-const char *gazel_revision = "$Revision: 2.6 $";
+const char *gazel_revision = "$Revision: 2.11.6.3 $";
#define R647 1
#define R685 2
#define R753 3
#define R742 4
-/* Gazel R685 stuff */
-#define GAZEL_MANUFACTURER 0x10b5
-#define GAZEL_R685 0x1030
-#define GAZEL_R753 0x1152
-#define GAZEL_DJINN_ITOO 0x1151
-
#define PLX_CNTRL 0x50 /* registre de controle PLX */
#define RESET_GAZEL 0x4
#define RESET_9050 0x40000000
@@ -586,24 +561,25 @@
printk(KERN_WARNING "Gazel: No PCI bus present\n");
return 1;
}
- seekcard = GAZEL_R685;
+ seekcard = PCI_DEVICE_ID_PLX_R685;
for (nbseek = 0; nbseek < 3; nbseek++) {
- if ((dev_tel = pci_find_device(GAZEL_MANUFACTURER, seekcard, dev_tel))) {
-
+ if ((dev_tel = pci_find_device(PCI_VENDOR_ID_PLX, seekcard, dev_tel))) {
+ if (pci_enable_device(dev_tel))
+ return 1;
pci_irq = dev_tel->irq;
- pci_ioaddr0 = dev_tel->base_address[ 1];
- pci_ioaddr1 = dev_tel->base_address[ 2];
+ pci_ioaddr0 = dev_tel->base_address[ 1] & PCI_BASE_ADDRESS_IO_MASK;
+ pci_ioaddr1 = dev_tel->base_address[ 2] & PCI_BASE_ADDRESS_IO_MASK;
found = 1;
}
if (found)
break;
else {
switch (seekcard) {
- case GAZEL_R685:
- seekcard = GAZEL_R753;
+ case PCI_DEVICE_ID_PLX_R685:
+ seekcard = PCI_DEVICE_ID_PLX_R753;
break;
- case GAZEL_R753:
- seekcard = GAZEL_DJINN_ITOO;
+ case PCI_DEVICE_ID_PLX_R753:
+ seekcard = PCI_DEVICE_ID_PLX_DJINN_ITOO;
break;
}
}
@@ -632,7 +608,7 @@
cs->irq_flags |= SA_SHIRQ;
switch (seekcard) {
- case GAZEL_R685:
+ case PCI_DEVICE_ID_PLX_R685:
printk(KERN_INFO "Gazel: Card PCI R685 found\n");
cs->subtyp = R685;
cs->dc.isac.adf2 = 0x87;
@@ -643,8 +619,8 @@
"Gazel: hscx A:0x%X hscx B:0x%X\n",
cs->hw.gazel.hscx[0], cs->hw.gazel.hscx[1]);
break;
- case GAZEL_R753:
- case GAZEL_DJINN_ITOO:
+ case PCI_DEVICE_ID_PLX_R753:
+ case PCI_DEVICE_ID_PLX_DJINN_ITOO:
printk(KERN_INFO "Gazel: Card PCI R753 found\n");
cs->subtyp = R753;
test_and_set_bit(HW_IPAC, &cs->HW_Flags);
@@ -657,8 +633,8 @@
return (0);
}
-__initfunc(int
- setup_gazel(struct IsdnCard *card))
+int __init
+setup_gazel(struct IsdnCard *card)
{
struct IsdnCardState *cs = card->cs;
char tmp[64];
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)