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: <34347fd8-1d67-4d16-b09f-061bc0c0cb5a@www.fastmail.com>
Date:   Sun, 14 Nov 2021 12:56:02 +0100
From:   "Sven Peter" <sven@...npeter.dev>
To:     "Fabio Aiuto" <fabioaiuto83@...il.com>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>
Cc:     "Felipe Balbi" <balbi@...nel.org>, "Arnd Bergmann" <arnd@...db.de>,
        "hch@....de" <hch@....de>, hdegoede@...hat.com,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: dwc3: leave default DMA for PCI devices

On Sat, Nov 13, 2021, at 15:29, Fabio Aiuto wrote:
> in case of a PCI dwc3 controller, leave the default DMA
> mask. Calling of a 64 bit DMA mask breaks the driver on
> cherrytrail based tablets like Cyberbook T116.
>
> Fixes: 45d39448b4d0 ("usb: dwc3: support 64 bit DMA in platform driver")
> Reported-by: Hans De Goede <hdegoede@...hat.com>
> Tested-by: Fabio Aiuto <fabioaiuto83@...il.com>
> Signed-off-by: Fabio Aiuto <fabioaiuto83@...il.com>
> ---
>  drivers/usb/dwc3/core.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 643239d7d370..f4c09951b517 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -1594,9 +1594,11 @@ static int dwc3_probe(struct platform_device *pdev)
> 
>  	dwc3_get_properties(dwc);
> 
> -	ret = dma_set_mask_and_coherent(dwc->sysdev, DMA_BIT_MASK(64));
> -	if (ret)
> -		return ret;
> +	if (!dwc->sysdev_is_parent) {


Are you sure it's the dwc3 controller that limits DMA to 32 bit addresses and
not the PCI bus itself?
I also think the xhci driver will call dma_set_mask_and_coherent again
later on when dwc3 is used in host mode.



Sven

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ