AnsweredAssumed Answered

g_mass_storage device dependency on HW?

Question asked by Dan MacDonald on Mar 22, 2018
Latest reply on Mar 23, 2018 by Dan MacDonald

My device needs to auto-mount to a PC as a USB mass storage device.

I have implemented a partition for user data on my device, formatted it to fat, and launch the g_mass_storage.ko driver:

 

modprobe g_mass_storage file=/dev/mmcblk2p3 removable=1

 

The drive successfully mounts as a USB Mass Storage device on some PCs. BUT on some other PCs the device is NOT recognized. I have narrowed down the culprit as a possible HW dependency, here's why:

 

1) Plug IMX into Windows PC "A". auto-mount is successful

2) Plug IMX into Ubuntu PC "B". auto-mount is successful

3) Plug IMX into Windows PC "C". auto-mount is NOT successful

4) Boot PC "C" into Ubuntu. IMX auto-mount is NOT successful  --> Therefore, not a silly Windows driver issue

Now Add a Cheap USB hub in between the PC and IMX (IMX-->USB HUB---> PC)

5) Plug IMX -->USB HUB --> Ubuntu PC "C" . auto-mount is successful !!!

6) Boot PC "C" into Windows again. Plug IMX -->USB HUB --> Windows PC "C" . auto-mount is successful !!!

 

Here is my IMX output when modprobing:

# modprobe g_mass_storage file=/dev/mmcblk2p3 removable=1
[ 1441.573884] Number of LUNs=8
[ 1441.580845] Mass Storage Function, version: 2009/09/11
[ 1441.586390] LUN: removable file: (no medium)
[ 1441.596948] Number of LUNs=1
[ 1441.603800] LUN: removable file: /dev/mmcblk2p3
[ 1441.609030] Number of LUNs=1
[ 1441.618926] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
[ 1441.626486] g_mass_storage gadget: userspace failed to provide iSerialNumber
[ 1441.634116] g_mass_storage gadget: g_mass_storage ready

 

The output when it successfully mounts:

[ 2696.409919] g_mass_storage gadget: high-speed config #1: Linux File-Backed Storage

 

When mounted to PC "A" the VID, PID, Rev are:

VID 0x0525 - driver default

PID 0xA4A5 - driver default

REV 0x0314 

 

I'd like to fix this, but I'm at a loss of how to do this if its a HW dependency.

Outcomes