u-boot/drivers/ata
Tony Dinh 7940d9628a 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>
2021-08-11 08:42:26 +02:00
..
ahci-pci.c ata: ahci-pci: Use scsi_ops to initialize ops 2021-07-06 14:07:36 -04:00
ahci-uclass.c dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
ahci.c ata: ahci: fix ahci_link_up() type mismatch for LTO 2021-05-24 14:21:30 -04:00
ahci_mvebu.c sata: ahci_mvebu.c: Enable AHCI/SATA driver for MIPS Octeon 2021-04-23 21:22:55 +02:00
ahci_sunxi.c ata: sunxi: fix debug messages 2021-01-31 23:55:56 +00:00
dwc_ahci.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
dwc_ahsata.c dm: treewide: Rename 'platdata' variables to just 'plat' 2020-12-13 16:51:08 -07:00
dwc_ahsata_priv.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fsl_sata.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
fsl_sata.h ata: fsl_sata: Add DM support for Freescale PowerPC SATA driver 2019-11-19 14:11:44 +05:30
Kconfig ata: Make LIBATA means AHCI is enabled mandatory. 2021-05-11 09:14:56 -04:00
libata.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
Makefile drivers: ata: Remove mvsata_ide driver 2021-04-10 07:59:30 -04:00
mtk_ahci.c ahci: mediatek: fix undefined reference of dev_err 2021-03-19 10:35:19 -04:00
sata.c common: Drop part.h from common header 2020-05-18 17:33:33 -04:00
sata_ceva.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
sata_mv.c arm: mvebu: sata_mv failed to identify HDDs during cold start 2021-08-11 08:42:26 +02:00
sata_sandbox.c common: Drop part.h from common header 2020-05-18 17:33:33 -04:00
sata_sil.c pci: sata_sil: Drop DM_PCI checks 2021-08-06 08:21:03 -04:00
sata_sil.h pci: sata_sil: Drop DM_PCI checks 2021-08-06 08:21:03 -04:00
sata_sil3114.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
sata_sil3114.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00