All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] doc: usage: man-page for ums command
@ 2021-06-04 16:51 Patrick Delaunay
  2021-06-04 16:51 ` [PATCH v2 1/2] cmd: Add dependency " Patrick Delaunay
  2021-06-04 16:51 ` [PATCH v2 2/2] doc: usage: man-page " Patrick Delaunay
  0 siblings, 2 replies; 5+ messages in thread
From: Patrick Delaunay @ 2021-06-04 16:51 UTC (permalink / raw)
  To: u-boot
  Cc: Heinrich Schuchardt, Patrick Delaunay, Bin Meng,
	Frédéric Danis, Priyanka Jain, Simon Glass,
	U-Boot STM32


V2 for [1], after Heinrich remarks.

[1] doc: usage: man-page for ums command
http://patchwork.ozlabs.org/project/uboot/list/?series=246862&archive=both&state=*

Changes in v2:
- NEW: Add dependency for ums command
- clarify description
- add reference to <partitions> and align parameter name
- correct information for partition = 0 (expose all partitions)
- update dependency

Patrick Delaunay (2):
  cmd: Add dependency for ums command
  doc: usage: man-page for ums command

 cmd/Kconfig         |  5 +++-
 doc/usage/index.rst |  1 +
 doc/usage/ums.rst   | 57 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 62 insertions(+), 1 deletion(-)
 create mode 100644 doc/usage/ums.rst

-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/2] cmd: Add dependency for ums command
  2021-06-04 16:51 [PATCH v2 0/2] doc: usage: man-page for ums command Patrick Delaunay
@ 2021-06-04 16:51 ` Patrick Delaunay
  2021-06-08 22:04   ` Heinrich Schuchardt
  2021-06-04 16:51 ` [PATCH v2 2/2] doc: usage: man-page " Patrick Delaunay
  1 sibling, 1 reply; 5+ messages in thread
From: Patrick Delaunay @ 2021-06-04 16:51 UTC (permalink / raw)
  To: u-boot
  Cc: Heinrich Schuchardt, Patrick Delaunay, Bin Meng,
	Frédéric Danis, Priyanka Jain, Simon Glass,
	U-Boot STM32

Add the missing dependency for the command ums:
- CONFIG_BLK: call of blk_* functions in usb_mass_storage.c
- CONFIG_USB_GADGET: required to select CONFIG_USB_FUNCTION_MASS_STORAGE

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

Changes in v2:
- NEW: Add dependency for ums command

 cmd/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index f962bb7141..a9fb4eead2 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1346,8 +1346,11 @@ config CMD_ROCKUSB
 config CMD_USB_MASS_STORAGE
 	bool "UMS usb mass storage"
 	select USB_FUNCTION_MASS_STORAGE
+	depends on BLK && USB_GADGET
 	help
-	  USB mass storage support
+	  Enables the command "ums" and the USB mass storage support to the
+	  export a block device: U-Boot, the USB device, acts as a simple
+	  external hard drive plugged on the host USB port.
 
 config CMD_PVBLOCK
 	bool "Xen para-virtualized block device"
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/2] doc: usage: man-page for ums command
  2021-06-04 16:51 [PATCH v2 0/2] doc: usage: man-page for ums command Patrick Delaunay
  2021-06-04 16:51 ` [PATCH v2 1/2] cmd: Add dependency " Patrick Delaunay
@ 2021-06-04 16:51 ` Patrick Delaunay
  2021-06-08 22:10   ` Heinrich Schuchardt
  1 sibling, 1 reply; 5+ messages in thread
From: Patrick Delaunay @ 2021-06-04 16:51 UTC (permalink / raw)
  To: u-boot; +Cc: Heinrich Schuchardt, Patrick Delaunay, Simon Glass, U-Boot STM32

Provide a man-page for the ums command - USB Mass Storage.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

Changes in v2:
- clarify description
- add reference to <partitions> and align parameter name
- correct information for partition = 0 (expose all partitions)
- update dependency

 doc/usage/index.rst |  1 +
 doc/usage/ums.rst   | 57 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 58 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..19d2ebb4a6
--- /dev/null
+++ b/doc/usage/ums.rst
@@ -0,0 +1,57 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+ums command
+===========
+
+Synopsis
+--------
+
+::
+
+    <dev> [<interface>] <devnum[:partnum]>
+
+Description
+-----------
+
+Use the USB Mass Storage class (also known as UMS) to make accessible an U-Boot
+block device (fully or with :ref:`U-Boot's partition syntax <partitions>`)
+to a USB host and to enable file transfers. U-Boot, the USB device, acts as a
+simple external hard drive plugged on the host USB port.
+
+This command "ums" stays in the USB's treatment loop until user enters Ctrl-C.
+
+dev
+    USB gadget device number
+
+interface
+    interface for accessing the block device (mmc, sata, scsi, usb, ....)
+    defaults is "mmc"
+
+devnum
+    device number for selected interface
+
+partnum
+    partition number or 0 to expose all partitions, defaults to 0
+
+Example
+-------
+
+::
+
+    => ums 0 mmc 0
+    => ums 0 usb 1:2
+
+Configuration
+-------------
+
+The ums command is only available if CONFIG_CMD_USB_MASS_STORAGE=y
+and depends on CONFIG_USB_USB_GADGET and CONFIG_BLK.
+
+Return value
+------------
+
+The return value $? is set to 0 (true) when the USB stack was successfully
+started and interrupted, with Ctrl-C or after USB cable issue (detection
+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] 5+ messages in thread

* Re: [PATCH v2 1/2] cmd: Add dependency for ums command
  2021-06-04 16:51 ` [PATCH v2 1/2] cmd: Add dependency " Patrick Delaunay
@ 2021-06-08 22:04   ` Heinrich Schuchardt
  0 siblings, 0 replies; 5+ messages in thread
From: Heinrich Schuchardt @ 2021-06-08 22:04 UTC (permalink / raw)
  To: Patrick Delaunay, u-boot
  Cc: Bin Meng, Frédéric Danis, Priyanka Jain, Simon Glass,
	U-Boot STM32

On 6/4/21 6:51 PM, Patrick Delaunay wrote:
> Add the missing dependency for the command ums:
> - CONFIG_BLK: call of blk_* functions in usb_mass_storage.c
> - CONFIG_USB_GADGET: required to select CONFIG_USB_FUNCTION_MASS_STORAGE
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> ---
>
> Changes in v2:
> - NEW: Add dependency for ums command
>
>   cmd/Kconfig | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/cmd/Kconfig b/cmd/Kconfig
> index f962bb7141..a9fb4eead2 100644
> --- a/cmd/Kconfig
> +++ b/cmd/Kconfig
> @@ -1346,8 +1346,11 @@ config CMD_ROCKUSB
>   config CMD_USB_MASS_STORAGE
>   	bool "UMS usb mass storage"
>   	select USB_FUNCTION_MASS_STORAGE
> +	depends on BLK && USB_GADGET
>   	help
> -	  USB mass storage support
> +	  Enables the command "ums" and the USB mass storage support to the
> +	  export a block device: U-Boot, the USB device, acts as a simple
> +	  external hard drive plugged on the host USB port.
>
>   config CMD_PVBLOCK
>   	bool "Xen para-virtualized block device"
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 2/2] doc: usage: man-page for ums command
  2021-06-04 16:51 ` [PATCH v2 2/2] doc: usage: man-page " Patrick Delaunay
@ 2021-06-08 22:10   ` Heinrich Schuchardt
  0 siblings, 0 replies; 5+ messages in thread
From: Heinrich Schuchardt @ 2021-06-08 22:10 UTC (permalink / raw)
  To: Patrick Delaunay, u-boot; +Cc: Simon Glass, U-Boot STM32

On 6/4/21 6:51 PM, Patrick Delaunay wrote:
> Provide a man-page for the ums command - USB Mass Storage.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
>
> Changes in v2:
> - clarify description
> - add reference to <partitions> and align parameter name
> - correct information for partition = 0 (expose all partitions)
> - update dependency
>
>   doc/usage/index.rst |  1 +
>   doc/usage/ums.rst   | 57 +++++++++++++++++++++++++++++++++++++++++++++
>   2 files changed, 58 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..19d2ebb4a6
> --- /dev/null
> +++ b/doc/usage/ums.rst
> @@ -0,0 +1,57 @@
> +.. SPDX-License-Identifier: GPL-2.0+
> +
> +ums command
> +===========
> +
> +Synopsis
> +--------
> +
> +::
> +
> +    <dev> [<interface>] <devnum[:partnum]>

ums missing. I can add it when merging.

Otherwise

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


> +
> +Description
> +-----------
> +
> +Use the USB Mass Storage class (also known as UMS) to make accessible an U-Boot
> +block device (fully or with :ref:`U-Boot's partition syntax <partitions>`)
> +to a USB host and to enable file transfers. U-Boot, the USB device, acts as a
> +simple external hard drive plugged on the host USB port.
> +
> +This command "ums" stays in the USB's treatment loop until user enters Ctrl-C.
> +
> +dev
> +    USB gadget device number
> +
> +interface
> +    interface for accessing the block device (mmc, sata, scsi, usb, ....)
> +    defaults is "mmc"
> +
> +devnum
> +    device number for selected interface
> +
> +partnum
> +    partition number or 0 to expose all partitions, defaults to 0
> +
> +Example
> +-------
> +
> +::
> +
> +    => ums 0 mmc 0
> +    => ums 0 usb 1:2
> +
> +Configuration
> +-------------
> +
> +The ums command is only available if CONFIG_CMD_USB_MASS_STORAGE=y
> +and depends on CONFIG_USB_USB_GADGET and CONFIG_BLK.
> +
> +Return value
> +------------
> +
> +The return value $? is set to 0 (true) when the USB stack was successfully
> +started and interrupted, with Ctrl-C or after USB cable issue (detection
> +timeout or cable removal).
> +
> +If an error occurs, the return value $? is set to 1 (false).
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-08 22:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 16:51 [PATCH v2 0/2] doc: usage: man-page for ums command Patrick Delaunay
2021-06-04 16:51 ` [PATCH v2 1/2] cmd: Add dependency " Patrick Delaunay
2021-06-08 22:04   ` Heinrich Schuchardt
2021-06-04 16:51 ` [PATCH v2 2/2] doc: usage: man-page " Patrick Delaunay
2021-06-08 22:10   ` Heinrich Schuchardt

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.