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, 7 Oct 2021 13:03:22 +0800
From:   Peter Chen <peter.chen@...nel.org>
To:     Manish Narani <manish.narani@...inx.com>
Cc:     gregkh@...uxfoundation.org, michal.simek@...inx.com,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        git@...inx.com, Piyush Mehta <piyush.mehta@...inx.com>
Subject: Re: [PATCH 6/6] usb: chipidea: udc: Add xilinx revision support

On 21-08-24 22:46:18, Manish Narani wrote:
> From: Piyush Mehta <piyush.mehta@...inx.com>
> 
> Issue: Adding a dTD to a Primed Endpoint May Not Get Recognized with
> revision 2.20a.
> 
> There is an issue with the add dTD tripwire semaphore (ATDTW bit in
> USBCMD register) that can cause the controller to ignore a dTD that is
> added to a primed endpoint. When this happens, the software can read
> the tripwire bit and the status bit at '1' even though the endpoint is
> unprimed.
> This issue observed with the Windows host machine.
> 
> Workaround:
> The software must implement a periodic cycle, and check for each dTD
> pending on execution (Active = 1), if the endpoint is primed. It can do
> this by reading the corresponding bits in the ENDPTPRIME and ENDPTSTAT
> registers. If these bits are read at 0, the software needs to re-prime
> the endpoint by writing 1 to the corresponding bit in the ENDPTPRIME
> register.
> 
> Added conditional revision check of 2.20[CI_REVISION_22] along with 2.40.
> 
> Signed-off-by: Piyush Mehta <piyush.mehta@...inx.com>
> Signed-off-by: Manish Narani <manish.narani@...inx.com>
> ---
>  drivers/usb/chipidea/udc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
> index 8834ca6..b440205 100644
> --- a/drivers/usb/chipidea/udc.c
> +++ b/drivers/usb/chipidea/udc.c
> @@ -680,7 +680,8 @@ static int _hardware_dequeue(struct ci_hw_ep *hwep, struct ci_hw_req *hwreq)
>  		if ((TD_STATUS_ACTIVE & tmptoken) != 0) {
>  			int n = hw_ep_bit(hwep->num, hwep->dir);
>  
> -			if (ci->rev == CI_REVISION_24)
> +			if (ci->rev == CI_REVISION_24 ||
> +			    ci->rev == CI_REVISION_22)

Besides, please change subject a little, it is for specific IP version,
but not related to SoC platforms.

>  				if (!hw_read(ci, OP_ENDPTSTAT, BIT(n)))
>  					reprime_dtd(ci, hwep, node);
>  			hwreq->req.status = -EALREADY;
> -- 
> 2.1.1
> 

-- 

Thanks,
Peter Chen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ