Re: [PATCH] spi: rspi: fix the bug related to mount/remount jffs2

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

 



Hi Geert,

Sorry for the delay.

Thanks for your reply.


On Mon, Feb 13, 2017 at 7:50 AM, Hiep Cao Minh <cm-hiep@xxxxxxxxxxx> wrote:
Sorry to bother you!
No, thank you for finally make me see my wrong reasoning!

qspi_transfer_in() does:

          while (n > 0) {
                  len = qspi_set_receive_trigger(rspi, n);
                  // len will be <= n
I agree. This is len = min value of n and 32.
                  if (len == QSPI_BUFFER_SIZE) {
                          // receive blocks of len bytes
Yes, This is len == 32 bytes
                          ...
                  } else {
                          // receive n (not len) bytes
This is always n == len ( This case, len or n is always < 32)
Because this is the last n bytes should be received.
Right.
Doh, I must have missed that if "len < n", the first branch is always taken.

                          ret = rspi_pio_transfer(rspi, NULL, rx, n);
It would have been clearer to use "len" here instead of "n".
I agree, Dong will update your suggestion at the patch.

Thank you.
Hiep.

--
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