
Hi Heinrich,
On Mon, 24 Jul 2023 at 02:49, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
On 7/24/23 00:58, Simon Glass wrote:
Hi Heinrich,
On Sat, 22 Jul 2023 at 15:56, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
Many SATA controllers are PCI bus devices. Before calling scsi_scan() we must bind the PCI devices.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
common/spl/spl_sata.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c index 32746ce9f3..060da49006 100644 --- a/common/spl/spl_sata.c +++ b/common/spl/spl_sata.c @@ -61,6 +61,8 @@ static int spl_sata_load_image(struct spl_image_info *spl_image, struct blk_desc *stor_dev;
/* try to recognize storage devices immediately */
if (IS_ENABLED(CONFIG_SPL_PCI))
pci_init();
error checking?
We should not fail here as there may be a SATA controller that does not depend on PCI though SPL_PCI is enabled.
Debug output for failing pci_init() (if deemed necessary) should be done within pci_init() and not be repeated for every invocation.
The boot method will write an error if it did not succeed. So don't add any debug output here.
I wasn't thinking of output, just making sure that errors are propagated. We do try to do that in U-Boot, since if things are not behaving correctly, the problem should be fixed, rather than papered ove.r
Regards, Simon