diff options
author | Park, Aiden <aiden.park@intel.com> | 2019-08-20 16:47:42 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-08-26 11:46:20 -0400 |
commit | bd98e6ae7160d5a4fc013266183506068227dd79 (patch) | |
tree | 0774d44b3c315d603830189d60c2c86e86c929f0 /drivers/ata/ahci.c | |
parent | 5adbc0e5caa3b0f3ca1211c952e0822fde8e8e5b (diff) | |
download | u-boot-bd98e6ae7160d5a4fc013266183506068227dd79.zip u-boot-bd98e6ae7160d5a4fc013266183506068227dd79.tar.gz u-boot-bd98e6ae7160d5a4fc013266183506068227dd79.tar.bz2 |
dm: scsi: Scan the actual number of ports
The scsi_scan_dev() is looping over the number of uc_plat->max_id.
The number of actual ports a AHCI controller has can be greater than
max_id. Update uc_plat->max_id to make SCSI scan all detected ports.
Signed-off-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r-- | drivers/ata/ahci.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index e3135bb..9a08575 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1167,6 +1167,14 @@ int ahci_probe_scsi(struct udevice *ahci_dev, ulong base) if (ret) return ret; + /* + * scsi_scan_dev() scans devices up-to the number of max_id. + * Update max_id if the number of detected ports exceeds max_id. + * This allows SCSI to scan all detected ports. + */ + uc_plat->max_id = max_t(unsigned long, uc_priv->n_ports, + uc_plat->max_id); + return 0; } |