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:	Thu, 25 Jul 2013 21:21:09 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	"Ivan T. Ivanov" <iivanov@...sol.com>
CC:	balbi@...com, gregkh@...uxfoundation.org,
	linux-usb@...r.kernel.org, linux-omap@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: dwc3: core: modify IO memory resource after deferred
 probe completes

On 07/25/2013 08:26 PM, Ivan T. Ivanov wrote:

> From: "Ivan T. Ivanov" <iivanov@...sol.com>

> When deferred probe happens driver will try to ioremap multiple times
> and will fail. Memory resource.start variable is a global variable,
> modifications in this field will be accumulated on every probe.
> Fix this by moving the above operations after driver hold all
> required PHY's.

> Signed-off-by: Ivan T. Ivanov <iivanov@...sol.com>
> ---
>   drivers/usb/dwc3/core.c |   31 ++++++++++++++++---------------
>   1 file changed, 16 insertions(+), 15 deletions(-)

> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 607bef8..50c833f 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
[...]
> @@ -452,6 +437,22 @@ static int dwc3_probe(struct platform_device *pdev)
>   		return -EPROBE_DEFER;
>   	}
>
> +	dwc->xhci_resources[0].start = res->start;
> +	dwc->xhci_resources[0].end = dwc->xhci_resources[0].start +
> +					DWC3_XHCI_REGS_END;
> +	dwc->xhci_resources[0].flags = res->flags;
> +	dwc->xhci_resources[0].name = res->name;
> +
> +	res->start += DWC3_GLOBALS_REGS_START;
> +
> +	 /*
> +	  * Request memory region but exclude xHCI regs,
> +	  * since it will be requested by the xhci-plat driver.
> +	  */

     Please remove an extra space after a tab on each comment line.
It seems like a good time to do it, while you're moving this code.

> +	regs = devm_ioremap_resource(dev, res);
> +	if (IS_ERR(regs))
> +		return PTR_ERR(regs);
> +

WBR, Sergei

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