At this week i have installed the last version of OpenWRT (21.02.1) at my modded TP-Link MR3020 v1 (8MB SPI Flash, 64MB DDR SDRAM).
I switched USB port to 'device' mode with hardware mod (GPIO13) and turn on kmod modules for gadget mode with 'make menuconfig'. also I slightly corrected the config file 'ar9331_tplink_mr-3020_v1.dts for usb controller mode: 'host'-> 'peripheral'.
Firmware starts normally.
When i prompt command 'insmod g_mass_storage file=/image', host detects the new mass storage device with correct attributes (name, serial, sectors count).
For prevent buffer overload bugs, i check this module with very small image file (64KB).
Log for that stage: root@OpenWrt:/# insmod g_mass_storage file=backing_file
[ 348.897602] Mass Storage Function, version: 2009/09/11
[ 348.901303] LUN: removable file: (no medium)
[ 348.905837] LUN: file: /backing_file
[ 348.909104] Number of LUNs=1
[ 348.923787] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
[ 348.929305] g_mass_storage gadget: userspace failed to provide iSerialNumber
[ 348.936379] g_mass_storage gadget: g_mass_storage ready
root@OpenWrt:/# [ 349.412682] g_mass_storage gadget: high-speed config #1: Linux File-Backed Storage
But if i try to read sectors from that device - it is not succesfull. My host pc freezes for some seconds, and after pause device disconnected from host.
At this moment i see a restart of the OpenWRT with watchdog: