u-boot/drivers/ata
Suneel Garapati 98a8180dca drivers: ata: ahci: update max id if it is more than available ports
After check for maximum between max id and available ports, also check
if available port count is less than max id and update.

In the case of the CN8030 OcteonTX SoC max_id needs to be reduced to
the number of ports found otherwise the following occurs on a scan:

GW6404-B> scsi scan
scanning bus for devices...
Target spinup took 0 ms.
AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: 64bit ncq ilck stag pm led clo only pmp fbss pio slum part ccc
apst
  Device 0: (0:0) Vendor: ATA Prod.: SanDisk SD8SFAT0 Rev: Z233
            Type: Hard Disk
            Capacity: 61057.3 MB = 59.6 GB (125045424 x 512)
"Synchronous Abort" handler, esr 0x96000006
elr: 000000000052f824 lr : 000000000052fa10 (reloc)
elr: 000000007fee9824 lr : 000000007fee9a10
x0 : 0000000000000001 x1 : 0000000000000001
x2 : 000000007bea3528 x3 : 000000007bea3580
x4 : 0000000000000200 x5 : 0000000000000000
x6 : 0000000000000002 x7 : 000000007bea3540
x8 : 00000000fffffff8 x9 : 0000000000000008
x10: 00000000000186a0 x11: 000000000000000d
x12: 0000000000000006 x13: 000000000001869f
x14: 0000000000000007 x15: 00000000ffffffff
x16: 000000007ff439a5 x17: 000000007ff5730c
x18: 000000007bea9de0 x19: 000000007ff7a580
x20: 000000007bec79f8 x21: 0000000000000000
x22: 000000007bea3580 x23: 0000000000000000
x24: 0000000000000000 x25: 000000007bec7a00
x26: 00000000ffffffc0 x27: 000000007bec79d0
x28: 000000007beb51c0 x29: 000000007bea3480

Code: 91246800 940130c2 12800000 1400004f (b9402ae0)
Resetting CPU ...

Signed-off-by: Suneel Garapati <sgarapati@marvell.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-04-20 07:31:12 -04:00
..
ahci-pci.c ahci-pci: ASM1061 report wrong class, but support AHCI. 2019-10-11 10:10:18 -04:00
ahci-uclass.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
ahci.c drivers: ata: ahci: update max id if it is more than available ports 2021-04-20 07:31:12 -04:00
ahci_mvebu.c ata: mvebu: use dev_read_addr() to get base address 2020-08-22 08:51:44 -06: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 drivers: ata: Remove mvsata_ide driver 2021-04-10 07:59:30 -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 common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
sata_sandbox.c common: Drop part.h from common header 2020-05-18 17:33:33 -04:00
sata_sil.c dm: treewide: Rename dev_get_platdata() to dev_get_plat() 2020-12-13 16:51:09 -07:00
sata_sil.h sata_sil: Enable DM_PCI operation 2020-07-07 18:23:48 -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