netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier.adi@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, uclinux-dist-devel@blackfin.uclinux.org,
	sonic.zhang@analog.com, cooloney@kernel.org
Subject: Re: [PATCH 2/5] netdev: bfin_mac: fix malformed UDP packet transmission when polling with KGDB
Date: Fri, 29 May 2009 07:20:18 -0400	[thread overview]
Message-ID: <8bd0f97a0905290420g454c3affr21b6f05e5971d93@mail.gmail.com> (raw)
In-Reply-To: <20090529.035224.124353374.davem@davemloft.net>

On Fri, May 29, 2009 at 06:52, David Miller wrote:
> From: Mike Frysinger <vapier.adi@gmail.com>
>> On Fri, May 29, 2009 at 05:04, David Miller wrote:
>>> From: Mike Frysinger <vapier@gentoo.org>
>>>> From: Sonic Zhang <sonic.zhang@analog.com>
>>>>
>>>> Make sure data is really written into the registers before enabling DMA.
>>>> Otherwise, the EMAC DMA controller may transfer out a malformed packet.
>>>> This patch may also fix netperf bugs or scp bugs.
>>>>
>>>> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
>>>> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
>>>> Signed-off-by: Bryan Wu <cooloney@kernel.org>
>>>
>>> Instead of using this incredibly non-portable blackfin specific SSYNC
>>> thing
>>
>> that doesnt make sense -- this is a completely non-portable Blackfin
>> specific driver.  everything in it uses Blackfin macros to access
>> Blackfin MMRs because this is a device that only exists on Blackfin
>> chips.
>
> There is never an excuse to not write portable code when you can.
>
> Some day we may have dummy do-nothing bus drivers for every platform
> bus or subsystem, so that we can compile any driver on any platform.
>
> Do you want to make that kind of build validation of you code harder?

if the portable version is unnecessarily ugly to implement, then yes,
especially this driver which has a lot more issues than an SSYNC macro

>>> why not read back a register from the device to ensure the
>>> register writes hit the chip just like other drivers do?
>>
>> because that isnt how the Blackfin hardware works in general, and
>> certainly not how the DMA hardware works.
>
> Have you tried reading the register back?  Does it work?

that isnt how the DMA is being used here.  there is no register to
read back because the DMA controller is doing the reading indirectly.
but along those lines, it's not entirely clear which DMA registers
this SSYNC is supposed to be protecting because all of the updates are
happening on the descriptors in external memory, not the DMA registers
themselves.  i'll have Sonic clarify.
-mike

  reply	other threads:[~2009-05-29 11:20 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-27  6:10 [PATCH 0/5] Blackfin MAC updates for 2.6.31 Mike Frysinger
2009-05-27  6:10 ` [PATCH 1/5] netdev: bfin_mac: Blackfin EMAC interrupt may not be shared Mike Frysinger
2009-05-29  9:01   ` David Miller
2009-05-29 10:49     ` [Uclinux-dist-devel] " Mike Frysinger
2009-05-29 10:53       ` David Miller
2009-05-29 11:12         ` Hennerich, Michael
2009-05-29 11:14           ` David Miller
2009-05-29 11:22             ` Mike Frysinger
2009-05-29 11:28               ` David Miller
2009-05-29 11:45                 ` Mike Frysinger
2009-05-29 22:09                   ` David Miller
2009-05-29 22:13                     ` Mike Frysinger
2009-05-29 22:18                       ` David Miller
2009-05-29 22:21                         ` Mike Frysinger
2009-05-29 22:45                           ` David Miller
2009-05-29 22:51                             ` Mike Frysinger
2009-05-29 13:39   ` [PATCH 1/4 v2] netdev: bfin_mac: drop useless IRQF_SHARED from Blackfin EMAC interrupt Mike Frysinger
2009-05-29 22:49     ` David Miller
2009-05-27  6:10 ` [PATCH 2/5] netdev: bfin_mac: fix malformed UDP packet transmission when polling with KGDB Mike Frysinger
2009-05-29  9:04   ` David Miller
2009-05-29 10:46     ` Mike Frysinger
2009-05-29 10:52       ` David Miller
2009-05-29 11:20         ` Mike Frysinger [this message]
2009-05-29 11:27           ` David Miller
2009-05-29 11:42             ` Mike Frysinger
2009-05-31  2:42             ` Zhang, Sonic
2009-05-31  2:45             ` Zhang, Sonic
2009-05-29 13:40   ` [PATCH 2/4 v2] " Mike Frysinger
2009-05-29 22:49     ` David Miller
2009-05-31  2:57     ` Zhang, Sonic
2009-05-27  6:10 ` [PATCH 3/5] netdev: bfin_mac: fix performance issue found by netperf Mike Frysinger
2009-05-29  9:05   ` David Miller
2009-05-29 13:41     ` [PATCH 3/4 v2] " Mike Frysinger
2009-05-29 22:49       ` David Miller
2009-05-27  6:10 ` [PATCH 4/5] netdev: bfin_mac: add Blackfin MII bus to platform bus to allow DSA access Mike Frysinger
2009-05-29  9:09   ` David Miller
2009-05-27  6:10 ` [PATCH 5/5] netdev: bfin_mac: fix crash when unloading module Mike Frysinger
2009-05-29  9:10   ` David Miller
2009-05-29 11:47     ` [Uclinux-dist-devel] " Mike Frysinger
2009-05-29 13:41     ` [PATCH 4/4 v2] netdev: bfin_mac: add Blackfin MII bus to platform bus to allow DSA access Mike Frysinger
2009-05-29 22:49       ` 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=8bd0f97a0905290420g454c3affr21b6f05e5971d93@mail.gmail.com \
    --to=vapier.adi@gmail.com \
    --cc=cooloney@kernel.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sonic.zhang@analog.com \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    /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).