All of lore.kernel.org
 help / color / mirror / Atom feed
From: jiri.prchal@aksignal.cz (Jiří Prchal)
To: linux-arm-kernel@lists.infradead.org
Subject: [BUG] at91: serial: something wrong with using DMA
Date: Thu, 04 Jun 2015 13:33:03 +0200	[thread overview]
Message-ID: <5570376F.7050406@aksignal.cz> (raw)
In-Reply-To: <556D611A.5090004@aksignal.cz>

Hi,
writing again, I made small tester to see what is happening. There is loop ttyS3 to ttyS2.

/ # uname -a
Linux prchal 3.18.0-linux4sam_4.7_cpm9g25+ #2 PREEMPT Thu May 21 14:29:51 CEST 2015 armv5tejl GNU/Linux
/ #  testtty -i /dev/ttyS2 -o /dev/ttyS3 -b 512
[ 9657.789789] atmel_usart f801c000.serial: using dma0chan4 for rx DMA transfers
[ 9657.798798] atmel_usart f801c000.serial: using dma0chan5 for tx DMA transfers
[ 9657.807807] atmel_usart f8020000.serial: using dma0chan6 for rx DMA transfers
[ 9657.816816] atmel_usart f8020000.serial: using dma0chan7 for tx DMA transfers
Write to /dev/ttyS3 = 512 B.
Read from /dev/ttyS2 = 512 B. Total = 512 B.
Write to /dev/ttyS3 = 512 B.
Read from /dev/ttyS2 = 512 B. Total = 1024 B.
Write to /dev/ttyS3 = 512 B.
Read from /dev/ttyS2 = 512 B. Total = 1536 B.
Write to /dev/ttyS3 = 512 B.
Read from /dev/ttyS2 = 512 B. Total = 2048 B.
Write to /dev/ttyS3 = 512 B.
Read from /dev/ttyS2 = 0 B, error! Total = 2048 B.
Write to /dev/ttyS3 = 512 B.
Read from /dev/ttyS2 = 0 B, error! Total = 2048 B.
Write to /dev/ttyS3 = 512 B.
Read from /dev/ttyS2 = 0 B, error! Total = 2048 B.
Write to /dev/ttyS3 = 512 B.
Read from /dev/ttyS2 = 2048 B, error! Total = 4096 B.
Write to /dev/ttyS3 = 512 B.
Read from /dev/ttyS2 = 512 B. Total = 4608 B.
Write to /dev/ttyS3 = 512 B.
Read from /dev/ttyS2 = 512 B. Total = 5120 B.
Write to /dev/ttyS3 = 512 B.
Read from /dev/ttyS2 = 512 B. Total = 5632 B.
Write to /dev/ttyS3 = 512 B.
Read from /dev/ttyS2 = 512 B. Total = 6144 B.

and repeated...

I can send testtty source code if you like.


On 2.6.2015 09:54, Ji?? Prchal wrote:
> Hi,
> we made some research how it "doesn't" work.
> Just after the ttyS is opened it gives data in each read as it received them (44 B). No select, just read, VMIN = 0
> VTIME = 1. But after 2048 B in total received since open it stopped giving data (read returns 0) until next 2048 B
> received and then read gives all of the next 2048 B and so on.
> In kernel 3.18.13 it works fine, in 4.x or 3.18.0-linux4sam no.
> What we do wrong?
> Jiri
>

  parent reply	other threads:[~2015-06-04 11:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 13:26 [BUG] at91: serial: is it using DMA? Jiří Prchal
2015-05-27  6:27 ` Jiří Prchal
     [not found]   ` <556D611A.5090004@aksignal.cz>
2015-06-04 11:33     ` Jiří Prchal [this message]
2015-06-12 17:01       ` [BUG] at91: serial: something wrong with using DMA Cyrille Pitchen

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=5570376F.7050406@aksignal.cz \
    --to=jiri.prchal@aksignal.cz \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.