Skip to content
Snippets Groups Projects
  • Simon Glass's avatar
    cae1ad02
    bootstd: Make bootdev_next_prio() continue after failure · cae1ad02
    Simon Glass authored and Tom Rini's avatar Tom Rini committed
    
    When a device fails to probe, the next device should be tried, until
    either we find a suitable device or run out of devices. A device
    should never be tried twice.
    
    When we run out of devices of a particular priority, the hunter should
    be used to generate devices of the next priority. Only if all attempts
    fail should this function return an error.
    
    Update the function to use the latent 'found' boolean to determine
    whether another loop iteration is warranted, rather than setting 'dev'
    to NULL, which creates confusion, suggesting that no devices have been
    scanned and the whole process is starting from the beginning.
    
    Note that the upcoming bootflow_efi() test is used to test this
    behaviour.
    
    Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
    Fixes: u-boot-dm#17
    cae1ad02
    History
    bootstd: Make bootdev_next_prio() continue after failure
    Simon Glass authored and Tom Rini's avatar Tom Rini committed
    
    When a device fails to probe, the next device should be tried, until
    either we find a suitable device or run out of devices. A device
    should never be tried twice.
    
    When we run out of devices of a particular priority, the hunter should
    be used to generate devices of the next priority. Only if all attempts
    fail should this function return an error.
    
    Update the function to use the latent 'found' boolean to determine
    whether another loop iteration is warranted, rather than setting 'dev'
    to NULL, which creates confusion, suggesting that no devices have been
    scanned and the whole process is starting from the beginning.
    
    Note that the upcoming bootflow_efi() test is used to test this
    behaviour.
    
    Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
    Fixes: u-boot-dm#17