netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Travis Stratman <tstratman@emacinc.com>
Cc: netdev@vger.kernel.org
Subject: Re: data received but not detected
Date: Tue, 8 Jul 2008 01:25:32 +0400	[thread overview]
Message-ID: <20080707212531.GA15288@2ka.mipt.ru> (raw)
In-Reply-To: <1215465030.14023.105.camel@localhost.localdomain>

On Mon, Jul 07, 2008 at 04:10:30PM -0500, Travis Stratman (tstratman@emacinc.com) wrote:
> I have not been able to work on this recently but I have some time to
> look at it again now. Before I stopped working on it, I implemented a
> workaround using a private ioctl() that was able to correct the issue
> after a hangup and (I believe) illustrates that a missed interrupt is
> causing the problem.
> 
> I added a private ioctl call to the macb driver that does the following:
> 1. read rx status register
> 2. if rx status is true, schedule poll (same block of code as in
> interrupt handler)
> 3. return
> 
> Then, in my userspace code, I called poll() with a timeout and called
> the ioctl() if poll timed out with no data. What I found was that the rx
> status register always reported a packet present but not acknowledged
> when poll timed out (on the board that missed the packet). Scheduling a
> poll in the driver forced it to read this new packet and the userspace
> code was able to continue from there.

Can it be missed acknowledge when ->poll() hits the quota limit?

> If the macb poll is executed, the receive status register will be
> cleared, so somewhere along the way an interrupt is being missed (or
> like you suggested some type of coalescing is happening).
> 
> Below is a patch of the changes that I have made to the driver including
> my rewrite of the poll() function and additional private ioctl()
> workaround. This patch is against 2.6.20 with some of the patches from
> http://maxim.org.za/sam9.html , most of which have been added to the
> vanilla kernel in the more current versions that I have tested (i.e.
> 2.6.25). This shows the changes that I have made more easily, but I can
> provide the full patch from vanilla if it would be more helpful (i.e.
> this one will not apply cleanly to a vanilla kernel). I wasn't sure
> which would be the best to post.

It is quite clear patch, but please provide needed part on top of .25
tree.
-- 
	Evgeniy Polyakov

  reply	other threads:[~2008-07-07 21:25 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-17 22:08 data received but not detected Travis Stratman
2008-06-17 22:27 ` Stephen Hemminger
2008-06-17 22:40   ` Travis Stratman
2008-06-17 22:31 ` Ben Greear
2008-06-17 22:58   ` Travis Stratman
2008-06-17 23:45     ` Ben Greear
2008-06-19 22:53       ` Travis Stratman
2008-06-19 23:08         ` Ben Greear
2008-06-22  9:16         ` James Chapman
2008-07-07 21:56           ` Travis Stratman
2008-07-08  9:37             ` James Chapman
2008-07-15 20:46               ` Travis Stratman
2008-06-18  6:28     ` Evgeniy Polyakov
2008-06-19 23:10       ` Travis Stratman
     [not found]         ` <20080620060219.GA22784@2ka.mipt.ru>
2008-06-20 17:10           ` Travis Stratman
2008-06-20 17:25             ` Evgeniy Polyakov
2008-06-20 17:41               ` Travis Stratman
2008-06-20 17:54                 ` Evgeniy Polyakov
2008-06-20 18:17                   ` Travis Stratman
2008-06-20 18:23                     ` Evgeniy Polyakov
2008-06-20 21:06                       ` Travis Stratman
2008-06-21  7:12                         ` Evgeniy Polyakov
2008-07-07 21:10                           ` Travis Stratman
2008-07-07 21:25                             ` Evgeniy Polyakov [this message]
2008-07-15 20:43                               ` Travis Stratman

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=20080707212531.GA15288@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=netdev@vger.kernel.org \
    --cc=tstratman@emacinc.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).