compatibility cleanup - part 6
This commit is contained in:
parent
9957cbef2c
commit
0c7ae2f941
|
@ -14,9 +14,6 @@
|
|||
#include "isac.h"
|
||||
#include "isdnl1.h"
|
||||
#include <linux/pci.h>
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
extern const char *CardType[];
|
||||
|
@ -769,11 +766,7 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
|
|||
return(0);
|
||||
}
|
||||
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
static struct pci_dev *dev_avm __initdata = NULL;
|
||||
#else
|
||||
static int pci_index __initdata = 0;
|
||||
#endif
|
||||
|
||||
__initfunc(int
|
||||
setup_avm_pcipnp(struct IsdnCard *card))
|
||||
|
@ -792,7 +785,6 @@ setup_avm_pcipnp(struct IsdnCard *card))
|
|||
cs->subtyp = AVM_FRITZ_PNP;
|
||||
} else {
|
||||
#if CONFIG_PCI
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
if (!pci_present()) {
|
||||
printk(KERN_ERR "FritzPCI: no PCI bus present\n");
|
||||
return(0);
|
||||
|
@ -816,36 +808,6 @@ setup_avm_pcipnp(struct IsdnCard *card))
|
|||
printk(KERN_WARNING "FritzPCI: No PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
#else
|
||||
for (; pci_index < 255; pci_index++) {
|
||||
unsigned char pci_bus, pci_device_fn;
|
||||
unsigned int ioaddr;
|
||||
unsigned char irq;
|
||||
|
||||
if (pcibios_find_device(PCI_VENDOR_ID_AVM,
|
||||
PCI_DEVICE_ID_AVM_FRITZ, pci_index,
|
||||
&pci_bus, &pci_device_fn) != 0) {
|
||||
continue;
|
||||
}
|
||||
pcibios_read_config_byte(pci_bus, pci_device_fn,
|
||||
PCI_INTERRUPT_LINE, &irq);
|
||||
pcibios_read_config_dword(pci_bus, pci_device_fn,
|
||||
PCI_BASE_ADDRESS_1, &ioaddr);
|
||||
cs->irq = irq;
|
||||
cs->hw.avm.cfg_reg = ioaddr & PCI_BASE_ADDRESS_IO_MASK;
|
||||
if (!cs->hw.avm.cfg_reg) {
|
||||
printk(KERN_ERR "FritzPCI: No IO-Adr for PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
cs->subtyp = AVM_FRITZ_PCI;
|
||||
break;
|
||||
}
|
||||
if (pci_index == 255) {
|
||||
printk(KERN_WARNING "FritzPCI: No PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
pci_index++;
|
||||
#endif /* COMPAT_HAS_NEW_PCI */
|
||||
cs->irq_flags |= SA_SHIRQ;
|
||||
#else
|
||||
printk(KERN_WARNING "FritzPCI: NO_PCI_BIOS\n");
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
#include "jade.h"
|
||||
#include "isdnl1.h"
|
||||
#include <linux/pci.h>
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
#include "bkm_ax.h"
|
||||
|
||||
extern const char *CardType[];
|
||||
|
@ -266,11 +263,7 @@ BKM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
|
|||
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))
|
||||
|
@ -280,9 +273,6 @@ __initfunc(int
|
|||
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);
|
||||
|
@ -293,7 +283,6 @@ __initfunc(int
|
|||
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);
|
||||
|
@ -314,37 +303,10 @@ __initfunc(int
|
|||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
for (; pci_index < 0xff; pci_index++) {
|
||||
if (pcibios_find_device(PCI_VENDOR_ID_ZORAN,
|
||||
PCI_DEVICE_ID_ZORAN_36120,
|
||||
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);
|
||||
pci_memaddr &= PCI_BASE_ADDRESS_MEM_MASK;
|
||||
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);
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
#include "hscx.h"
|
||||
#include "isdnl1.h"
|
||||
#include <linux/pci.h>
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
#include "bkm_ax.h"
|
||||
|
||||
#if CONFIG_PCI
|
||||
|
@ -285,11 +282,7 @@ sct_alloc_io(u_int adr, u_int len))
|
|||
return(0);
|
||||
}
|
||||
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
static struct pci_dev *dev_a8 __initdata = NULL;
|
||||
#else
|
||||
static int pci_index __initdata = 0;
|
||||
#endif
|
||||
static u16 sub_vendor_id __initdata = 0;
|
||||
static u16 sub_sys_id __initdata = 0;
|
||||
static u_char pci_bus __initdata = 0;
|
||||
|
@ -327,7 +320,6 @@ setup_sct_quadro(struct IsdnCard *card))
|
|||
(sub_vendor_id != SCT_SUBVEN_ID)))
|
||||
return (0);
|
||||
if (cs->subtyp == SCT_1) {
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
if (!pci_present()) {
|
||||
printk(KERN_ERR "bkm_a4t: no PCI bus present\n");
|
||||
return (0);
|
||||
|
@ -349,39 +341,12 @@ setup_sct_quadro(struct IsdnCard *card))
|
|||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
for (; pci_index < 0xff; pci_index++) {
|
||||
if (pcibios_find_device(PCI_VENDOR_ID_PLX,
|
||||
PCI_DEVICE_ID_PLX_9050, pci_index, &pci_bus,
|
||||
&pci_device_fn) == PCIBIOS_SUCCESSFUL) {
|
||||
pcibios_read_config_dword(pci_bus,
|
||||
pci_device_fn, PCI_SUBSYSTEM_VENDOR_ID,
|
||||
&sub_sys_id);
|
||||
if (sub_sys_id == ((SCT_SUBSYS_ID << 16) |
|
||||
SCT_SUBVEN_ID)) {
|
||||
found = 1;
|
||||
pcibios_read_config_dword(pci_bus,
|
||||
pci_device_fn,
|
||||
PCI_BASE_ADDRESS_1,
|
||||
&pci_ioaddr1);
|
||||
pcibios_read_config_byte(pci_bus,
|
||||
pci_device_fn,
|
||||
PCI_INTERRUPT_LINE,
|
||||
&pci_irq);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* COMPAT_HAS_NEW_PCI */
|
||||
if (!found) {
|
||||
printk(KERN_WARNING "HiSax: %s (%s): Card not found\n",
|
||||
CardType[card->typ],
|
||||
sct_quadro_subtypes[cs->subtyp]);
|
||||
return (0);
|
||||
}
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
pci_index++; /* need for more as one card */
|
||||
#endif
|
||||
#ifdef ATTEMPT_PCI_REMAPPING
|
||||
/* HACK: PLX revision 1 bug: PLX address bit 7 must not be set */
|
||||
pcibios_read_config_byte(pci_bus, pci_device_fn,
|
||||
|
@ -398,9 +363,7 @@ setup_sct_quadro(struct IsdnCard *card))
|
|||
pci_ioaddr1 &= PCI_BASE_ADDRESS_IO_MASK;
|
||||
pcibios_write_config_dword(pci_bus, pci_device_fn,
|
||||
PCI_BASE_ADDRESS_1, pci_ioaddr1);
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
get_pcibase(dev_a8, 1) = pci_ioaddr1;
|
||||
#endif /* COMPAT_HAS_NEW_PCI */
|
||||
}
|
||||
#endif /* End HACK */
|
||||
}
|
||||
|
|
|
@ -20,9 +20,6 @@
|
|||
#include "ipac.h"
|
||||
#include "isdnl1.h"
|
||||
#include <linux/pci.h>
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
|
||||
extern const char *CardType[];
|
||||
|
||||
|
@ -838,13 +835,9 @@ Diva_card_msg(struct IsdnCardState *cs, int mt, void *arg)
|
|||
return(0);
|
||||
}
|
||||
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
static struct pci_dev *dev_diva __initdata = NULL;
|
||||
static struct pci_dev *dev_diva_u __initdata = NULL;
|
||||
static struct pci_dev *dev_diva201 __initdata = NULL;
|
||||
#else
|
||||
static int pci_index __initdata = 0;
|
||||
#endif
|
||||
|
||||
__initfunc(int
|
||||
setup_diva(struct IsdnCard *card))
|
||||
|
@ -885,7 +878,6 @@ setup_diva(struct IsdnCard *card))
|
|||
bytecnt = 8;
|
||||
} else {
|
||||
#if CONFIG_PCI
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
if (!pci_present()) {
|
||||
printk(KERN_ERR "Diva: no PCI bus present\n");
|
||||
return(0);
|
||||
|
@ -930,66 +922,6 @@ setup_diva(struct IsdnCard *card))
|
|||
printk(KERN_WARNING "Diva: No IO-Adr for PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
#else
|
||||
u_char pci_bus, pci_device_fn, pci_irq;
|
||||
u_int pci_ioaddr;
|
||||
|
||||
cs->subtyp = 0;
|
||||
for (; pci_index < 0xff; pci_index++) {
|
||||
if (pcibios_find_device(PCI_VENDOR_ID_EICON,
|
||||
PCI_DEVICE_ID_EICON_DIVA20, pci_index, &pci_bus,
|
||||
&pci_device_fn) == PCIBIOS_SUCCESSFUL)
|
||||
cs->subtyp = DIVA_PCI;
|
||||
else if (pcibios_find_device(PCI_VENDOR_ID_EICON,
|
||||
PCI_DEVICE_ID_EICON_DIVA20_U, pci_index, &pci_bus,
|
||||
&pci_device_fn) == PCIBIOS_SUCCESSFUL)
|
||||
cs->subtyp = DIVA_PCI;
|
||||
else if (pcibios_find_device(PCI_VENDOR_ID_EICON,
|
||||
PCI_DEVICE_ID_EICON_DIVA201, pci_index, &pci_bus,
|
||||
&pci_device_fn) == PCIBIOS_SUCCESSFUL)
|
||||
cs->subtyp = DIVA_IPAC_PCI;
|
||||
else
|
||||
break;
|
||||
/* get IRQ */
|
||||
pcibios_read_config_byte(pci_bus, pci_device_fn,
|
||||
PCI_INTERRUPT_LINE, &pci_irq);
|
||||
|
||||
/* get IO address */
|
||||
if (cs->subtyp == DIVA_IPAC_PCI) {
|
||||
pcibios_read_config_dword(pci_bus, pci_device_fn,
|
||||
PCI_BASE_ADDRESS_0, &pci_ioaddr);
|
||||
cs->hw.diva.pci_cfg = (ulong) ioremap(pci_ioaddr,
|
||||
4096);
|
||||
pcibios_read_config_dword(pci_bus, pci_device_fn,
|
||||
PCI_BASE_ADDRESS_1, &pci_ioaddr);
|
||||
cs->hw.diva.cfg_reg = (ulong) ioremap(pci_ioaddr,
|
||||
4096);
|
||||
} else {
|
||||
pcibios_read_config_dword(pci_bus, pci_device_fn,
|
||||
PCI_BASE_ADDRESS_1, &pci_ioaddr);
|
||||
cs->hw.diva.pci_cfg = pci_ioaddr & ~3;
|
||||
pcibios_read_config_dword(pci_bus, pci_device_fn,
|
||||
PCI_BASE_ADDRESS_2, &pci_ioaddr);
|
||||
cs->hw.diva.cfg_reg = pci_ioaddr & ~3;
|
||||
}
|
||||
if (cs->subtyp)
|
||||
break;
|
||||
}
|
||||
if (!cs->subtyp) {
|
||||
printk(KERN_WARNING "Diva: No PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
pci_index++;
|
||||
if (!pci_irq) {
|
||||
printk(KERN_WARNING "Diva: No IRQ for PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
if (!pci_ioaddr) {
|
||||
printk(KERN_WARNING "Diva: No IO-Adr for PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
cs->irq = pci_irq;
|
||||
#endif /* COMPAT_HAS_NEW_PCI */
|
||||
cs->irq_flags |= SA_SHIRQ;
|
||||
#else
|
||||
printk(KERN_WARNING "Diva: cfgreg 0 and NO_PCI_BIOS\n");
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
#include "hscx.h"
|
||||
#include "isdnl1.h"
|
||||
#include <linux/pci.h>
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
#include <linux/serial.h>
|
||||
#include <linux/serial_reg.h>
|
||||
|
||||
|
@ -870,12 +867,8 @@ probe_elsa(struct IsdnCardState *cs)
|
|||
return (CARD_portlist[i]);
|
||||
}
|
||||
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
static struct pci_dev *dev_qs1000 __initdata = NULL;
|
||||
static struct pci_dev *dev_qs3000 __initdata = NULL;
|
||||
#else
|
||||
static int pci_index __initdata = 0;
|
||||
#endif
|
||||
|
||||
int
|
||||
setup_elsa(struct IsdnCard *card)
|
||||
|
@ -993,7 +986,6 @@ setup_elsa(struct IsdnCard *card)
|
|||
cs->irq);
|
||||
} else if (cs->typ == ISDN_CTYPE_ELSA_PCI) {
|
||||
#if CONFIG_PCI
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
if (!pci_present()) {
|
||||
printk(KERN_ERR "Elsa: no PCI bus present\n");
|
||||
return(0);
|
||||
|
@ -1038,54 +1030,6 @@ setup_elsa(struct IsdnCard *card)
|
|||
HZDELAY(500); /* wait 500*10 ms */
|
||||
restore_flags(flags);
|
||||
}
|
||||
#else
|
||||
u_char pci_bus, pci_device_fn, pci_irq;
|
||||
u_int pci_ioaddr;
|
||||
|
||||
cs->subtyp = 0;
|
||||
for (; pci_index < 0xff; pci_index++) {
|
||||
if (pcibios_find_device(PCI_VENDOR_ID_ELSA,
|
||||
PCI_DEVICE_ID_ELSA_MIRCOLINK, pci_index, &pci_bus,
|
||||
&pci_device_fn) == PCIBIOS_SUCCESSFUL)
|
||||
cs->subtyp = ELSA_QS1000PCI;
|
||||
else if (pcibios_find_device(PCI_VENDOR_ID_ELSA,
|
||||
PCI_DEVICE_ID_ELSA_QS3000, pci_index, &pci_bus,
|
||||
&pci_device_fn) == PCIBIOS_SUCCESSFUL)
|
||||
cs->subtyp = ELSA_QS3000PCI;
|
||||
else
|
||||
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_ioaddr);
|
||||
pci_ioaddr &= ~3; /* remove io/mem flag */
|
||||
cs->hw.elsa.cfg = pci_ioaddr;
|
||||
pcibios_read_config_dword(pci_bus, pci_device_fn,
|
||||
PCI_BASE_ADDRESS_3, &pci_ioaddr);
|
||||
if (cs->subtyp)
|
||||
break;
|
||||
}
|
||||
if (!cs->subtyp) {
|
||||
printk(KERN_WARNING "Elsa: No PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
pci_index++;
|
||||
if (!pci_irq) {
|
||||
printk(KERN_WARNING "Elsa: No IRQ for PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
|
||||
if (!pci_ioaddr) {
|
||||
printk(KERN_WARNING "Elsa: No IO-Adr for PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
pci_ioaddr &= ~3; /* remove io/mem flag */
|
||||
cs->hw.elsa.base = pci_ioaddr;
|
||||
cs->irq = pci_irq;
|
||||
#endif /* COMPAT_HAS_NEW_PCI */
|
||||
cs->hw.elsa.ale = cs->hw.elsa.base;
|
||||
cs->hw.elsa.isac = cs->hw.elsa.base +1;
|
||||
cs->hw.elsa.hscx = cs->hw.elsa.base +1;
|
||||
|
|
|
@ -16,9 +16,6 @@
|
|||
#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$";
|
||||
|
@ -562,11 +559,7 @@ setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs)
|
|||
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)
|
||||
|
@ -578,15 +571,12 @@ setup_gazelpci(struct IsdnCardState *cs)
|
|||
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 = PCI_DEVICE_ID_PLX_R685;
|
||||
for (nbseek = 0; nbseek < 3; nbseek++) {
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
if ((dev_tel = pci_find_device(PCI_VENDOR_ID_PLX, seekcard, dev_tel))) {
|
||||
if (pci_enable_device(dev_tel))
|
||||
return 1;
|
||||
|
@ -595,26 +585,6 @@ setup_gazelpci(struct IsdnCardState *cs)
|
|||
pci_ioaddr1 = pci_resource_start_io(dev_tel, 2);
|
||||
found = 1;
|
||||
}
|
||||
#else
|
||||
for (; pci_index < 0xff; pci_index++) {
|
||||
u_char pci_bus, pci_device_fn;
|
||||
|
||||
if (pcibios_find_device(PCI_VENDOR_ID_PLX, 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);
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
#endif /* COMPAT_HAS_NEW_PCI */
|
||||
if (found)
|
||||
break;
|
||||
else {
|
||||
|
@ -626,9 +596,6 @@ setup_gazelpci(struct IsdnCardState *cs)
|
|||
seekcard = PCI_DEVICE_ID_PLX_DJINN_ITOO;
|
||||
break;
|
||||
}
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
pci_index = 0;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
|
|
|
@ -30,9 +30,6 @@
|
|||
#include "hfc_pci.h"
|
||||
#include "isdnl1.h"
|
||||
#include <linux/pci.h>
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
extern const char *CardType[];
|
||||
|
@ -1655,11 +1652,7 @@ hfcpci_card_msg(struct IsdnCardState *cs, int mt, void *arg)
|
|||
|
||||
|
||||
/* this variable is used as card index when more than one cards are present */
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
static struct pci_dev *dev_hfcpci __initdata = NULL;
|
||||
#else
|
||||
static int pci_index __initdata = 0;
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_PCI */
|
||||
|
||||
|
@ -1670,9 +1663,7 @@ __initfunc(int
|
|||
unsigned short cmd;
|
||||
char tmp[64];
|
||||
int i;
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
struct pci_dev *tmp_hfcpci = NULL;
|
||||
#endif
|
||||
|
||||
#ifdef __BIG_ENDIAN
|
||||
#error "not running on big endian machines now"
|
||||
|
@ -1684,7 +1675,6 @@ __initfunc(int
|
|||
cs->dc.hfcpci.ph_state = 0;
|
||||
cs->hw.hfcpci.fifo = 255;
|
||||
if (cs->typ == ISDN_CTYPE_HFC_PCI) {
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
if (!pci_present()) {
|
||||
printk(KERN_ERR "HFC-PCI: no PCI bus present\n");
|
||||
return (0);
|
||||
|
@ -1721,44 +1711,6 @@ __initfunc(int
|
|||
printk(KERN_WARNING "HFC-PCI: No PCI card found\n");
|
||||
return (0);
|
||||
}
|
||||
#else
|
||||
for (; pci_index < 255; pci_index++) {
|
||||
unsigned char irq;
|
||||
|
||||
i = 0;
|
||||
while (id_list[i].vendor_id) {
|
||||
if (pcibios_find_device(id_list[i].vendor_id,
|
||||
id_list[i].device_id, pci_index,
|
||||
&cs->hw.hfcpci.pci_bus, &cs->hw.hfcpci.pci_device_fn) == 0)
|
||||
break;
|
||||
i++;
|
||||
}
|
||||
if (!id_list[i].vendor_id)
|
||||
continue;
|
||||
|
||||
if (card->para[0]) {
|
||||
pcibios_read_config_dword(cs->hw.hfcpci.pci_bus,
|
||||
cs->hw.hfcpci.pci_device_fn, PCI_BASE_ADDRESS_0,
|
||||
(void *) &cs->hw.hfcpci.pci_io);
|
||||
if (((u32) cs->hw.hfcpci.pci_io & PCI_BASE_ADDRESS_IO_MASK) != card->para[0])
|
||||
continue;
|
||||
}
|
||||
pcibios_read_config_byte(cs->hw.hfcpci.pci_bus, cs->hw.hfcpci.pci_device_fn,
|
||||
PCI_INTERRUPT_LINE, &irq);
|
||||
cs->irq = irq;
|
||||
|
||||
pcibios_read_config_dword(cs->hw.hfcpci.pci_bus,
|
||||
cs->hw.hfcpci.pci_device_fn, PCI_BASE_ADDRESS_1,
|
||||
(void *) &cs->hw.hfcpci.pci_io);
|
||||
printk(KERN_INFO "HiSax: HFC-PCI card manufacturer: %s card name: %s\n", id_list[i].vendor_name, id_list[i].card_name);
|
||||
break;
|
||||
}
|
||||
if (pci_index == 255) {
|
||||
printk(KERN_WARNING "HFC-PCI: No card found\n");
|
||||
return (0);
|
||||
}
|
||||
pci_index++;
|
||||
#endif /* COMPAT_HAS_NEW_PCI */
|
||||
if (((int) cs->hw.hfcpci.pci_io & (PAGE_SIZE - 1))) {
|
||||
printk(KERN_WARNING "HFC-PCI shared mem address will be corrected\n");
|
||||
pcibios_write_config_word(cs->hw.hfcpci.pci_bus,
|
||||
|
@ -1790,9 +1742,7 @@ __initfunc(int
|
|||
printk(KERN_WARNING "HFC-PCI unable to align address %x\n", (unsigned) cs->hw.hfcpci.pci_io);
|
||||
return (0);
|
||||
}
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
get_pcibase(dev_hfcpci,1) = (int) cs->hw.hfcpci.pci_io;
|
||||
#endif
|
||||
}
|
||||
if (!cs->hw.hfcpci.pci_io) {
|
||||
printk(KERN_WARNING "HFC-PCI: No IO-Mem for PCI card found\n");
|
||||
|
|
|
@ -17,9 +17,6 @@
|
|||
#include "hscx.h"
|
||||
#include "isdnl1.h"
|
||||
#include <linux/pci.h>
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/ppp_defs.h>
|
||||
#include "netjet.h"
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
#include "hscx.h"
|
||||
#include "isdnl1.h"
|
||||
#include <linux/pci.h>
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
|
||||
extern const char *CardType[];
|
||||
const char *niccy_revision = "$Revision$";
|
||||
|
@ -245,11 +242,7 @@ niccy_card_msg(struct IsdnCardState *cs, int mt, void *arg)
|
|||
return(0);
|
||||
}
|
||||
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
static struct pci_dev *niccy_dev __initdata = NULL;
|
||||
#else
|
||||
static int pci_index __initdata = 0;
|
||||
#endif
|
||||
|
||||
__initfunc(int
|
||||
setup_niccy(struct IsdnCard *card))
|
||||
|
@ -292,7 +285,6 @@ setup_niccy(struct IsdnCard *card))
|
|||
} else {
|
||||
#if CONFIG_PCI
|
||||
u_int pci_ioaddr;
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
if (!pci_present()) {
|
||||
printk(KERN_ERR "Niccy: no PCI bus present\n");
|
||||
return(0);
|
||||
|
@ -323,51 +315,6 @@ setup_niccy(struct IsdnCard *card))
|
|||
printk(KERN_WARNING "Niccy: No PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
#else
|
||||
u_char pci_bus, pci_device_fn, pci_irq;
|
||||
|
||||
cs->subtyp = 0;
|
||||
for (; pci_index < 0xff; pci_index++) {
|
||||
if (pcibios_find_device(PCI_VENDOR_ID_SATSAGEM,
|
||||
PCI_DEVICE_ID_SATSAGEM_NICCY, pci_index, &pci_bus,
|
||||
&pci_device_fn) == PCIBIOS_SUCCESSFUL)
|
||||
cs->subtyp = NICCY_PCI;
|
||||
else
|
||||
continue;
|
||||
/* get IRQ */
|
||||
pcibios_read_config_byte(pci_bus, pci_device_fn,
|
||||
PCI_INTERRUPT_LINE, &pci_irq);
|
||||
|
||||
/* get IO pci AMCC address */
|
||||
pcibios_read_config_dword(pci_bus, pci_device_fn,
|
||||
PCI_BASE_ADDRESS_0, &pci_ioaddr);
|
||||
if (!pci_ioaddr) {
|
||||
printk(KERN_WARNING "Niccy: No IO-Adr for PCI cfg found\n");
|
||||
return(0);
|
||||
}
|
||||
cs->hw.niccy.cfg_reg = pci_ioaddr & ~3 ;
|
||||
/* get IO address */
|
||||
pcibios_read_config_dword(pci_bus, pci_device_fn,
|
||||
PCI_BASE_ADDRESS_1, &pci_ioaddr);
|
||||
if (cs->subtyp)
|
||||
break;
|
||||
}
|
||||
if (!cs->subtyp) {
|
||||
printk(KERN_WARNING "Niccy: No PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
pci_index++;
|
||||
if (!pci_irq) {
|
||||
printk(KERN_WARNING "Niccy: No IRQ for PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
if (!pci_ioaddr) {
|
||||
printk(KERN_WARNING "Niccy: No IO-Adr for PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
pci_ioaddr &= ~3; /* remove io/mem flag */
|
||||
cs->irq = pci_irq;
|
||||
#endif /* COMPAT_HAS_NEW_PCI */
|
||||
cs->irq_flags |= SA_SHIRQ;
|
||||
cs->hw.niccy.isac = pci_ioaddr + ISAC_PCI_DATA;
|
||||
cs->hw.niccy.isac_ale = pci_ioaddr + ISAC_PCI_ADDR;
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
#include "isac.h"
|
||||
#include "isdnl1.h"
|
||||
#include <linux/pci.h>
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/ppp_defs.h>
|
||||
#include "netjet.h"
|
||||
|
@ -142,11 +139,7 @@ NETjet_S_card_msg(struct IsdnCardState *cs, int mt, void *arg)
|
|||
return(0);
|
||||
}
|
||||
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
static struct pci_dev *dev_netjet __initdata = NULL;
|
||||
#else
|
||||
static int pci_index __initdata = 0;
|
||||
#endif
|
||||
|
||||
__initfunc(int
|
||||
setup_netjet_s(struct IsdnCard *card))
|
||||
|
@ -156,10 +149,6 @@ setup_netjet_s(struct IsdnCard *card))
|
|||
char tmp[64];
|
||||
long flags;
|
||||
#if CONFIG_PCI
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
u_char pci_bus, pci_device_fn, pci_irq;
|
||||
u_int pci_ioaddr, found;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __BIG_ENDIAN
|
||||
#error "not running on big endian machines now"
|
||||
|
@ -171,7 +160,6 @@ setup_netjet_s(struct IsdnCard *card))
|
|||
test_and_clear_bit(FLG_LOCK_ATOMIC, &cs->HW_Flags);
|
||||
|
||||
#if CONFIG_PCI
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
|
||||
for ( ;; )
|
||||
{
|
||||
|
@ -197,42 +185,6 @@ setup_netjet_s(struct IsdnCard *card))
|
|||
printk(KERN_WARNING "NETjet-S: No PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
#else
|
||||
found = 0;
|
||||
for (; pci_index < 0xff; pci_index++) {
|
||||
if (pcibios_find_device(PCI_VENDOR_TRAVERSE_TECH,
|
||||
PCI_NETJET_ID, pci_index, &pci_bus, &pci_device_fn)
|
||||
== PCIBIOS_SUCCESSFUL)
|
||||
found = 1;
|
||||
else
|
||||
continue;
|
||||
/* 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_0, &pci_ioaddr);
|
||||
if (found)
|
||||
break;
|
||||
}
|
||||
if (!found) {
|
||||
printk(KERN_WARNING "NETjet-S: No PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
pci_index++;
|
||||
if (!pci_irq) {
|
||||
printk(KERN_WARNING "NETjet-S: No IRQ for PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
if (!pci_ioaddr) {
|
||||
printk(KERN_WARNING "NETjet-S: No IO-Adr for PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
cs->hw.njet.base = pci_ioaddr & PCI_BASE_ADDRESS_IO_MASK;
|
||||
cs->irq = pci_irq;
|
||||
|
||||
#endif /* COMPAT_HAS_NEW_PCI */
|
||||
|
||||
cs->hw.njet.auxa = cs->hw.njet.base + NETJET_AUXDATA;
|
||||
cs->hw.njet.isac = cs->hw.njet.base | NETJET_ISAC_OFF;
|
||||
|
|
|
@ -10,9 +10,6 @@
|
|||
#include "icc.h"
|
||||
#include "isdnl1.h"
|
||||
#include <linux/pci.h>
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/ppp_defs.h>
|
||||
#include "netjet.h"
|
||||
|
@ -144,11 +141,7 @@ NETjet_U_card_msg(struct IsdnCardState *cs, int mt, void *arg)
|
|||
return(0);
|
||||
}
|
||||
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
static struct pci_dev *dev_netjet __initdata = NULL;
|
||||
#else
|
||||
static int pci_index __initdata = 0;
|
||||
#endif
|
||||
|
||||
__initfunc(int
|
||||
setup_netjet_u(struct IsdnCard *card))
|
||||
|
@ -158,10 +151,6 @@ setup_netjet_u(struct IsdnCard *card))
|
|||
char tmp[64];
|
||||
long flags;
|
||||
#if CONFIG_PCI
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
u_char pci_bus, pci_device_fn, pci_irq;
|
||||
u_int pci_ioaddr, found;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __BIG_ENDIAN
|
||||
#error "not running on big endian machines now"
|
||||
|
@ -173,7 +162,6 @@ setup_netjet_u(struct IsdnCard *card))
|
|||
test_and_clear_bit(FLG_LOCK_ATOMIC, &cs->HW_Flags);
|
||||
|
||||
#if CONFIG_PCI
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
|
||||
for ( ;; )
|
||||
{
|
||||
|
@ -199,42 +187,6 @@ setup_netjet_u(struct IsdnCard *card))
|
|||
printk(KERN_WARNING "NETspider-U: No PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
#else
|
||||
found = 0;
|
||||
for (; pci_index < 0xff; pci_index++) {
|
||||
if (pcibios_find_device(PCI_VENDOR_TRAVERSE_TECH,
|
||||
PCI_NETJET_ID, pci_index, &pci_bus, &pci_device_fn)
|
||||
== PCIBIOS_SUCCESSFUL)
|
||||
found = 1;
|
||||
else
|
||||
continue;
|
||||
/* 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_0, &pci_ioaddr);
|
||||
if (found)
|
||||
break;
|
||||
}
|
||||
if (!found) {
|
||||
printk(KERN_WARNING "NETspider-U: No PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
pci_index++;
|
||||
if (!pci_irq) {
|
||||
printk(KERN_WARNING "NETspider-U: No IRQ for PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
if (!pci_ioaddr) {
|
||||
printk(KERN_WARNING "NETspider-U: No IO-Adr for PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
cs->hw.njet.base = pci_ioaddr & PCI_BASE_ADDRESS_IO_MASK;
|
||||
cs->irq = pci_irq;
|
||||
|
||||
#endif /* COMPAT_HAS_NEW_PCI */
|
||||
|
||||
cs->hw.njet.auxa = cs->hw.njet.base + NETJET_AUXDATA;
|
||||
cs->hw.njet.isac = cs->hw.njet.base | NETJET_ISAC_OFF;
|
||||
|
|
|
@ -48,14 +48,6 @@
|
|||
#include "isar.h"
|
||||
#include "isdnl1.h"
|
||||
#include <linux/pci.h>
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
#include <linux/bios32.h>
|
||||
/* in old PCI here is an error in defining SUB SYSTEM/VENDOR Ids */
|
||||
#undef PCI_SUBSYSTEM_VENDOR_ID
|
||||
#define PCI_SUBSYSTEM_VENDOR_ID 0x2c
|
||||
#undef PCI_SUBSYSTEM_ID
|
||||
#define PCI_SUBSYSTEM_ID 0x2e
|
||||
#endif
|
||||
|
||||
extern const char *CardType[];
|
||||
|
||||
|
@ -542,11 +534,7 @@ Sedl_card_msg(struct IsdnCardState *cs, int mt, void *arg)
|
|||
return(0);
|
||||
}
|
||||
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
static struct pci_dev *dev_sedl __initdata = NULL;
|
||||
#else
|
||||
static int pci_index __initdata = 0;
|
||||
#endif
|
||||
|
||||
__initfunc(int
|
||||
setup_sedlbauer(struct IsdnCard *card))
|
||||
|
@ -585,7 +573,6 @@ setup_sedlbauer(struct IsdnCard *card))
|
|||
} else {
|
||||
/* Probe for Sedlbauer speed pci */
|
||||
#if CONFIG_PCI
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
if (!pci_present()) {
|
||||
printk(KERN_ERR "Sedlbauer: no PCI bus present\n");
|
||||
return(0);
|
||||
|
@ -604,35 +591,6 @@ setup_sedlbauer(struct IsdnCard *card))
|
|||
printk(KERN_WARNING "Sedlbauer: No PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
#else
|
||||
for (; pci_index < 255; pci_index++) {
|
||||
unsigned char pci_bus, pci_device_fn;
|
||||
unsigned int ioaddr;
|
||||
unsigned char irq;
|
||||
|
||||
if (pcibios_find_device (PCI_VENDOR_ID_TIGERJET,
|
||||
PCI_DEVICE_ID_TIGERJET_100, pci_index,
|
||||
&pci_bus, &pci_device_fn) != 0) {
|
||||
continue;
|
||||
}
|
||||
pcibios_read_config_byte(pci_bus, pci_device_fn,
|
||||
PCI_INTERRUPT_LINE, &irq);
|
||||
pcibios_read_config_dword(pci_bus, pci_device_fn,
|
||||
PCI_BASE_ADDRESS_0, &ioaddr);
|
||||
cs->irq = irq;
|
||||
cs->hw.sedl.cfg_reg = ioaddr & PCI_BASE_ADDRESS_IO_MASK;
|
||||
if (!cs->hw.sedl.cfg_reg) {
|
||||
printk(KERN_WARNING "Sedlbauer: No IO-Adr for PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (pci_index == 255) {
|
||||
printk(KERN_WARNING "Sedlbauer: No PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
pci_index++;
|
||||
#endif /* COMPAT_HAS_NEW_PCI */
|
||||
cs->irq_flags |= SA_SHIRQ;
|
||||
cs->hw.sedl.bus = SEDL_BUS_PCI;
|
||||
pci_get_sub_vendor(dev_sedl,sub_vendor_id);
|
||||
|
|
|
@ -15,9 +15,6 @@
|
|||
#include "hscx.h"
|
||||
#include "isdnl1.h"
|
||||
#include <linux/pci.h>
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
|
||||
extern const char *CardType[];
|
||||
const char *telespci_revision = "$Revision$";
|
||||
|
@ -285,22 +282,13 @@ TelesPCI_card_msg(struct IsdnCardState *cs, int mt, void *arg)
|
|||
return(0);
|
||||
}
|
||||
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
static struct pci_dev *dev_tel __initdata = NULL;
|
||||
#else
|
||||
static int pci_index __initdata = 0;
|
||||
#endif
|
||||
|
||||
__initfunc(int
|
||||
setup_telespci(struct IsdnCard *card))
|
||||
{
|
||||
struct IsdnCardState *cs = card->cs;
|
||||
char tmp[64];
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
u_char pci_bus, pci_device_fn, pci_irq;
|
||||
u_int pci_memaddr;
|
||||
u_char found = 0;
|
||||
#endif
|
||||
|
||||
#ifdef __BIG_ENDIAN
|
||||
#error "not running on big endian machines now"
|
||||
|
@ -310,7 +298,6 @@ setup_telespci(struct IsdnCard *card))
|
|||
if (cs->typ != ISDN_CTYPE_TELESPCI)
|
||||
return (0);
|
||||
#if CONFIG_PCI
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
if (!pci_present()) {
|
||||
printk(KERN_ERR "TelesPCI: no PCI bus present\n");
|
||||
return(0);
|
||||
|
@ -331,32 +318,6 @@ setup_telespci(struct IsdnCard *card))
|
|||
printk(KERN_WARNING "TelesPCI: No PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
#else
|
||||
for (; pci_index < 0xff; pci_index++) {
|
||||
if (pcibios_find_device (PCI_VENDOR_ID_ZORAN, PCI_DEVICE_ID_ZORAN_36120,
|
||||
pci_index, &pci_bus, &pci_device_fn)
|
||||
== PCIBIOS_SUCCESSFUL) {
|
||||
found = 1;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
pcibios_read_config_dword(pci_bus, pci_device_fn,
|
||||
PCI_BASE_ADDRESS_0, &pci_memaddr);
|
||||
pcibios_read_config_byte(pci_bus, pci_device_fn,
|
||||
PCI_INTERRUPT_LINE, &pci_irq);
|
||||
|
||||
printk(KERN_INFO "Found: Zoran, base-address: 0x%x,"
|
||||
" irq: 0x%x\n", pci_memaddr, pci_irq);
|
||||
break;
|
||||
}
|
||||
if (!found) {
|
||||
printk(KERN_WARNING "TelesPCI: No PCI card found\n");
|
||||
return(0);
|
||||
}
|
||||
pci_index++;
|
||||
cs->irq = pci_irq;
|
||||
cs->hw.teles0.membase = (u_long) vremap(pci_memaddr, PAGE_SIZE);
|
||||
#endif /* COMPAT_HAS_NEW_PCI */
|
||||
#else
|
||||
printk(KERN_WARNING "HiSax: Teles/PCI and NO_PCI_BIOS\n");
|
||||
printk(KERN_WARNING "HiSax: Teles/PCI unable to config\n");
|
||||
|
|
|
@ -16,9 +16,6 @@
|
|||
#include "isdnl1.h"
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/pci.h>
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
|
||||
#ifdef COMPAT_PCI_COMMON_ID
|
||||
#ifndef PCI_VENDOR_ID_ASUSCOM
|
||||
|
@ -990,11 +987,7 @@ w6692_card_msg(struct IsdnCardState *cs, int mt, void *arg)
|
|||
|
||||
static int id_idx = 0;
|
||||
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
static struct pci_dev *dev_w6692 __initdata = NULL;
|
||||
#else
|
||||
static int pci_index __initdata = 0;
|
||||
#endif
|
||||
|
||||
__initfunc(int setup_w6692(struct IsdnCard *card))
|
||||
{
|
||||
|
@ -1002,9 +995,6 @@ __initfunc(int setup_w6692(struct IsdnCard *card))
|
|||
char tmp[64];
|
||||
u_char found = 0;
|
||||
u_char pci_irq = 0;
|
||||
#ifndef COMPAT_HAS_NEW_PCI
|
||||
u_char pci_bus, pci_device_fn;
|
||||
#endif
|
||||
u_int pci_ioaddr = 0;
|
||||
|
||||
#ifdef __BIG_ENDIAN
|
||||
|
@ -1015,7 +1005,6 @@ __initfunc(int setup_w6692(struct IsdnCard *card))
|
|||
if (cs->typ != ISDN_CTYPE_W6692)
|
||||
return (0);
|
||||
#if CONFIG_PCI
|
||||
#ifdef COMPAT_HAS_NEW_PCI
|
||||
if (!pci_present()) {
|
||||
printk(KERN_ERR "W6692: no PCI bus present\n");
|
||||
return (0);
|
||||
|
@ -1038,33 +1027,6 @@ __initfunc(int setup_w6692(struct IsdnCard *card))
|
|||
/* and address 1 is the real IO space KKe 03.09.99 */
|
||||
pci_ioaddr = pci_resource_start_io(dev_w6692, 1);
|
||||
}
|
||||
#else
|
||||
for (; pci_index < 0xff; pci_index++) {
|
||||
while (id_list[id_idx].vendor_id) {
|
||||
if (pcibios_find_device(id_list[id_idx].vendor_id,
|
||||
id_list[id_idx].device_id,
|
||||
pci_index, &pci_bus, &pci_device_fn)
|
||||
== PCIBIOS_SUCCESSFUL) {
|
||||
found = 1;
|
||||
break;
|
||||
} else {
|
||||
id_idx++;
|
||||
}
|
||||
}
|
||||
if (found)
|
||||
break;
|
||||
if (!id_list[id_idx].vendor_id)
|
||||
id_idx = 0;
|
||||
}
|
||||
if (found) {
|
||||
pcibios_read_config_byte(pci_bus, pci_device_fn,
|
||||
PCI_INTERRUPT_LINE, &pci_irq);
|
||||
pcibios_read_config_dword(pci_bus, pci_device_fn,
|
||||
PCI_BASE_ADDRESS_1, &pci_ioaddr);
|
||||
pci_ioaddr &= PCI_BASE_ADDRESS_IO_MASK;
|
||||
pci_index++;
|
||||
}
|
||||
#endif /* COMPAT_HAS_NEW_PCI */
|
||||
if (!found) {
|
||||
printk(KERN_WARNING "W6692: No PCI card found\n");
|
||||
return (0);
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
#define poll_wait(f,wq,w) poll_wait((wq),(w))
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,91)
|
||||
#define COMPAT_HAS_NEW_PCI
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,13)
|
||||
#define COMPAT_HAS_2_2_PCI
|
||||
#define get_pcibase(ps, nr) ps->base_address[nr]
|
||||
|
@ -37,7 +35,6 @@
|
|||
#define pci_get_sub_vendor(pdev, id) pci_read_config_word(pdev, PCI_SUBSYSTEM_VENDOR_ID, &id)
|
||||
#define pci_get_sub_system(pdev, id) pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &id)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,118)
|
||||
#define FILEOP_HAS_FLUSH
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#delete #include <linux/isdn_compat.h>
|
||||
#define dev_kfree_skb_irq(a,b) dev_kfree_skb(a)
|
||||
#define dev_kfree_skb_any(a,b) dev_kfree_skb(a)
|
||||
#define COMPAT_HAS_NEW_PCI
|
||||
#define COMPAT_HAS_2_2_PCI
|
||||
#define get_pcibase(ps,nr) ps->base_address[nr]
|
||||
#define pci_resource_start_io(pdev,nr) pdev->base_address[nr] & PCI_BASE_ADDRESS_IO_MASK
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#delete #include <linux/isdn_compat.h>
|
||||
#define dev_kfree_skb_irq(a,b) dev_kfree_skb(a)
|
||||
#define dev_kfree_skb_any(a,b) dev_kfree_skb(a)
|
||||
#define COMPAT_HAS_NEW_PCI
|
||||
#define COMPAT_HAS_2_2_PCI
|
||||
#define get_pcibase(ps,nr) ps->base_address[nr]
|
||||
#define pci_resource_start_io(pdev,nr) pdev->base_address[nr] & PCI_BASE_ADDRESS_IO_MASK
|
||||
|
|
Loading…
Reference in New Issue