Gadget Mass storage not working after standby/suspend on i.MX25

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Gadget Mass storage not working after standby/suspend on i.MX25

1,214 Views
vinaybondade
Contributor I

Hello All,

I am using main line Linux kernel 4.9.7 and have been trying to use the Gadget Mass storage functionality on i.MX25. When the system boots up, the vfat.img is exported correctly by i.MX25 through the Gadget Mass storage interface and Windows/Ubuntu PC is able to read/write to the removable disk. The problem comes when i.MX25 is put to standby and resumed. The gadget mass storage interface keeps enumerating /negotiating but never finishes. It keeps printing - "g_mass_storage gadget: high-speed config #1: Linux File-Backed Storage" message.

I have tried using both drivers/usb/gadget/legacy/g_mass_storage.ko and drivers/usb/gadget/function/usb_f_mass_storage.ko same result in both interfaces.

the Kernel configs related to USB Gadget Mass storage are as follows:

CONFIG_USB_PHY=y
CONFIG_NOP_USB_XCEIV=y
# CONFIG_AM335X_PHY_USB is not set
# CONFIG_USB_GPIO_VBUS is not set
# CONFIG_USB_ISP1301 is not set
# CONFIG_USB_MXS_PHY is not set
# CONFIG_USB_ULPI is not set
CONFIG_USB_GADGET=y
# CONFIG_USB_GADGET_DEBUG is not set
# CONFIG_USB_GADGET_DEBUG_FILES is not set
CONFIG_USB_GADGET_VBUS_DRAW=500
CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
CONFIG_USB_GADGET=y
# CONFIG_USB_GADGET_DEBUG is not set
# CONFIG_USB_GADGET_DEBUG_FILES is not set
CONFIG_USB_GADGET_VBUS_DRAW=500
CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
CONFIG_USB_CHIPIDEA=y
CONFIG_USB_CHIPIDEA_OF=y
CONFIG_USB_CHIPIDEA_UDC=y
CONFIG_USB_CHIPIDEA_HOST=y
CONFIG_USB_FUNCTIONFS_GENERIC=y
CONFIG_USB_MASS_STORAGE=m
CONFIG_USB_G_SERIAL=m
CONFIG_USB_FUNCTIONFS_GENERIC=y
CONFIG_USB_MASS_STORAGE=m
CONFIG_USB_G_SERIAL=m
CONFIG_USB_GADGETFS=m
CONFIG_USB_FUNCTIONFS=m

CONFIG_USB_LIBCOMPOSITE=m

CONFIG_USB_F_MASS_STORAGE=m

CONFIG_USB_F_FS=m

Please help.

Thanks,

Vinay

0 Kudos
2 Replies

758 Views
igorpadykov
NXP Employee
NXP Employee

Hi Vinay

in general issue may be caused by erratum ENGcm12381 CCM: PLL locks at lower frequency

when returning from a low power mode. Note, kernel 4.9.7 is not supported by nxp and this may be posted

on mainline kernel mail list.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

758 Views
vinaybondade
Contributor I

Hi igor,

Thanks for the response.

I was previously using Freescale (now nxp) supported Linux 2.6.31 and had the Mass storage gadget driver enabled but didn't face this problem. The Gadget Mass storage device worked fine after resuming from standby. Do you think the workaround for ENGcm12381 was implemented in Linux 2.6.31 BSP for i.MX25. If it was not implemented in nxp supported BSP for i.MX25 then we should have faced the same issue with Linux 2.6.31 ? Please point me to the correct file in Linux 2.6.31 that implements this workaround.

Thanks,

Vinay

0 Kudos