[PATCH 4/4] NE2000 driver updates

Jeff Muizelaar (muizelaar@rogers.com)
Thu, 01 May 2003 13:47:43 -0400


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-484-1051811324-0001-2
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

--=_courier-484-1051811324-0001-2
Content-Type: text/plain; name="ne-bad.patch"; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="ne-bad.patch"

--- linux-2.5.66-nelist/drivers/net/ne.c 2003-05-01 11:05:56.000000000 -0400
+++ linux-2.5.66-nebad/drivers/net/ne.c 2003-05-01 11:18:19.000000000 -0400
@@ -145,10 +145,10 @@

static int ne_legacy_probe(unsigned long base_addr, unsigned long irq, unsigned long bad);

-static int ne_probe1(struct net_device *dev, int ioaddr);
+static int ne_probe1(struct net_device *dev, int ioaddr, int bad);

static int ne_create(struct net_device **ndev, unsigned long base_addr,
- unsigned long irq, unsigned long bad);
+ unsigned long irq, int bad);
static void ne_remove(struct net_device *dev);

static int ne_open(struct net_device *dev);
@@ -223,7 +223,7 @@
return err;
}

-static int ne_create(struct net_device **ndev, unsigned long base_addr, unsigned long irq, unsigned long bad)
+static int ne_create(struct net_device **ndev, unsigned long base_addr, unsigned long irq, int bad)
{
int err;

@@ -237,7 +237,7 @@
(*ndev)->mem_end = bad;
SET_MODULE_OWNER(*ndev);

- if (ne_probe1(*ndev, (*ndev)->base_addr) != 0) { /* Shouldn't happen. */
+ if (ne_probe1(*ndev, (*ndev)->base_addr, bad) != 0) { /* Shouldn't happen. */
printk(KERN_ERR "ne.c: Probe at %#lx failed\n", (*ndev)->base_addr);
err = -ENXIO;
goto probe_fail;
@@ -268,14 +268,14 @@
}
}

-static int __init ne_probe1(struct net_device *dev, int ioaddr)
+static int __init ne_probe1(struct net_device *dev, int ioaddr, int bad_card)
{
int i;
unsigned char SA_prom[32];
int wordlength = 2;
const char *name = NULL;
int start_page, stop_page;
- int neX000, ctron, copam, bad_card;
+ int neX000, ctron, copam;
int reg0, ret;
static unsigned version_printed;

@@ -311,11 +311,8 @@

/* A user with a poor card that fails to ack the reset, or that
does not have a valid 0x57,0x57 signature can still use this
- without having to recompile. Specifying an i/o address along
- with an otherwise unused dev->mem_end value of "0xBAD" will
- cause the driver to skip these parts of the probe. */
-
- bad_card = ((dev->base_addr != 0) && (dev->mem_end == 0xbad));
+ without having to recompile. Specifying a bad card will cause
+ the driver to skip these parts of the probe. */

/* Reset card. Who knows what dain-bramaged state it was left in. */

@@ -766,7 +763,7 @@
#define MAX_NE_CARDS 4 /* Max number of NE cards per module */
static int io[MAX_NE_CARDS];
static int irq[MAX_NE_CARDS];
-static int bad[MAX_NE_CARDS]; /* 0xbad = bad sig or no reset ack */
+static int bad[MAX_NE_CARDS]; /* bad sig or no reset ack */

MODULE_PARM(io, "1-" __MODULE_STRING(MAX_NE_CARDS) "i");
MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_NE_CARDS) "i");

--=_courier-484-1051811324-0001-2--