Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#4135 - ATH79 - AR9331 gadget mode bug #9117

Open
openwrt-bot opened this issue Nov 9, 2021 · 0 comments
Open

FS#4135 - ATH79 - AR9331 gadget mode bug #9117

openwrt-bot opened this issue Nov 9, 2021 · 0 comments
Labels
flyspray release/21.02

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Nov 9, 2021

SergDatex:

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:

root@OpenWrt:/# [ 349.412682] g_mass_storage gadget: high-speed config #1: Linux File-Backed Storage


  • U-Boot 1.1.4-e5984195-clean     *
    
  •      Build: 2017-02-24          *
    

......
[ 3.927282] init: Console is alive
[ 3.930007] init: - watchdog -
[ 3.932844] init: Watchdog has previously reset the system
.......
[ 15.135549] procd: - early -
[ 15.137533] procd: - watchdog -
[ 15.140670] procd: Watchdog has previously reset the system
[ 16.233851] procd: - watchdog -
[ 16.236135] procd: Watchdog has previously reset the system
[ 16.244006] procd: - ubus -
[ 17.216758] urandom_read: 3 callbacks suppressed

i compiled the previous version (19.07.8 - Atheros AR7xxx/AR9xx -> Devices with small flash -> MR3020v1) - gadget mode (g_mass_storage) works fine at that board.

@aparcar aparcar added the release/21.02 label Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray release/21.02
Projects
None yet
Development

No branches or pull requests

2 participants