public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] config_distro_bootcmd: Avoid scanning usb twice (under some circumstances)
Date: Sun, 23 Nov 2014 12:03:33 +0100	[thread overview]
Message-ID: <5471BF05.3030203@redhat.com> (raw)
In-Reply-To: <1416509997-6536-1-git-send-email-hdegoede@redhat.com>

Hi,

On 11/20/2014 07:59 PM, Hans de Goede wrote:
> When using usb-keyboard support, the preboot env variable must be set to a
> command to scan usb, so that the keyboard is available to interrupt autoboot.
> 
> The logical command to add when using config_distro_bootcmd.h is
> "run usb_init", as that does a "setenv usb_need_init false" which should avoid
> a second scan when booting from usb.
> 
> However this does not work because config_distro_bootcmd sets
> bootcmd to "setenv usb_need_init; ...".
> 
> This is not necessary "if ${usb_need_init}" will evaluate to true just as well
> if usb_need_init is not set at all. So drop the BOOTENV_SET_USB_NEED_INIT
> macro and calling of it, thereby fixing the double usb-scan.
> 
> While at it do the same for scsi_need_init which was modelled after the usb
> code.

Self-NAK, this breaks things after an "env save" command, as then the env
saved will contain usb_need_init=false, and usb will no longer get scanned.

I'll look into a different fix.

Regards,

Hans

      reply	other threads:[~2014-11-23 11:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-20 18:59 [U-Boot] [PATCH] config_distro_bootcmd: Avoid scanning usb twice (under some circumstances) Hans de Goede
2014-11-23 11:03 ` Hans de Goede [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5471BF05.3030203@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox