summaryrefslogtreecommitdiff
path: root/drivers/ata/ahci-uclass.c
diff options
context:
space:
mode:
authorTony Dinh <mibodhi@gmail.com>2021-08-01 06:29:35 +0300
committerStefan Roese <sr@denx.de>2021-08-11 09:42:26 +0300
commit7940d9628a0b70c09efbcb04cb6af10bc7dd9fea (patch)
tree18a55ea6bdd94fc083edd8b546732cee59e579a8 /drivers/ata/ahci-uclass.c
parent8ac303d49f891e11a5c0c4cce7a09a518cfb041b (diff)
downloadu-boot-7940d9628a0b70c09efbcb04cb6af10bc7dd9fea.tar.xz
arm: mvebu: sata_mv failed to identify HDDs during cold start
During cold start, with some HDDs, mv_sata_identify() does not populate the ID words on the 1st ATA ID command. In fact, the first ATA ID command will only power up the drive, and then the ATA ID command processing is lost in the process. Tests with: - Seagate ST9250320AS 250GB HDD and Seagate ST4000DM004-2CV104 4TB HDD. - Zyxel NSA310S (Kirkwood 88F6702), Marvell Dreamplug (Kirkwood 88F6281), Seagate GoFlex Home (Kirkwood 88F6281), Pogoplug V4 (Kirkwood 88F6192). Observation: - The Seagate ST9250320AS 250GB took about 3 seconds to spin up. - The Seagate ST4000DM004-2CV104 4TB took about 8 seconds to spin up. - mv_sata_identify() did not populate the ID words after the call to mv_ata_exec_ata_cmd_nondma(). - Attempt to insert a long delay of 30 seconds, ie. mdelay(30_000), after the call to ata_wait_register() inside mv_ata_exec_ata_cmd_nondma() did not help with the 4TB drive. The ID words were still empty after that 30s delay. Patch Description: - Added a second ATA ID command in mv_sata_identify(), which will be executed if the 1st ATA ID command did not return with valid ID words. - Use the HDD drive capacity in the ID words as a successful indicator of ATA ID command. - In the scenario where a box is rebooted, the 1st ATA ID command is always successful, so there is no extra time wasted. - In the scenario where a box is cold started, the 1st ATA command is the power up command. The 2nd ATA ID command alleviates the uncertainty of how long we have to wait for the ID words to be populated by the SATA controller. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Diffstat (limited to 'drivers/ata/ahci-uclass.c')
0 files changed, 0 insertions, 0 deletions