On 17/12/14 14:48  Martin Pieuchot wrote:
> Hello Tilo,
> 
> On 17/12/14(Wed) 09:27, Tilo Stritzky wrote:
> > >Synopsis:   Subject: Panic on removal of PCMCIA card 4 ports USB on HP 
> > >avilion ze4300
> > >Category:  system
> > >Environment:
> >     System      : OpenBSD 5.6
> >     Details     : OpenBSD 5.6-current (GENERIC) #594: Sun Dec 14 19:58:51 
> > MST 2014
> >                      
> > [email protected]:/usr/src/sys/arch/i386/compile/GENERIC
> > 
> >     Architecture: OpenBSD.i386
> >     Machine     : i386
> > >Description:
> > System panics when a PCMCIA card (4 Port USB) is physically removed
> > from machine. Card works fine otherwise.
> > 
> > Panic is 100% reproducible.
> > Dumps are available.
> 
> Thanks for the report, diff below fixes it for me, could you try it?

Yes, this seems to fix it, thanks.
dmesg below.
> 
> Index: ehci.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/dev/usb/ehci.c,v
> retrieving revision 1.171
> diff -u -p -r1.171 ehci.c
> --- ehci.c    9 Dec 2014 07:05:06 -0000       1.171
> +++ ehci.c    17 Dec 2014 12:25:00 -0000
> @@ -542,8 +542,8 @@ ehci_intr1(struct ehci_softc *sc)
>       sc->sc_bus.intr_context++;
>       sc->sc_bus.no_intrs++;
>       if (eintrs & EHCI_STS_HSE) {
> -             printf("%s: unrecoverable error, controller halted\n",
> -                    sc->sc_bus.bdev.dv_xname);
> +             printf("%s: host controller halted\n",
> +                 sc->sc_bus.bdev.dv_xname);
>               sc->sc_bus.dying = 1;
>               sc->sc_bus.intr_context--;
>               return (1);
> Index: uhci.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/dev/usb/uhci.c,v
> retrieving revision 1.133
> diff -u -p -r1.133 uhci.c
> --- uhci.c    9 Dec 2014 07:05:06 -0000       1.133
> +++ uhci.c    17 Dec 2014 12:25:00 -0000
> @@ -1052,6 +1052,13 @@ uhci_intr1(struct uhci_softc *sc)
>               printf("%s: resume detect\n", sc->sc_bus.bdev.dv_xname);
>  #endif
>       }
> +     if (status & UHCI_STS_HCH) {
> +             printf("%s: host controller halted\n",
> +                 sc->sc_bus.bdev.dv_xname);
> +             sc->sc_bus.dying = 1;
> +             sc->sc_bus.intr_context--;
> +             return (1);
> +     }
>       if (status & UHCI_STS_HSE) {
>               ack |= UHCI_STS_HSE;
>               printf("%s: host system error\n", sc->sc_bus.bdev.dv_xname);
> @@ -1059,18 +1066,7 @@ uhci_intr1(struct uhci_softc *sc)
>       if (status & UHCI_STS_HCPE) {
>               ack |= UHCI_STS_HCPE;
>               printf("%s: host controller process error\n",
> -                    sc->sc_bus.bdev.dv_xname);
> -     }
> -     if (status & UHCI_STS_HCH) {
> -             /* no acknowledge needed */
> -             if (!sc->sc_bus.dying) {
> -                     printf("%s: host controller halted\n",
> -                         sc->sc_bus.bdev.dv_xname);
> -#ifdef UHCI_DEBUG
> -                     uhci_dump_all(sc);
> -#endif
> -             }
> -             sc->sc_bus.dying = 1;
> +                 sc->sc_bus.bdev.dv_xname);
>       }
>  
>       if (!ack)
> Index: usb.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/dev/usb/usb.c,v
> retrieving revision 1.102
> diff -u -p -r1.102 usb.c
> --- usb.c     10 Aug 2014 11:18:57 -0000      1.102
> +++ usb.c     17 Dec 2014 12:25:00 -0000
> @@ -262,6 +262,13 @@ usb_detach_roothub(struct usb_softc *sc)
>        * it.
>        */
>       sc->sc_bus->flags |= USB_BUS_DISCONNECTING;
> +     /*
> +      * Reset the dying flag in case it has been set by the interrupt
> +      * handler when unplugging a HC card otherwise the task won't be
> +      * scheduled.  This is safe since a dead HC should not trigger
> +      * new interrupt.
> +      */
> +     sc->sc_bus->dying = 0;
>       usb_needs_explore(sc->sc_bus->root_hub, 0);
>  
>       usb_wait_task(sc->sc_bus->root_hub, &sc->sc_explore_task);
> Index: xhci.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/dev/usb/xhci.c,v
> retrieving revision 1.46
> diff -u -p -r1.46 xhci.c
> --- xhci.c    15 Dec 2014 17:10:44 -0000      1.46
> +++ xhci.c    17 Dec 2014 12:25:00 -0000
> @@ -600,7 +600,7 @@ xhci_intr1(struct xhci_softc *sc)
>       sc->sc_bus.no_intrs++;
>  
>       if (intrs & XHCI_STS_HSE) {
> -             printf("%s: host system error\n", DEVNAME(sc));
> +             printf("%s: host controller halted\n", DEVNAME(sc));
>               sc->sc_bus.dying = 1;
>               sc->sc_bus.intr_context--;
>               return (1);


OpenBSD 5.6-current (cpa) #0: Thu Dec 18 17:19:54 CET 2014
    [email protected]:/home/tst/cpa
cpu0: mobile AMD Athlon(tm) XP2200+ ("AuthenticAMD" 686-class, 256KB L2 cache) 
1.79 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE,MPC,MMXX,3DNOW2,3DNOW
real mem  = 501694464 (478MB)
avail mem = 481165312 (458MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 05/04/05, BIOS32 rev. 0 @ 0xfd730, SMBIOS 
rev. 2.3 @ 0xdb010 (44 entries)
bios0: vendor Phoenix Technologies Ltd. version "KAM1.60" date 05/04/2005
bios0: Hewlett-Packard Pavilion ze4300 (DC713A)
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP BOOT SSDT
acpi0: wakeup devices PCI0(S5) MDEM(S4) LAN_(S5) LID_(S3)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (AGPB)
acpiec0 at acpi0
acpicpu0 at acpi0: C2, PSS
acpitz0 at acpi0: critical temperature is 100 degC
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: LID_
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT1 not present
acpivideo0 at acpi0: VGA_
bios0: ROM list: 0xc0000/0xf000 0xcf000/0x800 0xdb000/0x1000! 0xdc000/0x4000!
cpu0 at mainbus0: (uniprocessor)
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: PowerNow! K7 1790 MHz: speeds: 1781 1370 959 822 685 548 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "ATI RS100 AGP" rev 0x13
agp at pchb0 not configured
ppb0 at pci0 dev 1 function 0 "ATI RS100 PCI" rev 0x01
pci1 at ppb0 bus 1
radeondrm0 at pci1 dev 5 function 0 "ATI Radeon IGP 320M" rev 0x00
drm0 at radeondrm0
radeondrm0: irq 9
ohci0 at pci0 dev 2 function 0 "Acer Labs M5237 USB" rev 0x03: irq 9, version 
1.0, legacy support
autri0 at pci0 dev 6 function 0 "Acer Labs M5451 Audio" rev 0x02: irq 5
ac97: codec id 0x43585429 (Conexant CX20468 rev 1)
ac97: codec features reserved, headphone, 18 bit DAC, 18 bit ADC, No 3D Stereo
audio0 at autri0
midi0 at autri0: <4DWAVE MIDI UART>
pcib0 at pci0 dev 7 function 0 "Acer Labs M1533 ISA" rev 0x00
"Acer Labs M5457 Modem" rev 0x00 at pci0 dev 8 function 0 not configured
cbb0 at pci0 dev 10 function 0 "O2 Micro OZ69[17]2 CardBus" rev 0x00: irq 10
"TI TSB43AB21 FireWire" rev 0x00 at pci0 dev 12 function 0 not configured
pciide0 at pci0 dev 16 function 0 "Acer Labs M5229 UDMA IDE" rev 0xc4: DMA, 
channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <SAMSUNG MP0402H>
wd0: 16-sector PIO, LBA48, 38204MB, 78242976 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <TOSHIBA, DVD-ROM SD-R2312, 1905> ATAPI 5/cdrom 
removable
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2
alipm0 at pci0 dev 17 function 0 "Acer Labs M7101 Power" rev 0x00: 74KHz clock
iic0 at alipm0
spdmem0 at iic0 addr 0x50: 256MB DDR SDRAM non-parity PC2300CL2.5
spdmem1 at iic0 addr 0x51: 256MB DDR SDRAM non-parity PC2300CL2.5
sis0 at pci0 dev 18 function 0 "NS DP83815 10/100" rev 0x00, DP83816A: irq 11, 
address 00:0b:cd:34:69:2f
nsphyter0 at sis0 phy 0: DP83815 10/100 PHY, rev. 1
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 "Acer Labs OHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pms0: Synaptics touchpad, firmware 5.8
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 2 device 0 cacheline 0x0, lattimer 0x20
pcmcia0 at cardslot0
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on wd0a (23fe4705e9293a4c.a) swap on wd0b dump on wd0b
drm: initializing kernel modesetting (RS100 0x1002:0x4336 0x103C:0x0024).
error: [drm:pid0:radeon_agp_init] *ERROR* Unable to acquire AGP: 22
drm: Forcing AGP to PCI mode
radeondrm0: VRAM: 32M 0x000000001E000000 - 0x000000001FFFFFFF (32M used)
radeondrm0: GTT: 512M 0x0000000020000000 - 0x000000003FFFFFFF
drm: PCI GART of 512M enabled (table at 0x00000000015F1000).
error: [drm:pid0:r100_ring_test] *ERROR* radeon: ring test failed 
(scratch(0x15E4)=0xCAFEDEAD)
error: [drm:pid0:r100_cp_init] *ERROR* radeon: cp isn't working (-22).
error: [drm:pid0:r100_startup] *ERROR* failed initializing CP (-22).
error: [drm:pid0:r100_init] *ERROR* Disabling GPU acceleration
error: [drm:pid0:r100_cp_fini] *ERROR* Wait for CP idle timeout, shutting down 
CP.
drm: radeon: cp finalized
drm: Panel ID String: 1024x768                
drm: Panel Size 1024x768
drm: No TV DAC info found in BIOS
radeondrm0: 1024x768
wsdisplay0 at radeondrm0 mux 1: console (std, vt100 emulation), using wskbd0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
uhci0 at cardbus0 dev 0 function 0 "VIA VT83C572 USB" rev 0x62: irq 10
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "VIA UHCI root hub" rev 1.00/1.00 addr 1
uhci1 at cardbus0 dev 0 function 1 "VIA VT83C572 USB" rev 0x62: irq 10
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "VIA UHCI root hub" rev 1.00/1.00 addr 1
ehci0 at cardbus0 dev 0 function 2 "VIA VT6202 USB" rev 0x65: irq 10
usb3 at ehci0: USB revision 2.0
uhub3 at usb3 "VIA EHCI root hub" rev 2.00/1.00 addr 1
uhub1 detached
usb1 detached
uhci0 detached
uhub2 detached
usb2 detached
uhci1 detached
uhub3 detached
usb3 detached
ehci0: reset timeout
ehci0 detached
uhci0 at cardbus0 dev 0 function 0 "VIA VT83C572 USB" rev 0x62: irq 10
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "VIA UHCI root hub" rev 1.00/1.00 addr 1
uhci1 at cardbus0 dev 0 function 1 "VIA VT83C572 USB" rev 0x62: irq 10
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "VIA UHCI root hub" rev 1.00/1.00 addr 1
ehci0 at cardbus0 dev 0 function 2 "VIA VT6202 USB" rev 0x65: irq 10
usb3 at ehci0: USB revision 2.0
uhub3 at usb3 "VIA EHCI root hub" rev 2.00/1.00 addr 1
uhub1 detached
usb1 detached
uhci0 detached
uhub2 detached
usb2 detached
uhci1 detached
uhub3 detached
usb3 detached
ehci0: reset timeout
ehci0 detached
uhci0 at cardbus0 dev 0 function 0 "VIA VT83C572 USB" rev 0x62: irq 10
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "VIA UHCI root hub" rev 1.00/1.00 addr 1
uhci1 at cardbus0 dev 0 function 1 "VIA VT83C572 USB" rev 0x62: irq 10
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "VIA UHCI root hub" rev 1.00/1.00 addr 1
ehci0 at cardbus0 dev 0 function 2 "VIA VT6202 USB" rev 0x65: irq 10
usb3 at ehci0: USB revision 2.0
uhub3 at usb3 "VIA EHCI root hub" rev 2.00/1.00 addr 1
umass0 at uhub3 port 2 configuration 1 interface 0 " Patriot Memory" rev 
2.00/1.10 addr 2
umass0: using SCSI over Bulk-Only
scsibus4 at umass0: 2 targets, initiator 0
sd0 at scsibus4 targ 1 lun 0: <, Patriot Memory, PMAP> SCSI0 0/direct removable 
serial.13fe1e0007780FA62054
sd0: 7872MB, 512 bytes/sector, 16121856 sectors
uhub1 detached
usb1 detached
uhci0 detached
uhub2 detached
usb2 detached
uhci1 detached
sd0 detached
scsibus4 detached
umass0 detached
uhub3 detached
usb3 detached
ehci0: reset timeout
ehci0 detached

Reply via email to