Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Sep 2016 09:59:10 +0200
From:      Jan Henrik Sylvester <me@janh.de>
To:        Eric van Gyzen <vangyzen@FreeBSD.org>
Cc:        Borja Marcos <borjam@sarenet.es>, FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org>, FreeBSD-USB Mailing List <freebsd-usb@freebsd.org>
Subject:   Re: Status of PCIe Hotplug?
Message-ID:  <a5c570cf-28ff-dc70-cb2b-67d91adf0c56@janh.de>
In-Reply-To: <58f84457-d775-3023-5727-a326bc8df722@FreeBSD.org>
References:  <D7E110DB-EF6D-41DD-8D69-A021422916FA@sarenet.es> <791ee95b-ab4e-f07e-6b8d-0e0b6c49ceb0@janh.de> <E9D08BBA-762D-4F27-A853-645764235209@sarenet.es> <58f84457-d775-3023-5727-a326bc8df722@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 09/27/2016 17:51, Eric van Gyzen wrote:
> In the case of Jan's USB 3.0 ExpressCard, it's possible that one or all
> of the USB controller drivers (xhci, ehci, uhci) didn't cope with the
> surprise removal of the controller.  Before removing the card, try
> detaching the driver(s) with "devctl detach xhciN".  There might be more
> than one device.  Use "pciconf -lc" to find the HotPlug-capable pcib
> devices (bridges).  Use devinfo to find which one is your ExpressCard
> slot and find all the devices attached to it.  Then use devctl to detach
> the devices.  There could be a tree of devices; in that case, you can
> usually start at the level immediately under pcibN; you don't need to
> detach every device from the bottom up.  Once all the devices are
> detached, you should be able to remove the card safely.

Doing "devctl detach xhci0" before the removal of the USB 3.0
ExpressCard, there is no panic, the device gets deattached properly, and
I can reconnect it later.

Anyhow, because the mechanism holding the ExpressCard is not completely
reliable, on the third time inserting the card, it did not hold and I
got a panic, because it was immediately ejected without devctl detach.

Due to the card not holding firmly, I often pulled it together with the
usb device on 10.3-RELEASE and never got a panic. I guess it is a
regression in the usb driver dealing with sudden loss of the device.

The panic message is below, I guess I should take this discussion to
freebsd-usb@, CCed.

Thanks,
Jan Henrik


Fatal trap 9: general protection fault while in kernel mode
cpuid = 1; acpic id = 01
instruction pointer		= 0x20:0xffffffff80b1549c
stack pointer			= 0x28:0xfffffe022f62ca00
frame pointer			= 0x28:0xfffffe022f62ca70
code segment			= base 0x0, limit 0xfffff, type 0x1b
				= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags		= interrupt enabled, resume, IOPL = 0
current process			= 14 (usbus1)
trap number                     = 9
panic: general protection fault
cpuid = 1
KDB: stack backtrace:
#0 0xffffffff80b24077 at kdb_backtrace+0x67
#1 0xffffffff80ad93e2 at vpanic+0x182
#2 0xffffffff80ad9253 at panic+0x43
#3 0xffffffff80fa0d31 at trap_fatal+0x351
#4 0xffffffff80fa09c8 at trap+0x768
#5 0xffffffff80f84141 at calltrap+0x8
#6 0xffffffff808f2f63 at usb_detach_device+0xf3
#7 0xffffffff808f1d5b at usb_unconfigure+0x2b
#8 0xffffffff808f5623 at usb_free_device+0x103
#9 0xffffffff808f58b1 at usb_bus_detach+0x161
#10 0xffffffff80903e95 at usb_process+0x125
#11 0xffffffff80a90055 at fork_exit+0x85
#12 0xffffffff80f8467e at fork_trampoline+0xe
Uptime: 18m27s
Automatic reboot in 15 seconds - press a key on the console to abort




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a5c570cf-28ff-dc70-cb2b-67d91adf0c56>