All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Taehun Kim <kth3321@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <suhwan@wiznet.co.kr>,
	<bongbong@wiznet.co.kr>
Subject: Re: [PATCH net-next] W5300: Add WIZnet W5300 Ethernet driver
Date: Tue, 8 Nov 2011 20:06:58 +0000	[thread overview]
Message-ID: <1320782818.2799.62.camel@bwh-desktop> (raw)
In-Reply-To: <1320779368.2799.55.camel@bwh-desktop>

On Tue, 2011-11-08 at 19:09 +0000, Ben Hutchings wrote:
> On Mon, 2011-11-07 at 23:37 +0900, Taehun Kim wrote: 
[...]
> > +/* Default MAC address. */
> > +static __initdata u8 w5300_defmac[6] = {0x00, 0x08, 0xDC, 0xA0, 0x00, 0x01};
> 
> This is not suitable as a default MAC address.

Really you mustn't use a fixed default at all.

[...]
> > +/* Interrupt Handler(ISR) */
> > +static irqreturn_t wiz_interrupt(int irq, void *dev_instance)
> > +{
> > +	struct net_device *dev = dev_instance;
> > +	struct wiz_private *wp = netdev_priv(dev);
> > +	int timeout = 100;
> > +	u16 isr, ssr;
> > +	int s;
> > +
> > +	isr = w5300_read(wp, IR);
> > +
> > +	/* Completing all interrupts at a time. */
> > +	while (isr && timeout--) {
> 
> Why would you need to repeat this?  You disable the interrupt 
[...]

I'm not sure what I was starting to say there.

But I really don't see any justification for this loop.  Perhaps it's
left over from a non-NAPI implementation?  Just acknowledge the
interrupt, schedule NAPI as appropriate, and let the kernel call the
interrupt handler again if another interrupt is raised.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


  reply	other threads:[~2011-11-08 20:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-07 14:37 [PATCH net-next] W5300: Add WIZnet W5300 Ethernet driver Taehun Kim
2011-11-08 19:09 ` Ben Hutchings
2011-11-08 20:06   ` Ben Hutchings [this message]
2011-11-18 16:15   ` Taehun Kim
  -- strict thread matches above, loose matches on Subject: below --
2011-10-22  8:41 [PATCH net-next] w5300: add " Taehun Kim
2011-10-24 22:21 ` David Miller
2011-10-29 18:29   ` Taehun Kim

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=1320782818.2799.62.camel@bwh-desktop \
    --to=bhutchings@solarflare.com \
    --cc=bongbong@wiznet.co.kr \
    --cc=davem@davemloft.net \
    --cc=kth3321@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=suhwan@wiznet.co.kr \
    /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.