Commit 7d2012ed authored by Kai Germaschewski's avatar Kai Germaschewski

ISDN/HiSax: Remove superfluous card type checks

We use card->typ to decide which subdriver to call, so there's
no need at all for the subdriver to check again that card->typ is correct.
parent b362b375
...@@ -707,8 +707,6 @@ setup_amd7930(struct IsdnCard *card) ...@@ -707,8 +707,6 @@ setup_amd7930(struct IsdnCard *card)
strcpy(tmp, amd7930_revision); strcpy(tmp, amd7930_revision);
printk(KERN_INFO "HiSax: AMD7930 driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: AMD7930 driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_AMD7930)
return 0;
cs->irq = amd7930_get_irqnum(0); cs->irq = amd7930_get_irqnum(0);
if (cs->irq == 0) if (cs->irq == 0)
......
...@@ -262,8 +262,6 @@ setup_asuscom(struct IsdnCard *card) ...@@ -262,8 +262,6 @@ setup_asuscom(struct IsdnCard *card)
strcpy(tmp, Asuscom_revision); strcpy(tmp, Asuscom_revision);
printk(KERN_INFO "HiSax: Asuscom ISDNLink driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: Asuscom ISDNLink driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_ASUSCOM)
return (0);
#ifdef __ISAPNP__ #ifdef __ISAPNP__
if (!card->para[1] && isapnp_present()) { if (!card->para[1] && isapnp_present()) {
struct pci_bus *pb; struct pci_bus *pb;
......
...@@ -169,8 +169,6 @@ setup_avm_a1(struct IsdnCard *card) ...@@ -169,8 +169,6 @@ setup_avm_a1(struct IsdnCard *card)
strcpy(tmp, avm_revision); strcpy(tmp, avm_revision);
printk(KERN_INFO "HiSax: AVM driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: AVM driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_A1)
return (0);
cs->hw.avm.cfg_reg = request_io(&cs->rs, card->para[1] + 0x1800, 8, "avm cfg"); cs->hw.avm.cfg_reg = request_io(&cs->rs, card->para[1] + 0x1800, 8, "avm cfg");
if (!cs->hw.avm.cfg_reg) goto err; if (!cs->hw.avm.cfg_reg) goto err;
......
...@@ -226,9 +226,6 @@ setup_avm_a1_pcmcia(struct IsdnCard *card) ...@@ -226,9 +226,6 @@ setup_avm_a1_pcmcia(struct IsdnCard *card)
strcpy(tmp, avm_revision); strcpy(tmp, avm_revision);
printk(KERN_INFO "HiSax: AVM A1 PCMCIA driver Rev. %s\n", printk(KERN_INFO "HiSax: AVM A1 PCMCIA driver Rev. %s\n",
HiSax_getrev(tmp)); HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_A1_PCMCIA)
return (0);
cs->hw.avm.cfg_reg = card->para[1]; cs->hw.avm.cfg_reg = card->para[1];
cs->irq = card->para[0]; cs->irq = card->para[0];
......
...@@ -611,8 +611,6 @@ setup_avm_pcipnp(struct IsdnCard *card) ...@@ -611,8 +611,6 @@ setup_avm_pcipnp(struct IsdnCard *card)
strcpy(tmp, avm_pci_rev); strcpy(tmp, avm_pci_rev);
printk(KERN_INFO "HiSax: AVM PCI driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: AVM PCI driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_FRITZPCI)
return (0);
if (card->para[1]) { if (card->para[1]) {
/* old manual method */ /* old manual method */
cs->hw.avm.cfg_reg = card->para[1]; cs->hw.avm.cfg_reg = card->para[1];
......
...@@ -177,48 +177,44 @@ bkm_interrupt(int intno, void *dev_id, struct pt_regs *regs) ...@@ -177,48 +177,44 @@ bkm_interrupt(int intno, void *dev_id, struct pt_regs *regs)
static void static void
enable_bkm_int(struct IsdnCardState *cs, unsigned bEnable) enable_bkm_int(struct IsdnCardState *cs, unsigned bEnable)
{ {
if (cs->typ == ISDN_CTYPE_BKM_A4T) { I20_REGISTER_FILE *pI20_Regs = (I20_REGISTER_FILE *) (cs->hw.ax.base);
I20_REGISTER_FILE *pI20_Regs = (I20_REGISTER_FILE *) (cs->hw.ax.base); if (bEnable)
if (bEnable) pI20_Regs->i20IntCtrl |= (intISDN | intPCI);
pI20_Regs->i20IntCtrl |= (intISDN | intPCI); else
else /* CAUTION: This disables the video capture driver too */
/* CAUTION: This disables the video capture driver too */ pI20_Regs->i20IntCtrl &= ~(intISDN | intPCI);
pI20_Regs->i20IntCtrl &= ~(intISDN | intPCI);
}
} }
static void static void
reset_bkm(struct IsdnCardState *cs) reset_bkm(struct IsdnCardState *cs)
{ {
if (cs->typ == ISDN_CTYPE_BKM_A4T) { I20_REGISTER_FILE *pI20_Regs = (I20_REGISTER_FILE *) (cs->hw.ax.base);
I20_REGISTER_FILE *pI20_Regs = (I20_REGISTER_FILE *) (cs->hw.ax.base); /* Issue the I20 soft reset */
/* Issue the I20 soft reset */ pI20_Regs->i20SysControl = 0xFF; /* all in */
pI20_Regs->i20SysControl = 0xFF; /* all in */ set_current_state(TASK_UNINTERRUPTIBLE);
set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout((10 * HZ) / 1000);
schedule_timeout((10 * HZ) / 1000); /* Remove the soft reset */
/* Remove the soft reset */ pI20_Regs->i20SysControl = sysRESET | 0xFF;
pI20_Regs->i20SysControl = sysRESET | 0xFF; set_current_state(TASK_UNINTERRUPTIBLE);
set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout((10 * HZ) / 1000);
schedule_timeout((10 * HZ) / 1000); /* Set our configuration */
/* Set our configuration */ pI20_Regs->i20SysControl = sysRESET | sysCFG;
pI20_Regs->i20SysControl = sysRESET | sysCFG; /* Issue ISDN reset */
/* Issue ISDN reset */ pI20_Regs->i20GuestControl = guestWAIT_CFG |
pI20_Regs->i20GuestControl = guestWAIT_CFG | g_A4T_JADE_RES |
g_A4T_JADE_RES | g_A4T_ISAR_RES |
g_A4T_ISAR_RES | g_A4T_ISAC_RES |
g_A4T_ISAC_RES | g_A4T_JADE_BOOTR |
g_A4T_JADE_BOOTR | g_A4T_ISAR_BOOTR;
g_A4T_ISAR_BOOTR; set_current_state(TASK_UNINTERRUPTIBLE);
set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout((10 * HZ) / 1000);
schedule_timeout((10 * HZ) / 1000);
/* Remove RESET state from ISDN */
/* Remove RESET state from ISDN */ pI20_Regs->i20GuestControl &= ~(g_A4T_ISAC_RES |
pI20_Regs->i20GuestControl &= ~(g_A4T_ISAC_RES | g_A4T_JADE_RES |
g_A4T_JADE_RES | g_A4T_ISAR_RES);
g_A4T_ISAR_RES); set_current_state(TASK_UNINTERRUPTIBLE);
set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout((10 * HZ) / 1000);
schedule_timeout((10 * HZ) / 1000);
}
} }
static void static void
...@@ -265,11 +261,6 @@ setup_bkm_a4t(struct IsdnCard *card) ...@@ -265,11 +261,6 @@ setup_bkm_a4t(struct IsdnCard *card)
strcpy(tmp, bkm_a4t_revision); strcpy(tmp, bkm_a4t_revision);
printk(KERN_INFO "HiSax: T-Berkom driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: T-Berkom driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ == ISDN_CTYPE_BKM_A4T) {
cs->subtyp = BKM_A4T;
} else
return (0);
while ((dev_a4t = pci_find_device(PCI_VENDOR_ID_ZORAN, while ((dev_a4t = pci_find_device(PCI_VENDOR_ID_ZORAN,
PCI_DEVICE_ID_ZORAN_36120, dev_a4t))) { PCI_DEVICE_ID_ZORAN_36120, dev_a4t))) {
u16 sub_sys; u16 sub_sys;
......
...@@ -99,12 +99,10 @@ set_ipac_active(struct IsdnCardState *cs, u_int active) ...@@ -99,12 +99,10 @@ set_ipac_active(struct IsdnCardState *cs, u_int active)
static void static void
enable_bkm_int(struct IsdnCardState *cs, unsigned bEnable) enable_bkm_int(struct IsdnCardState *cs, unsigned bEnable)
{ {
if (cs->typ == ISDN_CTYPE_SCT_QUADRO) { if (bEnable)
if (bEnable) wordout(cs->hw.ax.plx_adr + 0x4C, (wordin(cs->hw.ax.plx_adr + 0x4C) | 0x41));
wordout(cs->hw.ax.plx_adr + 0x4C, (wordin(cs->hw.ax.plx_adr + 0x4C) | 0x41)); else
else wordout(cs->hw.ax.plx_adr + 0x4C, (wordin(cs->hw.ax.plx_adr + 0x4C) & ~0x41));
wordout(cs->hw.ax.plx_adr + 0x4C, (wordin(cs->hw.ax.plx_adr + 0x4C) & ~0x41));
}
} }
static void static void
...@@ -172,11 +170,6 @@ setup_sct_quadro(struct IsdnCard *card) ...@@ -172,11 +170,6 @@ setup_sct_quadro(struct IsdnCard *card)
strcpy(tmp, sct_quadro_revision); strcpy(tmp, sct_quadro_revision);
printk(KERN_INFO "HiSax: T-Berkom driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: T-Berkom driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ == ISDN_CTYPE_SCT_QUADRO) {
cs->subtyp = SCT_1; /* Preset */
} else
return (0);
/* Identify subtype by para[0] */ /* Identify subtype by para[0] */
if (card->para[0] >= SCT_1 && card->para[0] <= SCT_4) if (card->para[0] >= SCT_1 && card->para[0] <= SCT_4)
cs->subtyp = card->para[0]; cs->subtyp = card->para[0];
......
...@@ -556,8 +556,6 @@ setup_diva(struct IsdnCard *card) ...@@ -556,8 +556,6 @@ setup_diva(struct IsdnCard *card)
strcpy(tmp, Diva_revision); strcpy(tmp, Diva_revision);
printk(KERN_INFO "HiSax: Eicon.Diehl Diva driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: Eicon.Diehl Diva driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_DIEHLDIVA)
return(0);
if (card->para[1]) { if (card->para[1]) {
cs->hw.diva.ctrl_reg = 0; cs->hw.diva.ctrl_reg = 0;
cs->hw.diva.cfg_reg = card->para[1]; cs->hw.diva.cfg_reg = card->para[1];
......
...@@ -276,8 +276,6 @@ setup_enternow_pci(struct IsdnCard *card) ...@@ -276,8 +276,6 @@ setup_enternow_pci(struct IsdnCard *card)
#endif #endif
strcpy(tmp, enternow_pci_rev); strcpy(tmp, enternow_pci_rev);
printk(KERN_INFO "HiSax: Formula-n Europe AG enter:now ISDN PCI driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: Formula-n Europe AG enter:now ISDN PCI driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_ENTERNOW)
return(0);
for ( ;; ) { for ( ;; ) {
if ((dev_netjet = pci_find_device(PCI_VENDOR_ID_TIGERJET, if ((dev_netjet = pci_find_device(PCI_VENDOR_ID_TIGERJET,
......
...@@ -530,9 +530,6 @@ setup_gazel(struct IsdnCard *card) ...@@ -530,9 +530,6 @@ setup_gazel(struct IsdnCard *card)
strcpy(tmp, gazel_revision); strcpy(tmp, gazel_revision);
printk(KERN_INFO "Gazel: Driver Revision %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "Gazel: Driver Revision %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_GAZEL)
return (0);
if (card->para[0]) { if (card->para[0]) {
if (setup_gazelisa(card, cs)) if (setup_gazelisa(card, cs))
return (0); return (0);
......
...@@ -1398,66 +1398,63 @@ setup_hfcpci(struct IsdnCard *card) ...@@ -1398,66 +1398,63 @@ setup_hfcpci(struct IsdnCard *card)
cs->hw.hfcpci.int_s1 = 0; cs->hw.hfcpci.int_s1 = 0;
cs->dc.hfcpci.ph_state = 0; cs->dc.hfcpci.ph_state = 0;
cs->hw.hfcpci.fifo = 255; cs->hw.hfcpci.fifo = 255;
if (cs->typ == ISDN_CTYPE_HFC_PCI) {
i = 0;
while (id_list[i].vendor_id) {
tmp_hfcpci = pci_find_device(id_list[i].vendor_id,
id_list[i].device_id,
dev_hfcpci);
i++;
if (tmp_hfcpci) {
if (pci_enable_device(tmp_hfcpci))
continue;
pci_set_master(tmp_hfcpci);
if ((card->para[0]) && (card->para[0] != (tmp_hfcpci->resource[ 0].start & PCI_BASE_ADDRESS_IO_MASK)))
continue;
else
break;
}
}
i = 0;
while (id_list[i].vendor_id) {
tmp_hfcpci = pci_find_device(id_list[i].vendor_id,
id_list[i].device_id,
dev_hfcpci);
i++;
if (tmp_hfcpci) { if (tmp_hfcpci) {
i--; if (pci_enable_device(tmp_hfcpci))
dev_hfcpci = tmp_hfcpci; /* old device */ continue;
cs->irq = dev_hfcpci->irq; pci_set_master(tmp_hfcpci);
cs->hw.hfcpci.pdev = tmp_hfcpci; if ((card->para[0]) && (card->para[0] != (tmp_hfcpci->resource[ 0].start & PCI_BASE_ADDRESS_IO_MASK)))
if (!cs->irq) { continue;
printk(KERN_WARNING "HFC-PCI: No IRQ for PCI card found\n"); else
return (0); break;
}
printk(KERN_INFO "HiSax: HFC-PCI card manufacturer: %s card name: %s\n", id_list[i].vendor_name, id_list[i].card_name);
} else {
printk(KERN_WARNING "HFC-PCI: No PCI card found\n");
return (0);
} }
/* Allocate memory for FIFOS */ }
cs->hw.hfcpci.fifos = pci_alloc_consistent(tmp_hfcpci, 32768, &cs->hw.hfcpci.fifos_dma);
if (!cs->hw.hfcpci.fifos) { if (tmp_hfcpci) {
printk(KERN_WARNING "HFC-PCI: Error allocating memory for FIFO!\n"); i--;
return 0; dev_hfcpci = tmp_hfcpci; /* old device */
cs->irq = dev_hfcpci->irq;
cs->hw.hfcpci.pdev = tmp_hfcpci;
if (!cs->irq) {
printk(KERN_WARNING "HFC-PCI: No IRQ for PCI card found\n");
return (0);
} }
pci_write_config_dword(cs->hw.hfcpci.pdev, 0x80, printk(KERN_INFO "HiSax: HFC-PCI card manufacturer: %s card name: %s\n", id_list[i].vendor_name, id_list[i].card_name);
(u_int)cs->hw.hfcpci.fifos_dma); } else {
cs->hw.hfcpci.pci_io = request_mmio(&cs->rs, dev_hfcpci->resource[ 1].start, 256, "hfc_pci"); printk(KERN_WARNING "HFC-PCI: No PCI card found\n");
if (!cs->hw.hfcpci.pci_io) return (0);
goto err; }
/* Allocate memory for FIFOS */
printk(KERN_INFO cs->hw.hfcpci.fifos = pci_alloc_consistent(tmp_hfcpci, 32768, &cs->hw.hfcpci.fifos_dma);
"HFC-PCI: defined at mem %#x fifo %#x(%#x) IRQ %d HZ %d\n", if (!cs->hw.hfcpci.fifos) {
(u_int) cs->hw.hfcpci.pci_io, printk(KERN_WARNING "HFC-PCI: Error allocating memory for FIFO!\n");
(u_int) cs->hw.hfcpci.fifos, return 0;
(u_int) cs->hw.hfcpci.fifos_dma, }
cs->irq, HZ); pci_write_config_dword(cs->hw.hfcpci.pdev, 0x80,
printk("ChipID: %x\n", Read_hfc(cs, HFCPCI_CHIP_ID)); (u_int)cs->hw.hfcpci.fifos_dma);
cs->hw.hfcpci.int_m2 = 0; /* disable alle interrupts */ cs->hw.hfcpci.pci_io = request_mmio(&cs->rs, dev_hfcpci->resource[ 1].start, 256, "hfc_pci");
cs->hw.hfcpci.int_m1 = 0; if (!cs->hw.hfcpci.pci_io)
Write_hfc(cs, HFCPCI_INT_M1, cs->hw.hfcpci.int_m1); goto err;
Write_hfc(cs, HFCPCI_INT_M2, cs->hw.hfcpci.int_m2);
/* At this point the needed PCI config is done */ printk(KERN_INFO
/* fifos are still not enabled */ "HFC-PCI: defined at mem %#x fifo %#x(%#x) IRQ %d HZ %d\n",
} else (u_int) cs->hw.hfcpci.pci_io,
return (0); /* no valid card type */ (u_int) cs->hw.hfcpci.fifos,
(u_int) cs->hw.hfcpci.fifos_dma,
cs->irq, HZ);
printk("ChipID: %x\n", Read_hfc(cs, HFCPCI_CHIP_ID));
cs->hw.hfcpci.int_m2 = 0; /* disable alle interrupts */
cs->hw.hfcpci.int_m1 = 0;
Write_hfc(cs, HFCPCI_INT_M1, cs->hw.hfcpci.int_m1);
Write_hfc(cs, HFCPCI_INT_M2, cs->hw.hfcpci.int_m2);
/* At this point the needed PCI config is done */
/* fifos are still not enabled */
cs->irq_flags |= SA_SHIRQ; cs->irq_flags |= SA_SHIRQ;
......
...@@ -1223,54 +1223,48 @@ setup_hfcsx(struct IsdnCard *card) ...@@ -1223,54 +1223,48 @@ setup_hfcsx(struct IsdnCard *card)
cs->hw.hfcsx.int_s1 = 0; cs->hw.hfcsx.int_s1 = 0;
cs->dc.hfcsx.ph_state = 0; cs->dc.hfcsx.ph_state = 0;
cs->hw.hfcsx.fifo = 255; cs->hw.hfcsx.fifo = 255;
if ((cs->typ == ISDN_CTYPE_HFC_SX) ||
(cs->typ == ISDN_CTYPE_HFC_SP_PCMCIA)) {
if (!request_io(&cs->rs, cs->hw.hfcsx.base, 2, "HFCSX isdn"))
return 0;
byteout(cs->hw.hfcsx.base, cs->hw.hfcsx.base & 0xFF);
byteout(cs->hw.hfcsx.base + 1,
((cs->hw.hfcsx.base >> 8) & 3) | 0x54);
udelay(10);
cs->hw.hfcsx.chip = Read_hfc(cs,HFCSX_CHIP_ID);
switch (cs->hw.hfcsx.chip >> 4) {
case 1:
tmp[0] ='+';
break;
case 9:
tmp[0] ='P';
break;
default:
printk(KERN_WARNING "HFC-SX: invalid chip id 0x%x\n",
cs->hw.hfcsx.chip >> 4);
hisax_release_resources(cs);
return 0;
}
if (!ccd_sp_irqtab[cs->irq & 0xF]) {
printk(KERN_WARNING
"HFC_SX: invalid irq %d specified\n",
cs->irq & 0xF);
hisax_release_resources(cs);
return 0;
}
cs->hw.hfcsx.extra = kmalloc(sizeof(struct hfcsx_extra),
GFP_ATOMIC);
if (!cs->hw.hfcsx.extra) {
hisax_release_resources(cs);
printk(KERN_WARNING
"HFC-SX: unable to allocate memory\n");
return 0;
}
printk(KERN_INFO if (!request_io(&cs->rs, cs->hw.hfcsx.base, 2, "HFCSX isdn"))
"HFC-S%c chip detected at base 0x%x IRQ %d HZ %d\n", return 0;
tmp[0], (u_int) cs->hw.hfcsx.base, byteout(cs->hw.hfcsx.base, cs->hw.hfcsx.base & 0xFF);
cs->irq, HZ); byteout(cs->hw.hfcsx.base + 1,
cs->hw.hfcsx.int_m2 = 0; /* disable alle interrupts */ ((cs->hw.hfcsx.base >> 8) & 3) | 0x54);
cs->hw.hfcsx.int_m1 = 0; udelay(10);
Write_hfc(cs, HFCSX_INT_M1, cs->hw.hfcsx.int_m1); cs->hw.hfcsx.chip = Read_hfc(cs,HFCSX_CHIP_ID);
Write_hfc(cs, HFCSX_INT_M2, cs->hw.hfcsx.int_m2); switch (cs->hw.hfcsx.chip >> 4) {
} else case 1:
return (0); /* no valid card type */ tmp[0] ='+';
break;
case 9:
tmp[0] ='P';
break;
default:
printk(KERN_WARNING "HFC-SX: invalid chip id 0x%x\n",
cs->hw.hfcsx.chip >> 4);
hisax_release_resources(cs);
return 0;
}
if (!ccd_sp_irqtab[cs->irq & 0xF]) {
printk(KERN_WARNING "HFC_SX: invalid irq %d specified\n",
cs->irq & 0xF);
hisax_release_resources(cs);
return 0;
}
cs->hw.hfcsx.extra = kmalloc(sizeof(struct hfcsx_extra),
GFP_ATOMIC);
if (!cs->hw.hfcsx.extra) {
hisax_release_resources(cs);
printk(KERN_WARNING "HFC-SX: unable to allocate memory\n");
return 0;
}
printk(KERN_INFO "HFC-S%c chip detected at base 0x%x IRQ %d HZ %d\n",
tmp[0], (u_int) cs->hw.hfcsx.base,
cs->irq, HZ);
cs->hw.hfcsx.int_m2 = 0; /* disable alle interrupts */
cs->hw.hfcsx.int_m1 = 0;
Write_hfc(cs, HFCSX_INT_M1, cs->hw.hfcsx.int_m1);
Write_hfc(cs, HFCSX_INT_M2, cs->hw.hfcsx.int_m2);
cs->hw.hfcsx.timer.function = (void *) hfcsx_Timer; cs->hw.hfcsx.timer.function = (void *) hfcsx_Timer;
cs->hw.hfcsx.timer.data = (long) cs; cs->hw.hfcsx.timer.data = (long) cs;
...@@ -1281,5 +1275,5 @@ setup_hfcsx(struct IsdnCard *card) ...@@ -1281,5 +1275,5 @@ setup_hfcsx(struct IsdnCard *card)
hfcsx_reset(cs); hfcsx_reset(cs);
cs->auxcmd = &hfcsx_auxcmd; cs->auxcmd = &hfcsx_auxcmd;
cs->card_ops = &hfcsx_ops; cs->card_ops = &hfcsx_ops;
return (1); return 1;
} }
...@@ -197,8 +197,6 @@ setup_isurf(struct IsdnCard *card) ...@@ -197,8 +197,6 @@ setup_isurf(struct IsdnCard *card)
strcpy(tmp, ISurf_revision); strcpy(tmp, ISurf_revision);
printk(KERN_INFO "HiSax: ISurf driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: ISurf driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_ISURF)
return(0);
if (card->para[1] && card->para[2]) { if (card->para[1] && card->para[2]) {
cs->hw.isurf.reset = card->para[1]; cs->hw.isurf.reset = card->para[1];
cs->irq = card->para[0]; cs->irq = card->para[0];
......
...@@ -186,8 +186,6 @@ setup_ix1micro(struct IsdnCard *card) ...@@ -186,8 +186,6 @@ setup_ix1micro(struct IsdnCard *card)
strcpy(tmp, ix1_revision); strcpy(tmp, ix1_revision);
printk(KERN_INFO "HiSax: ITK IX1 driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: ITK IX1 driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_IX1MICROR2)
return (0);
#ifdef __ISAPNP__ #ifdef __ISAPNP__
if (!card->para[1] && isapnp_present()) { if (!card->para[1] && isapnp_present()) {
......
...@@ -146,8 +146,6 @@ setup_mic(struct IsdnCard *card) ...@@ -146,8 +146,6 @@ setup_mic(struct IsdnCard *card)
strcpy(tmp, mic_revision); strcpy(tmp, mic_revision);
printk(KERN_INFO "HiSax: mic driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: mic driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_MIC)
return (0);
cs->hw.mic.cfg_reg = card->para[1]; cs->hw.mic.cfg_reg = card->para[1];
cs->irq = card->para[0]; cs->irq = card->para[0];
......
...@@ -212,8 +212,6 @@ setup_niccy(struct IsdnCard *card) ...@@ -212,8 +212,6 @@ setup_niccy(struct IsdnCard *card)
strcpy(tmp, niccy_revision); strcpy(tmp, niccy_revision);
printk(KERN_INFO "HiSax: Niccy driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: Niccy driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_NICCY)
return (0);
#ifdef __ISAPNP__ #ifdef __ISAPNP__
if (!card->para[1] && isapnp_present()) { if (!card->para[1] && isapnp_present()) {
struct pci_bus *pb; struct pci_bus *pb;
......
...@@ -119,8 +119,6 @@ setup_netjet_s(struct IsdnCard *card) ...@@ -119,8 +119,6 @@ setup_netjet_s(struct IsdnCard *card)
#endif #endif
strcpy(tmp, NETjet_S_revision); strcpy(tmp, NETjet_S_revision);
printk(KERN_INFO "HiSax: Traverse Tech. NETjet-S driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: Traverse Tech. NETjet-S driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_NETJET_S)
return(0);
for ( ;; ) { for ( ;; ) {
if ((dev_netjet = pci_find_device(PCI_VENDOR_ID_TIGERJET, if ((dev_netjet = pci_find_device(PCI_VENDOR_ID_TIGERJET,
......
...@@ -122,8 +122,6 @@ setup_netjet_u(struct IsdnCard *card) ...@@ -122,8 +122,6 @@ setup_netjet_u(struct IsdnCard *card)
#endif #endif
strcpy(tmp, NETjet_U_revision); strcpy(tmp, NETjet_U_revision);
printk(KERN_INFO "HiSax: Traverse Tech. NETspider-U driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: Traverse Tech. NETspider-U driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_NETJET_U)
return(0);
for ( ;; ) { for ( ;; ) {
if ((dev_netjet = pci_find_device(PCI_VENDOR_ID_TIGERJET, if ((dev_netjet = pci_find_device(PCI_VENDOR_ID_TIGERJET,
......
...@@ -180,9 +180,6 @@ setup_s0box(struct IsdnCard *card) ...@@ -180,9 +180,6 @@ setup_s0box(struct IsdnCard *card)
strcpy(tmp, s0box_revision); strcpy(tmp, s0box_revision);
printk(KERN_INFO "HiSax: S0Box IO driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: S0Box IO driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_S0BOX)
return (0);
cs->hw.teles3.cfg_reg = card->para[1]; cs->hw.teles3.cfg_reg = card->para[1];
cs->hw.teles3.hscx[0] = -0x20; cs->hw.teles3.hscx[0] = -0x20;
cs->hw.teles3.hscx[1] = 0x0; cs->hw.teles3.hscx[1] = 0x0;
......
...@@ -198,8 +198,6 @@ setup_sportster(struct IsdnCard *card) ...@@ -198,8 +198,6 @@ setup_sportster(struct IsdnCard *card)
strcpy(tmp, sportster_revision); strcpy(tmp, sportster_revision);
printk(KERN_INFO "HiSax: USR Sportster driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: USR Sportster driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_SPORTSTER)
return (0);
cs->hw.spt.cfg_reg = card->para[1]; cs->hw.spt.cfg_reg = card->para[1];
cs->irq = card->para[0]; cs->irq = card->para[0];
......
...@@ -264,8 +264,6 @@ setup_TeleInt(struct IsdnCard *card) ...@@ -264,8 +264,6 @@ setup_TeleInt(struct IsdnCard *card)
strcpy(tmp, TeleInt_revision); strcpy(tmp, TeleInt_revision);
printk(KERN_INFO "HiSax: TeleInt driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: TeleInt driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_TELEINT)
return (0);
cs->hw.hfc.addr = card->para[1] & 0x3fe; cs->hw.hfc.addr = card->para[1] & 0x3fe;
cs->irq = card->para[0]; cs->irq = card->para[0];
......
...@@ -174,9 +174,6 @@ setup_teles0(struct IsdnCard *card) ...@@ -174,9 +174,6 @@ setup_teles0(struct IsdnCard *card)
strcpy(tmp, teles0_revision); strcpy(tmp, teles0_revision);
printk(KERN_INFO "HiSax: Teles 8.0/16.0 driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: Teles 8.0/16.0 driver Rev. %s\n", HiSax_getrev(tmp));
if ((cs->typ != ISDN_CTYPE_16_0) && (cs->typ != ISDN_CTYPE_8_0))
return (0);
if (cs->typ == ISDN_CTYPE_16_0) if (cs->typ == ISDN_CTYPE_16_0)
cs->hw.teles0.cfg_reg = card->para[2]; cs->hw.teles0.cfg_reg = card->para[2];
else /* 8.0 */ else /* 8.0 */
......
...@@ -244,8 +244,6 @@ setup_telespci(struct IsdnCard *card) ...@@ -244,8 +244,6 @@ setup_telespci(struct IsdnCard *card)
#endif #endif
strcpy(tmp, telespci_revision); strcpy(tmp, telespci_revision);
printk(KERN_INFO "HiSax: Teles/PCI driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: Teles/PCI driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_TELESPCI)
return (0);
if ((dev_tel = pci_find_device (PCI_VENDOR_ID_ZORAN, PCI_DEVICE_ID_ZORAN_36120, dev_tel))) { if ((dev_tel = pci_find_device (PCI_VENDOR_ID_ZORAN, PCI_DEVICE_ID_ZORAN_36120, dev_tel))) {
if (pci_enable_device(dev_tel)) if (pci_enable_device(dev_tel))
return(0); return(0);
......
...@@ -682,8 +682,6 @@ setup_w6692(struct IsdnCard *card) ...@@ -682,8 +682,6 @@ setup_w6692(struct IsdnCard *card)
#endif #endif
strcpy(tmp, w6692_revision); strcpy(tmp, w6692_revision);
printk(KERN_INFO "HiSax: W6692 driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: W6692 driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_W6692)
return (0);
while (id_list[id_idx].vendor_id) { while (id_list[id_idx].vendor_id) {
dev_w6692 = pci_find_device(id_list[id_idx].vendor_id, dev_w6692 = pci_find_device(id_list[id_idx].vendor_id,
id_list[id_idx].device_id, id_list[id_idx].device_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment