Re: Small example program shut down urtwn

2016-09-05 Thread Adrian Chadd
hm, interesting! I wonder if urtwn and/or usb is missing some bus barriers for ARM or something? -a On 4 September 2016 at 14:18, Otacílio wrote: > Dears > > I wrote these two small programs to help debug a problem that I think I have > found when using urtwn driver in a baglebone black. The p

Re: Deadlock between device_detach() and usbd_do_request_flags()

2016-09-05 Thread Hans Petter Selasky
On 09/05/16 12:21, Andriy Voskoboinyk wrote: Mon, 05 Sep 2016 12:10:34 +0300 було написано Hans Petter Selasky : Works fine, thanks! P.S. Reliable test case: 1) ifconfig wlan1 create wlandev 2) wpa_supplicant -i wlan1 -c /etc/wpa_supplicant.conf & * wait for CTRL-EVENT-CONNECTED event 3) us

Re: Deadlock between device_detach() and usbd_do_request_flags()

2016-09-05 Thread Andriy Voskoboinyk
Mon, 05 Sep 2016 12:10:34 +0300 було написано Hans Petter Selasky : Works fine, thanks! P.S. Reliable test case: 1) ifconfig wlan1 create wlandev 2) wpa_supplicant -i wlan1 -c /etc/wpa_supplicant.conf & * wait for CTRL-EVENT-CONNECTED event 3) usbconfig -d . power_off Hi, Can you test t

Re: Deadlock between device_detach() and usbd_do_request_flags()

2016-09-05 Thread Hans Petter Selasky
Hi, Can you test the attached patch? Does it solve your issue? --HPS Index: sys/dev/usb/usb_device.c === --- sys/dev/usb/usb_device.c (revision 304569) +++ sys/dev/usb/usb_device.c (working copy) @@ -1585,6 +1585,7 @@ /* initialis

Re: Deadlock between device_detach() and usbd_do_request_flags()

2016-09-05 Thread Hans Petter Selasky
On 09/05/16 09:53, Hans Petter Selasky wrote: Hi, I think the right solution is to let usbd_do_request_flags() use its own SX lock for synchronization, instead of re-using the enumeration SX lock. What do you think about that? --HPS Hi, Another approach which will work is to setup your own

Re: Deadlock between device_detach() and usbd_do_request_flags()

2016-09-05 Thread Hans Petter Selasky
On 09/04/16 23:20, Andriy Voskoboinyk wrote: There is a rare, but reproducible deadlock for wlan(4) drivers: Thread 1: * uhub_explore_handle_re_enumerate() (obtains enum_sx lock) * usbd_set_config_index() * usb_unconfigure() * usb_detach_device() * usb_detach_device_sub() * typically