public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] usb: Allow up to 7 storage devices
Date: Sun, 3 Jan 2016 22:23:11 +0100	[thread overview]
Message-ID: <201601032223.11888.marex@denx.de> (raw)
In-Reply-To: <1451854231-20916-2-git-send-email-sjg@chromium.org>

On Sunday, January 03, 2016 at 09:50:30 PM, Simon Glass wrote:
> The current limit of 5 is not enough for the driver model USB tests. Really
> we should not have a limit but the driver model code still uses the
> usb_dev_desc[] array, which has a limit.
> 
> Increasing the limit by 2 should not bother anyone. Adjust it.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

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

btw moving this constant to one place would be nice ;)

> ---
> 
>  common/usb_storage.c | 2 +-
>  include/usb.h        | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/common/usb_storage.c b/common/usb_storage.c
> index 4fa6538..e61a8c8 100644
> --- a/common/usb_storage.c
> +++ b/common/usb_storage.c
> @@ -65,7 +65,7 @@ static const unsigned char us_direction[256/8] = {
>  static ccb usb_ccb __attribute__((aligned(ARCH_DMA_MINALIGN)));
>  static __u32 CBWTag;
> 
> -#define USB_MAX_STOR_DEV 5
> +#define USB_MAX_STOR_DEV 7
>  static int usb_max_devs; /* number of highest available usb device */
> 
>  static block_dev_desc_t usb_dev_desc[USB_MAX_STOR_DEV];
> diff --git a/include/usb.h b/include/usb.h
> index 55b9268..7d6ad70 100644
> --- a/include/usb.h
> +++ b/include/usb.h
> @@ -227,7 +227,7 @@ int board_usb_cleanup(int index, enum usb_init_type
> init);
> 
>  #ifdef CONFIG_USB_STORAGE
> 
> -#define USB_MAX_STOR_DEV 5
> +#define USB_MAX_STOR_DEV 7
>  block_dev_desc_t *usb_stor_get_dev(int index);
>  int usb_stor_scan(int mode);
>  int usb_stor_info(void);

Best regards,
Marek Vasut

  reply	other threads:[~2016-01-03 21:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-03 20:50 [U-Boot] [PATCH 1/3] dm: Disable all SPI and SPI flash tests Simon Glass
2016-01-03 20:50 ` [U-Boot] [PATCH 2/3] usb: Allow up to 7 storage devices Simon Glass
2016-01-03 21:23   ` Marek Vasut [this message]
2016-01-07 19:23     ` Simon Glass
2016-01-08  3:34     ` Simon Glass
2016-01-08 12:10       ` Marek Vasut
2016-01-03 20:50 ` [U-Boot] [PATCH 3/3] dm: usb: Add a remove() method for USB keyboards Simon Glass
2016-01-03 21:22   ` Marek Vasut
2016-01-04  4:04   ` Joe Hershberger
2016-01-04  4:08     ` Simon Glass
2016-01-07 19:23       ` Simon Glass
2016-01-07 19:23 ` [U-Boot] [PATCH 1/3] dm: Disable all SPI and SPI flash tests Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201601032223.11888.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox