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] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1210041456310.1441-100000@iolanthe.rowland.org>
Date:	Thu, 4 Oct 2012 14:58:08 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Florian Fainelli <florian@...nwrt.org>
cc:	linux-usb@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 06/24 v2] USB: EHCI: add no_io_watchdog platform_data
 parameter to ehci-platform

On Thu, 4 Oct 2012, Florian Fainelli wrote:

> Enhance the ehci-platform driver to also accept no_io_watchdog as a platform
> data parameter. When no_io_watchdog is set to 1, the ehci controller will set
> ehci->need_io_watchdog to 0. Since most EHCI controllers do need the I/O
> watchdog to be on, only let those which need it to turn the watchdog off.
> 
> Signed-off-by: Florian Fainelli <florian@...nwrt.org>
> ---
> Changes since v1:
> - reworked patch to introduce "no_io_watchdog" instead of "need_io_watchdog"
> - reworded commit message accordingly

Very good except for one thing...

> --- a/drivers/usb/host/ehci-platform.c
> +++ b/drivers/usb/host/ehci-platform.c
> @@ -32,6 +32,8 @@ static int ehci_platform_reset(struct usb_hcd *hcd)
>  	ehci->has_synopsys_hc_bug = pdata->has_synopsys_hc_bug;
>  	ehci->big_endian_desc = pdata->big_endian_desc;
>  	ehci->big_endian_mmio = pdata->big_endian_mmio;
> +	if (pdata->no_io_watchdog)
> +		ehci->need_io_watchdog = 0;
>  
>  	ehci->caps = hcd->regs + pdata->caps_offset;
>  	retval = ehci_setup(hcd);

ehci_setup calls ehci_init, which unconditionally sets 
need_io_watchdog.  Your new "if" statement has to come after this call.

Alan Stern

--
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