06 May, 2020

1 commit

  • When sata stop is executed, the sata_curr_device is not reset to -1, so
    any following sata commands will not initialize the sata again and cause
    problem.

    Additional, in sata init implementation, the sata_curr_device should be updated,
    otherwise sata will be initialized again when doing other sata commands like
    read/write/info/part/device.

    Signed-off-by: Ye Li
    (cherry picked from commit 9bccfd01c618a5d059f332c000c42e5bf39880d9)
    (cherry picked from commit f162bbb14b5c9b0c4073eee5ceeea6a9d1780394)

    Ye Li
     

28 Jan, 2020

1 commit

  • If we didn't unbind the sata from block device, the same devices would
    be added after sata remove,
    This patch is to resolve this issue as below:

    => sata info
    SATA#0:
    (3.0 Gbps)
    SATA#1:
    (3.0 Gbps)
    Device 0: Model: INTEL SSDSA2BW300G3D Firm: 4PC10362 Ser#: BTPR247005PY30
    Type: Hard Disk
    Supports 48-bit addressing
    Capacity: 286168.1 MB = 279.4 GB (586072368 x 512)
    Device 1: Model: INTEL SSDSA2BW300G3D Firm: 4PC10362 Ser#: BTPR247005VX30
    Type: Hard Disk
    Supports 48-bit addressing
    Capacity: 286168.1 MB = 279.4 GB (586072368 x 512)
    => sata stop
    => sata info
    SATA#0:
    (3.0 Gbps)
    SATA#1:
    (3.0 Gbps)
    Device 0: Model: INTEL SSDSA2BW300G3D Firm: 4PC10362 Ser#: BTPR247005PY300
    Type: Hard Disk
    Supports 48-bit addressing
    Capacity: 286168.1 MB = 279.4 GB (586072368 x 512)
    Device 1: Model: INTEL SSDSA2BW300G3D Firm: 4PC10362 Ser#: BTPR247005VX300
    Type: Hard Disk
    Supports 48-bit addressing
    Capacity: 286168.1 MB = 279.4 GB (586072368 x 512)
    Device 2: Model: INTEL SSDSA2BW300G3D Firm: 4PC10362 Ser#: BTPR247005PY300
    Type: Hard Disk
    Supports 48-bit addressing
    Capacity: 286168.1 MB = 279.4 GB (586072368 x 512)
    Device 3: Model: INTEL SSDSA2BW300G3D Firm: 4PC10362 Ser#: BTPR247005VX300
    Type: Hard Disk
    Supports 48-bit addressing
    Capacity: 286168.1 MB = 279.4 GB (586072368 x 512)

    Signed-off-by: Peng Ma
    Reviewed-by: Simon Glass

    Peng Ma
     

09 Feb, 2019

1 commit


15 Nov, 2018

1 commit

  • part_init() is currently called in every DM BLK driver, either
    in its bind() or probe() method. However we can use the BLK
    uclass driver's post_probe() method to do it automatically.

    Update all DM BLK drivers to adopt this change.

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

    Bin Meng
     

10 Aug, 2018

1 commit


07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

17 Aug, 2017

2 commits


15 Jan, 2017

1 commit

  • Since commit aa6ab905b2, sata_initialize returns -1 if init_sata or
    scan_sata fails. But this return value becomes the do_sata return
    value which is equivalent to CMD_RET_USAGE.

    In case one issues 'sata init' and that the hardware fails to
    initialize, there's no need to display the command usage. Instead
    the command shoud just return the CMD_RET_FAILURE value.

    Fixes: aa6ab905b2 (sata: fix sata command can not being executed bug)

    Signed-off-by: Gary Bisson
    Reviewed-by: Eric Nelson
    Reviewed-by: Simon Glass

    Gary Bisson
     

29 Nov, 2016

1 commit

  • Commit d97dc8a0 separated the non-command code into its own file
    which caused variable sata_curr_device can not be set to a correct
    value.

    Before commit d97dc8a0, variable sata_curr_device can be set
    correctly in sata_initialize().
    After commit d97dc8a0, sata_initialize() is moved out to its own file.
    Accordingly, variable sata_curr_device is removed from sata_initialize()
    too. This caused sata_curr_device never gets a chance to be set properly
    which prevent other commands from being executed.

    This patch sets variable sata_curr_device properly.

    Fixes: d97dc8a0 (dm: sata: Separate the non-command code into its
    own file)

    Signed-off-by: Tang Yuantian
    Reviewed-by: Simon Glass

    Tang Yuantian
     

17 May, 2016

2 commits

  • At present the SATA command code includes both the command-processing code
    and the core SATA functions and data structures.

    Separate the latter into its own file, adding functions as needed to avoid
    the command code accessing data structures directly.

    With this commit:
    - All CONFIG option are referenced from the non-command code
    - The concept of a 'current SATA device' is confined to the command code

    This will make it easier to convert this code to driver model.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • This file has a few coding style problems. Fix these to make future updates
    easier.

    Signed-off-by: Simon Glass

    Simon Glass
     

02 Apr, 2016

1 commit


15 Mar, 2016

3 commits


25 Jan, 2016

1 commit

  • Now that they are in their own directory, we can remove this prefix.
    This makes it easier to find a file since the prefix does not get in the
    way.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Reviewed-by: Heiko Schocher
    Acked-by: Stefan Roese
    Acked-by: Przemyslaw Marczak

    Simon Glass