USB device configuration
Hans Petter Selasky
hps at bitfrost.no
Wed Oct 9 06:52:31 UTC 2013
On 10/09/13 01:21, aseem.jolly wrote:
> *usb_set_device_state(udev, USB_STATE_CONFIGURED);*
Hi,
Beware that this state is tracked by:
static void
xhci_device_state_change(struct usb_device *udev)
in dev/usb/controller/xhci.c
And changing this value forth and back will trigger events in the XHCI
driver at least.
It sounds more like we should set the configured state, only and only if
the configure function is successful at the end:
done:
if (err)
unconfigure();
else
usb_set_device_state(udev, USB_STATE_CONFIGURED);
Anyhow, if a second configure event fails after a successful one, we are
still in the configured state.
--HPS
More information about the freebsd-usb
mailing list