From: Jarek Poplawski <jarkao2@gmail•com>
To: David Miller <davem@davemloft•net>
Cc: shemminger@vyatta•com, netdev@vger•kernel.org
Subject: Re: [PATCH 02/11] sky2: fix DMA sync_single length error
Date: Thu, 21 Jan 2010 00:52:45 +0100 [thread overview]
Message-ID: <20100120235245.GE3072@del.dom.local> (raw)
In-Reply-To: <20100120.153451.62650459.davem@davemloft.net>
On Wed, Jan 20, 2010 at 03:34:51PM -0800, David Miller wrote:
> From: Jarek Poplawski <jarkao2@gmail•com>
> Date: Thu, 21 Jan 2010 00:21:02 +0100
>
> > "dma_sync_single_range(struct device *dev, dma_addr_t dma_handle,
> > unsigned long offset, size_t size,
> > enum dma_data_direction direction)
> >
> > Does a partial sync, starting at offset and continuing for size. You
> > must be careful to observe the cache alignment and width when doing
> > anything like this. You must also be extra careful about accessing
> > memory you intend to sync partially." [Documentation/DMA-API.txt]
> >
> > looks like even if implemented might be very tricky, especially if
> > untested.
>
> This is an absurd set of requirements. What driver author is
> going to get this right?
>
> Any alignment issues are of the domain of the implementation and as
> Alan said should be handled there.
>
> Back to the main issue, these localized fixes in the driver leave all
> of the other cases in the tree unhandled. There are likely to be
> SCSI, USB host controller, SOUND, and other drivers with the same
> issue.
>
> At what point do we understand that peppering workarounds in the
> drivers is the wrong way to go about this?
*Temporary* only workarounds. Mainly simple cases. (e.g. I'm not sure
of tg3)
>
> Whereas 1 patch in the 1 place in the DMA API implementation would fix
> everything for everybody.
1) As I mentioned earlier there were similar dmar errors reported with
real oopses, but of course it might be unconnected. (But why risk...)
2) Why would the author of this doc above warn us so much if it were
so obviously simple and safe?
>
> It's great that we had this report to track down the issue, now let's
> fix it correctly so nobody else (regardless of device they have) has
> to see it.
I hope you're right as usual! (But I disagree as usual ;-)
Jarek P.
next prev parent reply other threads:[~2010-01-20 23:52 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-20 20:44 [PATCH 00/11] DMA sync errors Stephen Hemminger
2010-01-20 20:45 ` [PATCH 01/11] tg3: fix DMA sync_single length error Stephen Hemminger
2010-01-20 20:45 ` [PATCH 02/11] sky2: " Stephen Hemminger
2010-01-20 21:32 ` Jarek Poplawski
2010-01-20 22:52 ` David Miller
2010-01-20 23:21 ` Jarek Poplawski
2010-01-20 23:34 ` David Miller
2010-01-20 23:41 ` David Miller
2010-01-20 23:59 ` Jarek Poplawski
2010-01-21 0:04 ` Stephen Hemminger
2010-01-21 0:15 ` David Miller
2010-01-20 23:52 ` Jarek Poplawski [this message]
2010-01-20 23:56 ` David Miller
2010-01-20 20:45 ` [PATCH 03/11] skge: " Stephen Hemminger
2010-01-20 20:45 ` [PATCH 04/11] r8169: " Stephen Hemminger
2010-01-20 20:45 ` [PATCH 05/11] rrunner: " Stephen Hemminger
2010-01-20 20:45 ` [PATCH 06/11] de2104x: " Stephen Hemminger
2010-01-22 1:02 ` Grant Grundler
2010-01-22 1:12 ` Stephen Hemminger
2010-01-20 20:45 ` [PATCH 07/11] sungem: " Stephen Hemminger
2010-01-20 20:45 ` [PATCH 08/11] sunhme: " Stephen Hemminger
2010-01-20 20:45 ` [PATCH 09/11] cassini: " Stephen Hemminger
2010-01-20 20:45 ` [PATCH 10/11] cxgb3: " Stephen Hemminger
2010-01-20 20:45 ` [PATCH 11/11] ipoib: " Stephen Hemminger
2010-01-20 22:46 ` [PATCH 00/11] DMA sync errors David Miller
2010-01-20 23:28 ` Stephen Hemminger
2010-01-21 0:18 ` David Miller
2010-01-21 0:34 ` Stephen Hemminger
2010-01-21 0:36 ` David Miller
2010-01-21 12:44 ` Jarek Poplawski
2010-01-21 13:12 ` David Miller
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=20100120235245.GE3072@del.dom.local \
--to=jarkao2@gmail$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
--cc=shemminger@vyatta$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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