All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] dm: scsi: Scan the actual number of ports
@ 2019-08-20 16:47 Park, Aiden
  2019-08-21  9:41 ` Bin Meng
  2019-08-27  0:18 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Park, Aiden @ 2019-08-20 16:47 UTC (permalink / raw)
  To: u-boot

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>
---
 drivers/ata/ahci.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index e3135bb75f..9a08575053 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;
 }
 
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH 1/1] dm: scsi: Scan the actual number of ports
  2019-08-20 16:47 [U-Boot] [PATCH 1/1] dm: scsi: Scan the actual number of ports Park, Aiden
@ 2019-08-21  9:41 ` Bin Meng
  2019-08-27  0:18 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Bin Meng @ 2019-08-21  9:41 UTC (permalink / raw)
  To: u-boot

On Wed, Aug 21, 2019 at 12:47 AM Park, Aiden <aiden.park@intel.com> wrote:
>
> 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>
> ---
>  drivers/ata/ahci.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH 1/1] dm: scsi: Scan the actual number of ports
  2019-08-20 16:47 [U-Boot] [PATCH 1/1] dm: scsi: Scan the actual number of ports Park, Aiden
  2019-08-21  9:41 ` Bin Meng
@ 2019-08-27  0:18 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2019-08-27  0:18 UTC (permalink / raw)
  To: u-boot

On Tue, Aug 20, 2019 at 04:47:42PM +0000, Park, Aiden wrote:

> 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>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-27  0:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-20 16:47 [U-Boot] [PATCH 1/1] dm: scsi: Scan the actual number of ports Park, Aiden
2019-08-21  9:41 ` Bin Meng
2019-08-27  0:18 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.