Re: [PATCH] [RFC] 3c509: convert to isa_driver and pnp_driver v2

Previous thread: [PATCH] remove device mapper max_sectors restriction by Erich Focht on Thursday, January 31, 2008 - 2:09 pm. (1 message)

Next thread: [1/2] POHMELFS - network filesystem with local coherent cache. by Evgeniy Polyakov on Thursday, January 31, 2008 - 3:17 pm. (4 messages)
To: <netdev@...>
Cc: Linux Kernel <linux-kernel@...>
Date: Thursday, January 31, 2008 - 3:12 pm

Hello,
this patch is an (incomplete and probably wrong) attempt to convert 3c509
driver to isa_driver and pnp_driver model. It works but is not finished. My
original goal was to make 3c509 resume correctly after hibernation - this
still does not work (in fact, now it hangs during hibernation - I need to do
some more debugging). Having udev to load the driver automatically when 3c509
PnP card is detected would be very nice too (assuming udev can do that for
PnP cards).

I think that the isa_driver part is mostly OK but don't know about the PnP
one.

Should I use pnp_driver or pnp_card_driver? 3c509 cards have no subdevices.
I'm confused about usage of pnp_driver together with word "bios" in ALSA
drivers - I think that pnp_driver should work with all 3 PnP kinds (isapnp,
pnpbios, acpipnp).

Is it OK to introduce a limit of 8 3c509 cards? The driver had no explicit
limit before - but the irq[] module parameter had space for only 8 numbers
(and xcvr[] had 12?)

--- 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-01-30 20:44:48.000000000 +0100
@@ -69,10 +69,9 @@
static int max_interrupt_work = 10;

#include <linux/module.h>
-#ifdef CONFIG_MCA
#include <linux/mca.h>
-#endif
-#include <linux/isapnp.h>
+#include <linux/isa.h>
+#include <linux/pnp.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
@@ -97,20 +96,17 @@

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
-static int el3_debug = 2;
+static int el3_debug = 20;
#endif

/* Used to do a global count of all the cards in the system. Must be
* a global variable so that the mca/eisa probe routines can increment
* ...

To: <netdev@...>
Cc: Linux Kernel <linux-kernel@...>
Date: Saturday, February 2, 2008 - 2:25 pm

Hello,
this is second version of the patch. Autoloading using udev works fine with
PnP card. Hibernation now works both in PnP and ISA modes. The I/O address
used for non-pnp ISA card detection is now not released as it's needed to
wake up the card.

Manual irq and transceiver settings aren't implemented yet. Operation with
multiple cards is not tested - I'll try 3 cards in both PnP and ISA modes.
There is some code that is the same in each of the 4 probe functions (isa,
pnp, eisa and mca), which should be probably separated into a function.

I have no EISA or MCA machine so I hope that I didn't break them.

--- 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-02 14:01:04.000000000 +0100
@@ -69,10 +69,9 @@
static int max_interrupt_work = 10;

#include <linux/module.h>
-#ifdef CONFIG_MCA
#include <linux/mca.h>
-#endif
-#include <linux/isapnp.h>
+#include <linux/isa.h>
+#include <linux/pnp.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
@@ -97,20 +96,17 @@

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
-static int el3_debug = 2;
+static int el3_debug = 20;
#endif

/* Used to do a global count of all the cards in the system. Must be
* 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...

To: Ondrej Zary <linux@...>
Cc: <netdev@...>, Linux Kernel <linux-kernel@...>, Jeff Garzik <jeff@...>
Date: Saturday, February 2, 2008 - 5:07 pm

Hi,

You might want to consider dropping these hunks...
--

To: Pekka Enberg <penberg@...>
Cc: <netdev@...>, Linux Kernel <linux-kernel@...>, Jeff Garzik <jeff@...>
Date: Saturday, February 2, 2008 - 5:28 pm

Yes, they're going away. The last one is there just as a reminder that the irq
and xcvr parameters should be used in the ISA code.

--
Ondrej Zary
--

To: Ondrej Zary <linux@...>
Cc: <netdev@...>, Linux Kernel <linux-kernel@...>, Andrew Morton <akpm@...>
Date: Saturday, February 2, 2008 - 4:50 pm

Looks pretty good at first glance...

I'll throw it in my queue. Want to add a signed-off-by: ?

Jeff

--

To: Jeff Garzik <jeff@...>
Cc: <netdev@...>, Linux Kernel <linux-kernel@...>, Andrew Morton <akpm@...>
Date: Sunday, February 17, 2008 - 7:02 am

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@rainbow-software.org>

--- 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-10 21:52:04.000000000 +0100
@@ -54,25 +54,24 @@
v1.19a 28Oct2002 Davud Ruggiero <jdr@farfalle.com>
- Increase *read_eeprom udelay to workaround oops with 2 cards.
v1.19b 08Nov2002 Marc Zyngier <maz@wild-wind.fr.eu.org>
- - Introduce driver model for EISA cards.
+ - Introduce driver model for EISA cards.
+ v1.20 04Feb2008 Ondrej Zary <linux@rainbow-software.org>
+ - convert to isa_driver and pnp_driver and some cleanups
*/

#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 <linux/module.h>
-#ifdef CONFIG_MCA
#include <linux/mca.h>
-#endif
-#include <linux/isapnp.h>
+#include <linux/isa.h>
+#include <linux/pnp.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
@@ -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
...

To: Ondrej Zary <linux@...>
Cc: Jeff Garzik <jeff@...>, <netdev@...>, Linux Kernel <linux-kernel@...>
Date: Tuesday, March 4, 2008 - 12:25 am

alpha allmodconfig:

drivers/net/3c509.c:494: error: 'el3_suspend' undeclared here (not in a function)
drivers/net/3c509.c:495: error: 'el3_resume' undeclared here (not in a function)
--

To: Jeff Garzik <jeff@...>
Cc: <netdev@...>, Linux Kernel <linux-kernel@...>, Andrew Morton <akpm@...>
Date: Wednesday, February 6, 2008 - 2:09 pm

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.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>

--- 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-04 22:30:37.000000000 +0100
@@ -54,25 +54,24 @@
v1.19a 28Oct2002 Davud Ruggiero <jdr@farfalle.com>
- Increase *read_eeprom udelay to workaround oops with 2 cards.
v1.19b 08Nov2002 Marc Zyngier <maz@wild-wind.fr.eu.org>
- - Introduce driver model for EISA cards.
+ - Introduce driver model for EISA cards.
+ v1.20 04Feb2008 Ondrej Zary <linux@rainbow-software.org>
+ - convert to isa_driver and pnp_driver and some cleanups
*/

#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 <linux/module.h>
-#ifdef CONFIG_MCA
#include <linux/mca.h>
-#endif
-#include <linux/isapnp.h>
+#include <linux/isa.h>
+#include <linux/pnp.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
@@ -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;
...

To: Ondrej Zary <linux@...>
Cc: Jeff Garzik <jeff@...>, <netdev@...>, Linux Kernel <linux-kernel@...>, Andrew Morton <akpm@...>
Date: Thursday, February 7, 2008 - 7:51 am

>>>>> "Ondrej" == Ondrej Zary <linux@rainbow-software.org> writes:

Ondrej> Tested using 3 ISA cards in various combinations of PnP and non-PnP modes.

Ondrej> #ifdef CONFIG_EISA
Ondrej> ret = eisa_driver_register(&el3_eisa_driver);
Ondrej> + if (!ret)
Ondrej> + eisa_registeted = 1;
Ondrej> #endif
^^^^^^^^^^^^^^^

You probably should at least test-compile this driver with CONFIG_EISA
enabled...

Regards,

M.
--
And if you don't know where you're going, any road will take you there...
--

To: <maz@...>
Cc: Jeff Garzik <jeff@...>, <netdev@...>, Linux Kernel <linux-kernel@...>, Andrew Morton <akpm@...>
Date: Saturday, February 9, 2008 - 5:33 pm

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@rainbow-software.org>

--- 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 <jdr@farfalle.com>
- Increase *read_eeprom udelay to workaround oops with 2 cards.
v1.19b 08Nov2002 Marc Zyngier <maz@wild-wind.fr.eu.org>
- - Introduce driver model for EISA cards.
+ - Introduce driver model for EISA cards.
+ v1.20 04Feb2008 Ondrej Zary <linux@rainbow-software.org>
+ - convert to isa_driver and pnp_driver and some cleanups
*/

#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 <linux/module.h>
-#ifdef CONFIG_MCA
#include <linux/mca.h>
-#endif
-#include <linux/isapnp.h>
+#include <linux/isa.h>
+#include <linux/pnp.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
@@ -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
...

To: <linux-kernel@...>
Cc: <netdev@...>
Date: Saturday, February 9, 2008 - 5:48 pm

On Sat, 9 Feb 2008 22:33:07 +0100

Don't bother with comment, kernel uses git change log to figure out

I know is only ISA, but having a limit seems silly, can't the device just

--
Stephen Hemminger <stephen.hemminger@vyatta.com>

--

To: Stephen Hemminger <shemminger@...>
Cc: <linux-kernel@...>, <netdev@...>
Date: Saturday, February 9, 2008 - 8:10 pm

Is there any standard way to solve this without a typedef? I added
el3_dev_fill() function which fills that card type value according to a
parameter passed to it. "int" could be used instead and "#define EL3_ISA

EL3_MAX_CARDS is also used as a parameter to isa_register_driver(). The irq[]
array (see below) is limited to 8 devices too. And finally, the card itself
can use one of 8 different IRQs (3,5,7,2/9,10,11,12,15). So I think that it's
not worth adding more code to support more cards.
The original driver will do bad things with more than 8 cards too - read

--
Ondrej Zary
--

To: Ondrej Zary <linux@...>
Cc: Stephen Hemminger <shemminger@...>, <linux-kernel@...>, <netdev@...>
Date: Sunday, February 10, 2008 - 1:18 am

enum el3_cardtype {
EL3_ISA,
EL3_PNP,
EL3_MCA,
EL3_EISA,

While I agree with Stephens comment that this driver should be using
the stats in net_device that's totally out of scope for this patch.
As you're the defacto maintainer of this driver now it would be nice

Yes, separate patch please.

--

To: Christoph Hellwig <hch@...>
Cc: Stephen Hemminger <shemminger@...>, <linux-kernel@...>, <netdev@...>
Date: Wednesday, February 13, 2008 - 5:28 pm

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@rainbow-software.org>

--- 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-10 21:52:04.000000000 +0100
@@ -54,25 +54,24 @@
v1.19a 28Oct2002 Davud Ruggiero <jdr@farfalle.com>
- Increase *read_eeprom udelay to workaround oops with 2 cards.
v1.19b 08Nov2002 Marc Zyngier <maz@wild-wind.fr.eu.org>
- - Introduce driver model for EISA cards.
+ - Introduce driver model for EISA cards.
+ v1.20 04Feb2008 Ondrej Zary <linux@rainbow-software.org>
+ - convert to isa_driver and pnp_driver and some cleanups
*/

#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 <linux/module.h>
-#ifdef CONFIG_MCA
#include <linux/mca.h>
-#endif
-#include <linux/isapnp.h>
+#include <linux/isa.h>
+#include <linux/pnp.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
@@ -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
...

To: Christoph Hellwig <hch@...>
Cc: Stephen Hemminger <shemminger@...>, <linux-kernel@...>, <netdev@...>
Date: Sunday, February 10, 2008 - 5:03 pm

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@rainbow-software.org>

--- 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-10 21:52:04.000000000 +0100
@@ -54,25 +54,24 @@
v1.19a 28Oct2002 Davud Ruggiero <jdr@farfalle.com>
- Increase *read_eeprom udelay to workaround oops with 2 cards.
v1.19b 08Nov2002 Marc Zyngier <maz@wild-wind.fr.eu.org>
- - Introduce driver model for EISA cards.
+ - Introduce driver model for EISA cards.
+ v1.20 04Feb2008 Ondrej Zary <linux@rainbow-software.org>
+ - convert to isa_driver and pnp_driver and some cleanups
*/

#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 <linux/module.h>
-#ifdef CONFIG_MCA
#include <linux/mca.h>
-#endif
-#include <linux/isapnp.h>
+#include <linux/isa.h>
+#include <linux/pnp.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
@@ -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
...

To: <maz@...>
Cc: Jeff Garzik <jeff@...>, <netdev@...>, Linux Kernel <linux-kernel@...>, Andrew Morton <akpm@...>
Date: Thursday, February 7, 2008 - 1:31 pm

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@rainbow-software.org>

--- 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 <jdr@farfalle.com>
- Increase *read_eeprom udelay to workaround oops with 2 cards.
v1.19b 08Nov2002 Marc Zyngier <maz@wild-wind.fr.eu.org>
- - Introduce driver model for EISA cards.
+ - Introduce driver model for EISA cards.
+ v1.20 04Feb2008 Ondrej Zary <linux@rainbow-software.org>
+ - convert to isa_driver and pnp_driver and some cleanups
*/

#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 <linux/module.h>
-#ifdef CONFIG_MCA
#include <linux/mca.h>
-#endif
-#include <linux/isapnp.h>
+#include <linux/isa.h>
+#include <linux/pnp.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
@@ -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
...

To: Jeff Garzik <jeff@...>
Cc: <netdev@...>, Linux Kernel <linux-kernel@...>, Andrew Morton <akpm@...>
Date: Monday, February 4, 2008 - 7:02 pm

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.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>

--- 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-04 22:30:37.000000000 +0100
@@ -54,25 +54,24 @@
v1.19a 28Oct2002 Davud Ruggiero <jdr@farfalle.com>
- Increase *read_eeprom udelay to workaround oops with 2 cards.
v1.19b 08Nov2002 Marc Zyngier <maz@wild-wind.fr.eu.org>
- - Introduce driver model for EISA cards.
+ - Introduce driver model for EISA cards.
+ v1.20 04Feb2008 Ondrej Zary <linux@rainbow-software.org>
+ - convert to isa_driver and pnp_driver and some cleanups
*/

#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 <linux/module.h>
-#ifdef CONFIG_MCA
#include <linux/mca.h>
-#endif
-#include <linux/isapnp.h>
+#include <linux/isa.h>
+#include <linux/pnp.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
@@ -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;
...

To: Jeff Garzik <jeff@...>
Cc: <netdev@...>, Linux Kernel <linux-kernel@...>, Andrew Morton <akpm@...>
Date: Saturday, February 2, 2008 - 5:08 pm

I think that the ISA resume will not work with more than 1 card. I'll fix that
first and test with 3 cards. So the next version can include signed-off-by.

I also wonder about the old el3_cleanup_module() function - it called
el3_common_remove for all cards. With isa_driver and pnp_driver, it oopsed -
I think that's because the remove() functions were called by driver core on
isa_unregister_driver (and pnp_unregister_driver) - but what about MCA and
EISA?

--
Ondrej Zary
--

Previous thread: [PATCH] remove device mapper max_sectors restriction by Erich Focht on Thursday, January 31, 2008 - 2:09 pm. (1 message)

Next thread: [1/2] POHMELFS - network filesystem with local coherent cache. by Evgeniy Polyakov on Thursday, January 31, 2008 - 3:17 pm. (4 messages)