lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <517A31A9.5070504@hp.com>
Date:	Fri, 26 Apr 2013 15:50:01 +0800
From:	ZhenHua <zhen-hual@...com>
To:	"Li, Zhen-Hua" <zhen-hual@...com>, stern@...land.harvard.edu,
	gregkh@...uxfoundation.org, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] driver,usb: Fix a warning in uhci-hcd driver

There is a function  wait_for_HP() in uhci-hub.c. In this
patch, it is used in suspend_rh(),  I think this can be a
solution. And I have tested this patch, it can fix the bug.

I think there is another patch needed. As Alan said in another
mail, in the UHCI_RH_RUNNING_NODEVS case, it should not be stopped
if the uhci device is HP iLo virtual usb.


Thanks
Zhen-Hua

On 04/26/2013 03:38 PM, Li, Zhen-Hua wrote:
> This patch is trying to fix this bug on SLES11 SP2:
>      https://bugzilla.novell.com/show_bug.cgi?id=817035
>
> On a large HP system with 64T memory and 60 logical cpus, when usb
> driver inits the iLo Virtual USB Controller, there comes a warning
> "Controller not stopped yet!". It is because the HP iLo virtual usb
> device requires a longer delay.
>
> Signed-off-by: Li, Zhen-Hua <zhen-hual@...com>
> ---
>   drivers/usb/host/uhci-hcd.c |    5 +++++
>   drivers/usb/host/uhci-hub.c |   12 +++++++-----
>   2 files changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
> index 4a86b63..af30517 100644
> --- a/drivers/usb/host/uhci-hcd.c
> +++ b/drivers/usb/host/uhci-hcd.c
> @@ -355,6 +355,11 @@ __acquires(uhci->lock)
>   		if (uhci->dead)
>   			return;
>   	}
> +
> +	/* HP's iLo Virtual USB Controller requires a longer delay. */
> +	if (uhci->wait_for_hp)
> +		wait_for_HP(uhci, USBSTS, USBSTS_HCH, 1000);
> +
>   	if (!(uhci_readw(uhci, USBSTS) & USBSTS_HCH))
>   		dev_warn(uhci_dev(uhci), "Controller not stopped yet!\n");
>   
> diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c
> index f87bee6..c3f772c 100644
> --- a/drivers/usb/host/uhci-hub.c
> +++ b/drivers/usb/host/uhci-hub.c
> @@ -120,14 +120,15 @@ static void uhci_finish_suspend(struct uhci_hcd *uhci, int port,
>   }
>   
>   /* Wait for the UHCI controller in HP's iLO2 server management chip.
> - * It can take up to 250 us to finish a reset and set the CSC bit.
> + * It can take up to max_wait us to finish the operation.
>    */
> -static void wait_for_HP(struct uhci_hcd *uhci, unsigned long port_addr)
> +static void wait_for_HP(struct uhci_hcd *uhci, unsigned long port_addr,
> +		u16 status, int max_wait)
>   {
>   	int i;
>   
> -	for (i = 10; i < 250; i += 10) {
> -		if (uhci_readw(uhci, port_addr) & USBPORTSC_CSC)
> +	for (i = 10; i < max_wait; i += 10) {
> +		if (uhci_readw(uhci, port_addr) & status)
>   			return;
>   		udelay(10);
>   	}
> @@ -151,7 +152,8 @@ static void uhci_check_ports(struct uhci_hcd *uhci)
>   				/* HP's server management chip requires
>   				 * a longer delay. */
>   				if (uhci->wait_for_hp)
> -					wait_for_HP(uhci, port_addr);
> +					wait_for_HP(uhci, port_addr,
> +						USBPORTSC_CSC, 250);
>   
>   				/* If the port was enabled before, turning
>   				 * reset on caused a port enable change.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ