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: <CH2PR02MB7000EACD029FC7E47679393CC7810@CH2PR02MB7000.namprd02.prod.outlook.com>
Date:   Fri, 27 Sep 2019 06:48:29 +0000
From:   Radhey Shyam Pandey <radheys@...inx.com>
To:     Vinod Koul <vkoul@...nel.org>
CC:     "dan.j.williams@...el.com" <dan.j.williams@...el.com>,
        Michal Simek <michals@...inx.com>,
        "nick.graumann@...il.com" <nick.graumann@...il.com>,
        "andrea.merello@...il.com" <andrea.merello@...il.com>,
        Appana Durga Kedareswara Rao <appanad@...inx.com>,
        "mcgrof@...nel.org" <mcgrof@...nel.org>,
        "dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH -next 7/8] dmaengine: xilinx_dma: Check for both idle and
 halted state in axidma stop_transfer

> -----Original Message-----
> From: Vinod Koul <vkoul@...nel.org>
> Sent: Thursday, September 26, 2019 10:51 PM
> To: Radhey Shyam Pandey <radheys@...inx.com>
> Cc: dan.j.williams@...el.com; Michal Simek <michals@...inx.com>;
> nick.graumann@...il.com; andrea.merello@...il.com; Appana Durga
> Kedareswara Rao <appanad@...inx.com>; mcgrof@...nel.org;
> dmaengine@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH -next 7/8] dmaengine: xilinx_dma: Check for both idle
> and halted state in axidma stop_transfer
> 
> On 05-09-19, 22:07, Radhey Shyam Pandey wrote:
> > From: Nicholas Graumann <nick.graumann@...il.com>
> >
> > When polling for a stopped transfer in AXI DMA mode, in some cases the
> > status of the channel may indicate IDLE instead of HALTED if the
> > channel was reset due to an error.
> >
> > Signed-off-by: Nicholas Graumann <nick.graumann@...il.com>
> > Signed-off-by: Radhey Shyam Pandey
> <radhey.shyam.pandey@...inx.com>
> > ---
> >  drivers/dma/xilinx/xilinx_dma.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/dma/xilinx/xilinx_dma.c
> b/drivers/dma/xilinx/xilinx_dma.c
> > index b5dd62a..0896e07 100644
> > --- a/drivers/dma/xilinx/xilinx_dma.c
> > +++ b/drivers/dma/xilinx/xilinx_dma.c
> > @@ -1092,8 +1092,9 @@ static int xilinx_dma_stop_transfer(struct
> xilinx_dma_chan *chan)
> >
> >  	/* Wait for the hardware to halt */
> >  	return xilinx_dma_poll_timeout(chan, XILINX_DMA_REG_DMASR,
> val,
> > -				       val & XILINX_DMA_DMASR_HALTED, 0,
> > -				       XILINX_DMA_LOOP_COUNT);
> > +				       val | (XILINX_DMA_DMASR_IDLE |
> > +					      XILINX_DMA_DMASR_HALTED),
> 
> The condition was bitwise AND and now is OR.. ??

Ah, it should be same as before . Only _IDLE mask should be in OR.

Also on second thought to this patch- we need to describe which error
scenario "in some cases the status of the channel may indicate IDLE
instead of HALTED" as mentioned in commit description.

@Nick: Can you comment?

> 
> > +				       0, XILINX_DMA_LOOP_COUNT);
> >  }
> >
> >  /**
> > --
> > 2.7.4
> 
> --
> ~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ