Date: Fri, 26 Jun 2020 10:54:34 +0200 From: Hans Petter Selasky <hps@selasky.org> To: Jan Behrens <jbe-mlist@magnetkern.de>, freebsd-usb@freebsd.org Subject: Re: USB reset fails when using a LimeSDR Mini on FreeBSD Message-ID: <abdabfa4-b0f1-9f25-337b-0e2817b69d31@selasky.org> In-Reply-To: <20200626093705.12d3ac4bfa8d82f0b2ae1dd6@magnetkern.de> References: <20200625121052.e9f7e7cbeb68fad264ec80a9@magnetkern.de> <20200625195943.a6b32addb3c66c3294ed78ef@magnetkern.de> <20200626093705.12d3ac4bfa8d82f0b2ae1dd6@magnetkern.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On 2020-06-26 09:37, Jan Behrens wrote: > 1. Are there (intended or accidental/unwanted) API and/or behaviour > differences between Linux/macOS's libusb. Are there certain > considerations when building apps that use libusb? Is it wrong to call > libusb_reset_device() in a driver? If yes, why? If no, what is the > function used for? Some devices are only tested using Windows, and I know that timing may affect how libusb_reset_device() works. My guess is that libusb_reset_device() should only be used in the case you've uploaded new firmware to the device, and that USB stack on the device has been rebooted. In FreeBSD there are a bunch of sysctl's which affect the libusb reset device behaviour: hw.usb.timings.extra_power_up_time: 20 hw.usb.timings.resume_recovery: 50 hw.usb.timings.resume_wait: 50 hw.usb.timings.resume_delay: 250 hw.usb.timings.set_address_settle: 10 hw.usb.timings.port_resume_delay: 40 hw.usb.timings.port_powerup_delay: 300 hw.usb.timings.port_reset_recovery: 250 hw.usb.timings.port_root_reset_delay: 200 hw.usb.timings.port_reset_delay: 50 In order to figure out exactly what is wrong, you need to have a USB analyzer, capturing all USB communications on the USB cable. --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?abdabfa4-b0f1-9f25-337b-0e2817b69d31>