lkml.org 
[lkml]   [2020]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 4.19 182/267] spi: dw: Return any value retrieved from the dma_transfer callback
    On Fri, Jun 26, 2020 at 11:18:00AM -0400, Ralph Siemsen wrote:
    >Hi Serge, Pavel, Greg,
    >
    >On Mon, Jun 22, 2020 at 11:51:21PM +0300, Serge Semin wrote:
    >>Hello Pavel
    >>
    >>On Fri, Jun 19, 2020 at 11:07:19PM +0200, Pavel Machek wrote:
    >>
    >>>Mainline patch simply changes return value, but code is different in
    >>>v4.19, and poll_transfer will now be avoided when dws->dma_mapped. Is
    >>>that a problem?
    >>
    >>Actually no.) In that old 4.19 context it's even better to return straight away
    >>no matter what value is returned by the dma_transfer() callback.
    >
    >This patch changes the return dma_transfer return value from 0 to 1,
    >however it was only done in spi-dw-mid.c func mid_spi_dma_transfer().
    >
    >There is an identical function in spi-dw-mmio.c that needs the same
    >treatment, otherwise access to the SPI device becomes erratic and even
    >causes kernel to hang. Guess how I found this ;-)
    >
    >So the following patch is needed as well, at least in 4.9 and 4.19, I
    >did not check/test other versions. Mainline does not need this, since
    >the code seems to have been refactored to avoid the duplication.

    Could you add your signed-off-by tag please? :)

    --
    Thanks,
    Sasha

    \
     
     \ /
      Last update: 2020-06-26 22:07    [W:4.279 / U:0.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site