* [PATCH] doc: usage: man-page for ums command
@ 2021-06-02 13:52 Patrick Delaunay
2021-06-02 18:06 ` Heinrich Schuchardt
0 siblings, 1 reply; 3+ messages in thread
From: Patrick Delaunay @ 2021-06-02 13:52 UTC (permalink / raw)
To: u-boot; +Cc: Patrick Delaunay, Heinrich Schuchardt, Simon Glass, U-Boot STM32
Provide a man-page for the ums command for USB Mass Storage.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---
doc/usage/index.rst | 1 +
doc/usage/ums.rst | 54 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+)
create mode 100644 doc/usage/ums.rst
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index 41b247bc62..1bab6ae3e9 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -43,3 +43,4 @@ Shell commands
scp03
size
true
+ ums
diff --git a/doc/usage/ums.rst b/doc/usage/ums.rst
new file mode 100644
index 0000000000..cf0e3a9479
--- /dev/null
+++ b/doc/usage/ums.rst
@@ -0,0 +1,54 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+ums command
+===========
+
+Synopsis
+--------
+
+::
+
+ <USB_controller> [<devtype>] <dev[:part]>
+
+Description
+-----------
+
+Use the USB Mass Storage class (also known as USB MSC or UMS) to make
+accessible a block device (based on UCLASS_BLK) to a host computing device and
+to enable file transfers between the host and the U-Boot device.
+
+This command "ums" stays in the USB's treatment loop until user enters Ctrl-C.
+
+USB_controller
+ USB device number
+
+devtype
+ block device interface, defaults to "mmc"
+
+dev
+ device number for devtype
+
+part
+ partition number, defaults to 0 (first partition)
+
+Example
+-------
+
+::
+
+ => ums 0 mmc 0
+ => ums 0 usb 1:2
+
+Configuration
+-------------
+
+The ums command is only available if CONFIG_CMD_USB_MASS_STORAGE=y.
+
+Return value
+------------
+
+The return value $? is set to 0 (true) when the USB stack was successfully
+started and interrupted Ctrl-C or after USB cable detection issue
+(timeout or cable removal).
+
+If an error occurs, the return value $? is set to 1 (false).
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] doc: usage: man-page for ums command
2021-06-02 13:52 [PATCH] doc: usage: man-page for ums command Patrick Delaunay
@ 2021-06-02 18:06 ` Heinrich Schuchardt
2021-06-04 14:27 ` Patrick DELAUNAY
0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2021-06-02 18:06 UTC (permalink / raw)
To: Patrick Delaunay, u-boot; +Cc: Simon Glass, U-Boot STM32
On 6/2/21 3:52 PM, Patrick Delaunay wrote:
> Provide a man-page for the ums command for USB Mass Storage.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
>
> doc/usage/index.rst | 1 +
> doc/usage/ums.rst | 54 +++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 55 insertions(+)
> create mode 100644 doc/usage/ums.rst
>
> diff --git a/doc/usage/index.rst b/doc/usage/index.rst
> index 41b247bc62..1bab6ae3e9 100644
> --- a/doc/usage/index.rst
> +++ b/doc/usage/index.rst
> @@ -43,3 +43,4 @@ Shell commands
> scp03
> size
> true
> + ums
> diff --git a/doc/usage/ums.rst b/doc/usage/ums.rst
> new file mode 100644
> index 0000000000..cf0e3a9479
> --- /dev/null
> +++ b/doc/usage/ums.rst
> @@ -0,0 +1,54 @@
> +.. SPDX-License-Identifier: GPL-2.0+
> +
> +ums command
> +===========
> +
> +Synopsis
> +--------
> +
> +::
> +
> + <USB_controller> [<devtype>] <dev[:part]>
> +
> +Description
> +-----------
> +
> +Use the USB Mass Storage class (also known as USB MSC or UMS) to make
> +accessible a block device (based on UCLASS_BLK) to a host computing device and
> +to enable file transfers between the host and the U-Boot device.
Thank you for writing this man-page.
Unfortunately it is still unclear to me how to use it. Is this related
to USB OTG? What requirements have to be met to use the command?
> +
> +This command "ums" stays in the USB's treatment loop until user enters Ctrl-C.
> +
> +USB_controller
> + USB device number
> +
> +devtype
> + block device interface, defaults to "mmc"
> +
> +dev
> + device number for devtype
> +
> +part
> + partition number, defaults to 0 (first partition)
> +
> +Example
> +-------
> +
> +::
> +
> + => ums 0 mmc 0
> + => ums 0 usb 1:2
> +
> +Configuration
> +-------------
> +
> +The ums command is only available if CONFIG_CMD_USB_MASS_STORAGE=y.
The symbol does not even depend on USB and mass storage being enabled. I
would have expected CONFIG_USB_GADGET and CONFIG_BLK as requirements.
Either this description or cmd/Kconfig is wrong. I suggest both to be
updated.
Best regards
Heinrich
> +
> +Return value
> +------------
> +
> +The return value $? is set to 0 (true) when the USB stack was successfully
> +started and interrupted Ctrl-C or after USB cable detection issue
> +(timeout or cable removal).
> +
> +If an error occurs, the return value $? is set to 1 (false).
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] doc: usage: man-page for ums command
2021-06-02 18:06 ` Heinrich Schuchardt
@ 2021-06-04 14:27 ` Patrick DELAUNAY
0 siblings, 0 replies; 3+ messages in thread
From: Patrick DELAUNAY @ 2021-06-04 14:27 UTC (permalink / raw)
To: Heinrich Schuchardt, u-boot; +Cc: Simon Glass, U-Boot STM32
Hi
On 6/2/21 8:06 PM, Heinrich Schuchardt wrote:
> On 6/2/21 3:52 PM, Patrick Delaunay wrote:
>> Provide a man-page for the ums command for USB Mass Storage.
>>
>> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
>> ---
>>
>> doc/usage/index.rst | 1 +
>> doc/usage/ums.rst | 54 +++++++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 55 insertions(+)
>> create mode 100644 doc/usage/ums.rst
>>
>> diff --git a/doc/usage/index.rst b/doc/usage/index.rst
>> index 41b247bc62..1bab6ae3e9 100644
>> --- a/doc/usage/index.rst
>> +++ b/doc/usage/index.rst
>> @@ -43,3 +43,4 @@ Shell commands
>> scp03
>> size
>> true
>> + ums
>> diff --git a/doc/usage/ums.rst b/doc/usage/ums.rst
>> new file mode 100644
>> index 0000000000..cf0e3a9479
>> --- /dev/null
>> +++ b/doc/usage/ums.rst
>> @@ -0,0 +1,54 @@
>> +.. SPDX-License-Identifier: GPL-2.0+
>> +
>> +ums command
>> +===========
>> +
>> +Synopsis
>> +--------
>> +
>> +::
>> +
>> + <USB_controller> [<devtype>] <dev[:part]>
>> +
>> +Description
>> +-----------
>> +
>> +Use the USB Mass Storage class (also known as USB MSC or UMS) to make
>> +accessible a block device (based on UCLASS_BLK) to a host computing
>> device and
>> +to enable file transfers between the host and the U-Boot device.
>
> Thank you for writing this man-page.
>
> Unfortunately it is still unclear to me how to use it. Is this related
> to USB OTG? What requirements have to be met to use the command?
>
it is linked to USB gadget (USB device), I will clarified in V2
>> +
>> +This command "ums" stays in the USB's treatment loop until user
>> enters Ctrl-C.
>> +
>> +USB_controller
>> + USB device number
>> +
>> +devtype
>> + block device interface, defaults to "mmc"
>> +
>> +dev
>> + device number for devtype
>> +
>> +part
>> + partition number, defaults to 0 (first partition)
>> +
>> +Example
>> +-------
>> +
>> +::
>> +
>> + => ums 0 mmc 0
>> + => ums 0 usb 1:2
>> +
>> +Configuration
>> +-------------
>> +
>> +The ums command is only available if CONFIG_CMD_USB_MASS_STORAGE=y.
>
> The symbol does not even depend on USB and mass storage being enabled. I
> would have expected CONFIG_USB_GADGET and CONFIG_BLK as requirements.
> Either this description or cmd/Kconfig is wrong. I suggest both to be
> updated.
>
yes it is a indirect dependency
=> if the CONFIG_USB_GADGET or CONFIG_BLK is not activated the ums
command don't compile (or work I don't sure)
CMD_USB_MASS_STORAGE => select USB_FUNCTION_MASS_STORAGE (witch depends
on USB_GADGET / USB)
CONFIG_BLK => required in usb_mass_storage.c (blk_dread/blk_dwrite)
I will add the 2 dependencies in V2
configCMD_USB_MASS_STORAGE
bool"UMS usb mass storage"
selectUSB_FUNCTION_MASS_STORAGE
+ depends onBLK&& USB_GADGET
help
USB mass storage support
> Best regards
>
> Heinrich
>
>
(...)
Regards
Patrick
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-04 14:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 13:52 [PATCH] doc: usage: man-page for ums command Patrick Delaunay
2021-06-02 18:06 ` Heinrich Schuchardt
2021-06-04 14:27 ` Patrick DELAUNAY
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.