From: Michael Walle <michael-QKn5cuLxLXY@public.gmane.org>
To: Vladimir Oltean <olteanv-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
lkml <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Esben Haabendal <eha-/iRVSOupHO4@public.gmane.org>,
angelo-BIYBQhTR83Y@public.gmane.org,
andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
"Gustavo A. R. Silva"
<gustavo-L1vi/lXTdts+Va1GwOuvDg@public.gmane.org>,
Wei Chen <weic-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Mohamed Hosny <mhosny-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
peng.ma-3arQi8VN3Tc@public.gmane.org
Subject: Re: [PATCH v3 06/12] spi: spi-fsl-dspi: Replace interruptible wait queue with a simple completion
Date: Mon, 16 Mar 2020 18:15:48 +0100 [thread overview]
Message-ID: <8c22cb70b7c0acb6769e0c68540ab523@walle.cc> (raw)
In-Reply-To: <CA+h21hqt7Xe1LrSDsCVS8zqunQp2tKGhmHDraMirxL595go4nA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Am 2020-03-16 17:23, schrieb Vladimir Oltean:
> On Mon, 16 Mar 2020 at 15:25, Michael Walle <michael-QKn5cuLxLXY@public.gmane.org> wrote:
>>
>> Am 2020-03-16 14:00, schrieb Vladimir Oltean:
>> > On Mon, 16 Mar 2020 at 14:49, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
>> >>
>> >> On Mon, Mar 16, 2020 at 02:29:09PM +0200, Vladimir Oltean wrote:
>> >>
>> >> > Correct, the real problem is that I forgot to add a Fixes: tag for
>> >> > patch 5. I'll do that now.
>> >>
>> >> OK. The series otherwise looked fine but I'll wait for testing.
>> >> Michael, if there's issues remaining it might be good to get some
>> >> Tested-bys for the patches prior to whatever's broken so we can get
>> >> those fixes in (but obviously verifying that is work so only if you
>> >> have time).
>>
>> I'm just about to test it. While my former "cat /dev/mtdN > /dev/null"
>> is working. I had the impression that it was slower, so I tried to
>> test
>> it with dd now and a known chunk size.. only to find out that it is
>> still not working:
>>
>> # dmesg|grep spi
>> [ 1.894891] spi-nor spi1.0: w25q128fw (16384 Kbytes)
>> ..
>> # time cat /dev/mtd0 > /dev/null
>> real 0m 30.73s
>> user 0m 0.00s
>> sys 0m 1.02s
>> # dd if=/dev/mtd0 of=/dev/null bs=64
>> 262144+0 records in
>> 262144+0 records out
>> # dd if=/dev/mtd0 of=/dev/null bs=64
>> 262144+0 records in
>> 262144+0 records out
>> # dd if=/dev/mtd0 of=/dev/null bs=64
>> dd: /dev/mtd0: Input/output error
>
> I don't really have a SPI flash connected to DSPI on any LS1028A board.
I'm already debugging it again.
> Is this DMA or XSPI mode?
XSPI mode. DMA mode looked good for now.
>>
>> I also wanted to test how it behaves if there are multiple processes
>> access the /dev/mtdN device. I haven't found the time to dig into
>> the call chain if see if there is any locking. Because what happens
>> if transfer_one_message() is called twice at the same time from two
>> different processes?
>>
>
> There is a mutex on the SPI bus, and therefore all variants of the
> .transfer() call are operating under this lock protection, which
> simplifies things quite a bit.
Ok, thanks.
-michael
>> >
>> > This time I verified with a protocol analyzer all transfer lengths
>> > from 1 all the way to 256, with this script:
>> >
>> > #!/bin/bash
>> >
>> > buf=''
>> >
>> > for i in $(seq 0 255); do
>> > » buf="${buf}\x$(printf '%02x' ${i})"
>> > » spidev_test --device /dev/spidev2.0 --bpw 8 --cpha --speed
>> > 5000000 -p "${buf}"
>> > done
>> >
>> > It looked fine as far as I could tell, and also the problems
>> > surrounding Ctrl-C are no longer present. Nonetheless it would be good
>> > if Michael could confirm, but I know that he's very busy too so it's
>> > understandable if he can no longer spend time on this.
>>
>> I'm working on it ;)
>>
>> -michael
>
> Thanks,
> -Vladimir
next prev parent reply other threads:[~2020-03-16 17:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-14 22:43 [PATCH v3 00/12] NXP DSPI bugfixes and support for LS1028A Vladimir Oltean
2020-03-14 22:43 ` [PATCH v3 01/12] spi: spi-fsl-dspi: Don't access reserved fields in SPI_MCR Vladimir Oltean
2020-03-14 22:43 ` [PATCH v3 06/12] spi: spi-fsl-dspi: Replace interruptible wait queue with a simple completion Vladimir Oltean
2020-03-16 12:26 ` Mark Brown
[not found] ` <20200316122613.GE5010-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2020-03-16 12:29 ` Vladimir Oltean
[not found] ` <CA+h21hqRV+HmAz4QGyH9ZtcFWzeCKczitcn+mfTdwAC7ZobdDw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-03-16 12:49 ` Mark Brown
2020-03-16 13:00 ` Vladimir Oltean
[not found] ` <CA+h21hpoHGuDwpOqtWJFO7+0mQVUrmcBLW7nnGq6dt3QU5axfw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-03-16 13:25 ` Michael Walle
2020-03-16 16:23 ` Vladimir Oltean
[not found] ` <CA+h21hqt7Xe1LrSDsCVS8zqunQp2tKGhmHDraMirxL595go4nA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-03-16 17:15 ` Michael Walle [this message]
[not found] ` <8c22cb70b7c0acb6769e0c68540ab523-QKn5cuLxLXY@public.gmane.org>
2020-03-17 11:24 ` Michael Walle
2020-03-14 22:43 ` [PATCH v3 07/12] spi: spi-fsl-dspi: Avoid NULL pointer in dspi_slave_abort for non-DMA mode Vladimir Oltean
[not found] ` <20200314224340.1544-1-olteanv-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-03-14 22:43 ` [PATCH v3 02/12] spi: spi-fsl-dspi: Fix little endian access to PUSHR CMD and TXDATA Vladimir Oltean
2020-03-14 22:43 ` [PATCH v3 03/12] spi: spi-fsl-dspi: Fix bits-per-word acceleration in DMA mode Vladimir Oltean
2020-03-14 22:43 ` [PATCH v3 04/12] spi: spi-fsl-dspi: Avoid reading more data than written in EOQ mode Vladimir Oltean
2020-03-14 22:43 ` [PATCH v3 05/12] spi: spi-fsl-dspi: Protect against races on dspi->words_in_flight Vladimir Oltean
[not found] ` <20200314224340.1544-6-olteanv-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-03-16 12:35 ` Vladimir Oltean
2020-03-14 22:43 ` [PATCH v3 08/12] spi: spi-fsl-dspi: Fix interrupt-less DMA mode taking an XSPI code path Vladimir Oltean
2020-03-14 22:43 ` [PATCH v3 09/12] spi: spi-fsl-dspi: Move invariant configs out of dspi_transfer_one_message Vladimir Oltean
2020-03-14 22:43 ` [PATCH v3 10/12] spi: spi-fsl-dspi: Add support for LS1028A Vladimir Oltean
2020-03-14 22:43 ` [PATCH v3 11/12] arm64: dts: ls1028a: Specify the DMA channels for the DSPI controllers Vladimir Oltean
2020-03-14 22:43 ` [PATCH v3 12/12] arm64: dts: ls1028a-rdb: Add a spidev node for the mikroBUS Vladimir Oltean
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8c22cb70b7c0acb6769e0c68540ab523@walle.cc \
--to=michael-qkn5culxlxy@public.gmane.org \
--cc=andrew.smirnov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=angelo-BIYBQhTR83Y@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=eha-/iRVSOupHO4@public.gmane.org \
--cc=gustavo-L1vi/lXTdts+Va1GwOuvDg@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=mhosny-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=olteanv-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=peng.ma-3arQi8VN3Tc@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=weic-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).