All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: b-liu@ti.com, gregkh@linuxfoundation.org,
	linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
	balbi@kernel.org, linux-kernel@vger.kernel.org,
	Aaro Koskinen <aaro.koskinen@iki.fi>
Subject: Re: [PATCH 4/4] usb: musb: tusb6010_omap: Convert to DMAengine API
Date: Fri, 5 May 2017 15:55:23 -0700	[thread overview]
Message-ID: <20170505225523.GD3489@atomide.com> (raw)
In-Reply-To: <52c733a8-e8d3-abd9-2ea8-f3f91f823b89@ti.com>

* Peter Ujfalusi <peter.ujfalusi@ti.com> [170505 08:20]:
> On 2017-05-05 16:37, Peter Ujfalusi wrote:
> > On 2017-05-05 00:05, Tony Lindgren wrote:
> > > And this sync gpmc issue seems to be timing related. Setting
> > > DEBUG in tusb6010_omap.c makes it happen easily while without
> > > it it's much harder to trigger. So probably some kind of issue
> > > with GPMC sync timings.
> > 
> > Indeed there are some interesting things happening...
> > As I said, I was testing with g_cdc (CDC Composite (ECM + ACM)) and I
> > found it pretty stable with DMAengine. But short story long:
> > 
> > With the series applied and getting rid of the dma_addr & 0x2, plus
> > setting the set the quirk_avoids_skb_reserve flag:
> > g_cdc (ECM + ACM) boots to nfsroot most of the time, ping, scp works
> > g_ether (ECM) does not boot to nfsroot, ping does not work. However if I
> > disable the rx DMA with:
> > 
> > diff --git a/drivers/usb/musb/tusb6010_omap.c
> > b/drivers/usb/musb/tusb6010_omap.c
> > index 8b43c4b99f04..8e0a19b47132 100644
> > --- a/drivers/usb/musb/tusb6010_omap.c
> > +++ b/drivers/usb/musb/tusb6010_omap.c
> > @@ -512,6 +512,12 @@ tusb_omap_dma_allocate(struct dma_controller *c,
> >          return NULL;
> >      }
> > 
> > +    if (!tx) {
> > +        dev_err(musb->controller, "Not allowing RX DMA for ep%i %s\n",
> > +            chdat->epnum);
> 
> Remove the %s and s/chdat/hw_ep
> 
> and the kernel will not crash :( But still not booting with DMAengine when
> RX DMA is disabled :o

OK I verified that with the current mainline kernel using dma
and g_ether and your patches 1 to 3 I can run the variable size
ping test loop for few minutes before it just stops working and
I can see the legacy DMA interrupt increase depending on the
size of the packet. Then I checked with v4.1 kernel, and that
too seems to have the same issue.

I've also verified running the same variable size ping test with
your patch 4/4 makes things stop within just a few seconds. The
script I'm using for ping is below.

Anyways, what we really should ensure here is that the external
dmarequest line is properly triggering things with dmaengine :)
That's why I'm a bit worried your patch 4/4.

Oh and I also verified the GPMC timings we're using are the same
as in production n810 kernel so that should not be the issue.

And using the async access on n800 will not work as it will
produce corrupt transfer size register the report I posted
earlier is from n800 allowing it to use async transfers. On
n810 async transfers may work as I recall it having a newer
tusb6010 version.

Regards,

Tony

8< ----------------
#!/bin/bash

device=$1
size=$2

while [ 1 ]; do
        #echo "Pinging with size $size"
        if ! ping -w0 -c1 -s$size $device > /dev/null 2>&1; then
                break;
        fi
        size=$(expr $size + 1)

        if [ $size -gt 8192 ]; then
                size=1
        fi
done
echo "Test ran up to $size"

  reply	other threads:[~2017-05-05 22:55 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03 10:56 [PATCH 0/4] usb: musb: tusb6010_omap: Convert to DMAengine Peter Ujfalusi
2017-05-03 10:56 ` Peter Ujfalusi
2017-05-03 10:56 ` [PATCH 1/4] usb: musb: tusb6010_omap: Create new struct for DMA data/parameters Peter Ujfalusi
2017-05-03 10:56   ` Peter Ujfalusi
2017-05-03 10:56 ` [PATCH 2/4] usb: musb: tusb6010_omap: Allocate DMA channels upfront Peter Ujfalusi
2017-05-03 10:56   ` Peter Ujfalusi
2017-05-03 10:56 ` [PATCH 3/4] ARM: OMAP2+: DMA: Add slave map entries for 24xx external request lines Peter Ujfalusi
2017-05-03 10:56   ` Peter Ujfalusi
2017-05-03 10:56 ` [PATCH 4/4] usb: musb: tusb6010_omap: Convert to DMAengine API Peter Ujfalusi
2017-05-03 10:56   ` Peter Ujfalusi
2017-05-04 19:40   ` Tony Lindgren
2017-05-04 21:05     ` Tony Lindgren
2017-05-05 13:37       ` Peter Ujfalusi
2017-05-05 13:37         ` Peter Ujfalusi
2017-05-05 15:17         ` Peter Ujfalusi
2017-05-05 15:17           ` Peter Ujfalusi
2017-05-05 22:55           ` Tony Lindgren [this message]
2017-05-08 15:12             ` Peter Ujfalusi
2017-05-08 15:12               ` Peter Ujfalusi
2017-05-08 15:29               ` Tony Lindgren
2017-05-04 14:31 ` [PATCH 0/4] usb: musb: tusb6010_omap: Convert to DMAengine Tony Lindgren
2017-05-05  7:28   ` Peter Ujfalusi
2017-05-05  7:28     ` Peter Ujfalusi

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=20170505225523.GD3489@atomide.com \
    --to=tony@atomide.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=b-liu@ti.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.ujfalusi@ti.com \
    /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.