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]
Date:	Fri, 29 Oct 2010 10:06:26 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>
cc:	Greg KH <gregkh@...e.de>, <matthieu.castet@...rot.com>,
	<linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>,
	Nguyen Dinh-R00091 <R00091@...escale.com>
Subject: Re: [PATCH] USB: ehci/mxc: compile fix

On Fri, 29 Oct 2010, [UTF-8] Uwe Kleine-König wrote:

> 65fd42724aee31018b0bb53f4cb04971423be664 broke the build using
> ARM's mx51_defconfig:
> 
>  	  CC      drivers/usb/host/ehci-hcd.o
>  	In file included from drivers/usb/host/ehci-hcd.c:1166:
>  	drivers/usb/host/ehci-mxc.c: In function 'ehci_mxc_drv_probe':
>  	drivers/usb/host/ehci-mxc.c:192: error: 'ehci' undeclared (first use in this function)
>  	drivers/usb/host/ehci-mxc.c:192: error: (Each undeclared identifier is reported only once
>  	drivers/usb/host/ehci-mxc.c:192: error: for each function it appears in.)
>  	drivers/usb/host/ehci-mxc.c:117: warning: unused variable 'temp'
>  	make[3]: *** [drivers/usb/host/ehci-hcd.o] Error 1
>  	make[2]: *** [drivers/usb/host/ehci-hcd.o] Error 2
>  	make[1]: *** [sub-make] Error 2
>  	make: *** [all] Error 2
> 
> Fix it together with the warnung about the unused variable.
> 
> Tested-by: Dinh Nguyen <Dinh.Nguyen@...escale.com>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
> ---
>  drivers/usb/host/ehci-mxc.c |   13 ++++++++-----
>  1 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
> index ac9c4d7..70edb11 100644
> --- a/drivers/usb/host/ehci-mxc.c
> +++ b/drivers/usb/host/ehci-mxc.c
> @@ -36,6 +36,8 @@ struct ehci_mxc_priv {
>  static int ehci_mxc_setup(struct usb_hcd *hcd)
>  {
>  	struct ehci_hcd *ehci = hcd_to_ehci(hcd);
> +	struct device *dev = hcd->self.controller;
> +	struct mxc_usbh_platform_data *pdata = dev_get_platdata(dev);
>  	int retval;
>  
>  	/* EHCI registers start at offset 0x100 */
> @@ -64,6 +66,11 @@ static int ehci_mxc_setup(struct usb_hcd *hcd)
>  	ehci_reset(ehci);
>  
>  	ehci_port_power(ehci, 0);
> +
> +	/* set up the PORTSCx register */
> +	ehci_writel(ehci, pdata->portsc, &ehci->regs->port_status[0]);
> +	mdelay(10);

This mdelay really should be changed to msleep.  Also according to 
Matthieu, in ehci-fsl this is done before the ehci_port_power() call, 
not after, and there is no delay.  I don't know if this makes any 
difference.

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