From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH 09/11] netpoll: ethernet devices only Date: Mon, 19 Nov 2007 19:55:15 -0800 (PST) Message-ID: <20071119.195515.54073365.davem@davemloft.net> References: <20071103184314.216145305@linux-foundation.org> <20071103184338.929307786@linux-foundation.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: satyam@infradead.org, netdev@vger.kernel.org To: shemminger@linux-foundation.org Return-path: Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:54814 "EHLO sunset.davemloft.net" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751624AbXKTDzQ (ORCPT ); Mon, 19 Nov 2007 22:55:16 -0500 In-Reply-To: <20071103184338.929307786@linux-foundation.org> Sender: netdev-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Stephen Hemminger Date: Sat, 03 Nov 2007 11:43:23 -0700 > Netpoll only works on Ethernet devices, so check during setup > rather than just failing silently later. > > Signed-off-by: Stephen Hemminger > > --- a/net/core/netpoll.c 2007-11-03 11:05:33.000000000 -0700 > +++ b/net/core/netpoll.c 2007-11-03 11:08:23.000000000 -0700 > @@ -653,6 +653,12 @@ int netpoll_setup(struct netpoll *np, st > unsigned long flags; > int err; > > + if (ndev->type != ARPHRD_ETHER) { > + printk(KERN_ERR "netpoll: %s is not an ethernet device\n", > + ndev->name); > + return -EINVAL; > + } > + > np->dev = ndev; This patch depends upon the broken np->dev_name one, and I also would rather fix the limitations in netpoll.