Re: USB keyboard/mouse combo fails to attach

From: Hans Petter Selasky <hselasky_at_c2i.net>
Date: Sun, 21 Jun 2009 03:00:12 +0200
On Saturday 20 June 2009 21:08:20 Jason Harmening wrote:
> Hi all,
>
> I have a USB keyboard/mouse combo that sometimes fails to attach in
> -CURRENT, with the following error:
>
> uhub_reattach_port:416: could not allocate new device!
>
> This failure happens roughly every other time the device enumerates;
> generally it will attach and work fine if I just re-plug it.
>
> It looks like a stall while retrieving the device descriptor, though the
> device never had a problem attaching in 7-STABLE. I've included what (I
> think) are the relevant lines from my syslog w/ hw.usb.debug=15.
>
> Any help would be greatly appreciated.
>
> Thanks,
> Jason
>
>
> Jun 20 13:53:09 riviera kernel: usbd_do_request_flags:307: Handle Request
> function is set Jun 20 13:53:09 riviera kernel: usbd_do_request_flags:272:
> udev=0xffffff0005bb8000 bmRequestType=0x23 bRequest=0x01 wValue=0x0014
> wIndex=0x0001 wLength=0x0000 Jun 20 13:53:09 riviera kernel:
> usbd_do_request_flags:307: Handle Request function is set Jun 20 13:53:09
> riviera kernel: usbd_req_reset_port:659: port 1 reset returning
> error=USB_ERR_NORMAL_COMPLETION Jun 20 13:53:09 riviera kernel:
> usbd_do_request_flags:272: udev=0xffffff0005bb8000 bmRequestType=0xa3
> bRequest=0x00 wValue=0x0000 wIndex=0x0001 wLength=0x0004 Jun 20 13:53:09
> riviera kernel: usbd_do_request_flags:307: Handle Request function is set
> Jun 20 13:53:09 riviera kernel: usb_alloc_device:1432:
> parent_dev=0xffffff0005be1400, bus=0xffffff80005e8db0,
> parent_hub=0xffffff0005bb8000, depth=1, port_index=0, port_no=1, speed=1,
> usb_mode=0 Jun 20 13:53:09 riviera kernel: usb_set_device_state:2421: udev
> 0xffffff0016575800 state DETACHED -> POWERED Jun 20 13:53:09 riviera
> kernel: usbd_req_set_address:1160: setting device address=2 Jun 20 13:53:09
> riviera kernel: usbd_do_request_flags:272: udev=0xffffff0016575800
> bmRequestType=0x00 bRequest=0x05 wValue=0x0002 wIndex=0x0000 wLength=0x0000
> Jun 20 13:53:09 riviera kernel: usbd_get_endpoint:184:
> udev=0xffffff0016575800 iface_index=0 address=0x0 type=0x0 dir=0xff index=0
> Jun 20 13:53:09 riviera last message repeated 3 times
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usbd_callback_wrapper:1922: case 1-4 Jun 20 13:53:09 riviera kernel:
> usbd_do_request_callback:75: st=0
> Jun 20 13:53:09 riviera kernel: usbd_transfer_submit:1381:
> xfer=0xffffff8000aa0148, endpoint=0xffffff00165758d8, nframes=1, dir=write
> Jun 20 13:53:09 riviera kernel: usb_dump_endpoint:
> endpoint=0xffffff00165758d8 edesc=0xffffff0016575de4 isoc_next=0
> toggle_next=0 bEndpointAddress=0x00 Jun 20 13:53:09 riviera kernel:
> usb_dump_queue: endpoint=0xffffff00165758d8 xfer: Jun 20 13:53:09 riviera
> kernel: usbd_transfer_submit:1400: open
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0xffffff8000aa0148 (leave) Jun 20 13:53:09
> riviera kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun
> 20 13:53:09 riviera kernel: usbd_pipe_enter:1568: enter
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usbd_pipe_start:2296: start
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2543: cb
> 0xffffff8000aa0148 (leave) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0 (leave) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0 (leave) Jun 20 13:53:09 riviera kernel:
> usbd_transfer_done:2077: err=USB_ERR_NORMAL_COMPLETION Jun 20 13:53:09
> riviera kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun
> 20 13:53:09 riviera kernel: usbd_callback_wrapper:1922: case 1-4 Jun 20
> 13:53:09 riviera kernel: usbd_callback_wrapper_sub:2430:
> xfer=0xffffff8000aa0148 endpoint=0xffffff00165758d8 sts=0 alen=8, slen=8,
> afrm=1, nfrm=1 Jun 20 13:53:09 riviera kernel:
> usbd_callback_wrapper_sub:2466: xfer=0xffffff8000aa0148: Control transfer
> active on endpoint=0xffffff00165758d8 Jun 20 13:53:09 riviera kernel:
> usbd_do_request_callback:75: st=1
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2543: cb 0 (leave)
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usbd_callback_wrapper:1922: case 1-4 Jun 20 13:53:09 riviera kernel:
> usbd_do_request_callback:75: st=0
> Jun 20 13:53:09 riviera kernel: usbd_transfer_submit:1381:
> xfer=0xffffff8000aa0148, endpoint=0xffffff00165758d8, nframes=1, dir=write
> Jun 20 13:53:09 riviera kernel: usb_dump_endpoint:
> endpoint=0xffffff00165758d8 edesc=0xffffff0016575de4 isoc_next=0
> toggle_next=1 bEndpointAddress=0x00 Jun 20 13:53:09 riviera kernel:
> usb_dump_queue: endpoint=0xffffff00165758d8 xfer: Jun 20 13:53:09 riviera
> kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun 20
> 13:53:09 riviera kernel: usb_command_wrapper:2543: cb 0xffffff8000aa0148
> (leave) Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usbd_pipe_enter:1568: enter
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usbd_pipe_start:2296: start
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2543: cb
> 0xffffff8000aa0148 (leave) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0 (leave) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0 (leave) Jun 20 13:53:09 riviera kernel:
> usbd_transfer_done:2077: err=USB_ERR_NORMAL_COMPLETION Jun 20 13:53:09
> riviera kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun
> 20 13:53:09 riviera kernel: usbd_callback_wrapper:1922: case 1-4 Jun 20
> 13:53:09 riviera kernel: usbd_callback_wrapper_sub:2430:
> xfer=0xffffff8000aa0148 endpoint=0xffffff00165758d8 sts=0 alen=0, slen=0,
> afrm=1, nfrm=1 Jun 20 13:53:09 riviera kernel: usbd_do_request_callback:75:
> st=1
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2543: cb 0 (leave)
> Jun 20 13:53:09 riviera kernel: usb_set_device_state:2421: udev
> 0xffffff0016575800 state POWERED -> ADDRESSED Jun 20 13:53:09 riviera
> kernel: usbd_req_get_desc:699: id=0, type=1, index=0, max_len=8 Jun 20
> 13:53:09 riviera kernel: usbd_do_request_flags:272: udev=0xffffff0016575800
> bmRequestType=0x80 bRequest=0x06 wValue=0x0100 wIndex=0x0000 wLength=0x0008
> Jun 20 13:53:09 riviera kernel: usbd_transfer_stop:1675: close
> Jun 20 13:53:09 riviera kernel: usbd_transfer_done:2077:
> err=USB_ERR_CANCELLED Jun 20 13:53:09 riviera kernel:
> usbd_transfer_done:2084: not transferring Jun 20 13:53:09 riviera kernel:
> usbd_get_endpoint:184: udev=0xffffff0016575800 iface_index=0 address=0x0
> type=0x0 dir=0xff index=0 Jun 20 13:53:09 riviera last message repeated 3
> times
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usbd_callback_wrapper:1922: case 1-4 Jun 20 13:53:09 riviera kernel:
> usbd_do_request_callback:75: st=0
> Jun 20 13:53:09 riviera kernel: usbd_transfer_submit:1381:
> xfer=0xffffff8000aa0148, endpoint=0xffffff00165758d8, nframes=2, dir=write
> Jun 20 13:53:09 riviera kernel: usb_dump_endpoint:
> endpoint=0xffffff00165758d8 edesc=0xffffff0016575de4 isoc_next=0
> toggle_next=0 bEndpointAddress=0x00 Jun 20 13:53:09 riviera kernel:
> usb_dump_queue: endpoint=0xffffff00165758d8 xfer: Jun 20 13:53:09 riviera
> kernel: usbd_transfer_submit:1400: open
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0xffffff8000aa0148 (leave) Jun 20 13:53:09
> riviera kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun
> 20 13:53:09 riviera kernel: usb_command_wrapper:2543: cb 0xffffff8000aa0148
> (leave) Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usbd_pipe_enter:1568: enter
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usbd_pipe_start:2296: start
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2543: cb
> 0xffffff8000aa0148 (leave) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0 (leave) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0 (leave) Jun 20 13:53:09 riviera kernel:
> usbd_transfer_done:2077: err=USB_ERR_NORMAL_COMPLETION Jun 20 13:53:09
> riviera kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun
> 20 13:53:09 riviera kernel: usbd_callback_wrapper:1922: case 1-4 Jun 20
> 13:53:09 riviera kernel: usbd_callback_wrapper_sub:2430:
> xfer=0xffffff8000aa0148 endpoint=0xffffff00165758d8 sts=0 alen=16, slen=16,
> afrm=2, nfrm=2 Jun 20 13:53:09 riviera kernel: usbd_do_request_callback:75:
> st=1
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2543: cb 0 (leave)
> Jun 20 13:53:09 riviera kernel: usb_alloc_device:1622: adding unit addr=2,
> rev=110, class=0, subclass=0, protocol=0, maxpacket=8, len=8, speed=1 Jun
> 20 13:53:09 riviera kernel: usbd_req_get_device_desc:1023:
> Jun 20 13:53:09 riviera kernel: usbd_req_get_desc:699: id=0, type=1,
> index=0, max_len=18 Jun 20 13:53:09 riviera kernel:
> usbd_do_request_flags:272: udev=0xffffff0016575800 bmRequestType=0x80
> bRequest=0x06 wValue=0x0100 wIndex=0x0000 wLength=0x0012 Jun 20 13:53:09
> riviera kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun
> 20 13:53:09 riviera kernel: usbd_callback_wrapper:1922: case 1-4 Jun 20
> 13:53:09 riviera kernel: usbd_do_request_callback:75: st=0
> Jun 20 13:53:09 riviera kernel: usbd_transfer_submit:1381:
> xfer=0xffffff8000aa0148, endpoint=0xffffff00165758d8, nframes=2, dir=read
> Jun 20 13:53:09 riviera kernel: usb_dump_endpoint:
> endpoint=0xffffff00165758d8 edesc=0xffffff0016575de4 isoc_next=0
> toggle_next=0 bEndpointAddress=0x00 Jun 20 13:53:09 riviera kernel:
> usb_dump_queue: endpoint=0xffffff00165758d8 xfer: Jun 20 13:53:09 riviera
> kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun 20
> 13:53:09 riviera kernel: usb_command_wrapper:2543: cb 0xffffff8000aa0148
> (leave) Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0xffffff8000aa0148 (leave) Jun 20 13:53:09
> riviera kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun
> 20 13:53:09 riviera kernel: usbd_pipe_enter:1568: enter
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usbd_pipe_start:2296: start
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2543: cb
> 0xffffff8000aa0148 (leave) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0 (leave) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0 (leave) Jun 20 13:53:09 riviera kernel:
> usbd_transfer_done:2077: err=USB_ERR_STALLED Jun 20 13:53:09 riviera
> kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun 20
> 13:53:09 riviera kernel: usbd_callback_wrapper:1922: case 1-4 Jun 20
> 13:53:09 riviera kernel: usbd_callback_wrapper_sub:2430:
> xfer=0xffffff8000aa0148 endpoint=0xffffff00165758d8 sts=22 alen=8, slen=26,
> afrm=1, nfrm=2 Jun 20 13:53:09 riviera kernel: usbd_do_request_callback:75:
> st=2
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2543: cb 0 (leave)
> Jun 20 13:53:09 riviera kernel: usbd_transfer_stop:1675: close
> Jun 20 13:53:09 riviera kernel: usbd_transfer_done:2077:
> err=USB_ERR_CANCELLED Jun 20 13:53:09 riviera kernel:
> usbd_transfer_done:2084: not transferring Jun 20 13:53:09 riviera kernel:
> usbd_do_request_flags:272: udev=0xffffff0005bb8800 bmRequestType=0xa3
> bRequest=0x00 wValue=0x0000 wIndex=0x0001 wLength=0x0004 Jun 20 13:53:09
> riviera kernel: usbd_do_request_flags:307: Handle Request function is set
> Jun 20 13:53:09 riviera kernel: usbd_do_request_flags:272:
> udev=0xffffff0005bb8800 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000
> wIndex=0x0002 wLength=0x0004 Jun 20 13:53:09 riviera kernel:
> usbd_do_request_flags:307: Handle Request function is set Jun 20 13:53:09
> riviera kernel: usbd_do_request_flags:272: udev=0xffffff0005bb8800
> bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0003 wLength=0x0004
> Jun 20 13:53:09 riviera kernel: usbd_do_request_flags:307: Handle Request
> function is set Jun 20 13:53:09 riviera kernel: usbd_do_request_flags:272:
> udev=0xffffff0005bb8800 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000
> wIndex=0x0004 wLength=0x0004 Jun 20 13:53:09 riviera kernel:
> usbd_do_request_flags:307: Handle Request function is set Jun 20 13:53:09
> riviera kernel: usbd_do_request_flags:272: udev=0xffffff0005bb8800
> bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0005 wLength=0x0004
> Jun 20 13:53:09 riviera kernel: usbd_do_request_flags:307: Handle Request
> function is set Jun 20 13:53:09 riviera kernel: usbd_do_request_flags:272:
> udev=0xffffff0005bb8800 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000
> wIndex=0x0006 wLength=0x0004 Jun 20 13:53:09 riviera kernel:
> usbd_do_request_flags:307: Handle Request function is set Jun 20 13:53:09
> riviera kernel: usbd_do_request_flags:272: udev=0xffffff0005bb5800
> bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0001 wLength=0x0004
> Jun 20 13:53:09 riviera kernel: usbd_do_request_flags:307: Handle Request
> function is set Jun 20 13:53:09 riviera kernel: usbd_do_request_flags:272:
> udev=0xffffff0005bb5800 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000
> wIndex=0x0002 wLength=0x0004 Jun 20 13:53:09 riviera kernel:
> usbd_do_request_flags:307: Handle Request function is set Jun 20 13:53:09
> riviera kernel: usbd_do_request_flags:272: udev=0xffffff0005bb5800
> bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0003 wLength=0x0004
> Jun 20 13:53:09 riviera kernel: usbd_do_request_flags:307: Handle Request
> function is set Jun 20 13:53:09 riviera kernel: usbd_do_request_flags:272:
> udev=0xffffff0005bb5800 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000
> wIndex=0x0004 wLength=0x0004 Jun 20 13:53:09 riviera kernel:
> usbd_do_request_flags:307: Handle Request function is set Jun 20 13:53:09
> riviera kernel: usbd_do_request_flags:272: udev=0xffffff0005bb5800
> bmRequestType=0xa3 bRequest=0x00 wValue=0x0000 wIndex=0x0005 wLength=0x0004
> Jun 20 13:53:09 riviera kernel: usbd_do_request_flags:307: Handle Request
> function is set Jun 20 13:53:09 riviera kernel: usbd_do_request_flags:272:
> udev=0xffffff0005bb5800 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000
> wIndex=0x0006 wLength=0x0004 Jun 20 13:53:09 riviera kernel:
> usbd_do_request_flags:307: Handle Request function is set Jun 20 13:53:09
> riviera kernel: usbd_do_request_flags:272: udev=0xffffff0016575800
> bmRequestType=0x80 bRequest=0x06 wValue=0x0100 wIndex=0x0000 wLength=0x0012
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usbd_callback_wrapper:1922: case 1-4 Jun 20 13:53:09 riviera kernel:
> usbd_do_request_callback:75: st=0
> Jun 20 13:53:09 riviera kernel: usbd_transfer_submit:1381:
> xfer=0xffffff8000aa0148, endpoint=0xffffff00165758d8, nframes=2, dir=read
> Jun 20 13:53:09 riviera kernel: usb_dump_endpoint:
> endpoint=0xffffff00165758d8 edesc=0xffffff0016575de4 isoc_next=0
> toggle_next=1 bEndpointAddress=0x00 Jun 20 13:53:09 riviera kernel:
> usb_dump_queue: endpoint=0xffffff00165758d8 xfer: Jun 20 13:53:09 riviera
> kernel: usbd_transfer_submit:1400: open
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0xffffff8000aa0148 (leave) Jun 20 13:53:09
> riviera kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun
> 20 13:53:09 riviera kernel: usb_command_wrapper:2543: cb 0xffffff8000aa0148
> (leave) Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usbd_pipe_enter:1568: enter
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usbd_pipe_start:2296: start
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2543: cb
> 0xffffff8000aa0148 (leave) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0 (leave) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0 (leave) Jun 20 13:53:09 riviera kernel:
> usbd_transfer_done:2077: err=USB_ERR_STALLED Jun 20 13:53:09 riviera
> kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun 20
> 13:53:09 riviera kernel: usbd_callback_wrapper:1922: case 1-4 Jun 20
> 13:53:09 riviera kernel: usbd_callback_wrapper_sub:2430:
> xfer=0xffffff8000aa0148 endpoint=0xffffff00165758d8 sts=22 alen=8, slen=26,
> afrm=1, nfrm=2 Jun 20 13:53:09 riviera kernel: usbd_do_request_callback:75:
> st=2
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2543: cb 0 (leave)
> Jun 20 13:53:09 riviera kernel: usbd_transfer_stop:1675: close
> Jun 20 13:53:09 riviera kernel: usbd_transfer_done:2077:
> err=USB_ERR_CANCELLED Jun 20 13:53:09 riviera kernel:
> usbd_transfer_done:2084: not transferring Jun 20 13:53:09 riviera kernel:
> usbd_do_request_flags:272: udev=0xffffff0016575800 bmRequestType=0x80
> bRequest=0x06 wValue=0x0100 wIndex=0x0000 wLength=0x0012 Jun 20 13:53:09
> riviera kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun
> 20 13:53:09 riviera kernel: usbd_callback_wrapper:1922: case 1-4 Jun 20
> 13:53:09 riviera kernel: usbd_do_request_callback:75: st=0
> Jun 20 13:53:09 riviera kernel: usbd_transfer_submit:1381:
> xfer=0xffffff8000aa0148, endpoint=0xffffff00165758d8, nframes=2, dir=read
> Jun 20 13:53:09 riviera kernel: usb_dump_endpoint:
> endpoint=0xffffff00165758d8 edesc=0xffffff0016575de4 isoc_next=0
> toggle_next=1 bEndpointAddress=0x00 Jun 20 13:53:09 riviera kernel:
> usb_dump_queue: endpoint=0xffffff00165758d8 xfer: Jun 20 13:53:09 riviera
> kernel: usbd_transfer_submit:1400: open
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0xffffff8000aa0148 (leave) Jun 20 13:53:09
> riviera kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun
> 20 13:53:09 riviera kernel: usb_command_wrapper:2543: cb 0xffffff8000aa0148
> (leave) Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usbd_pipe_enter:1568: enter
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:09 riviera kernel:
> usbd_pipe_start:2296: start
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2543: cb
> 0xffffff8000aa0148 (leave) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0 (leave) Jun 20 13:53:09 riviera kernel:
> usb_command_wrapper:2543: cb 0 (leave) Jun 20 13:53:09 riviera kernel:
> usbd_transfer_done:2077: err=USB_ERR_STALLED Jun 20 13:53:09 riviera
> kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun 20
> 13:53:09 riviera kernel: usbd_callback_wrapper:1922: case 1-4 Jun 20
> 13:53:09 riviera kernel: usbd_callback_wrapper_sub:2430:
> xfer=0xffffff8000aa0148 endpoint=0xffffff00165758d8 sts=22 alen=8, slen=26,
> afrm=1, nfrm=2 Jun 20 13:53:09 riviera kernel: usbd_do_request_callback:75:
> st=2
> Jun 20 13:53:09 riviera kernel: usb_command_wrapper:2543: cb 0 (leave)
> Jun 20 13:53:09 riviera kernel: usbd_transfer_stop:1675: close
> Jun 20 13:53:09 riviera kernel: usbd_transfer_done:2077:
> err=USB_ERR_CANCELLED Jun 20 13:53:09 riviera kernel:
> usbd_transfer_done:2084: not transferring Jun 20 13:53:10 riviera kernel:
> usbd_do_request_flags:272: udev=0xffffff0016575800 bmRequestType=0x80
> bRequest=0x06 wValue=0x0100 wIndex=0x0000 wLength=0x0012 Jun 20 13:53:10
> riviera kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun
> 20 13:53:10 riviera kernel: usbd_callback_wrapper:1922: case 1-4 Jun 20
> 13:53:10 riviera kernel: usbd_do_request_callback:75: st=0
> Jun 20 13:53:10 riviera kernel: usbd_transfer_submit:1381:
> xfer=0xffffff8000aa0148, endpoint=0xffffff00165758d8, nframes=2, dir=read
> Jun 20 13:53:10 riviera kernel: usb_dump_endpoint:
> endpoint=0xffffff00165758d8 edesc=0xffffff0016575de4 isoc_next=0
> toggle_next=1 bEndpointAddress=0x00 Jun 20 13:53:10 riviera kernel:
> usb_dump_queue: endpoint=0xffffff00165758d8 xfer: Jun 20 13:53:10 riviera
> kernel: usbd_transfer_submit:1400: open
> Jun 20 13:53:10 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:10 riviera kernel:
> usb_command_wrapper:2543: cb 0xffffff8000aa0148 (leave) Jun 20 13:53:10
> riviera kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun
> 20 13:53:10 riviera kernel: usb_command_wrapper:2543: cb 0xffffff8000aa0148
> (leave) Jun 20 13:53:10 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:10 riviera kernel:
> usbd_pipe_enter:1568: enter
> Jun 20 13:53:10 riviera kernel: usb_command_wrapper:2541: cb
> 0xffffff8000aa0148 (enter) Jun 20 13:53:10 riviera kernel:
> usbd_pipe_start:2296: start
> Jun 20 13:53:10 riviera kernel: usb_command_wrapper:2543: cb
> 0xffffff8000aa0148 (leave) Jun 20 13:53:10 riviera kernel:
> usb_command_wrapper:2543: cb 0 (leave) Jun 20 13:53:10 riviera kernel:
> usb_command_wrapper:2543: cb 0 (leave) Jun 20 13:53:10 riviera kernel:
> usbd_transfer_done:2077: err=USB_ERR_STALLED Jun 20 13:53:10 riviera
> kernel: usb_command_wrapper:2541: cb 0xffffff8000aa0148 (enter) Jun 20
> 13:53:10 riviera kernel: usbd_callback_wrapper:1922: case 1-4 Jun 20
> 13:53:10 riviera kernel: usbd_callback_wrapper_sub:2430:
> xfer=0xffffff8000aa0148 endpoint=0xffffff00165758d8 sts=22 alen=8, slen=26,
> afrm=1, nfrm=2 Jun 20 13:53:10 riviera kernel: usbd_do_request_callback:75:
> st=2
> Jun 20 13:53:10 riviera kernel: usb_command_wrapper:2543: cb 0 (leave)
> Jun 20 13:53:10 riviera kernel: usbd_transfer_stop:1675: close
> Jun 20 13:53:10 riviera kernel: usbd_transfer_done:2077:
> err=USB_ERR_CANCELLED Jun 20 13:53:10 riviera kernel:
> usbd_transfer_done:2084: not transferring Jun 20 13:53:10 riviera kernel:
> usb_alloc_device:1628: addr=2, getting full desc failed Jun 20 13:53:10
> riviera kernel: usb_free_device:1920: udev=0xffffff0016575800 port=1 Jun 20
> 13:53:10 riviera kernel: usb_set_device_state:2421: udev 0xffffff0016575800
> state ADDRESSED -> DETACHED Jun 20 13:53:10 riviera kernel: ugen4.2:
> <(null)> at usbus4 (disconnected) Jun 20 13:53:10 riviera kernel:
> usb_detach_device:1037: udev=0xffffff0016575800 Jun 20 13:53:10 riviera
> kernel: usb_cdev_free:1887: Freeing device nodes Jun 20 13:53:10 riviera
> kernel: usb_config_parse:618: iface_index=255 cmd=1 Jun 20 13:53:10 riviera
> kernel: uhub_reattach_port:416: could not allocate new device!
>

In /sys/dev/usb/usb_device.c :

There is some code to re-enumerate the device, when errors are detected. Maybe 
we should add an automatic re-enumeration in case the full device descriptor 
cannot be retrieved aswell.

Search for:
       err = usbd_req_get_desc(udev, NULL, NULL, &udev->ddesc,
            USB_MAX_IPACKET, USB_MAX_IPACKET, 0, UDESC_DEVICE, 0, 0);
        if (err) {
                DPRINTFN(0, "getting device descriptor "
                    "at addr %d failed, %s!\n", udev->address,
                    usbd_errstr(err));
                /* XXX try to re-enumerate the device */
                err = usbd_req_re_enumerate(udev, NULL);
                if (err) {
                        goto done;
                }
        }

Some lines down you patch the code like this:

        /* get the full device descriptor */
        err = usbd_req_get_device_desc(udev, NULL, &udev->ddesc);
        if (err) {
                DPRINTF("addr=%d, getting full desc failed\n",
                    udev->address);
+                /* XXX try to re-enumerate the device */
+                err = usbd_req_re_enumerate(udev, NULL);
+                if (err) {
+                        goto done;
+                }
-                goto done;
        }

--HPS
Received on Sat Jun 20 2009 - 22:55:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:50 UTC