Subject: kern/6069: Booting with Nokia DTP-2 PCMCIA card causes panic
To: None <gnats-bugs@gnats.netbsd.org>
From: Andreas Gustafsson <gson@araneus.fi>
List: netbsd-bugs
Date: 08/30/1998 19:33:18
>Number:         6069
>Category:       kern
>Synopsis:       Booting with Nokia DTP-2 PCMCIA card causes panic
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 30 16:20:05 1998
>Last-Modified:
>Originator:     Andreas Gustafsson
>Organization:
Araneus Information Systems Oy
>Release:        NetBSD 1.3G, 19980828
>Environment:

System: NetBSD guava.araneus.fi 1.3System: NetBSD gulag.araneus.fi 1.3G NetBSD 1.3G (GULAG) #0: Sun Aug 30 15:42:23 EEST 1998 gson@gulag.araneus.fi:/usr/src/sys/arch/i386/compile/GULAG i386

>Description:

After I built a kernel from sources SUPed on August 28, 1998, my IBM
ThinkPad 365XD panics during boot when a Nokia DTP-2 PCMCIA GSM data
card (a serial device) is present.  This did not happen with a kernel
from the 19980723 i386 binary snapshot.

Relevant boot-time console output and backtrace follows.

pcmcia1 at pcic0 controller 0 socket 1
pcmcia1: CIS version PCMCIA 2.0 or 2.1
pcmcia1: CIS info: Nokia Mobile Phones, DTP-2, , 
pcmcia1: Manufacturer code 0xffff, product 0x100
pcmcia1: function 0: serial port, ccr addr 4000 mask 7
pcmcia1: function 0, config table entry 48: I/O card; irq mask 86bc; iomask 3, iospace 0-7; powerdown
pcmcia1: function 0, config table entry 32: I/O card; irq mask 10; iomask 3, iospace 3f8-3ff; io8 powerdown
pcmcia1: function 0, config table entry 33: I/O card; irq mask 8; iomask 3, iospace 2f8-2ff; io8 powerdown
pcmcia1: function 0, config table entry 34: I/O card; irq mask 10; iomask 3, iospace 3e8-3ef; io8 powerdown
pcmcia1: function 0, config table entry 35: I/O card; irq mask 8; iomask 3, iospace 2e8-2ef; io8 powerdown
com1 at pcmcia1 function 0panic: extent_alloc_subregion: bad alignment
Stopped in  at  _Debugger+0x4:  leave
db> t
_Debugger(0,0,f0286a44,f012704c,f0126e4e) at _Debugger+0x4
_panic(f0126e4e,400,0,8,800) at _panic+0x55
_extent_alloc_subregion(f0246be4,400,500,8,0) at _extent_alloc_subregion+0xb8
_i386_memio_alloc(0,400,500,8,0,0,0,f0286abc,f0286ac0) at _i386_memio_alloc+0x8d
_pcic_chip_io_alloc(f03d54e0,0,8,0,f03d7ce8) at _pcic_chip_io_alloc+0x7e
_com_pcmcia_attach(f03d7e00,f03d7c00,f0286b90,f03d7c00,f0286b90) at _com_pcmcia
_attach+0x84
_config_attach(f03d7e00,f022480c,f0286b90,f0218470,f03d0b80) at _config_attach+0x2c8
_config_found_sm(f03d7e00,f0286b90,f0218470,f0218408) at _config_found_sm+0x29
_pcmcia_card_attach(f03d7e00,f03d5441,f0286bc8,f0215fa1,f03d54e0) at _pcmcia_card_attach+0xe1
_pcic_attach_card(f03d54e0,f03d54e0,e0,f03d5400,f0286be8) at _pcic_attach_card+0x23
_pcic_init_socket(f03d54e0,88,f0234c98,f03d54e0,400) at _pcic_init_socket+0x1c5
_pcic_attach_socket(f03d54e0) at _pcic_attach_socket+0x65
_pcic_attach_sockets(f03d5400,0,f0224508,f03d5400,1) at _pcic_attach_sockets+0x2b
_pcic_isa_attach(f03cef00,f03d5400,f0286ca4,f03d5400,f0286ca4) at _pcic_isa_attach+0x14e
_config_attach(f03cef00,f0224a58,f0286ca4,f01f9128) at _config_attach+0x2c8
_isasearch(f03cef00,f0224a58,0,f0224776,f0224a5c) at _isasearch+0xa0
_mapply(f0286d10,f0224a58) at _mapply+0x35
_config_search(f01f91e0,f03cef00,0,0,f0224440) at _config_search+0x6a
_isaattach(f03cef40,f03cef00,f0286de0,f03cef00,f0286de0) at _isaattach+0x69
_config_attach(f03cef40,f0224924,f0286de0,f01f9038,f0286de0) at _config_attach+0x2c8
_config_found_sm(f03cef40,f0286de0,f01f9038,0,f0286de0) at _config_found_sm+0x29
_pcib_callback(f03cef40,0,f02243dc,f03d0f80,f0286e60) at _pcib_callback+0x42
_config_process_deferred_children(f03d0f80,f03cefc0,f03d0f80,f0286ea8,f03d0f80) at _config_process_deferred_children+0x43
_config_attach(f03cefc0,f0224898,f0286ea8,f01f108c,f03cefc0) at _config_attach+0x2ce
_config_found_sm(f03cefc0,f0286ea8,f01f108c,0) at _config_found_sm+0x29
_mainbus_attach(0,f03cefc0,0,f03cefc0,0) at _mainbus_attach+0x5e
_config_attach(0,f022487c,0,0,224) at _config_attach+0x2c8
_config_rootfound(f01ddc23,0) at _config_rootfound+0x37
_configure(f0284010,284000,28b000,0,0) at _configure+0x14
_cpu_startup(f0225e08,f0284010,284000,28b000,fffff000) at _cpu_startup+0x2cb
_main(0,0,0,0,0) at _main+0x4f
db> 


>How-To-Repeat:

See above.

>Fix:

Presumably the "align" argument given to pcmcia_io_alloc() at
com_pcmcia.c line 244 should be changed from the constant zero to
something else, but I don't know what.
>Audit-Trail:
>Unformatted: