hisax isdn card (Sedlbauer Speed Fax+) does not get an interrupt
Hi,
after finally upgrading our systems from Kernel 2.4 to 2.6 we experienced problems with the ISDN cards, a hisax driven Sedlbauer Speed Fax+.
A "modprobe hisax type=28 protocol=2" ends in this mess:
==========================================================================
<05>2007 May 30 14:21:40 cbs kern: ISDN subsystem Rev: 1.1.2.3/1.1.2.3/1.1.2.2/1.1.2.3/1.1.2.2/1.1.2.2 loaded <06>2007 May 30 14:21:40 cbs kern: HiSax: Linux Driver for passive ISDN cards
<06>2007 May 30 14:21:40 cbs kern: HiSax: Version 3.5 (module)
<06>2007 May 30 14:21:40 cbs kern: HiSax: Layer1 Revision 2.46.2.5
<06>2007 May 30 14:21:40 cbs kern: HiSax: Layer2 Revision 2.30.2.4
<06>2007 May 30 14:21:40 cbs kern: HiSax: TeiMgr Revision 2.20.2.3
<06>2007 May 30 14:21:40 cbs kern: HiSax: Layer3 Revision 2.22.2.3
<06>2007 May 30 14:21:40 cbs kern: HiSax: LinkLayer Revision 2.59.2.4
<06>2007 May 30 14:21:40 cbs kern: HiSax module removed
<06>2007 May 30 14:21:40 cbs kern: HiSax: Linux Driver for passive ISDN cards
<06>2007 May 30 14:21:40 cbs kern: HiSax: Version 3.5 (module)
<06>2007 May 30 14:21:40 cbs kern: HiSax: Layer1 Revision 2.46.2.5
<06>2007 May 30 14:21:40 cbs kern: HiSax: Layer2 Revision 2.30.2.4
<06>2007 May 30 14:21:40 cbs kern: HiSax: TeiMgr Revision 2.20.2.3
<06>2007 May 30 14:21:40 cbs kern: HiSax: Layer3 Revision 2.22.2.3
<06>2007 May 30 14:21:40 cbs kern: HiSax: LinkLayer Revision 2.59.2.4
<07>2007 May 30 14:21:40 cbs kern: HiSax: Total 1 card defined
<06>2007 May 30 14:21:40 cbs kern: HiSax: Card 1 Protocol EDSS1 Id=isdn0 (0)
<06>2007 May 30 14:21:40 cbs kern: HiSax: Sedlbauer driver Rev. 1.34.2.6
<06>2007 May 30 14:21:40 cbs kern: ACPI: PCI Interrupt 0000:01:03.0[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11 <06>2007 May 30 14:21:40 cbs kern: Sedlbauer: PCI subvendor:51 subid 1
<06>2007 May 30 14:21:40 cbs kern: Sedlbauer: PCI base adr 0xa800
<03>2007 May 30 14:21:40 cbs kern: irq 11: nobody cared (try booting with the \"irqpoll\" option) <04>2007 May 30 14:21:40 cbs kern: [<c012f243>] __report_bad_irq+0x2b/0x69
<04>2007 May 30 14:21:40 cbs kern: [<c012f3e7>] note_interrupt+0x166/0x193
<04>2007 May 30 14:21:40 cbs kern: [<c03089c0>] usb_hcd_irq+0x23/0x4f
<04>2007 May 30 14:21:40 cbs kern: [<c012ee7c>] handle_IRQ_event+0x21/0x4a
<04>2007 May 30 14:21:40 cbs kern: [<c012ef0d>] __do_IRQ+0x68/0x8f
<04>2007 May 30 14:21:40 cbs kern: [<c01050de>] do_IRQ+0x5c/0x77
<04>2007 May 30 14:21:40 cbs kern: =======================
<04>2007 May 30 14:21:40 cbs kern: [<c0103ada>] common_interrupt+0x1a/0x20
<04>2007 May 30 14:21:40 cbs kern: [<c011a87c>] __do_softirq+0x2c/0x7d
<04>2007 May 30 14:21:40 cbs kern: [<c0105131>] do_softirq+0x38/0x3f
<04>2007 May 30 14:21:40 cbs kern: =======================
<04>2007 May 30 14:21:40 cbs kern: [<c01050f0>] do_IRQ+0x6e/0x77
<04>2007 May 30 14:21:40 cbs kern: [<c0103ada>] common_interrupt+0x1a/0x20
<04>2007 May 30 14:21:40 cbs kern: [<d894007b>] W6692B_interrupt+0x23c/0x559 [hisax]
<04>2007 May 30 14:21:40 cbs kern: [<c010b893>] delay_pmtmr+0xb/0x13
<04>2007 May 30 14:21:40 cbs kern: [<c01b73f5>] __delay+0x9/0xa
<04>2007 May 30 14:21:40 cbs kern: [<d892f834>] setup_sedlbauer+0x1ee/0x534 [hisax]
<04>2007 May 30 14:21:40 cbs kern: [<c01175e8>] printk+0x12/0x16
<04>2007 May 30 14:21:40 cbs kern: [<d890dcdb>] checkcard+0x201/0x566 [hisax]
<04>2007 May 30 14:21:40 cbs kern: [<d890dd62>] checkcard+0x288/0x566 [hisax]
<04>2007 May 30 14:21:40 cbs kern: [<d88554dc>] HiSax_init+0x4dc/0x57a [hisax]
<04>2007 May 30 14:21:40 cbs kern: [<c0159693>] new_inode+0x14/0x76
<04>2007 May 30 14:21:40 cbs kern: [<c017340c>] sysfs_add_file+0x1f/0x52
<04>2007 May 30 14:21:40 cbs kern: [<c01275fc>] debug_mutex_add_waiter+0x14/0x24
<04>2007 May 30 14:21:40 cbs kern: [<c0173995>] sysfs_new_dirent+0x17/0x56
<04>2007 May 30 14:21:40 cbs kern: [<c012a782>] sys_init_module+0x1364/0x1439
<04>2007 May 30 14:21:40 cbs kern: [<c013711c>] vma_prio_tree_insert+0x17/0x2a
<04>2007 May 30 14:21:40 cbs kern: [<c013ac54>] vma_link+0x85/0x8b
<04>2007 May 30 14:21:40 cbs kern: [<c013c7a4>] do_mmap_pgoff+0x4e7/0x634
<04>2007 May 30 14:21:40 cbs kern: [<c0106f44>] sys_mmap2+0x61/0x90
<04>2007 May 30 14:21:40 cbs kern: [<c0102a79>] syscall_call+0x7/0xb
<03>2007 May 30 14:21:40 cbs kern: handlers:
<03>2007 May 30 14:21:40 cbs kern: [<c030899d>] (usb_hcd_irq+0x0/0x4f)
<00>2007 May 30 14:21:40 cbs kern: Disabling IRQ #11
<06>2007 May 30 14:21:40 cbs kern: Sedlbauer: defined at 0xa800-0xa900 IRQ 11
<06>2007 May 30 14:21:40 cbs kern: Sedlbauer: speed fax+ pyramid detected
<06>2007 May 30 14:21:40 cbs kern: Sedlbauer: ISAC version (0): 2086/2186 V1.1
<06>2007 May 30 14:21:40 cbs kern: Sedlbauer: resetting card
<06>2007 May 30 14:21:40 cbs kern: Sedlbauer: ISAR version 1
<06>2007 May 30 14:21:40 cbs kern: Sedlbauer Speed Fax +: IRQ 11 count 100000
<06>2007 May 30 14:21:40 cbs kern: Sedlbauer: resetting card
<06>2007 May 30 14:21:40 cbs kern: Sedlbauer Speed Fax +: IRQ 11 count 100000
<04>2007 May 30 14:21:40 cbs kern: Sedlbauer Speed Fax +: IRQ(11) getting no interrupts during init 1 <06>2007 May 30 14:21:40 cbs kern: Sedlbauer: resetting card
<06>2007 May 30 14:21:40 cbs kern: Sedlbauer: resetting card
<06>2007 May 30 14:21:40 cbs kern: Sedlbauer Speed Fax +: IRQ 11 count 100000
<04>2007 May 30 14:21:40 cbs kern: Sedlbauer Speed Fax +: IRQ(11) getting no interrupts during init 2 <06>2007 May 30 14:21:40 cbs kern: Sedlbauer: resetting card
<06>2007 May 30 14:21:40 cbs kern: Sedlbauer: resetting card
<06>2007 May 30 14:21:40 cbs kern: Sedlbauer Speed Fax +: IRQ 11 count 100000
<04>2007 May 30 14:21:40 cbs kern: Sedlbauer Speed Fax +: IRQ(11) getting no interrupts during init 3 <06>2007 May 30 14:21:40 cbs kern: Sedlbauer: resetting card
<04>2007 May 30 14:21:40 cbs kern: HiSax: Card Sedlbauer Speed Fax + not installed !
==========================================================================
While the output seems to suggest a hardware problem, the same system loads the hisax driver perfectly on recent 2.4 kernels.
We tried several kernel versions, up to 2.6.21.3
Any hints are appreciated :)
Best,
Thomas
Signature · 2 lines
Thomas Vögtle email: [email protected] ----- http://www.voegtle-clan.de/thomas ------
Re: [Patch] sane irq initialization in sedlbauer/hisax (was: hisax isdn card (Sedlbauer Speed Fax+) does not get an interrupt)
Hi,
Quoted 1 line · Thomas Voegtle
==========================================================================
[...]
Quoted 2 lines
<06>2007 May 30 14:21:40 cbs kern: Sedlbauer: PCI base adr
0xa800
<03>2007 May 30 14:21:40 cbs kern: irq 11: nobody cared (try booting with the \"irqpoll\" option)
[...]
Quoted 3 lines
<03>2007 May 30 14:21:40 cbs kern: handlers:
<03>2007 May 30 14:21:40 cbs kern: [<c030899d>] (usb_hcd_irq+0x0/0x4f) <00>2007 May 30 14:21:40 cbs kern: Disabling IRQ #11
As described, the interrupt handler is registered too late, so early incoming interrupts lead to the original problem. The patch first disables the interrupts (byteout(..., 0)), then registers the irq, and finally enables the irqs again (byteout(..., 2) as was done at the first point before).
Please note that the patch was developed without access to technical specifications; the /exact/ meaning of the constants being written to the registers are unknown.
Patch applies to 2.6.22-rc4.
drivers/isdn/hisax/config.c +2 -0
@@ -511,6 +511,7 @@#if CARD_SEDLBAUER extern int setup_sedlbauer (struct IsdnCard *card); +extern void sedlbauer_enable_interrupts (struct IsdnCardState *cs);#endif #if CARD_SPORTSTER
@@ -822,6 +823,7 @@ cs->irq);return 1 ; } +sedlbauer_enable_interrupts (cs);while (cnt) { cs->cardmsg (cs,CARD_INIT ,NULL );/* Timeout 10ms */
drivers/isdn/hisax/sedlbauer.c +15 -1
@@ -529,6 +529,19 @@static struct pnp_card *pnp_c__devinitdata =NULL ;#endif +int +sedlbauer_enable_interrupts (struct IsdnCardState *cs) +{ +#ifdef CONFIG_PCI +if ((cs->typ ==ISDN_CTYPE_SEDLBAUER ) || + (cs->typ ==ISDN_CTYPE_SEDLBAUER_FAX )) { +byteout (cs->hw.sedl.cfg_reg+5 ,0x02 ); + } +#endif +return 0 ; +} + +int __devinit setup_sedlbauer (struct IsdnCard *card) {
@@ -667,7 +680,8 @@byteout (cs->hw.sedl.cfg_reg,0xff );byteout (cs->hw.sedl.cfg_reg,0x00 );byteout (cs->hw.sedl.cfg_reg+2 ,0xdd ); -byteout (cs->hw.sedl.cfg_reg+5 ,0x02 ); +byteout (cs->hw.sedl.cfg_reg+5 ,0x00 ); +/* 0 seems to be "disable". Enable (-> 0x02) later! */ byteout (cs->hw.sedl.cfg_reg +3 , cs->hw.sedl.reset_on);mdelay (2 );byteout (cs->hw.sedl.cfg_reg +3 , cs->hw.sedl.reset_off);
Signature · 2 lines
Thomas Vögtle email: [email protected] ----- http://www.voegtle-clan.de/thomas ------