[netdrivers] PATCH : tulip driver

Philippe De Muyter phdm at macqel.be
Wed Jun 15 05:41:32 PDT 2005


Hello Donald,

Because the official 2.4.21 tulip driver of my Suse 9.0 does not work
for my board in 10BaseT Half Duplex mode, I have downloaded your driver,
and compiled and tested it.

Unfortunately your driver crashed with a segmentation violation.
I have debugged it, and the crash occured because read_eeprom was called
without base_addr being set, and was thus still 0.  I have fixed that
and now your driver works perfectly for me.

Many thanks for your work.

You'll find the fix below.

Philippe

Philippe De Muyter  phdm at macqel dot be  Tel +32 27029044
Macq Electronique SA  rue de l'Aeronef 2  B-1140 Bruxelles  Fax +32 27029077

--- tulip.c	2005-05-13 13:56:06.000000000 +0200
+++ tulip.c	2005-05-13 22:41:28.000000000 +0200
@@ -722,6 +722,9 @@ static void *tulip_probe1(struct pci_dev
 	if (!dev)
 		return NULL;
 
+	/* base_addr must be set when calling read_eeprom in else case below */
+	dev->base_addr = ioaddr;
+
 	/* Make certain the data structures are quadword aligned. */
 	priv_mem = kmalloc(sizeof(*tp) + PRIV_ALIGN, GFP_KERNEL);
 	/* Check for the very unlikely case of no memory. */
@@ -843,7 +846,6 @@ static void *tulip_probe1(struct pci_dev
 	request_region(ioaddr, pci_id_tbl[chip_idx].io_size, dev->name);
 #endif
 
-	dev->base_addr = ioaddr;
 	dev->irq = irq;
 
 	tp->pci_dev = pdev;



More information about the netdrivers mailing list