Subject: kern/34537: kernel (esp driver) crash when pcmcia card is inserted
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <didier.gaumet@libertysurf.fr>
List: netbsd-bugs
Date: 09/15/2006 19:20:01
>Number:         34537
>Category:       kern
>Synopsis:       kernel (esp driver) crash when pcmcia card is inserted
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 15 19:20:01 +0000 2006
>Originator:     didier gaumet
>Release:        3.0, i386
>Organization:
>Environment:
I can't quote exact uname -a because NetBSD is not on the machine anymore.
It was a Generic-Laptop stock kernel, i386 NetBSD 3.0.
>Description:

I have installed NetBSD 3.0 (GENERIC_LAPTOP stock kernel) on a DELL
Latitude XPi P133ST laptop. 
DELL specifications are here:
http://support.euro.dell.com/support/edocs/dta/%5Ftitan/Specs.htm

I own an external pcmcia/scsi CD-ROM reader (PANASONIC KXL-D740).
PANASONIC specifications are here:
http://www.panasonic.com/office/pub/spec_sheets/kxld740.pdf
Under the CD-ROM reader, on its back, there are four micro-switches (DIP):
  SCSI ID 1 (On/Off): On
  SCSI ID 2 (On/Off): Off
  SCSI ID 3 (On/Off): On
  Terminator (On/Off): On
This CD-ROM reader was functionning properly under Windows 98 and Debian
Sarge whith these settings.

When I plug the CD-ROM reader in the PCMCIA slot1 (an ethernet card
being plugged in slot0), it crashes and ddb prompt appears: 

  -bash-3.1# 1esp0 at pcmcia1 function 0: <KME, KXLC002, 00>
  pcic0: port 0x410-0x41f
  pcmcia1: card irq 11
  uvm_fault(0xc0657e60, 0, 0, 2) -> 0xe
  kernel: page fault trap, code 0
  Stopped in pid 5.1 (pcic0,0,1) at     netbsd:ncr53c9x_init+0x4c:    movl
  $
  0,0(%eax)
  db>

result of bt:

db> bt
ncr53c9x_init(c08ade00,0,c01ec328,c08ade00,c08ade00) at
netbsd:ncr53c9x_init+0x4c
esp_pcmcia_enable(c08ade00,1,c08aebf0,c0588578,c0588578) at
netbsd:esp_pcmcia_enable+0x83
esp_pcmcia_attach(c0849000,c08ade00,c47c9ee4,c47c9ee0,0) at
netbsd:esp_pcmcia_attach+0x6c
config_attach_loc(c0849000,c05e9600,c47c9ed4,c47c9ee4,c048612c) at
netbsd:config_attach_loc+0x284
pcmcia_rescan(cc0849000,c057969a,c0558568,4b,c084d560) at
netbsd:pcmcia_rescan+0xa7
pcmcia_card_attach(c0849000,0,c47c9f8c,c047f9f3,380054fb) at
netbsd:pcmcia_card_attach+0x9b
pcic_attach_card(c084d560,2,0,246,0) at netbsd_pcic_attach_card+0x3a
pcic_event_thread(c084d560,70a000,712000,0,c0100321) at
netbsd:pcic_event_thread+0x2ce
db>

>How-To-Repeat:
Just plug in the Panasonic pcmcia card in the laptop.
>Fix: