u-boot/drivers/block
Bin Meng 4df2b48fbe x86: ahci: Make sure interface is not busy after enabling the port
Each time U-Boot boots on Intel Crown Bay board, the displayed hard
drive information is wrong. It could be either wrong capacity or just
a 'Capacity: not available' message. After enabling the debug switch,
we can see the scsi inquiry command did not execute successfully.
However, doing a 'scsi scan' in the U-Boot shell does not expose
this issue.

SCSI:  Target spinup took 0 ms.
SATA link 1 timeout.
AHCI 0001.0100 32 slots 2 ports 3 Gbps 0x3 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part ccc apst
scanning bus for devices...
ahci_device_data_io: 0 byte transferred.   <--- scsi inquiry fails
ahci_device_data_io: 512 byte transferred.
ahci_device_data_io: 512 byte transferred.
ahci_device_data_io: 512 byte transferred.
  Device 0: (0:0) Vendor: ATA Prod.:  Rev: ?8
              Type: Hard Disk
	                  Capacity: 912968.3 MB = 891.5 GB (1869759264 x 512)
			  Found 1 device(s).

So uninitialized contents on the stack were passed to dev_print() to
display those wrong information.

The symptom were observed on two hard drives (one is Seagate, the
other one is Western Digital). The fix is to make sure the AHCI
interface is not busy by checking the error and status information
from task file register after enabling the port in ahci_port_start()
before proceeding other operations like scsi_scan().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-01-23 17:24:53 -07:00
..
ahci.c x86: ahci: Make sure interface is not busy after enabling the port 2015-01-23 17:24:53 -07:00
ata_piix.c sata: implement reset_sata for dwc_ahsata 2014-11-24 11:59:59 +01:00
ata_piix.h sata.h: Make all sata/ata drivers include <sata.h> 2012-10-15 11:54:03 -07:00
dwc_ahsata.c sata: fix reset_sata for dwc_ahsata 2014-12-01 10:20:19 +01:00
dwc_ahsata.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
fsl_sata.c sata: implement reset_sata for dwc_ahsata 2014-11-24 11:59:59 +01:00
fsl_sata.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
ftide020.c Merge branch 'master' of git://git.denx.de/u-boot-nds32 2013-07-25 08:51:51 -04:00
ftide020.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
Kconfig kconfig: add blank Kconfig files 2014-09-24 18:30:28 -04:00
libata.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
Makefile sandbox: block driver using host file/device as backing store 2014-01-08 17:24:03 -07:00
mvsata_ide.c arm: marvell: Move arch/kirkwood.h to arch/soc.h 2014-10-23 09:59:20 -04:00
mxc_ata.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
pata_bfin.c sata: implement reset_sata for dwc_ahsata 2014-11-24 11:59:59 +01:00
pata_bfin.h blackfin: include <linux/compiler.h> rather than define __iomem 2014-12-08 09:35:46 -05:00
sandbox.c sandbox: block driver using host file/device as backing store 2014-01-08 17:24:03 -07:00
sata_dwc.c sata: implement reset_sata for dwc_ahsata 2014-11-24 11:59:59 +01:00
sata_dwc.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
sata_sil.c Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2014-11-24 12:02:12 -05:00
sata_sil.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
sata_sil3114.c sata: implement reset_sata for dwc_ahsata 2014-11-24 11:59:59 +01:00
sata_sil3114.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
sil680.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
sym53c8xx.c Fix some obvious typos across multiple subsystems. 2013-09-20 10:29:48 -04:00
systemace.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00