Re: [PATCH v2 1/2] spi: Split spi message into chunks of <65535 in the spi subsystem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Meghana,

On Sat, Mar 10, 2018 at 4:51 PM, Meghana Madhyastha
<meghana.madhyastha@xxxxxxxxx> wrote:
> Split spi messages into chunks of <65535 in the spi subsystem and remove the message
> length warning in bcm2835_spi_can_dma. This is so that the messages can be transferred
> via dma and that the tinydrm drivers need not split it.
>
> Signed-off-by: Meghana Madhyastha <meghana.madhyastha@xxxxxxxxx>

Thanks for your patch!

> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -1242,6 +1242,14 @@ static void __spi_pump_messages(struct spi_controller *ctlr, bool in_kthread)
>         trace_spi_message_start(ctlr->cur_msg);
>
>         if (ctlr->prepare_message) {
> +               gfp_t gfp_flags = GFP_KERNEL | GFP_DMA;
> +               size_t max_transfer_size = 32000;

Do you really want to impose this arbitrary limit (which BTW doesn't match
the value in the patch description) to each and every SPI controller driver?

> +               ret = spi_split_transfers_maxsize(ctlr, ctlr->cur_msg, max_transfer_size, gfp_flags);
> +               if (ret) {
> +                       dev_err(&ctlr->dev,
> +                               "failed to split message\n");
> +                       goto out;
> +               }
>                 ret = ctlr->prepare_message(ctlr, ctlr->cur_msg);
>                 if (ret) {
>                         dev_err(&ctlr->dev, "failed to prepare message: %d\n",

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux