dm: scsi: Scan the actual number of ports
Park
PATCH 1/1 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.
--- drivers/ata/ahci.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/ata/ahci.c +8 -0
@@ -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 ; }
Signature · 1 line
2.20.1
PATCH 1/1 dm: scsi: Scan the actual number of ports
Quoted 10 lines · Aiden
The
scsi_scan_dev()is looping over the number ofuc_plat->max_id. The number of actual ports a AHCI controller has can be greater thanmax_id. Updateuc_plat->max_idto make SCSI scan all detected ports.Signed-off-by Aiden Park <[email protected]>--- drivers/ata/ahci.c | 8 ++++++++ 1 file changed, 8 insertions(+)
PATCH 1/1 dm: scsi: Scan the actual number of ports
In reply to ParkQuoted 6 lines · Aiden
The
scsi_scan_dev()is looping over the number ofuc_plat->max_id. The number of actual ports a AHCI controller has can be greater thanmax_id. Updateuc_plat->max_idto make SCSI scan all detected ports.Signed-off-by Aiden Park <[email protected]>Reviewed-by Bin Meng <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190826/340f1dae/attachment.sig>