Skip to contentSkip to conversation

2.6.x net driver fixes

PATCH New Jeff Garzik 1 participant 1 message Feb 13, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.6.x net driver fixes

Please do a

bk pull bk://gkernel.bkbits.net/net-drivers-2.6

This will update the following files:

 drivers/net/ibm_emac/ibm_emac_core.c |    8 +-
 drivers/net/ibm_emac/ibm_emac_core.h |    2 
 drivers/net/tulip/de2104x.c          |    4 -
 drivers/net/wan/dscc4.c              |  117 ++++++++++++++++++-----------------
 4 files changed, 67 insertions(+), 64 deletions(-)

through these ChangeSets:

<[email protected]> (05/02/13 1.2033)
[PATCH] emac: fix mdio delay

Fixes MDIO delay. Please apply.

<[email protected]> (05/02/13 1.2032)
[PATCH] emac: fix jumbo frame support

Fixes a bug in RX buffer allocation so that jumbo size skbs are allocated when the MTU size is changed. Also removes the deprecated restore_flags() call. Please apply.

<[email protected]> (05/02/11 1.2031)
[PATCH] de214x.c uses uninitialized pci_dev->irq

Don't use pci_dev->irq until after pci_enable_device(). Andy Esten reported that his NIC stopped working in 2.6.10 because of this problem.

<[email protected]> (05/01/27 1.1966.102.5)
[PATCH] dscc4: removal of unneeded variable

Removal of unneeded variable and more spaces for my eyes.

<[email protected]> (05/01/27 1.1966.102.4)
[PATCH] dscc4: removal of unneeded casts

Removal of unneeded casts.

<[email protected]> (05/01/27 1.1966.102.3)
[PATCH] dscc4: error status checking and pci janitoring

Error status checking and PCI janitoring
- propagation of the error code;
- pci_request_region use in dscc4_init_one;
- missing pci_disable_device() added to the error path;

<[email protected]> (05/01/27 1.1966.102.2)
[PATCH] dscc4: code factorisation

Small code factorization.

<[email protected]> (05/01/27 1.1966.102.1)
[PATCH] dscc4: use of uncompletely initialized struct

dscc4_set_quartz() is issued with an argument in an unitialized state and the kernel does not like it.

drivers/net/ibm_emac/ibm_emac_core.c +4 -4
diff -Nru a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c
@@ -475,8 +475,9 @@
 
 	out_be32(&emacp->em0stacr, stacr);
 
-	while (((stacr = in_be32(&emacp->em0stacr) & EMAC_STACR_OC) == 0)
-					&& (count++ < 5000))
+	count = 0;
+	while ((((stacr = in_be32(&emacp->em0stacr)) & EMAC_STACR_OC) == 0)
+					&& (count++ < MDIO_DELAY))
 		udelay(1);
 	MDIO_DEBUG((" (count was %d)\n", count));
 
@@ -912,7 +913,6 @@
 		PKT_DEBUG(("emac_start_xmit() stopping queue\n"));
 		netif_stop_queue(dev);
 		spin_unlock_irqrestore(&fep->lock, flags);
-		restore_flags(flags);
 		return -EBUSY;
 	}
 
@@ -1281,7 +1281,7 @@
 	/* Format the receive descriptor ring. */
 	ep->rx_slot = 0;
 	/* Default is MTU=1500 + Ethernet overhead */
-	ep->rx_buffer_size = ENET_DEF_BUF_SIZE;
+	ep->rx_buffer_size = dev->mtu + ENET_HEADER_SIZE + ENET_FCS_SIZE;
 	emac_rx_fill(dev, 0);
 	if (ep->rx_slot != 0) {
 		printk(KERN_ERR
drivers/net/ibm_emac/ibm_emac_core.h +0 -2
diff -Nru a/drivers/net/ibm_emac/ibm_emac_core.h b/drivers/net/ibm_emac/ibm_emac_core.h
@@ -77,8 +77,6 @@
 
 #define ENET_HEADER_SIZE	14
 #define ENET_FCS_SIZE		4
-#define ENET_DEF_MTU_SIZE	1500
-#define ENET_DEF_BUF_SIZE	(ENET_DEF_MTU_SIZE + ENET_HEADER_SIZE + ENET_FCS_SIZE)
 #define EMAC_MIN_FRAME		64
 #define EMAC_MAX_FRAME		9018
 #define EMAC_MIN_MTU		(EMAC_MIN_FRAME - ENET_HEADER_SIZE - ENET_FCS_SIZE)
drivers/net/tulip/de2104x.c +2 -2
diff -Nru a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
@@ -1960,8 +1960,6 @@
 	dev->tx_timeout = de_tx_timeout;
 	dev->watchdog_timeo = TX_TIMEOUT;
 
-	dev->irq = pdev->irq;
-
 	de = dev->priv;
 	de->de21040 = ent->driver_data == 0 ? 1 : 0;
 	de->pdev = pdev;
@@ -1996,6 +1994,8 @@
 		       pdev->irq, pci_name(pdev));
 		goto err_out_res;
 	}
+
+	dev->irq = pdev->irq;
 
 	/* obtain and check validity of PCI I/O address */
 	pciaddr = pci_resource_start(pdev, 1);
drivers/net/wan/dscc4.c +61 -56

235 lines not on this page · raw message