Date: Thu, 2 Jul 2020 10:41:42 +0200 From: Hans Petter Selasky <hps@selasky.org> To: Jan Behrens <jbe-mlist@magnetkern.de>, "freebsd-usb@FreeBSD.org" <freebsd-usb@freebsd.org> Subject: Re: USB reset fails when using a LimeSDR Mini on FreeBSD Message-ID: <97c8fd11-9200-dff7-4c68-b0b80cc44871@selasky.org> In-Reply-To: <20200702103523.adb0566bcc7b6e354905a8a5@magnetkern.de> References: <20200625121052.e9f7e7cbeb68fad264ec80a9@magnetkern.de> <CAM8r67DFFeFCHMh6mAxw=x2LKYnFGwasOLgceo-EQSMOvMHbeg@mail.gmail.com> <20200625200849.6af81489a80c2f97d4f89ee6@magnetkern.de> <CAM8r67AE1K9AK%2BaL4RCn6_BWajvzKO7K99bYZMdH0mr-HQdyGw@mail.gmail.com> <20200625224522.44d6584465cb6e20d17be320@magnetkern.de> <0ec3e5a3-7f31-d1cd-6862-6066c431aa80@selasky.org> <20200626135151.e5542cf97fad213c4ad661f2@magnetkern.de> <5c0729f9-9e98-52f7-a5cb-6c5dfd2287a3@selasky.org> <20200626172851.872f3a08fa6e632666683230@magnetkern.de> <CAM8r67AF%2BfGiqBr9A0863Za_zR-fG1FxGfNAqEvvafW=wTRmyQ@mail.gmail.com> <20200627144419.f14371695d9b62ea99106c4a@magnetkern.de> <CAM8r67DTKdj0%2BhkOegjBj-ywzWFq2CnS2sQed0mibSUeGp6HSQ@mail.gmail.com> <20200627173604.7f7b7777140e66dbad812fc7@magnetkern.de> <CAM8r67DqZzje=JnrT_R3d6Uo_NxjvGsvpydd1NOTrJHU2jHzQA@mail.gmail.com> <20200627180420.4b8012fb@ernst.home> <20200702103523.adb0566bcc7b6e354905a8a5@magnetkern.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-07-02 10:35, Jan Behrens wrote: > Thus Linux definitely behaves differently here. My question is: Can > and/or should FreeBSD be fixed to allow libusb_reset_device() as a user > or should a driver library be fixed to not use that call. This is an architectural problem. USB devices may have interfaces with independent drivers attached. If one USB interface driver is running as root and another USB interface driver is running as non-root, it doesn't make sense that the non-root device driver should be able to affect the root-one. Your LimeSDR device appears to be very simple, having just one USB device driver attaching to it. Just imagine some web-page trying to reset your USB device, just because it can! Yes, USB is also exposed to firefox nowadays :-) What we could do is to add a sysctl which controls the behaviour for this specific case. Would that be of any use to you? --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?97c8fd11-9200-dff7-4c68-b0b80cc44871>