linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Boris ARZUR <boris@konbu.org>
Cc: linux-usb@vger.kernel.org,
	FelipeBalbi <felipe.balbi@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Minas Harutyunyan <hminas@synopsys.com>,
	William Wu <william.wu@rock-chips.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Douglas Anderson <dianders@chromium.org>
Subject: Re: [PATCH] usb: dwc2: extend treatment for incomplete transfer
Date: Tue, 11 Feb 2020 05:26:20 -0800	[thread overview]
Message-ID: <4dfba534-ad32-f69c-3ea3-ab838e894bbf@roeck-us.net> (raw)
In-Reply-To: <20200211054953.GA2401@tungsten>

On 2/10/20 9:49 PM, Boris ARZUR wrote:
> Hello Guenter,
> 
>> In the meantime, can you by any chance test the attached patch ? It _might_
>> fix the problem, but it is a bit of a wild shot.
> I tried your patch, but the machine does not finish booting.
> 

Weird. Can you enable pstore ? That should work on this system. Then you would
have the log from the previous boot in /sys/fs/pstore/.

> 
> I would like to give you a dump, but the screen scrolls fast, and what's
> left when paused is not interesting. How do I get it to dump on disk?
> 
> My journalctl doesn't show anything. I have no kmesg.log anywhere.
> The first time around I was 0/ changing fonts 1/ trimming the dump message
> in the kernel 2/ filming my screen. That's not practical at all...
> 
> 
> I have been looking a bit at things. I believe that part of the issue
> is the need to re-align the buffer we get in the URB. I'm wondering if asking
> for a specific alignment when creating the URB could be doable.
> 
> 
> As a stop-gap, maybe doing things like in tegra ehci could fix our bug:
> https://github.com/torvalds/linux/blob/master/drivers/usb/host/ehci-tegra.c#L288
> i.e. having the old pointer before the new buffer instead of at the end of
> it.
> 
Yes, that was the original solution. Unfortunately it didn't really DMA-align
buffers, so the temporary pointer was moved to the end. It still doesn't guarantee
DMA alignment, though, so I am working on fixing that and moving the old pointer
back to the beginning.

> Now if something is overwriting the buffer end, that would also be hiding the
> issue... but if the bug is related to lengths that don't match between
> allocation and free, that could work. In this case, that would also be
> hiding the issue :)
> 
Yes, that is why moving the old pointer to the beginning won't be sufficient.

Either case, if the current patch causes a boot loop there is obviously something
wrong with it, or the fix is incomplete. I'll keep trying to get equipment
that lets me reproduce the problem.

Thanks for trying!

Guenter

> 

  reply	other threads:[~2020-02-11 13:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 21:39 [PATCH] usb: dwc2: extend treatment for incomplete transfer Guenter Roeck
2020-02-11  5:49 ` Boris ARZUR
2020-02-11 13:26   ` Guenter Roeck [this message]
2020-02-11 16:15   ` Guenter Roeck
2020-02-15  5:36     ` Boris ARZUR
2020-02-19 21:10       ` Guenter Roeck
2020-02-23 11:00         ` Antti Seppälä
2020-02-23 12:10           ` Boris ARZUR
2020-02-23 13:45           ` Guenter Roeck
2020-02-23 18:20             ` Antti Seppälä
2020-02-23 18:47               ` Guenter Roeck
2020-02-23 12:02         ` Boris ARZUR
2020-02-23 13:53           ` Guenter Roeck
2020-02-25  0:18           ` Guenter Roeck
2020-02-20 21:22       ` Guenter Roeck
  -- strict thread matches above, loose matches on Subject: below --
2019-11-05  3:29 Boris ARZUR
2019-11-05  3:39 ` Boris ARZUR
2020-01-31 22:09 ` Guenter Roeck
2020-02-02  5:15   ` Boris ARZUR
2020-02-02 18:52     ` Guenter Roeck

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=4dfba534-ad32-f69c-3ea3-ab838e894bbf@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=boris@konbu.org \
    --cc=dianders@chromium.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=felipe.balbi@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hminas@synopsys.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=william.wu@rock-chips.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 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).