On 04/08/14(Mon) 21:41, Roberto E. Vargas Caballero wrote:
> Hi,
>
> After updating to the snapshot of 31 July, I get a kernel panic
> while booting if I have connected my usb devices. If I connect my
> devices (I connect them through an usb port expander) after booting
> everything work perfectly. I attach the best dmesg I got (I tried
> several times but kernel seems to have problems writing into the
> disk after the panic).
>
> I have tested that the problem depends only of the usb port
> expander, it is not related to the devices I connect on it:
>
> $ usbdevs
> addr 1: EHCI root hub, NVIDIA
> addr 1: OHCI root hub, NVIDIA
> addr 3: hub, Philips Semiconductors
> addr 4: PS/2 to USB converter, MTC
> addr 5: Targus Group Intl, USB-RS232 Interface Converter
> addr 6: product 0x0300, MCT
>
> The kernel panic happens when the system configure the tty flags,
> so it seems that it is related to the device in addr 6, that
> it is a usb-rs232 adapter. I have tried to boot with another
> usb-rs232 and system boots without problems. I also have
> added these lines in my /etc/ttys:
>
> ttyU0 "/usr/libexec/getty std.115200" vt520 on secure local rtscts
> ttyU1 "/usr/libexec/getty std.115200" vt520 on secure local rtscts
umct(4) has a broken descriptor and its bulk in endpoint is reported as
interrupt in. Diff below changes the check to be less strict and avoid
such panic. Can you confirm it?
Index: ehci.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/usb/ehci.c,v
retrieving revision 1.163
diff -u -p -r1.163 ehci.c
--- ehci.c 3 Aug 2014 14:30:28 -0000 1.163
+++ ehci.c 5 Aug 2014 09:12:32 -0000
@@ -3388,7 +3388,7 @@ ehci_device_intr_start(struct usbd_xfer
void
ehci_device_intr_abort(struct usbd_xfer *xfer)
{
- KASSERT(xfer->pipe->intrxfer == xfer);
+ KASSERT(!xfer->pipe->repeat || xfer->pipe->intrxfer == xfer);
/*
* XXX - abort_xfer uses ehci_sync_hc, which syncs via the advance
Index: ohci.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/usb/ohci.c,v
retrieving revision 1.136
diff -u -p -r1.136 ohci.c
--- ohci.c 12 Jul 2014 20:13:48 -0000 1.136
+++ ohci.c 5 Aug 2014 09:12:32 -0000
@@ -2934,7 +2934,7 @@ ohci_device_intr_start(struct usbd_xfer
void
ohci_device_intr_abort(struct usbd_xfer *xfer)
{
- KASSERT(xfer->pipe->intrxfer == xfer);
+ KASSERT(!xfer->pipe->repeat || xfer->pipe->intrxfer == xfer);
ohci_abort_xfer(xfer, USBD_CANCELLED);
}
Index: uhci.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/usb/uhci.c,v
retrieving revision 1.128
diff -u -p -r1.128 uhci.c
--- uhci.c 12 Jul 2014 20:13:48 -0000 1.128
+++ uhci.c 5 Aug 2014 09:12:32 -0000
@@ -1967,7 +1967,7 @@ uhci_device_ctrl_close(struct usbd_pipe
void
uhci_device_intr_abort(struct usbd_xfer *xfer)
{
- KASSERT(xfer->pipe->intrxfer == xfer);
+ KASSERT(!xfer->pipe->repeat || xfer->pipe->intrxfer == xfer);
uhci_abort_xfer(xfer, USBD_CANCELLED);
}