android_kernel_xiaomi_sm8350/drivers/isdn/hisax
Ingo Molnar 9fc89c2dea isdn: bootup crash fix
got this HiSax bootup crash on a "make randconfig" bzImage bootup:

 Calling initcall 0xc0bb1320: HiSax_init+0x0/0x380()
 HiSax: Linux Driver for passive ISDN cards
 HiSax: Version 3.5 (kernel)
 HiSax: Layer1 Revision 2.46.2.5
 HiSax: Layer2 Revision 2.30.2.4
 HiSax: TeiMgr Revision 2.20.2.3
 HiSax: Layer3 Revision 2.22.2.3
 HiSax: LinkLayer Revision 2.59.2.4
 HiSax: Total 1 card defined
 HiSax: Card 1 Protocol EDSS1 Id=HiSax (0)
 HiSax: HFC-S driver Rev. 1.10.2.4
 HFCS: defined at 0x500 IRQ 5 HZ 250
 Teles 16.3c: IRQ 5 count 0
 HFCS: resetting card
 Teles 16.3c: IRQ 5 count 0
 Teles 16.3c: IRQ(5) getting no interrupts during init 1
 HFCS: resetting card
 ------------[ cut here ]------------
 kernel BUG at include/linux/timer.h:145!
 invalid opcode: 0000 [#1] PREEMPT DEBUG_PAGEALLOC
 Modules linked in:

 Pid: 1, comm: swapper Not tainted (2.6.24-rc3 #2045)
 EIP: 0060:[<c063afbf>] EFLAGS: 00010286 CPU: 0
 EIP is at hfcs_card_msg+0x15f/0x180
 EAX: c0cf2e5c EBX: 000000f2 ECX: 00000000 EDX: ffff1193
 ESI: f76e8000 EDI: f76e8000 EBP: f7c23ec4 ESP: f7c23eac
  DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
 Process swapper (pid: 1, ti=f7c22000 task=f7c0e000 task.ti=f7c22000)
 Stack: 00000000 f7c23ec4 c011703b 00000002 f76e8000 00000000 f7c23ef8 c060c3e5
        c0a7c9c0 c0a315dc 00000005 00000001 00000000 f7c23f34 00000000 c0b5c9c0
        f7c23f34 00000000 c0f5a8e0 f7c23f80 c0bb154f 00000000 00000001 c0a9b5b9
 Call Trace:
  [<c010339a>] show_trace_log_lvl+0x1a/0x40
  [<c0103469>] show_stack_log_lvl+0xa9/0xe0
  [<c010355f>] show_registers+0xbf/0x200
  [<c01037a4>] die+0x104/0x220
  [<c0103943>] do_trap+0x83/0xc0
  [<c0103ca8>] do_invalid_op+0x88/0xa0
  [<c083621a>] error_code+0x6a/0x70
  [<c060c3e5>] checkcard+0x4a5/0x620
  [<c0bb154f>] HiSax_init+0x22f/0x380
  [<c0b867b7>] kernel_init+0x97/0x2a0
  [<c0102f87>] kernel_thread_helper+0x7/0x20
  =======================
 Code: e8 43 ae ff 8b 57 3c 85 d2 0f 84 ef fe ff ff b8 a0 99 ad c0 b9 02 00 00 00 e8 ce 11 ae ff 83 c4 0c b8 00 00 00 00 5b 5e 5f c9 c3 <0f> 0b eb fe 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
 EIP: [<c063afbf>] hfcs_card_msg+0x15f/0x180 SS:ESP 0068:f7c23eac
 Kernel panic - not syncing: Attempted to kill init!

The box has no HiSax card installed.

the reason for the crash is add_timer() done on an already running
timer. This happens because for some reason CARD_INIT is called twice.

this patch works this problem around by using mod_timer() - this gets
a booting system - but it would be nice to figure out why CARD_INIT
is done twice.

the ISDN config section (generated via make randconfig) is this:

#
# ISDN feature submodules
#
# CONFIG_ISDN_DRV_LOOP is not set
CONFIG_ISDN_DIVERSION=y

#
# ISDN4Linux hardware drivers
#

#
# Passive cards
#
CONFIG_ISDN_DRV_HISAX=y

#
# D-channel protocol features
#
CONFIG_HISAX_EURO=y
CONFIG_DE_AOC=y
# CONFIG_HISAX_NO_SENDCOMPLETE is not set
# CONFIG_HISAX_NO_LLC is not set
# CONFIG_HISAX_NO_KEYPAD is not set
CONFIG_HISAX_1TR6=y
CONFIG_HISAX_NI1=y
CONFIG_HISAX_MAX_CARDS=8

#
# HiSax supported cards
#
CONFIG_HISAX_16_0=y
# CONFIG_HISAX_16_3 is not set
# CONFIG_HISAX_TELESPCI is not set
CONFIG_HISAX_S0BOX=y
# CONFIG_HISAX_AVM_A1 is not set
CONFIG_HISAX_FRITZPCI=y
CONFIG_HISAX_AVM_A1_PCMCIA=y
CONFIG_HISAX_ELSA=y
CONFIG_HISAX_IX1MICROR2=y
CONFIG_HISAX_DIEHLDIVA=y
# CONFIG_HISAX_ASUSCOM is not set
# CONFIG_HISAX_TELEINT is not set
CONFIG_HISAX_HFCS=y
# CONFIG_HISAX_SEDLBAUER is not set
CONFIG_HISAX_SPORTSTER=y
# CONFIG_HISAX_MIC is not set
# CONFIG_HISAX_NETJET is not set
# CONFIG_HISAX_NETJET_U is not set
# CONFIG_HISAX_NICCY is not set
# CONFIG_HISAX_ISURF is not set
# CONFIG_HISAX_HSTSAPHIR is not set
# CONFIG_HISAX_BKM_A4T is not set
# CONFIG_HISAX_SCT_QUADRO is not set
# CONFIG_HISAX_GAZEL is not set
# CONFIG_HISAX_HFC_PCI is not set
# CONFIG_HISAX_W6692 is not set
# CONFIG_HISAX_HFC_SX is not set
# CONFIG_HISAX_DEBUG is not set

#
# HiSax PCMCIA card service modules
#

#
# HiSax sub driver modules
#
CONFIG_HISAX_ST5481=y
CONFIG_HISAX_HFCUSB=y
# CONFIG_HISAX_HFC4S8S is not set
CONFIG_HISAX_FRITZ_PCIPNP=y
CONFIG_HISAX_HDLC=y

#
# Active cards
#
CONFIG_ISDN_DRV_ICN=m
CONFIG_ISDN_DRV_PCBIT=m
CONFIG_ISDN_DRV_SC=y
# CONFIG_ISDN_DRV_ACT2000 is not set
CONFIG_HYSDN=m
# CONFIG_ISDN_DRV_GIGASET is not set
# CONFIG_ISDN_CAPI is not set
CONFIG_PHONE=y
CONFIG_PHONE_IXJ=m

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Karsten Keil <kkeil@suse.de>
Cc: Kai Germaschewski <kai@germaschewski.name>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29 09:24:53 -08:00
..
amd7930_fn.c Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
amd7930_fn.h fix file specification in comments 2006-10-03 23:01:26 +02:00
arcofi.c
arcofi.h
asuscom.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
avm_a1.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
avm_a1p.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
avm_pci.c PCI: Add Kconfig option to disable deprecated pci_find_* API 2007-11-05 13:35:17 -08:00
avma1_cs.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
bkm_a4t.c [ISDN] HiSax bkm_a4t: split setup into two smaller functions 2007-07-17 17:24:17 -04:00
bkm_a8.c [ISDN] Remove CONFIG_PCI ifdefs from 100% PCI source code 2007-10-12 09:16:48 -04:00
bkm_ax.h
callc.c
config.c ISDN HiSax: uninitialized return in hisax_cs_setup 2007-07-18 18:17:23 -04:00
diva.c PCI: Add Kconfig option to disable deprecated pci_find_* API 2007-11-05 13:35:17 -08:00
elsa_cs.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
elsa_ser.c [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset} 2007-04-25 22:28:23 -07:00
elsa.c i4l: errors with assignments in if 2007-11-05 15:12:31 -08:00
enternow_pci.c Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
fsm.c [PATCH] isdn: replace kmalloc+memset with kzalloc 2006-12-08 08:29:01 -08:00
fsm.h
gazel.c PCI: Add Kconfig option to disable deprecated pci_find_* API 2007-11-05 13:35:17 -08:00
hfc4s8s_l1.c [PATCH] ISDN: Rename special macro CONFIG_HISAX_HFC4S8S_PCIMEM 2007-02-12 09:48:35 -08:00
hfc4s8s_l1.h Fix misc .c/.h comment typos 2006-11-30 05:24:39 +01:00
hfc_2bds0.c more trivial signedness fixes in drivers 2007-10-14 12:41:52 -07:00
hfc_2bds0.h
hfc_2bs0.c
hfc_2bs0.h
hfc_pci.c Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
hfc_pci.h
hfc_sx.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
hfc_sx.h
hfc_usb.c hisax: hfc_usb: update to current CVS version 2007-10-14 12:45:14 -07:00
hfc_usb.h hisax: update hfc_usb driver 2007-08-21 10:14:28 -07:00
hfcscard.c isdn: bootup crash fix 2007-11-29 09:24:53 -08:00
hisax_cfg.h
hisax_debug.h
hisax_fcpcipnp.c HiSax: fix error checking for hisax_register()] 2007-05-23 20:14:14 -07:00
hisax_fcpcipnp.h
hisax_if.h long vs. unsigned long - low-hanging fruits in drivers 2007-10-14 12:41:51 -07:00
hisax_isac.c [PATCH] drivers/isdn/*: trivial vsnprintf() conversion 2006-12-08 08:29:01 -08:00
hisax_isac.h
hisax.h long vs. unsigned long - low-hanging fruits in drivers 2007-10-14 12:41:51 -07:00
hscx_irq.c
hscx.c
hscx.h
icc.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
icc.h
ipac.h
ipacx.c
ipacx.h
isac.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
isac.h
isar.c [PATCH] ISDN: fix BChannel_bh() call from isar_bh() 2007-03-27 09:05:15 -07:00
isar.h
isdnhdlc.c Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
isdnhdlc.h Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
isdnl1.c WorkStruct: make allyesconfig 2006-11-22 14:57:56 +00:00
isdnl1.h [PATCH] drivers/isdn/hisax/: proper prototypes 2007-02-12 09:48:34 -08:00
isdnl2.c [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset} 2007-04-25 22:28:23 -07:00
isdnl2.h
isdnl3.c [PATCH] drivers/isdn/hisax/: proper prototypes 2007-02-12 09:48:34 -08:00
isdnl3.h [PATCH] drivers/isdn/hisax/: proper prototypes 2007-02-12 09:48:34 -08:00
isurf.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
ix1_micro.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
jade_irq.c
jade.c Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
jade.h
Kconfig PCI: Add Kconfig option to disable deprecated pci_find_* API 2007-11-05 13:35:17 -08:00
l3_1tr6.c
l3_1tr6.h
l3dss1.c
l3dss1.h
l3ni1.c
l3ni1.h
lmgr.c
Makefile [PATCH] ISDN: Remove defunct test emulator 2007-02-12 09:48:34 -08:00
mic.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
netjet.c PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
netjet.h IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
niccy.c PCI: Add Kconfig option to disable deprecated pci_find_* API 2007-11-05 13:35:17 -08:00
nj_s.c more trivial signedness fixes in drivers 2007-10-14 12:41:52 -07:00
nj_u.c [ISDN] HiSax netjet_u: split setup into 3 smaller functions 2007-07-17 17:21:37 -04:00
q931.c
s0box.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
saphir.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
sedlbauer_cs.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
sedlbauer.c PCI: Add Kconfig option to disable deprecated pci_find_* API 2007-11-05 13:35:17 -08:00
sportster.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
st5481_b.c [PATCH] isdn/hisax: use bitrev8 2006-12-08 08:28:40 -08:00
st5481_d.c [PATCH] drivers/isdn/*: trivial vsnprintf() conversion 2006-12-08 08:29:01 -08:00
st5481_init.c HiSax: fix error checking for hisax_register()] 2007-05-23 20:14:14 -07:00
st5481_usb.c HiSax: fix error checking for hisax_register()] 2007-05-23 20:14:14 -07:00
st5481.h
tei.c
teleint.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
teles0.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
teles3.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
teles_cs.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
telespci.c [ISDN] Remove CONFIG_PCI ifdefs from 100% PCI source code 2007-10-12 09:16:48 -04:00
w6692.c [ISDN] Remove CONFIG_PCI ifdefs from 100% PCI source code 2007-10-12 09:16:48 -04:00
w6692.h