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: <BY5PR07MB81192669816D2F08D4AEAD1EB0269@BY5PR07MB8119.namprd07.prod.outlook.com>
Date:   Mon, 24 May 2021 05:39:22 +0000
From:   Sanket Parmar <sparmar@...ence.com>
To:     Peter Chen <peter.chen@...nel.org>,
        Pawel Laszczak <pawell@...ence.com>
CC:     "a-govindraju@...com" <a-govindraju@...com>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Rahul Kumar <kurahul@...ence.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "kishon@...com" <kishon@...com>
Subject: RE: [PATCH] usb: cdns3: Enable TDL_CHK only for OUT ep

> On 21-05-17 17:05:12, Sanket Parmar wrote:
> > ZLP gets stuck if TDL_CHK bit is set and TDL_FROM_TRB is used
> > as TDL source for IN endpoints. To fix it, TDL_CHK is only
> > enabled for OUT endpoints.
> >
> > Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver")
> > Reported-by: Aswath Govindraju <a-govindraju@...com>
> > Signed-off-by: Sanket Parmar <sparmar@...ence.com>
> > ---
> >  drivers/usb/cdns3/cdns3-gadget.c |    8 +++-----
> >  1 files changed, 3 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-
> gadget.c
> > index 105855a..f3c0276 100644
> > --- a/drivers/usb/cdns3/cdns3-gadget.c
> > +++ b/drivers/usb/cdns3/cdns3-gadget.c
> > @@ -2007,7 +2007,7 @@ static void cdns3_configure_dmult(struct
> cdns3_device *priv_dev,
> >  		else
> >  			mask = BIT(priv_ep->num);
> >
> > -		if (priv_ep->type != USB_ENDPOINT_XFER_ISOC) {
> > +		if (priv_ep->type != USB_ENDPOINT_XFER_ISOC  && !priv_ep-
> >dir) {
> >  			cdns3_set_register_bit(&regs->tdl_from_trb, mask);
> >  			cdns3_set_register_bit(&regs->tdl_beh, mask);
> >  			cdns3_set_register_bit(&regs->tdl_beh2, mask);
> > @@ -2046,15 +2046,13 @@ int cdns3_ep_config(struct cdns3_endpoint
> *priv_ep, bool enable)
> >  	case USB_ENDPOINT_XFER_INT:
> >  		ep_cfg = EP_CFG_EPTYPE(USB_ENDPOINT_XFER_INT);
> >
> > -		if ((priv_dev->dev_ver == DEV_VER_V2 && !priv_ep->dir) ||
> > -		    priv_dev->dev_ver > DEV_VER_V2)
> > +		if (priv_dev->dev_ver >= DEV_VER_V2 && !priv_ep->dir)
> >  			ep_cfg |= EP_CFG_TDL_CHK;
> >  		break;
> >  	case USB_ENDPOINT_XFER_BULK:
> >  		ep_cfg = EP_CFG_EPTYPE(USB_ENDPOINT_XFER_BULK);
> >
> > -		if ((priv_dev->dev_ver == DEV_VER_V2  && !priv_ep->dir) ||
> > -		    priv_dev->dev_ver > DEV_VER_V2)
> > +		if (priv_dev->dev_ver >= DEV_VER_V2 && !priv_ep->dir)
> >  			ep_cfg |= EP_CFG_TDL_CHK;
> >  		break;
> >  	default:
> > --
> 
> Sanket & Pawel, please confirm this behaviour could apply for DEV_VER_V3,
> that is TDL_CHK can't be used for bulk in for DEV_VER_V3?

Yes, TDL_CHK shouldn't be used for bulk in for DEV_VER_V3.

> 
> --
> 
> Thanks,
> Peter Chen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ