Re: usb: gadget: f_mass_storage: detect eject

2018-08-30 Thread Nuno Gonçalves
On Tue, Aug 28, 2018 at 5:09 PM Alan Stern wrote: > There is another way: modprobe g_file_storage with appropriate > parameters. Yes, but I am using a composite device, with ACM and UMS, and also g_multi (Ethernet+ACM+UMS) is not a option since my HW does not support enough endpoints for this

Re: usb: gadget: f_mass_storage: detect eject

2018-08-29 Thread Felipe Balbi
Hi, Alan Stern writes: >> The only other files I find in sysfs are the ones referring to the >> module being loaded, but those do not change with eject. >> >> What should I look for? > > Somewhere under /sys/devices will be a directory for the system's USB > device controller. Beneath that

Re: usb: gadget: f_mass_storage: detect eject

2018-08-28 Thread Alan Stern
On Tue, 28 Aug 2018, Nuno Gonçalves wrote: > On Mon, Aug 20, 2018 at 4:23 PM Alan Stern wrote: > > It is expected. No notifications for host-initiated ejects were ever > > put into the f_mass_storage driver. > > > > I have never tried to use f_mass_storage under configfs. When you do, > > does

Re: usb: gadget: f_mass_storage: detect eject

2018-08-28 Thread Nuno Gonçalves
On Mon, Aug 20, 2018 at 4:23 PM Alan Stern wrote: > It is expected. No notifications for host-initiated ejects were ever > put into the f_mass_storage driver. > > I have never tried to use f_mass_storage under configfs. When you do, > does the driver create its normal sysfs files? Is there any

Re: usb: gadget: f_mass_storage: detect eject

2018-08-20 Thread Alan Stern
On Sat, 18 Aug 2018, Nuno Gonçalves wrote: > Hi, > > I am trying to get some kind of notification when the host ejects a > f_mass_storage disk. > > When it happens, and the lun is removable, then the config > /sys/kernel/config/usb_gadget/*/functions/*/lun.*/file is cleared. > > I understand

usb: gadget: f_mass_storage: detect eject

2018-08-18 Thread Nuno Gonçalves
Hi, I am trying to get some kind of notification when the host ejects a f_mass_storage disk. When it happens, and the lun is removable, then the config /sys/kernel/config/usb_gadget/*/functions/*/lun.*/file is cleared. I understand that sysfs files can not be monitored with inotify, but some