mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC] [WIP] net: add initial ENC28J60 support
Date: Wed, 11 Jun 2014 07:48:00 +0400	[thread overview]
Message-ID: <20140611074800.6f02ad5d6eb98b467cd94032@gmail.com> (raw)
In-Reply-To: <20140610070833.GT15686@pengutronix.de>

On Tue, 10 Jun 2014 09:08:33 +0200
Sascha Hauer <s.hauer@pengutronix.de> wrote:

> Hi Antony,
> 
> On Fri, Jun 06, 2014 at 12:02:57PM +0400, Antony Pavlov wrote:

Thanks for comments!
But there is one issue (see below).

...

> > +
> > +static int enc28j60_eth_rx(struct eth_device *edev)
> > +{
> > +	struct enc28j60_net *priv = edev->priv;
> > +	int pk_counter;
> > +
> > +	pk_counter = locked_regb_read(priv, EPKTCNT);
> > +	if (pk_counter && netif_msg_intr(priv))
> > +		printk(KERN_DEBUG DRV_NAME ": intRX, pk_cnt: %d\n", pk_counter);
> > +
> > +	if (pk_counter > priv->max_pk_counter) {
> > +		priv->max_pk_counter = pk_counter;
> > +		if (netif_msg_rx_status(priv) && priv->max_pk_counter > 1)
> > +			printk(KERN_DEBUG DRV_NAME ": RX max_pk_cnt: %d\n",
> > +				priv->max_pk_counter);
> > +	}
> > +
> > +	while (pk_counter-- > 0)
> > +		enc28j60_hw_rx(edev);
> 
> You should only receive a single packet in your receive function.
> Otherwise some protocols may not function properly. We noticed this
> recently and didn't have the chance to fix all drivers.
> 

If I receive only one packet (I have simply dropped 'while (pk_counter-- > 0)')
then tftp does not work.

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2014-06-11  3:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-06  8:02 Antony Pavlov
2014-06-10  7:08 ` Sascha Hauer
2014-06-11  3:48   ` Antony Pavlov [this message]
2014-06-11  6:23     ` Sascha Hauer

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=20140611074800.6f02ad5d6eb98b467cd94032@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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