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, 9 Apr 2015 10:49:00 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	"Ivan T. Ivanov" <ivan.ivanov@...aro.org>,
	Vivek Gautam <gautam.vivek@...sung.com>
cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	USB list <linux-usb@...r.kernel.org>,
	Kernel development list <linux-kernel@...r.kernel.org>,
	<linux-arm-msm@...r.kernel.org>
Subject: Re: [PATCH] usb: ehci-msm: Don't ioremap configuration space
 exclusively

On Thu, 9 Apr 2015, Ivan T. Ivanov wrote:

> This allow same IO space to be shared between HCD and Device
> controller driver. Which can be loaded simultaneously and
> started/stopped on demand by USB OTG PHY driver.

You really should CC the person who wrote the code you are changing.  
This is almost exactly the same as reverting commit 70843f623b58 (usb: 
host: ehci-msm: Use devm_ioremap_resource instead of devm_ioremap).

Vivek, what do you think?

Alan Stern

> Signed-off-by: Ivan T. Ivanov <ivan.ivanov@...aro.org>
> ---
>  drivers/usb/host/ehci-msm.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
> index 9db74ca..f059e15 100644
> --- a/drivers/usb/host/ehci-msm.c
> +++ b/drivers/usb/host/ehci-msm.c
> @@ -88,13 +88,17 @@ static int ehci_msm_probe(struct platform_device *pdev)
>  	}
> 
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	hcd->regs = devm_ioremap_resource(&pdev->dev, res);
> +	if (!res)
> +		return -ENODEV;
> +
> +	hcd->rsrc_start = res->start;
> +	hcd->rsrc_len = resource_size(res);
> +
> +	hcd->regs = devm_ioremap(&pdev->dev, hcd->rsrc_start, hcd->rsrc_len);
>  	if (IS_ERR(hcd->regs)) {
>  		ret = PTR_ERR(hcd->regs);
>  		goto put_hcd;
>  	}
> -	hcd->rsrc_start = res->start;
> -	hcd->rsrc_len = resource_size(res);
> 
>  	/*
>  	 * OTG driver takes care of PHY initialization, clock management,
> --
> 1.9.1
> 
> 
> 

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