Date: Wed, 09 Oct 2013 08:53:38 +0200 From: Hans Petter Selasky <hps@bitfrost.no> To: "aseem.jolly" <aseem.jolly@gmail.com> Cc: freebsd-usb@freebsd.org Subject: Re: USB device configuration Message-ID: <5254FD72.2050507@bitfrost.no> In-Reply-To: <1381274499940-5850403.post@n5.nabble.com> References: <1381274499940-5850403.post@n5.nabble.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5254FD72.2050507>