Question about USB gadget driver usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

We have linux-2.6.35 based device. Device has removable SD-card, which by certain condition is shared to PC vis USB connection using g_file_storage driver. Everything if fine, but when I manualy eject sd-card from cardholder, on my linux host machine, sd-card partition is still being mounted. In sources, there is a note, that if pass 'removable' parametr to g_file_storage module, locations specified by 'file' argument could be unmounted from sysfs by writing zero string to 'file'. But when try to do so, removal attempt is rejected in drivers/usb/gadget/storage_common.c:fsg_store_file() by first if-condition.
755         if (curlun->prevent_medium_removal && fsg_lun_is_open(curlun)) {
756                 printk("eject attempt prevented\n");
757                 return -EBUSY;                          /* "Door is locked" */
758         }
As far as I understand, my host-pc blocks driver to eject certain LUN.

Here is my parametrs to insert module
insmod /lib/modules/g_file_storage.ko stall=0 removable=1 file=/dev/mmcblk0p4,/dev/mmcblk1p1 ro=0,0
where /dev/mmcblk0p4 is device internal memory (chip is soldered to pcb, so it can not be ejected)
and /dev/mmcblk1p1 is removable sd-card

Is there any way to perform `force eject` for one of my LUNs ?

Thank you

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux