linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: OHCI: ohci-sm501: complete URBs in BH context
Date: Mon, 6 Aug 2018 01:37:30 -0700	[thread overview]
Message-ID: <20180806083730.GA32650@infradead.org> (raw)
In-Reply-To: <1533355279-26725-1-git-send-email-linux@roeck-us.net>

On Fri, Aug 03, 2018 at 09:01:19PM -0700, Guenter Roeck wrote:
> Testing an USB drive connected to ohci-sm501 results in a large number
> of runtime warnings.

As far as I can tell this driver uses the HCD_LOCAL_MEM feature flag
for memory declared using dma_declare_coherent_memory.  Unlike the
mormal dma mapping interfaces this special case can actually be freed
from interrupt context, and we have a fix for this warning queued
up in linux-next:

http://git.infradead.org/users/hch/dma-mapping.git/commitdiff/d27fb99f62af7b79c542d161aa5155ed57271ddc

That being said I'm generally very unhappy how dma_init_coherent_memory
turned out.  The idea was to allow device local memory to be hidden
behind the DMA API, but in general we use it either as a way to declare
special uncache system memory (which would really be the plaform codes
job), or as a magic bounce buffer like in the USB code.  I plan to
eventually untangle this, but it is going to take some time.

  parent reply	other threads:[~2018-08-06  8:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-04  4:01 [PATCH] USB: OHCI: ohci-sm501: complete URBs in BH context Guenter Roeck
2018-08-04 14:50 ` Alan Stern
2018-08-04 19:19   ` Guenter Roeck
2018-08-05 18:31     ` Alan Stern
2018-08-05 21:38       ` Guenter Roeck
2018-08-06  8:33         ` Christoph Hellwig
2018-08-06 15:58           ` Guenter Roeck
2018-08-06  8:37 ` Christoph Hellwig [this message]
2018-08-06 16:03   ` Guenter Roeck
2018-08-07  7:25     ` Christoph Hellwig

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=20180806083730.GA32650@infradead.org \
    --to=hch@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=stern@rowland.harvard.edu \
    /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).