Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756829AbYBIVsb (ORCPT ); Sat, 9 Feb 2008 16:48:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751437AbYBIVsX (ORCPT ); Sat, 9 Feb 2008 16:48:23 -0500 Received: from main.gmane.org ([80.91.229.2]:58252 "EHLO ciao.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751347AbYBIVsW (ORCPT ); Sat, 9 Feb 2008 16:48:22 -0500 X-Injected-Via-Gmane: http://gmane.org/ To: linux-kernel@vger.kernel.org From: Stephen Hemminger Subject: Re: [PATCH] [resend] 3c509: convert to isa_driver and pnp_driver v4 Date: Sat, 9 Feb 2008 13:48:05 -0800 Organization: Linux Foundation Message-ID: <20080209134805.29cbc8ae@extreme> References: <200801312012.43447.linux@rainbow-software.org> <200802061909.37452.linux@rainbow-software.org> <200802092233.10239.linux@rainbow-software.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 75-175-37-168.ptld.qwest.net In-Reply-To: <200802092233.10239.linux@rainbow-software.org> X-Newsreader: Claws Mail 3.2.0 (GTK+ 2.12.7; x86_64-pc-linux-gnu) Cc: netdev@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4313 Lines: 134 On Sat, 9 Feb 2008 22:33:07 +0100 Ondrej Zary wrote: > Hello, > this patch converts 3c509 driver to isa_driver and pnp_driver. The result is > that autoloading using udev and hibernation works with ISA PnP cards. It also > adds hibernation support for non-PnP ISA cards. > > xcvr module parameter was removed as its value was not used. > > Tested using 3 ISA cards in various combinations of PnP and non-PnP modes. > EISA and MCA only compile-tested. > > Signed-off-by: Ondrej Zary > > --- linux-2.6.24-orig/drivers/net/3c509.c 2008-01-27 19:48:19.000000000 +0100 > +++ linux-2.6.24-pentium/drivers/net/3c509.c 2008-02-07 17:58:45.000000000 +0100 > @@ -54,25 +54,24 @@ > v1.19a 28Oct2002 Davud Ruggiero > - Increase *read_eeprom udelay to workaround oops with 2 cards. > v1.19b 08Nov2002 Marc Zyngier > - - Introduce driver model for EISA cards. > + - Introduce driver model for EISA cards. > + v1.20 04Feb2008 Ondrej Zary > + - convert to isa_driver and pnp_driver and some cleanups > */ Don't bother with comment, kernel uses git change log to figure out who to blame. > #define DRV_NAME "3c509" > -#define DRV_VERSION "1.19b" > -#define DRV_RELDATE "08Nov2002" > +#define DRV_VERSION "1.20" > +#define DRV_RELDATE "04Feb2008" > > /* A few values that may be tweaked. */ > > /* Time in jiffies before concluding the transmitter is hung. */ > #define TX_TIMEOUT (400*HZ/1000) > -/* Maximum events (Rx packets, etc.) to handle at each interrupt. */ > -static int max_interrupt_work = 10; > > #include > -#ifdef CONFIG_MCA > #include > -#endif > -#include > +#include > +#include > #include > #include > #include > @@ -97,10 +96,6 @@ > > static char version[] __initdata = DRV_NAME ".c:" DRV_VERSION " " DRV_RELDATE " becker@scyld.com\n"; > > -#if defined(CONFIG_PM) && (defined(CONFIG_MCA) || defined(CONFIG_EISA)) > -#define EL3_SUSPEND > -#endif > - > #ifdef EL3_DEBUG > static int el3_debug = EL3_DEBUG; > #else > @@ -111,6 +106,7 @@ > * a global variable so that the mca/eisa probe routines can increment > * it */ > static int el3_cards = 0; > +#define EL3_MAX_CARDS 8 > > /* To minimize the size of the driver source I only define operating > constants if they are used several times. You'll need the manual > @@ -119,7 +115,7 @@ > #define EL3_DATA 0x00 > #define EL3_CMD 0x0e > #define EL3_STATUS 0x0e > -#define EEPROM_READ 0x80 > +#define EEPROM_READ 0x80 > > #define EL3_IO_EXTENT 16 > > @@ -168,23 +164,31 @@ > */ > #define SKB_QUEUE_SIZE 64 > > +typedef enum { EL3_ISA, EL3_PNP, EL3_MCA, EL3_EISA } el3_cardtype; > + No typedef please (see checkpatch) > struct el3_private { > struct net_device_stats stats; Use network device stats in net_device now > - struct net_device *next_dev; > spinlock_t lock; > /* skb send-queue */ > int head, size; > struct sk_buff *queue[SKB_QUEUE_SIZE]; What about sk_buff_head (linked list instead)? > - enum { > - EL3_MCA, > - EL3_PNP, > - EL3_EISA, > - } type; /* type of device */ > - struct device *dev; > + el3_cardtype type; > }; > -static int id_port __initdata = 0x110; /* Start with 0x110 to avoid new sound cards.*/ > -static struct net_device *el3_root_dev; > +static int id_port; > +static int current_tag; > +static struct net_device *el3_devs[EL3_MAX_CARDS]; I know is only ISA, but having a limit seems silly, can't the device just use allocated space like other drivers. > + > +/* Parameters that may be passed into the module. */ > +static int debug = -1; > +static int irq[] = {-1, -1, -1, -1, -1, -1, -1, -1}; > +/* Maximum events (Rx packets, etc.) to handle at each interrupt. */ > +static int max_interrupt_work = 10; > +#ifdef CONFIG_PNP > +static int nopnp; > +#endif > -- Stephen Hemminger -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/