lkml.org 
[lkml]   [2018]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v3 3/6] spi: sun6i: restrict transfer length in PIO-mode
    On Mon, Apr 09, 2018 at 02:59:57PM +0300, Sergey Suloev wrote:
    > > > But as soon as sun4i SPI driver  is correctly declaring
    > > > max_transfer_size then "smart" clients will work well by limiting a
    > > > single transfer size to FIFO depth. I tested it with real hardware,
    > > > again.
    > > This is really not my point. What would prevent you from doing
    > > multiple transfers in that case, and filling the FIFO entirely,
    > > waiting for it to be done, then resuming until you have sent the right
    > > number of bytes?
    >
    > Because it makes no sense IMHO. I can't see any single point in allowing
    > long PIO transfers. Can you find at least one ?

    I'm probably going to state the obvious here, but to allow long transfers?

    > I think we should reuse as much SPI core code as possible. The SPI
    > core can handle an SPI message with multiple transfers, all we need
    > is to have max_transfer_size = FIFO depth and restrict it in
    > transfer_one().

    There's not a single call to the max_transfer_size hook in the SPI
    core in 4.16, so that seems a bit too optimistic.

    Maxime

    --
    Maxime Ripard, Bootlin (formerly Free Electrons)
    Embedded Linux and Kernel engineering
    https://bootlin.com
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2018-04-10 16:05    [W:2.770 / U:0.180 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site