Re: [PATCH 2/8] spi: sh-msiof: Fix DMA transfer size check

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

 



Hi Dirk,

On Thu, Sep 7, 2017 at 10:33 AM, Dirk Behme <dirk.behme@xxxxxxxxxxxx> wrote:
> On 07.09.2017 10:31, Geert Uytterhoeven wrote:
>> On Wed, Sep 6, 2017 at 9:05 AM, Dirk Behme <dirk.behme@xxxxxxxxxxxx>
>> wrote:
>>> From: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@xxxxxxxxxxx>
>>>
>>> DMA supports 32-bit words only,
>>> even if BITLEN1 of SITMDR2 register is 16bit.
>>>
>>> Signed-off-by: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@xxxxxxxxxxx>
>>> Signed-off-by: Dirk Behme <dirk.behme@xxxxxxxxxxxx>
>>> ---
>>>   drivers/spi/spi-sh-msiof.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
>>> index 2b4d3a520176..f9300fdf41e5 100644
>>> --- a/drivers/spi/spi-sh-msiof.c
>>> +++ b/drivers/spi/spi-sh-msiof.c
>>> @@ -904,7 +904,7 @@ static int sh_msiof_transfer_one(struct spi_master
>>> *master,
>>>                                  break;
>>>                          copy32 = copy_bswap32;
>>>                  } else if (bits <= 16) {
>>> -                       if (l & 1)
>>> +                       if (l & 3)
>>>                                  break;
>>>                          copy32 = copy_wswap32;
>>>                  } else {
>>
>>
>> Looks OK, as l is in bytes, not 16-bit words.
>>
>> Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
>
> What do you think about CCing this to -stable?

Sounds OK. Have you tested this?

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
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux