Date: Fri, 3 Jul 2020 11:06:59 +0200 From: Tomasz CEDRO <tomek@cedro.info> To: Hans Petter Selasky <hps@selasky.org> Cc: 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: <CAM8r67AKeLUfMqyL3_Ejh_2=LJrM-nCe22c7E3%2BiKLfBncxBRQ@mail.gmail.com> In-Reply-To: <4fdcdc92-6a0d-5645-0a10-e95d69001d3a@selasky.org> References: <20200625121052.e9f7e7cbeb68fad264ec80a9@magnetkern.de> <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> <97c8fd11-9200-dff7-4c68-b0b80cc44871@selasky.org> <20200702104743.223e98c325806025704703f2@magnetkern.de> <e3bd0417-c89c-5598-448e-33ec1e505a3f@selasky.org> <20200702111538.e7edf0ae8d10ec7ede9acebb@magnetkern.de> <9e14575a-5c8b-28c8-6593-22019a21e7e7@selasky.org> <20200702120655.73d1111e2de81c626be78139@magnetkern.de> <8ac365f3-3d33-4730-622e-e66f29dd5938@selasky.org> <20200702123747.1bdf36b9d2ebe283f7bb855e@magnetkern.de> <a6077d0e-71d6-4067-2651-428ce175b33b@selasky.org> <20200703095108.7ce5497f53ed4c4a3d7289e3@magnetkern.de> <4fdcdc92-6a0d-5645-0a10-e95d69001d3a@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
pt., 3 lip 2020, 10:10 u=C5=BCytkownik Hans Petter Selasky napisa=C5=82: > > I see three possible approaches currently: > > > > 1. Allowing a USB reset if the user has access to /dev/ugenX.Y (might > > allow users to mess with kernel's operation on a device, unless the > > problem exists anyway, see my questions above). > > > > 2. Allowing a USB reset if the user has access to /dev/ugenX.Y and > > there are other prerequirements fulfilled (e.g. a sysctl setting to > > enable it globally, which might not be fine-graded enough, or the > > requirement that there is currently no kernel driver attached, or a > > combination thereof). > > > > 3. Providing a way to grant "reset permissions" on a per-device basis > > (might be overkill, and not really needed). > > > > Maybe you're right we should allow this for non-root aswell. I need to > think about it! > +1 for user enabled actions like usb reset and kernel driver detach :-) maybe based on a sysctl like usermount, i.e. usb_allow_user_device_reset and usb_allow_user_kernel_driver_detach..? One would allow user to reset a usb device. This is sometimes required to restore device or change its configration. Second would allow user for example to unload ucom driver that is attached to a device which does not seem possible right now and causes problem with i.e. pyOCD / some debug probes. Best regards :-) Tomek -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM8r67AKeLUfMqyL3_Ejh_2=LJrM-nCe22c7E3%2BiKLfBncxBRQ>