From: Hans de Goede Date: Tue, 5 May 2015 15:28:20 +0200 Subject: [U-Boot] [PATCH 5/5] usb: ehci: Increase usb_companion_device_count when handing over devices In-Reply-To: <1430832500-7126-1-git-send-email-hdegoede@redhat.com> References: <1430832500-7126-1-git-send-email-hdegoede@redhat.com> Message-ID: <1430832500-7126-6-git-send-email-hdegoede@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Increase usb_companion_device_count when handing over devices to the ehci's companion controller. usb_init() will use this to short-circuit companion bus scanning when no devices were handed over at all. Signed-off-by: Hans de Goede --- drivers/usb/host/ehci-hcd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 25981ef..40d6dc1 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -873,6 +873,7 @@ static int ehci_submit_root(struct usb_device *dev, unsigned long pipe, /* Low speed device, give up ownership. */ debug("port %d low speed --> companion\n", port - 1); + usb_companion_device_count++; reg |= EHCI_PS_PO; ehci_writel(status_reg, reg); break; @@ -902,6 +903,7 @@ static int ehci_submit_root(struct usb_device *dev, unsigned long pipe, if ((reg & (EHCI_PS_PE | EHCI_PS_CS)) == EHCI_PS_CS && !ehci_is_TDI()) { debug("port %d full speed --> companion\n", port - 1); + usb_companion_device_count++; reg &= ~EHCI_PS_CLEAR; reg |= EHCI_PS_PO; ehci_writel(status_reg, reg); -- 2.3.6