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

Cannot write file to runtime added storages #89

Open
yana9i opened this issue May 23, 2023 · 0 comments
Open

Cannot write file to runtime added storages #89

yana9i opened this issue May 23, 2023 · 0 comments

Comments

@yana9i
Copy link

yana9i commented May 23, 2023

Hi,

I'm using a Firefly-RK3399 board with 4.4.194 kernel. And I'm using configfs mode to access the data from the board.
Storage entry points written in the configuration file works work properly. But when I try to add and mount some entry by the runtime command, I cannot write file to the entry point.

I added and mounted the entry point with the following commands:

umtprd "-cmd:addstorage:/tmp tmp rw"
umtprd "-cmd:mount:tmp"

And I tried to write some file to the entry point, Here is the debug info:

[uMTPrd - 07:31:56 - Debug] --------------------------------------------------
[uMTPrd - 07:31:56 - Debug] Incoming_packet : 0x5579ee8a40 - rawsize : 20
[uMTPrd - 07:31:56 - Debug] MTP Packet size : 20 bytes
[uMTPrd - 07:31:56 - Debug] MTP Operation   : 0x0001 (OPERATION)
[uMTPrd - 07:31:56 - Debug] MTP code        : 0x100C (MTP_OPERATION_SEND_OBJECT_INFO)
[uMTPrd - 07:31:56 - Debug] MTP Tx ID       : 0x0000003C
[uMTPrd - 07:31:56 - Debug] Header :
[uMTPrd - 07:31:56 - Debug] 14 00 00 00 01 00 0C 10 3C 00 00 00              ............
[uMTPrd - 07:31:56 - Debug] Payload :
[uMTPrd - 07:31:56 - Debug] 03 00 FF FF FF FF FF FF                          ........
[uMTPrd - 07:31:56 - Debug] MTP_OPERATION_SEND_OBJECT_INFO : Rx dataset...
[uMTPrd - 07:31:56 - Debug] B6 00 00 00 02 00 0C 10 3C 00 00 00 00 00 00 00  ................
................
// Omitted some debug info of the payload
................
[uMTPrd - 07:31:56 - Debug] 00 00 00 00                                      ....
[uMTPrd - 07:31:56 - Debug] mtp_get_storage_root : FFFF0002
[uMTPrd - 07:31:56 - Debug] mtp_get_storage_root : FFFF0002 -> /mnt/test
[uMTPrd - 07:31:56 - Debug] mtp_get_storage_flags : FFFF0002
[uMTPrd - 07:31:56 - Debug] mtp_get_storage_flags : FFFF0002 -> 0x00000002
[uMTPrd - 07:31:56 - Debug] mtp_get_storage_root : FFFF0002
[uMTPrd - 07:31:56 - Debug] mtp_get_storage_root : FFFF0002 -> /mnt/test
[uMTPrd - 07:31:56 - Debug] build_full_path : / -> /mnt/test//
[uMTPrd - 07:31:56 - Debug] mtp_get_storage_index_by_id : 0xFFFF0002
[uMTPrd - 07:31:56 - Debug] mtp_get_storage_index_by_id : FFFF0002 -> 1
[uMTPrd - 07:31:56 - Debug] Status response (12 Bytes):
[uMTPrd - 07:31:56 - Debug] 0C 00 00 00 03 00 02 20 3D 00 00 00              ........=...
[uMTPrd - 07:31:59 - Debug] 1 event(s)
[uMTPrd - 07:31:59 - Debug] EP0 FFS SETUP
[uMTPrd - 07:31:59 - Debug] Setup request 0x67
[uMTPrd - 07:31:59 - Debug] MTP_REQ_GET_DEVICE_STATUS !
[uMTPrd - 07:31:59 - Debug] Select without timeout
[uMTPrd - 07:32:02 - Debug] 1 event(s)
[uMTPrd - 07:32:02 - Debug] EP0 FFS SETUP
[uMTPrd - 07:32:02 - Debug] Setup request 0x67
[uMTPrd - 07:32:02 - Debug] MTP_REQ_GET_DEVICE_STATUS !
[uMTPrd - 07:32:02 - Debug] Select without timeout
[uMTPrd - 07:32:05 - Debug] 1 event(s)
[uMTPrd - 07:32:05 - Debug] EP0 FFS SETUP
[uMTPrd - 07:32:05 - Debug] Setup request 0x67
[uMTPrd - 07:32:05 - Debug] MTP_REQ_GET_DEVICE_STATUS !
[uMTPrd - 07:32:05 - Debug] Select without timeout
[uMTPrd - 07:32:08 - Debug] 1 event(s)
[uMTPrd - 07:32:08 - Debug] EP0 FFS SETUP
[uMTPrd - 07:32:08 - Debug] Setup request 0x67
[uMTPrd - 07:32:08 - Debug] MTP_REQ_GET_DEVICE_STATUS !
[uMTPrd - 07:32:08 - Debug] Select without timeout
[uMTPrd - 07:32:11 - Debug] 1 event(s)
[uMTPrd - 07:32:11 - Debug] EP0 FFS SETUP
[uMTPrd - 07:32:11 - Debug] Setup request 0x67
[uMTPrd - 07:32:11 - Debug] MTP_REQ_GET_DEVICE_STATUS !
[uMTPrd - 07:32:11 - Debug] Select without timeout
[uMTPrd - 07:32:14 - Debug] 1 event(s)
[uMTPrd - 07:32:14 - Debug] EP0 FFS SETUP
[uMTPrd - 07:32:14 - Debug] Setup request 0x67
[uMTPrd - 07:32:14 - Debug] MTP_REQ_GET_DEVICE_STATUS !
[uMTPrd - 07:32:14 - Debug] Select without timeout
[uMTPrd - 07:32:17 - Debug] 1 event(s)
[uMTPrd - 07:32:17 - Debug] EP0 FFS SETUP
[uMTPrd - 07:32:17 - Debug] Setup request 0x67
[uMTPrd - 07:32:17 - Debug] MTP_REQ_GET_DEVICE_STATUS !
[uMTPrd - 07:32:17 - Debug] Select without timeout
[uMTPrd - 07:32:20 - Debug] 1 event(s)
[uMTPrd - 07:32:20 - Debug] EP0 FFS SETUP
[uMTPrd - 07:32:20 - Debug] Setup request 0x67
[uMTPrd - 07:32:20 - Debug] MTP_REQ_GET_DEVICE_STATUS !
[uMTPrd - 07:32:20 - Debug] Select without timeout
[uMTPrd - 07:32:23 - Debug] 1 event(s)
[uMTPrd - 07:32:23 - Debug] EP0 FFS SETUP
[uMTPrd - 07:32:23 - Debug] Setup request 0x67
[uMTPrd - 07:32:23 - Debug] MTP_REQ_GET_DEVICE_STATUS !
[uMTPrd - 07:32:23 - Debug] Select without timeout
[uMTPrd - 07:32:26 - Debug] 1 event(s)
[uMTPrd - 07:32:26 - Debug] EP0 FFS SETUP
[uMTPrd - 07:32:26 - Debug] Setup request 0x67
[uMTPrd - 07:32:26 - Debug] MTP_REQ_GET_DEVICE_STATUS !
[uMTPrd - 07:32:26 - Debug] Select without timeout
[uMTPrd - 07:32:26 - Debug] 1 event(s)
[uMTPrd - 07:32:26 - Debug] EP0 FFS SETUP
[uMTPrd - 07:32:26 - Debug] Setup request 0x64
[uMTPrd - 07:32:26 - Debug] MTP_REQ_CANCEL !
[uMTPrd - 07:32:56 - Debug] MTP_REQ_CANCEL : Forcing read/write exit...
[uMTPrd - 07:32:56 - Debug] MTP_REQ_CANCEL : Stalled ... Killing the link...
[uMTPrd - 07:32:56 - Debug] MTP_REQ_CANCEL done !
[uMTPrd - 07:32:56 - Debug] handle_ffs_ep0 : Leaving... (ctx->stop=1)
[uMTPrd - 07:32:56 - Debug] entering deinit_usb_mtp_gadget
[uMTPrd - 07:32:56 - Debug] Closing End Point 0...
[uMTPrd - 07:32:56 - Debug] Closing End Point 1...
[uMTPrd - 07:32:56 - Debug] Closing End Point 2...
[uMTPrd - 07:32:56 - Debug] Closing usb device...
[uMTPrd - 07:32:56 - Debug] Stopping USB Thread...
[uMTPrd - 07:32:56 - Debug] leaving deinit_usb_mtp_gadget
[uMTPrd - 07:32:56 - Info] uMTP Responder : Disconnected
[uMTPrd - 07:32:56 - Debug] deinit_fs_db called
[uMTPrd - 07:32:56 - Debug] msgqueue_thread : Leaving msgqueue_thread...
[uMTPrd - 07:32:56 - Debug] inotify_thread : read error -1

After this, the umtprd exits.

@yana9i yana9i changed the title Cannot write file to runtime added storage Cannot write file to runtime added storages May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant