01 Oct, 2017

1 commit

  • The stored 'blk' value is overwritten to 'size / 512' before it can
    be used in usb_stor_set_max_xfer_blk(). This is not what we want.
    In fact, when 'size' exceeds the upper limit (USHRT_MAX * 512), we
    should simply assign 'size' to the upper limit.

    Reported-by: Coverity (CID: 167250)
    Signed-off-by: Bin Meng

    Bin Meng
     

27 Sep, 2017

2 commits

  • When EHCD and xHCD are enabled at the same time, USB storage device
    driver will fail to read/write from/to the storage device attached
    to the xHCI interface, due to its transfer blocks exceeds the xHCD
    driver limitation.

    With driver model, we have an API to get the controller's maximum
    transfer size and we can use that to determine the storage driver's
    capability of read/write.

    Note: the non-DM version driver is still broken with xHCD and the
    intent here is not to fix the non-DM one, since the xHCD itself is
    already broken in places like 3.0 hub support, etc.

    Signed-off-by: Bin Meng

    Bin Meng
     
  • This adds a new memeber max_xfer_blk in struct us_data to record
    the maximum number of transfer blocks for the storage device.

    It is set per HCD setting, and so far is to 65535 for EHCD and 20
    for everything else.

    Signed-off-by: Bin Meng

    Bin Meng
     

12 Jul, 2017

1 commit

  • We should not be using typedefs in U-Boot and 'ccb' is a pretty short
    name. It is also used with variables. Drop the typedef and use 'struct'
    instead.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     

15 May, 2017

1 commit


14 Apr, 2017

1 commit

  • This fixes a regression caused by

    commit 07b2b78ce4bc8ae25e066c65245eaf58c0d9a67c
    dm: usb: Convert USB storage to use driver-model for block devs

    which caused part_init to be called when it was not previously.
    Without this patch, the following happens when a USB sd card reader is used.

    => usb start
    starting USB...
    USB0: Port not available.
    USB1: USB EHCI 1.00
    scanning bus 1 for devices... 3 USB Device(s) found
    scanning usb for storage devices... Device NOT ready
    Request Sense returned 02 3A 00
    ### ERROR ### Please RESET the board ###

    This happens because dev_desc->blksz is 0.

    Signed-off-by: Troy Kisky

    Troy Kisky
     

17 Jan, 2017

1 commit

  • By enabling DM_USB information about number of storage devices
    was lost.
    Get this information back simply by printing number of devices detected
    via BLK uclass.

    For example:
    scanning bus 0 for devices... 7 USB Device(s) found
    scanning usb for storage devices... 3 Storage Device(s) found
    scanning usb for ethernet devices... 0 Ethernet Device(s) found

    Signed-off-by: Michal Simek

    Michal Simek
     

24 Sep, 2016

1 commit


17 May, 2016

3 commits


23 Mar, 2016

2 commits


15 Mar, 2016

6 commits


21 Jan, 2016

1 commit


14 Jan, 2016

1 commit

  • This will allow the implementation to make use of data in the block_dev
    structure beyond the base device number. This will be useful so that eMMC
    block devices can encompass the HW partition ID rather than treating this
    out-of-band. Equally, the existence of the priv field is crying out for
    this patch to exist.

    Signed-off-by: Stephen Warren
    Reviewed-by: Tom Rini

    Stephen Warren
     

08 Jan, 2016

1 commit

  • 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
    Reviewed-by: Marek Vasut

    Simon Glass
     

04 Nov, 2015

1 commit


23 Oct, 2015

1 commit


12 Sep, 2015

1 commit


22 Jul, 2015

1 commit

  • In Linux USB_DEVICE() is used to declare a USB device by vendor/device ID.
    We should follow the same convention in U-Boot. Rename the existing
    USB_DEVICE() macro to U_BOOT_USB_DEVICE() and bring in the USB_DEVICE()
    macro from Linux for use in U-Boot.

    Signed-off-by: Simon Glass

    Simon Glass
     

19 Apr, 2015

7 commits


14 Apr, 2015

2 commits


08 Nov, 2014

1 commit

  • Skip enclosure service devices when probing for usb storage devices.

    This avoids long timeouts when probing for external usb harddisks
    which provide "Enclosure Services".

    Signed-off-by: Soeren Moch
    --

    This is a new version of the patch
    "usb_storage: skip all unknown devices when probing"
    http://http://lists.denx.de/pipermail/u-boot/2014-November/194622.html

    Cc: Marek Vasut
    Cc: Tom Rini

    Soeren Moch
     

27 Oct, 2014

1 commit


24 Jul, 2013

1 commit


26 Jun, 2013

1 commit

  • With CONFIG_SYS_64BIT_LBA, lbaint_t gets defined as a 64-bit type,
    which is required to represent block numbers for storage devices that
    exceed 2TiB (the block size usually is 512B), e.g. recent hard drives.

    For some obscure reason, the current U-Boot code uses lbaint_t for the
    number of blocks to read (a rather optimistic estimation of how RAM
    sizes will evolve), but not for the starting address. Trying to access
    blocks beyond the 2TiB boundary will simply wrap around and read a
    block within the 0..2TiB range.

    We now use lbaint_t for block start addresses, too. This required
    changes to all block drivers as the signature of block_read(),
    block_write() and block_erase() in block_dev_desc_t changed.

    Signed-off-by: Sascha Silbe

    Sascha Silbe
     

06 May, 2013

1 commit