[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20071005.162751.118962534.davem@davemloft.net>
Date: Fri, 05 Oct 2007 16:27:51 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: shemminger@...ux-foundation.org
Cc: netdev@...r.kernel.org, Ariel.Hendel@....com, greg.onufer@....com,
jeff@...zik.org, Ashley.Saulsbury@....com, Matheos.Worku@....com
Subject: Re: [PATCH]: Third (final?) release of Sun Neptune driver
From: Stephen Hemminger <shemminger@...ux-foundation.org>
Date: Fri, 5 Oct 2007 08:35:56 -0700
> > +static int niu_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
> > +{
> > + return -EINVAL;
> > +}
>
> Why not leave function ptr null and get "-EOPNOTSUPP"
To be honest, it's there mostly to remind me that I need to implement
this routine :-)
> > + spin_lock_irqsave(&np->lock, flags);
> > + niu_enable_interrupts(np, 0);
> > + spin_unlock_irqrestore(&np->lock, flags);
> > +
> > + netif_device_detach(dev);
>
> No need to drop lock for detach? all it does is call stop_queue()
I think I'm just being paranoid here, I think it's fine either
way.
> > +static void *niu_phys_alloc_coherent(struct device *dev, size_t size,
> > + u64 *dma_addr, gfp_t flag)
> > +{
> > + unsigned long order = get_order(size);
> > + unsigned long page = __get_free_pages(flag, order);
> > +
> > + if (page == 0UL)
> > + return NULL;
> > + memset((char *)page, 0, PAGE_SIZE << order);
> > + *dma_addr = __pa(page);
> > +
> > + return (void *) page;
> > +}
>
> Generic cod useful for other drivers??
Quite possibly, once we have something else that wants this
we can split it out into some generic place. Currently I am
unaware of any such in-tree cases.
Thanks.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists