All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PULL] u-boot-usb/master
@ 2016-04-20  9:45 Marek Vasut
  2016-04-20 15:01 ` [U-Boot] [PATCH] cmd/usb_mass_storage.c: Rework ums_init() ret logic slightly Tom Rini
  2016-04-21 11:26 ` [U-Boot] [PULL] u-boot-usb/master Tom Rini
  0 siblings, 2 replies; 6+ messages in thread
From: Marek Vasut @ 2016-04-20  9:45 UTC (permalink / raw)
  To: u-boot

The following changes since commit 108f8418597350bd98357f25acaa8ab8a0435779:

  ARM: rpi: fix 64-bit CONFIG_SYS_TEXT_BASE (2016-04-16 09:02:17 -0400)

are available in the git repository at:

  git://git.denx.de/u-boot-usb.git master

for you to fetch changes up to e6c0bc0643e5a4387fecbcf83080d0b796eb067c:

  usb: gadget Move: CONFIG_G_DNL_* to Kconfig (2016-04-20 11:43:28 +0200)

----------------------------------------------------------------
John Tobias (2):
      USB: g_dnl: Change device class
      usb: ums - expose selected partition/s

Sam Protsenko (7):
      usb: gadget: Move CONFIG_USB_GADGET_VBUS_DRAW to Kconfig
      usb: gadget: Move CONFIG_USB_GADGET_DUALSPEED to Kconfig
      usb: gadget: Move CONFIG_USB_GADGET_DOWNLOAD to Kconfig
      usb: dwc3: Move CONFIG_USB_DWC3_GADGET/HOST to Kconfig
      usb: dwc3: Move CONFIG_USB_DWC3_OMAP to Kconfig
      usb: dwc3: Move CONFIG_USB_DWC3_PHY_* to Kconfig
      usb: gadget Move: CONFIG_G_DNL_* to Kconfig

 cmd/usb_mass_storage.c                       | 39
+++++++++++++++++++++++++++++----------
 configs/A13-OLinuXino_defconfig              |  4 ++++
 configs/CHIP_defconfig                       |  4 ++++
 configs/Cubietruck_defconfig                 |  4 ++++
 configs/am335x_baltos_defconfig              |  5 +++++
 configs/am335x_boneblack_defconfig           |  5 +++++
 configs/am335x_boneblack_vboot_defconfig     |  5 +++++
 configs/am335x_evm_defconfig                 |  5 +++++
 configs/am335x_evm_nor_defconfig             |  5 +++++
 configs/am335x_evm_norboot_defconfig         |  5 +++++
 configs/am335x_evm_spiboot_defconfig         |  5 +++++
 configs/am335x_evm_usbspl_defconfig          |  5 +++++
 configs/am335x_gp_evm_defconfig              |  5 +++++
 configs/am437x_gp_evm_defconfig              |  8 ++++++++
 configs/am437x_sk_evm_defconfig              |  8 ++++++++
 configs/am43xx_evm_defconfig                 |  8 ++++++++
 configs/am43xx_evm_ethboot_defconfig         |  8 ++++++++
 configs/am43xx_evm_qspiboot_defconfig        |  8 ++++++++
 configs/am43xx_evm_usbhost_boot_defconfig    |  8 ++++++++
 configs/apalis_t30_defconfig                 |  5 +++++
 configs/bcm11130_defconfig                   |  5 +++++
 configs/bcm11130_nand_defconfig              |  5 +++++
 configs/bcm28155_ap_defconfig                |  5 +++++
 configs/bcm28155_w1d_defconfig               |  5 +++++
 configs/beaver_defconfig                     |  5 +++++
 configs/birdland_bav335a_defconfig           |  5 +++++
 configs/birdland_bav335b_defconfig           |  5 +++++
 configs/cgtqmx6eval_defconfig                |  5 +++++
 configs/colibri_t20_defconfig                |  9 +++++++--
 configs/colibri_t30_defconfig                |  5 +++++
 configs/colibri_vf_defconfig                 |  5 +++++
 configs/corvus_defconfig                     |  5 +++++
 configs/dalmore_defconfig                    |  5 +++++
 configs/dra72_evm_defconfig                  |  8 ++++++++
 configs/dra74_evm_defconfig                  |  8 ++++++++
 configs/dra7xx_evm_defconfig                 |  8 ++++++++
 configs/dra7xx_evm_qspiboot_defconfig        |  8 ++++++++
 configs/dra7xx_evm_uart3_defconfig           |  8 ++++++++
 configs/draco_defconfig                      |  5 +++++
 configs/e2220-1170_defconfig                 |  5 +++++
 configs/gwventana_defconfig                  |  5 +++++
 configs/jetson-tk1_defconfig                 |  5 +++++
 configs/kc1_defconfig                        |  4 ++++
 configs/ma5d4evk_defconfig                   |  1 +
 configs/mx6dlsabreauto_defconfig             |  5 +++++
 configs/mx6dlsabresd_defconfig               |  5 +++++
 configs/mx6qpsabreauto_defconfig             |  5 +++++
 configs/mx6qsabreauto_defconfig              |  5 +++++
 configs/mx6qsabrelite_defconfig              |  5 +++++
 configs/mx6qsabresd_defconfig                |  5 +++++
 configs/mx6sabresd_spl_defconfig             |  5 +++++
 configs/mx7dsabresd_defconfig                |  5 +++++
 configs/nitrogen6dl2g_defconfig              |  5 +++++
 configs/nitrogen6dl_defconfig                |  5 +++++
 configs/nitrogen6q2g_defconfig               |  5 +++++
 configs/nitrogen6q_defconfig                 |  5 +++++
 configs/nitrogen6s1g_defconfig               |  5 +++++
 configs/nitrogen6s_defconfig                 |  5 +++++
 configs/novena_defconfig                     |  3 +++
 configs/nyan-big_defconfig                   |  5 +++++
 configs/odroid-xu3_defconfig                 |  7 +++++++
 configs/odroid_defconfig                     |  5 +++++
 configs/omap3_beagle_defconfig               |  5 +++++
 configs/omap3_logic_defconfig                |  5 +++++
 configs/omap5_uevm_defconfig                 |  8 ++++++++
 configs/origen_defconfig                     |  5 +++++
 configs/p2371-0000_defconfig                 |  5 +++++
 configs/p2371-2180_defconfig                 |  5 +++++
 configs/p2571_defconfig                      |  5 +++++
 configs/pcm051_rev1_defconfig                |  3 +++
 configs/pcm051_rev3_defconfig                |  3 +++
 configs/pengwyn_defconfig                    |  1 +
 configs/pxm2_defconfig                       |  5 +++++
 configs/rastaban_defconfig                   |  5 +++++
 configs/rut_defconfig                        |  5 +++++
 configs/s5p_goni_defconfig                   |  5 +++++
 configs/s5pc210_universal_defconfig          |  5 +++++
 configs/sama5d2_xplained_mmc_defconfig       |  1 +
 configs/sama5d2_xplained_spiflash_defconfig  |  1 +
 configs/sama5d3xek_mmc_defconfig             |  1 +
 configs/sama5d3xek_nandflash_defconfig       |  1 +
 configs/sama5d3xek_spiflash_defconfig        |  1 +
 configs/sama5d4_xplained_mmc_defconfig       |  1 +
 configs/sama5d4_xplained_nandflash_defconfig |  1 +
 configs/sama5d4_xplained_spiflash_defconfig  |  1 +
 configs/sama5d4ek_mmc_defconfig              |  1 +
 configs/sama5d4ek_nandflash_defconfig        |  1 +
 configs/sama5d4ek_spiflash_defconfig         |  1 +
 configs/sansa_fuze_plus_defconfig            |  3 +++
 configs/smartweb_defconfig                   |  4 ++++
 configs/sniper_defconfig                     |  4 ++++
 configs/socfpga_arria5_defconfig             |  5 +++++
 configs/socfpga_cyclone5_defconfig           |  5 +++++
 configs/socfpga_de0_nano_soc_defconfig       |  5 +++++
 configs/socfpga_mcvevk_defconfig             |  5 +++++
 configs/socfpga_sockit_defconfig             |  5 +++++
 configs/socfpga_socrates_defconfig           |  5 +++++
 configs/taurus_defconfig                     |  4 ++++
 configs/tbs2910_defconfig                    |  5 +++++
 configs/thuban_defconfig                     |  5 +++++
 configs/trats2_defconfig                     |  5 +++++
 configs/trats_defconfig                      |  5 +++++
 configs/venice2_defconfig                    |  5 +++++
 configs/vinco_defconfig                      |  1 +
 configs/warp_defconfig                       |  5 +++++
 configs/xfi3_defconfig                       |  3 +++
 configs/xilinx_zynqmp_ep_defconfig           |  6 ++++++
 configs/zynq_picozed_defconfig               |  9 +++++++--
 configs/zynq_zc702_defconfig                 |  9 +++++++--
 configs/zynq_zc706_defconfig                 |  9 +++++++--
 configs/zynq_zed_defconfig                   |  9 +++++++--
 configs/zynq_zybo_defconfig                  |  9 +++++++--
 drivers/usb/Kconfig                          |  2 ++
 drivers/usb/dwc3/Kconfig                     | 57
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/usb/gadget/Kconfig                   | 67
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/usb/gadget/g_dnl.c                   |  6 +++---
 drivers/usb/musb-new/Kconfig                 |  1 +
 include/configs/am335x_evm.h                 |  9 ---------
 include/configs/am3517_evm.h                 |  1 -
 include/configs/am43xx_evm.h                 | 26
++++++++++++--------------
 include/configs/baltos.h                     |  9 ---------
 include/configs/bav335x.h                    |  9 ---------
 include/configs/bcm28155_ap.h                |  7 -------
 include/configs/cgtqmx6eval.h                |  8 --------
 include/configs/colibri_vf.h                 |  7 -------
 include/configs/corvus.h                     | 10 ----------
 include/configs/dra7xx_evm.h                 | 13 -------------
 include/configs/exynos4-common.h             | 11 +----------
 include/configs/gw_ventana.h                 |  9 ---------
 include/configs/kc1.h                        | 13 -------------
 include/configs/kwb.h                        |  2 --
 include/configs/ma5d4evk.h                   |  2 --
 include/configs/mx6sabre_common.h            |  8 --------
 include/configs/mx7dsabresd.h                |  8 --------
 include/configs/nitrogen6x.h                 |  9 ---------
 include/configs/novena.h                     |  2 --
 include/configs/odroid_xu3.h                 | 15 ---------------
 include/configs/omap3_beagle.h               |  7 -------
 include/configs/omap3_logic.h                |  7 -------
 include/configs/omap5_uevm.h                 | 13 -------------
 include/configs/pcm051.h                     |  2 --
 include/configs/pengwyn.h                    |  3 ---
 include/configs/s5p_goni.h                   | 10 ++--------
 include/configs/s5pc210_universal.h          |  2 --
 include/configs/sama5d2_xplained.h           |  2 --
 include/configs/sama5d3xek.h                 |  2 --
 include/configs/sama5d4_xplained.h           |  2 --
 include/configs/sama5d4ek.h                  |  2 --
 include/configs/sansa_fuze_plus.h            |  3 ---
 include/configs/siemens-am33x-common.h       |  7 -------
 include/configs/smartweb.h                   |  7 -------
 include/configs/sniper.h                     | 13 -------------
 include/configs/socfpga_common.h             | 15 ++-------------
 include/configs/sunxi-common.h               | 10 ----------
 include/configs/taurus.h                     |  7 -------
 include/configs/tbs2910.h                    |  7 -------
 include/configs/tegra-common-usb-gadget.h    | 13 -------------
 include/configs/tseries.h                    |  2 --
 include/configs/vinco.h                      |  2 --
 include/configs/warp.h                       |  8 --------
 include/configs/xfi3.h                       |  3 ---
 include/configs/xilinx_zynqmp.h              | 10 ----------
 include/configs/zynq-common.h                |  7 -------
 163 files changed, 709 insertions(+), 352 deletions(-)
 create mode 100644 drivers/usb/dwc3/Kconfig

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

* [U-Boot] [PATCH] cmd/usb_mass_storage.c: Rework ums_init() ret logic slightly
  2016-04-20  9:45 [U-Boot] [PULL] u-boot-usb/master Marek Vasut
@ 2016-04-20 15:01 ` Tom Rini
  2016-04-20 15:46   ` Marek Vasut
  2016-04-21 11:27   ` Tom Rini
  2016-04-21 11:26 ` [U-Boot] [PULL] u-boot-usb/master Tom Rini
  1 sibling, 2 replies; 6+ messages in thread
From: Tom Rini @ 2016-04-20 15:01 UTC (permalink / raw)
  To: u-boot

Previously, ret could be used uninitialized if
blk_get_device_part_str() failed.  Default to ret being set to -1 so
that we always return an err up if we have a problem and then invert the
logic on testing ums_count as when that is non-zero is the time we can
return 0.

Cc: John Tobias <john.tobias.ph@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 cmd/usb_mass_storage.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index ac53a73..b03d567 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -56,7 +56,7 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
 	struct blk_desc *block_dev;
 	disk_partition_t info;
 	int partnum;
-	int ret;
+	int ret = -1;
 	struct ums *ums_new;
 
 	s = strdup(devnums_part_str);
@@ -86,13 +86,11 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
 
 		/* f_mass_storage.c assumes SECTOR_SIZE sectors */
 		if (block_dev->blksz != SECTOR_SIZE) {
-			ret = -1;
 			goto cleanup;
 		}
 
 		ums_new = realloc(ums, (ums_count + 1) * sizeof(*ums));
 		if (!ums_new) {
-			ret = -1;
 			goto cleanup;
 		}
 		ums = ums_new;
@@ -111,7 +109,6 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
 
 		name = malloc(UMS_NAME_LEN);
 		if (!name) {
-			ret = -1;
 			goto cleanup;
 		}
 		snprintf(name, UMS_NAME_LEN, "UMS disk %d", ums_count);
@@ -127,9 +124,7 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
 		ums_count++;
 	}
 
-	if (!ums_count)
-		ret = -1;
-	else
+	if (ums_count)
 		ret = 0;
 
 cleanup:
-- 
1.9.1

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

* [U-Boot] [PATCH] cmd/usb_mass_storage.c: Rework ums_init() ret logic slightly
  2016-04-20 15:01 ` [U-Boot] [PATCH] cmd/usb_mass_storage.c: Rework ums_init() ret logic slightly Tom Rini
@ 2016-04-20 15:46   ` Marek Vasut
  2016-04-20 17:20     ` Tom Rini
  2016-04-21 11:27   ` Tom Rini
  1 sibling, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2016-04-20 15:46 UTC (permalink / raw)
  To: u-boot

On 04/20/2016 05:01 PM, Tom Rini wrote:
> Previously, ret could be used uninitialized if
> blk_get_device_part_str() failed.  Default to ret being set to -1 so
> that we always return an err up if we have a problem and then invert the
> logic on testing ums_count as when that is non-zero is the time we can
> return 0.
> 
> Cc: John Tobias <john.tobias.ph@gmail.com>
> Cc: Marek Vasut <marex@denx.de>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>  cmd/usb_mass_storage.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
> index ac53a73..b03d567 100644
> --- a/cmd/usb_mass_storage.c
> +++ b/cmd/usb_mass_storage.c
> @@ -56,7 +56,7 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
>  	struct blk_desc *block_dev;
>  	disk_partition_t info;
>  	int partnum;
> -	int ret;
> +	int ret = -1;
>  	struct ums *ums_new;
>  
>  	s = strdup(devnums_part_str);
> @@ -86,13 +86,11 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
>  
>  		/* f_mass_storage.c assumes SECTOR_SIZE sectors */
>  		if (block_dev->blksz != SECTOR_SIZE) {

You can also drop the {} braces now.

Otherwise,

Acked-by: Marek Vasut <marex@denx.de>

> -			ret = -1;
>  			goto cleanup;
>  		}
>  
>  		ums_new = realloc(ums, (ums_count + 1) * sizeof(*ums));
>  		if (!ums_new) {
> -			ret = -1;
>  			goto cleanup;
>  		}
>  		ums = ums_new;
> @@ -111,7 +109,6 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
>  
>  		name = malloc(UMS_NAME_LEN);
>  		if (!name) {
> -			ret = -1;
>  			goto cleanup;
>  		}
>  		snprintf(name, UMS_NAME_LEN, "UMS disk %d", ums_count);
> @@ -127,9 +124,7 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
>  		ums_count++;
>  	}
>  
> -	if (!ums_count)
> -		ret = -1;
> -	else
> +	if (ums_count)
>  		ret = 0;
>  
>  cleanup:
> 


-- 
Best regards,
Marek Vasut

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

* [U-Boot] [PATCH] cmd/usb_mass_storage.c: Rework ums_init() ret logic slightly
  2016-04-20 15:46   ` Marek Vasut
@ 2016-04-20 17:20     ` Tom Rini
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2016-04-20 17:20 UTC (permalink / raw)
  To: u-boot

On Wed, Apr 20, 2016 at 05:46:53PM +0200, Marek Vasut wrote:
> On 04/20/2016 05:01 PM, Tom Rini wrote:
> > Previously, ret could be used uninitialized if
> > blk_get_device_part_str() failed.  Default to ret being set to -1 so
> > that we always return an err up if we have a problem and then invert the
> > logic on testing ums_count as when that is non-zero is the time we can
> > return 0.
> > 
> > Cc: John Tobias <john.tobias.ph@gmail.com>
> > Cc: Marek Vasut <marex@denx.de>
> > Signed-off-by: Tom Rini <trini@konsulko.com>
> > ---
> >  cmd/usb_mass_storage.c | 9 ++-------
> >  1 file changed, 2 insertions(+), 7 deletions(-)
> > 
> > diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
> > index ac53a73..b03d567 100644
> > --- a/cmd/usb_mass_storage.c
> > +++ b/cmd/usb_mass_storage.c
> > @@ -56,7 +56,7 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
> >  	struct blk_desc *block_dev;
> >  	disk_partition_t info;
> >  	int partnum;
> > -	int ret;
> > +	int ret = -1;
> >  	struct ums *ums_new;
> >  
> >  	s = strdup(devnums_part_str);
> > @@ -86,13 +86,11 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
> >  
> >  		/* f_mass_storage.c assumes SECTOR_SIZE sectors */
> >  		if (block_dev->blksz != SECTOR_SIZE) {
> 
> You can also drop the {} braces now.
> 
> Otherwise,
> 
> Acked-by: Marek Vasut <marex@denx.de>

I'll fix 'em up, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160420/bd15bfbf/attachment-0001.sig>

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

* [U-Boot] [PULL] u-boot-usb/master
  2016-04-20  9:45 [U-Boot] [PULL] u-boot-usb/master Marek Vasut
  2016-04-20 15:01 ` [U-Boot] [PATCH] cmd/usb_mass_storage.c: Rework ums_init() ret logic slightly Tom Rini
@ 2016-04-21 11:26 ` Tom Rini
  1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2016-04-21 11:26 UTC (permalink / raw)
  To: u-boot

On Wed, Apr 20, 2016 at 11:45:23AM +0200, Marek Vasut wrote:

> The following changes since commit 108f8418597350bd98357f25acaa8ab8a0435779:
> 
>   ARM: rpi: fix 64-bit CONFIG_SYS_TEXT_BASE (2016-04-16 09:02:17 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-usb.git master
> 
> for you to fetch changes up to e6c0bc0643e5a4387fecbcf83080d0b796eb067c:
> 
>   usb: gadget Move: CONFIG_G_DNL_* to Kconfig (2016-04-20 11:43:28 +0200)
> 

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/da0a43b3/attachment.sig>

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

* [U-Boot] [PATCH] cmd/usb_mass_storage.c: Rework ums_init() ret logic slightly
  2016-04-20 15:01 ` [U-Boot] [PATCH] cmd/usb_mass_storage.c: Rework ums_init() ret logic slightly Tom Rini
  2016-04-20 15:46   ` Marek Vasut
@ 2016-04-21 11:27   ` Tom Rini
  1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2016-04-21 11:27 UTC (permalink / raw)
  To: u-boot

On Wed, Apr 20, 2016 at 11:01:56AM -0400, Tom Rini wrote:

> Previously, ret could be used uninitialized if
> blk_get_device_part_str() failed.  Default to ret being set to -1 so
> that we always return an err up if we have a problem and then invert the
> logic on testing ums_count as when that is non-zero is the time we can
> return 0.
> 
> Cc: John Tobias <john.tobias.ph@gmail.com>
> Acked-by: Marek Vasut <marex@denx.de>
> Signed-off-by: Tom Rini <trini@konsulko.com>

With the brace changes Marek suggested, applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/b35fe71e/attachment.sig>

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

end of thread, other threads:[~2016-04-21 11:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-20  9:45 [U-Boot] [PULL] u-boot-usb/master Marek Vasut
2016-04-20 15:01 ` [U-Boot] [PATCH] cmd/usb_mass_storage.c: Rework ums_init() ret logic slightly Tom Rini
2016-04-20 15:46   ` Marek Vasut
2016-04-20 17:20     ` Tom Rini
2016-04-21 11:27   ` Tom Rini
2016-04-21 11:26 ` [U-Boot] [PULL] u-boot-usb/master Tom Rini

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.