All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Nicolas DET <nd@bplan-gmbh.de>,
	USB development list <linux-usb-devel@lists.sourceforge.net>,
	linux-mm@kvack.org
Subject: Re: [linux-usb-devel] Patch for UHCI driver (from kernel 2.6.6).
Date: Tue, 15 Jun 2004 10:08:05 -0700	[thread overview]
Message-ID: <40CF2CF5.5000209@pacbell.net> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0406151221220.1960-100000@ida.rowland.org>

Alan Stern wrote:
> On Mon, 14 Jun 2004, David Brownell wrote:
> 
> 
>>Seems like the dma_alloc_coherent() API spec can't be
>>implemented on such machines then, since it's defined
>>to return memory(*) such that:
>>
>>   ... a write by either the device or the processor
>>   can immediately be read by the processor or device
>>   without having to worry about caching effects.
>>
>>...
> 
> That text strikes me as rather ambiguous.  ...
> ...  It doesn't specify what happens to the other data
> bytes in the same cache line which _weren't_ written -- maybe they'll be
> messed up.

Actually I thought it was quite explicit:  "without having
to worry about caching effects".  What you described is
clearly a caching effect:  caused by caching.  And maybe
fixable by appropriate cache-flushing, or other cache-aware
driver logic ... making it "worry about caching effects".
Like the patch from Nicolas.

Maybe what we really need is patches to make USB switch to
dma_alloc_noncoherent(), checking dma_is_consistent() to
see whether a given QH/TD/ED/iTD/sITD/FSTN/... needs to be
explicitly flushed from cpu cache before handover to HC.

- Dave



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

  reply	other threads:[~2004-06-15 17:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <40CE2E24.5060207@pacbell.net>
2004-06-15 16:35 ` [linux-usb-devel] Patch for UHCI driver (from kernel 2.6.6) Alan Stern
2004-06-15 17:08   ` David Brownell [this message]
2004-06-15 17:23     ` Duncan Sands
2004-06-15 19:35     ` Alan Stern
2004-06-15 20:33       ` David Brownell
2004-06-15 21:12         ` Alan Stern
2004-06-15 21:40   ` Guennadi Liakhovetski
     [not found] <40CDC05B.9020708@bplan-gmbh.de>
     [not found] ` <1087241757.5996.3.camel@localhost.localdomain>
     [not found]   ` <20040617173454.GA5971@pegasos>
2004-06-18 10:20     ` [linux-usb-devel] [Patch] " Sven Luther
2004-06-18 21:31       ` Benjamin Herrenschmidt
2004-06-18 21:41         ` Alan Stern
2004-06-18 21:43           ` Benjamin Herrenschmidt
2004-06-19 13:59             ` Alan Stern
2004-06-19 14:16               ` Sven Luther
2004-06-21  8:18                 ` Segher Boessenkool
2004-06-21  8:57                   ` Sven Luther
2004-06-19  6:53           ` Oliver Neukum

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=40CF2CF5.5000209@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-mm@kvack.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=nd@bplan-gmbh.de \
    --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 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.