[U-Boot] [U-Boot, 1/4] ata: ahci: Loop over the actual number of ports, not the maximum

Tom Rini trini at konsulko.com
Wed Sep 26 12:49:35 UTC 2018


On Thu, Sep 13, 2018 at 01:28:54AM +0300, Tuomas Tynkkynen wrote:

> The loop in ahci_start_ports() is looping over the maximum number of
> SCSI devices in the system, which can be larger than the amount of ports
> a particular AHCI controller has. The extra looping isn't directly
> harmful because the link_port_map bitmap won't have the bit set for a
> nonexistent port, but it is wasteful. Replace the loop limit with the
> port count of the AHCI controller instead.
> 
> Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen at iki.fi>
> Reviewed-by: Simon Glass <sjg at chromium.org>

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/20180926/d84ed545/attachment.sig>


More information about the U-Boot mailing list