[Bug 261989] USB Joystick disconnects every three seconds

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 17 Feb 2022 11:07:42 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261989

--- Comment #4 from Jan Martin Mikkelsen <janm@transactionware.com> ---
I have tried on four machines, including through a root hub, an unpowered hub
and a powered hub. An iMac through an ordinary, unpowered, desktop hub connects
fine.

I just tested on a test machine (Atom E3950 based) with a single root hub and
no other USB devices and:

sysctl hw.usb.uhub.debug=9
sysctl hw.usb.dev.debug=9
sysctl hw.usb.debug=9
sysctl hw.usb.ctrl.debug=9
sysctl hw.usb.xhci.debug=9
sysctl hw.usb.ehci.debug=9
sysctl hw.usb.uhci.debug=9
sysctl hw.usb.ohci.debug=9

See the attachment for the full log. (Not my timezone, just the timezone of the
test machine.)

At lot happens in the second 21:31:43. At the end of 21:31:43, the device is
connected. In the second 21:31:45 there is a successful port status request on
port 4 with wPortChange=0.

At 21:31:46 this happens:

Feb 17 21:31:46 fitlet2-test kernel: xhci_interrupt_poll: Unhandled event = 34
Feb 17 21:31:46 fitlet2-test kernel: xhci_root_intr: port 4 changed
Feb 17 21:31:46 fitlet2-test kernel: usb_needs_explore:
Feb 17 21:31:46 fitlet2-test kernel: usb_bus_powerd: bus=0xfffffe0049b84428
Feb 17 21:31:46 fitlet2-test kernel: usb_bus_powerd: Recomputing power masks
Feb 17 21:31:46 fitlet2-test kernel: xhci_set_hw_power:

Followed by this a little later:

Feb 17 21:31:46 fitlet2-test kernel: usbd_do_request_flags:
udev=0xfffff80013035000 bmRequestType=0xa3 bRequest=0x00 wValue=0x0000
wIndex=0x0004 wLength=0x0004
Feb 17 21:31:46 fitlet2-test kernel: usbd_do_request_flags: Handle Request
function is set
Feb 17 21:31:46 fitlet2-test kernel: xhci_roothub_exec: type=0xa3 request=0x00
wLen=0x0004 wValue=0x0000 wIndex=0x0004
Feb 17 21:31:46 fitlet2-test kernel: xhci_roothub_exec: UR_GET_STATUS i=4
Feb 17 21:31:46 fitlet2-test kernel: xhci_roothub_exec: port status=0x000202a0
Feb 17 21:31:46 fitlet2-test kernel: uhub_read_port_status: port 4,
wPortStatus=0x06a0, wPortChange=0x0001, err=USB_ERR_NORMAL_COMPLETION
Feb 17 21:31:46 fitlet2-test kernel: uhub_reattach_port: reattaching port 4
Feb 17 21:31:46 fitlet2-test kernel: usbd_do_request_flags:
udev=0xfffff80013035000 bmRequestType=0x23 bRequest=0x01 wValue=0x0010
wIndex=0x0004 wLength=0x0000
Feb 17 21:31:46 fitlet2-test kernel: usbd_do_request_flags: Handle Request
function is set
Feb 17 21:31:46 fitlet2-test kernel: xhci_roothub_exec: type=0x23 request=0x01
wLen=0x0000 wValue=0x0010 wIndex=0x0004
Feb 17 21:31:46 fitlet2-test kernel: xhci_roothub_exec: UR_CLEAR_PORT_FEATURE
Feb 17 21:31:46 fitlet2-test kernel: usb_free_device: udev=0xfffff8006eaa4000
port=4
Feb 17 21:31:46 fitlet2-test kernel: usb_set_device_state: udev
0xfffff8006eaa4000 state CONFIGURED -> DETACHED

What is event 34? Does this shed any light on things?

-- 
You are receiving this mail because:
You are the assignee for the bug.