LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [git patches] net driver fixes for 2.6.28-rc
@ 2008-11-06  6:50 Jeff Garzik
  2008-11-06 23:50 ` David Miller
  0 siblings, 1 reply; 16+ messages in thread
From: Jeff Garzik @ 2008-11-06  6:50 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, LKML


Please pull from 'davem-fixes' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git davem-fixes

to receive the following updates:

 drivers/net/3c509.c          |    6 +++---
 drivers/net/mlx4/en_netdev.c |    2 +-
 drivers/net/sfc/ethtool.c    |    4 ++--
 drivers/net/tun.c            |    4 ++--
 drivers/net/usb/hso.c        |   12 +++++++-----
 drivers/net/virtio_net.c     |    2 +-
 6 files changed, 16 insertions(+), 14 deletions(-)

Al Viro (1):
      el3_common_init() should be __devinit, not __init

Ben Hutchings (1):
      sfc: Correct address of gPXE boot configuration in EEPROM

Jonathan McDowell (1):
      [netdrvr] usb/hso: Cleanup rfkill error handling

Mark McLoughlin (2):
      virtio_net: don't set NETIF_F_FRAGLIST
      tun: don't set NETIF_F_FRAGLIST

Paulius Zaleckas (1):
      hso: rfkill type should be WWAN

Yevgeny Petrilin (1):
      mlx4_en: Start port error flow bug fix

diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c
index 3a7bc52..c7a4f3b 100644
--- a/drivers/net/3c509.c
+++ b/drivers/net/3c509.c
@@ -94,7 +94,7 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 
-static char version[] __initdata = DRV_NAME ".c:" DRV_VERSION " " DRV_RELDATE " becker@scyld.com\n";
+static char version[] __devinitdata = DRV_NAME ".c:" DRV_VERSION " " DRV_RELDATE " becker@scyld.com\n";
 
 #ifdef EL3_DEBUG
 static int el3_debug = EL3_DEBUG;
@@ -186,7 +186,7 @@ static int max_interrupt_work = 10;
 static int nopnp;
 #endif
 
-static int __init el3_common_init(struct net_device *dev);
+static int __devinit el3_common_init(struct net_device *dev);
 static void el3_common_remove(struct net_device *dev);
 static ushort id_read_eeprom(int index);
 static ushort read_eeprom(int ioaddr, int index);
@@ -537,7 +537,7 @@ static struct mca_driver el3_mca_driver = {
 static int mca_registered;
 #endif /* CONFIG_MCA */
 
-static int __init el3_common_init(struct net_device *dev)
+static int __devinit el3_common_init(struct net_device *dev)
 {
 	struct el3_private *lp = netdev_priv(dev);
 	int err;
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index a339afb..a3f7324 100644
--- a/drivers/net/mlx4/en_netdev.c
+++ b/drivers/net/mlx4/en_netdev.c
@@ -706,7 +706,7 @@ tx_err:
 	mlx4_en_release_rss_steer(priv);
 rx_err:
 	for (i = 0; i < priv->rx_ring_num; i++)
-		mlx4_en_deactivate_rx_ring(priv, &priv->rx_ring[rx_index]);
+		mlx4_en_deactivate_rx_ring(priv, &priv->rx_ring[i]);
 cq_err:
 	while (rx_index--)
 		mlx4_en_deactivate_cq(priv, &priv->rx_cq[rx_index]);
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
index fa98af5..cd0d087 100644
--- a/drivers/net/sfc/ethtool.c
+++ b/drivers/net/sfc/ethtool.c
@@ -174,8 +174,8 @@ static struct efx_ethtool_stat efx_ethtool_stats[] = {
 
 /* EEPROM range with gPXE configuration */
 #define EFX_ETHTOOL_EEPROM_MAGIC 0xEFAB
-#define EFX_ETHTOOL_EEPROM_MIN 0x100U
-#define EFX_ETHTOOL_EEPROM_MAX 0x400U
+#define EFX_ETHTOOL_EEPROM_MIN 0x800U
+#define EFX_ETHTOOL_EEPROM_MAX 0x1800U
 
 /**************************************************************************
  *
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 6daea0c..86433ea 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -844,11 +844,11 @@ static int set_offload(struct net_device *dev, unsigned long arg)
 
 	old_features = dev->features;
 	/* Unset features, set them as we chew on the arg. */
-	features = (old_features & ~(NETIF_F_HW_CSUM|NETIF_F_SG|NETIF_F_FRAGLIST
+	features = (old_features & ~(NETIF_F_HW_CSUM|NETIF_F_SG
 				    |NETIF_F_TSO_ECN|NETIF_F_TSO|NETIF_F_TSO6));
 
 	if (arg & TUN_F_CSUM) {
-		features |= NETIF_F_HW_CSUM|NETIF_F_SG|NETIF_F_FRAGLIST;
+		features |= NETIF_F_HW_CSUM|NETIF_F_SG;
 		arg &= ~TUN_F_CSUM;
 
 		if (arg & (TUN_F_TSO4|TUN_F_TSO6)) {
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 1164c52..8e90891 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -2184,19 +2184,20 @@ static void hso_create_rfkill(struct hso_device *hso_dev,
 			     struct usb_interface *interface)
 {
 	struct hso_net *hso_net = dev2net(hso_dev);
-	struct device *dev = hso_dev->dev;
+	struct device *dev = &hso_net->net->dev;
 	char *rfkn;
 
 	hso_net->rfkill = rfkill_allocate(&interface_to_usbdev(interface)->dev,
-				 RFKILL_TYPE_WLAN);
+				 RFKILL_TYPE_WWAN);
 	if (!hso_net->rfkill) {
-		dev_err(dev, "%s - Out of memory", __func__);
+		dev_err(dev, "%s - Out of memory\n", __func__);
 		return;
 	}
 	rfkn = kzalloc(20, GFP_KERNEL);
 	if (!rfkn) {
 		rfkill_free(hso_net->rfkill);
-		dev_err(dev, "%s - Out of memory", __func__);
+		hso_net->rfkill = NULL;
+		dev_err(dev, "%s - Out of memory\n", __func__);
 		return;
 	}
 	snprintf(rfkn, 20, "hso-%d",
@@ -2209,7 +2210,8 @@ static void hso_create_rfkill(struct hso_device *hso_dev,
 		kfree(rfkn);
 		hso_net->rfkill->name = NULL;
 		rfkill_free(hso_net->rfkill);
-		dev_err(dev, "%s - Failed to register rfkill", __func__);
+		hso_net->rfkill = NULL;
+		dev_err(dev, "%s - Failed to register rfkill\n", __func__);
 		return;
 	}
 }
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 0196a0d..9d4fdad 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -505,7 +505,7 @@ static int virtnet_probe(struct virtio_device *vdev)
 	/* Do we support "hardware" checksums? */
 	if (csum && virtio_has_feature(vdev, VIRTIO_NET_F_CSUM)) {
 		/* This opens up the world of extra features. */
-		dev->features |= NETIF_F_HW_CSUM|NETIF_F_SG|NETIF_F_FRAGLIST;
+		dev->features |= NETIF_F_HW_CSUM|NETIF_F_SG;
 		if (gso && virtio_has_feature(vdev, VIRTIO_NET_F_GSO)) {
 			dev->features |= NETIF_F_TSO | NETIF_F_UFO
 				| NETIF_F_TSO_ECN | NETIF_F_TSO6;

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [git patches] net driver fixes for 2.6.28-rc
  2008-11-06  6:50 [git patches] net driver fixes for 2.6.28-rc Jeff Garzik
@ 2008-11-06 23:50 ` David Miller
  0 siblings, 0 replies; 16+ messages in thread
From: David Miller @ 2008-11-06 23:50 UTC (permalink / raw)
  To: jeff; +Cc: netdev, linux-kernel

From: Jeff Garzik <jeff@garzik.org>
Date: Thu, 6 Nov 2008 01:50:03 -0500

> Mark McLoughlin (2):
>       virtio_net: don't set NETIF_F_FRAGLIST
>       tun: don't set NETIF_F_FRAGLIST

These patches aren't correct, the drivers do in fact handle fragment
lists properly as was discussed in the threads where these patches
were posted.

Please pull these changes out and resend your pull request, thanks Jeff!

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [git patches] net driver fixes for 2.6.28-rc
  2008-11-14 23:25 Jeff Garzik
@ 2008-11-14 23:48 ` David Miller
  0 siblings, 0 replies; 16+ messages in thread
From: David Miller @ 2008-11-14 23:48 UTC (permalink / raw)
  To: jeff; +Cc: netdev, linux-kernel

From: Jeff Garzik <jeff@garzik.org>
Date: Fri, 14 Nov 2008 18:25:43 -0500

> 
> Please pull from 'davem-fixes' branch of
> master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git davem-fixes

Pulled, thanks Jeff.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [git patches] net driver fixes for 2.6.28-rc
@ 2008-11-14 23:25 Jeff Garzik
  2008-11-14 23:48 ` David Miller
  0 siblings, 1 reply; 16+ messages in thread
From: Jeff Garzik @ 2008-11-14 23:25 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, LKML


Please pull from 'davem-fixes' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git davem-fixes

to receive the following updates:

 drivers/net/atl1e/atl1e_hw.c   |    4 ----
 drivers/net/atlx/atl1.c        |   17 +++--------------
 drivers/net/gianfar.c          |   15 ++++++++-------
 drivers/net/phy/mdio_bus.c     |    2 +-
 drivers/net/ucc_geth_ethtool.c |    6 +++---
 5 files changed, 15 insertions(+), 29 deletions(-)

Andy Fleming (1):
      gianfar: Fix DMA unmap invocations

Anton Vorontsov (1):
      net/ucc_geth: Fix oops in uec_get_ethtool_stats()

J. K. Cliburn (2):
      atl1e: fix broken multicast by removing unnecessary crc inversion
      atl1: Do not enumerate options unsupported by chip

Lennert Buytenhek (1):
      phylib: fix premature freeing of struct mii_bus

diff --git a/drivers/net/atl1e/atl1e_hw.c b/drivers/net/atl1e/atl1e_hw.c
index 8cbc1b5..4a77006 100644
--- a/drivers/net/atl1e/atl1e_hw.c
+++ b/drivers/net/atl1e/atl1e_hw.c
@@ -163,9 +163,6 @@ int atl1e_read_mac_addr(struct atl1e_hw *hw)
  * atl1e_hash_mc_addr
  *  purpose
  *      set hash value for a multicast address
- *      hash calcu processing :
- *          1. calcu 32bit CRC for multicast address
- *          2. reverse crc with MSB to LSB
  */
 u32 atl1e_hash_mc_addr(struct atl1e_hw *hw, u8 *mc_addr)
 {
@@ -174,7 +171,6 @@ u32 atl1e_hash_mc_addr(struct atl1e_hw *hw, u8 *mc_addr)
 	int i;
 
 	crc32 = ether_crc_le(6, mc_addr);
-	crc32 = ~crc32;
 	for (i = 0; i < 32; i++)
 		value |= (((crc32 >> i) & 1) << (31 - i));
 
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 246d92b..aef403d 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -3404,14 +3404,8 @@ static void atl1_get_wol(struct net_device *netdev,
 {
 	struct atl1_adapter *adapter = netdev_priv(netdev);
 
-	wol->supported = WAKE_UCAST | WAKE_MCAST | WAKE_BCAST | WAKE_MAGIC;
+	wol->supported = WAKE_MAGIC;
 	wol->wolopts = 0;
-	if (adapter->wol & ATLX_WUFC_EX)
-		wol->wolopts |= WAKE_UCAST;
-	if (adapter->wol & ATLX_WUFC_MC)
-		wol->wolopts |= WAKE_MCAST;
-	if (adapter->wol & ATLX_WUFC_BC)
-		wol->wolopts |= WAKE_BCAST;
 	if (adapter->wol & ATLX_WUFC_MAG)
 		wol->wolopts |= WAKE_MAGIC;
 	return;
@@ -3422,15 +3416,10 @@ static int atl1_set_wol(struct net_device *netdev,
 {
 	struct atl1_adapter *adapter = netdev_priv(netdev);
 
-	if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
+	if (wol->wolopts & (WAKE_PHY | WAKE_UCAST | WAKE_MCAST | WAKE_BCAST |
+		WAKE_ARP | WAKE_MAGICSECURE))
 		return -EOPNOTSUPP;
 	adapter->wol = 0;
-	if (wol->wolopts & WAKE_UCAST)
-		adapter->wol |= ATLX_WUFC_EX;
-	if (wol->wolopts & WAKE_MCAST)
-		adapter->wol |= ATLX_WUFC_MC;
-	if (wol->wolopts & WAKE_BCAST)
-		adapter->wol |= ATLX_WUFC_BC;
 	if (wol->wolopts & WAKE_MAGIC)
 		adapter->wol |= ATLX_WUFC_MAG;
 	return 0;
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 83a5cb6..c4af949 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -1407,6 +1407,10 @@ static int gfar_clean_tx_ring(struct net_device *dev)
 		if (bdp->status & TXBD_DEF)
 			dev->stats.collisions++;
 
+		/* Unmap the DMA memory */
+		dma_unmap_single(&priv->dev->dev, bdp->bufPtr,
+				bdp->length, DMA_TO_DEVICE);
+
 		/* Free the sk buffer associated with this TxBD */
 		dev_kfree_skb_irq(priv->tx_skbuff[priv->skb_dirtytx]);
 
@@ -1666,6 +1670,9 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit)
 
 		skb = priv->rx_skbuff[priv->skb_currx];
 
+		dma_unmap_single(&priv->dev->dev, bdp->bufPtr,
+				priv->rx_buffer_size, DMA_FROM_DEVICE);
+
 		/* We drop the frame if we failed to allocate a new buffer */
 		if (unlikely(!newskb || !(bdp->status & RXBD_LAST) ||
 				 bdp->status & RXBD_ERR)) {
@@ -1674,14 +1681,8 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit)
 			if (unlikely(!newskb))
 				newskb = skb;
 
-			if (skb) {
-				dma_unmap_single(&priv->dev->dev,
-						bdp->bufPtr,
-						priv->rx_buffer_size,
-						DMA_FROM_DEVICE);
-
+			if (skb)
 				dev_kfree_skb_any(skb);
-			}
 		} else {
 			/* Increment the number of packets */
 			dev->stats.rx_packets++;
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index d0ed1ef..536bda1 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -136,7 +136,7 @@ void mdiobus_unregister(struct mii_bus *bus)
 	BUG_ON(bus->state != MDIOBUS_REGISTERED);
 	bus->state = MDIOBUS_UNREGISTERED;
 
-	device_unregister(&bus->dev);
+	device_del(&bus->dev);
 	for (i = 0; i < PHY_MAX_ADDR; i++) {
 		if (bus->phy_map[i])
 			device_unregister(&bus->phy_map[i]->dev);
diff --git a/drivers/net/ucc_geth_ethtool.c b/drivers/net/ucc_geth_ethtool.c
index 85f38a6..68a7f54 100644
--- a/drivers/net/ucc_geth_ethtool.c
+++ b/drivers/net/ucc_geth_ethtool.c
@@ -323,17 +323,17 @@ static void uec_get_ethtool_stats(struct net_device *netdev,
 	if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_HARDWARE) {
 		base = (u32 __iomem *)&ugeth->ug_regs->tx64;
 		for (i = 0; i < UEC_HW_STATS_LEN; i++)
-			data[j++] = (u64)in_be32(&base[i]);
+			data[j++] = in_be32(&base[i]);
 	}
 	if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_TX) {
 		base = (u32 __iomem *)ugeth->p_tx_fw_statistics_pram;
 		for (i = 0; i < UEC_TX_FW_STATS_LEN; i++)
-			data[j++] = (u64)in_be32(&base[i]);
+			data[j++] = base ? in_be32(&base[i]) : 0;
 	}
 	if (stats_mode & UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX) {
 		base = (u32 __iomem *)ugeth->p_rx_fw_statistics_pram;
 		for (i = 0; i < UEC_RX_FW_STATS_LEN; i++)
-			data[j++] = (u64)in_be32(&base[i]);
+			data[j++] = base ? in_be32(&base[i]) : 0;
 	}
 }
 

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [git patches] net driver fixes for 2.6.28-rc
  2008-11-11  8:58 Jeff Garzik
@ 2008-11-12  0:42 ` David Miller
  0 siblings, 0 replies; 16+ messages in thread
From: David Miller @ 2008-11-12  0:42 UTC (permalink / raw)
  To: jeff; +Cc: netdev, linux-kernel

From: Jeff Garzik <jeff@garzik.org>
Date: Tue, 11 Nov 2008 03:58:30 -0500

> Please pull from 'davem-fixes' branch of
> master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git davem-fixes
> 
> to receive the following updates:

Pulled, thanks a lot Jeff.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [git patches] net driver fixes for 2.6.28-rc
@ 2008-11-11  8:58 Jeff Garzik
  2008-11-12  0:42 ` David Miller
  0 siblings, 1 reply; 16+ messages in thread
From: Jeff Garzik @ 2008-11-11  8:58 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, LKML


Please pull from 'davem-fixes' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git davem-fixes

to receive the following updates:

 drivers/infiniband/hw/cxgb3/iwch_provider.c |    6 ------
 drivers/net/cxgb3/cxgb3_main.c              |    4 +++-
 drivers/net/cxgb3/t3_hw.c                   |    8 +++++++-
 drivers/net/myri10ge/myri10ge.c             |    4 +++-
 drivers/net/smc911x.c                       |    4 +++-
 5 files changed, 16 insertions(+), 10 deletions(-)

Brice Goglin (1):
      myri10ge: fix stop/go ordering even more

Dasgupta, Romit (1):
      [netdrvr] smc911x: fix for driver resume (and compilation warning)

Divy Le Ray (2):
      cxgb3 - eeprom read fixes
      cxgb3 - Limit multiqueue setting to msi-x

Steve Wise (1):
      RDMA/cxgb3: deadlock in iw_cxgb3 can cause hang when configuring interface.

diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c
index ecff980..160ef48 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c
@@ -1102,9 +1102,7 @@ static u64 fw_vers_string_to_u64(struct iwch_dev *iwch_dev)
 	char *cp, *next;
 	unsigned fw_maj, fw_min, fw_mic;
 
-	rtnl_lock();
 	lldev->ethtool_ops->get_drvinfo(lldev, &info);
-	rtnl_unlock();
 
 	next = info.fw_version + 1;
 	cp = strsep(&next, ".");
@@ -1192,9 +1190,7 @@ static ssize_t show_fw_ver(struct device *dev, struct device_attribute *attr, ch
 	struct net_device *lldev = iwch_dev->rdev.t3cdev_p->lldev;
 
 	PDBG("%s dev 0x%p\n", __func__, dev);
-	rtnl_lock();
 	lldev->ethtool_ops->get_drvinfo(lldev, &info);
-	rtnl_unlock();
 	return sprintf(buf, "%s\n", info.fw_version);
 }
 
@@ -1207,9 +1203,7 @@ static ssize_t show_hca(struct device *dev, struct device_attribute *attr,
 	struct net_device *lldev = iwch_dev->rdev.t3cdev_p->lldev;
 
 	PDBG("%s dev 0x%p\n", __func__, dev);
-	rtnl_lock();
 	lldev->ethtool_ops->get_drvinfo(lldev, &info);
-	rtnl_unlock();
 	return sprintf(buf, "%s\n", info.driver);
 }
 
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index 1ace41a..2c341f8 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -1307,8 +1307,10 @@ static void get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
 	u32 fw_vers = 0;
 	u32 tp_vers = 0;
 
+	spin_lock(&adapter->stats_lock);
 	t3_get_fw_version(adapter, &fw_vers);
 	t3_get_tp_version(adapter, &tp_vers);
+	spin_unlock(&adapter->stats_lock);
 
 	strcpy(info->driver, DRV_NAME);
 	strcpy(info->version, DRV_VERSION);
@@ -2699,7 +2701,7 @@ static void set_nqsets(struct adapter *adap)
 	int hwports = adap->params.nports;
 	int nqsets = SGE_QSETS;
 
-	if (adap->params.rev > 0) {
+	if (adap->params.rev > 0 && adap->flags & USING_MSIX) {
 		if (hwports == 2 &&
 		    (hwports * nqsets > SGE_QSETS ||
 		     num_cpus >= nqsets / hwports))
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
index 968f64b..9a0898b 100644
--- a/drivers/net/cxgb3/t3_hw.c
+++ b/drivers/net/cxgb3/t3_hw.c
@@ -572,7 +572,7 @@ struct t3_vpd {
 	u32 pad;		/* for multiple-of-4 sizing and alignment */
 };
 
-#define EEPROM_MAX_POLL   4
+#define EEPROM_MAX_POLL   40
 #define EEPROM_STAT_ADDR  0x4000
 #define VPD_BASE          0xc00
 
@@ -3690,6 +3690,12 @@ int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai,
 			;
 
 		pti = &port_types[adapter->params.vpd.port_type[j]];
+		if (!pti->phy_prep) {
+			CH_ALERT(adapter, "Invalid port type index %d\n",
+				 adapter->params.vpd.port_type[j]);
+			return -EINVAL;
+		}
+
 		ret = pti->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,
 				    ai->mdio_ops);
 		if (ret)
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index a5f428b..b378670 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -75,7 +75,7 @@
 #include "myri10ge_mcp.h"
 #include "myri10ge_mcp_gen_header.h"
 
-#define MYRI10GE_VERSION_STR "1.4.3-1.375"
+#define MYRI10GE_VERSION_STR "1.4.3-1.378"
 
 MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
 MODULE_AUTHOR("Maintainer: help@myri.com");
@@ -1393,6 +1393,7 @@ myri10ge_tx_done(struct myri10ge_slice_state *ss, int mcp_index)
 		if (tx->req == tx->done) {
 			tx->queue_active = 0;
 			put_be32(htonl(1), tx->send_stop);
+			mb();
 			mmiowb();
 		}
 		__netif_tx_unlock(dev_queue);
@@ -2865,6 +2866,7 @@ again:
 	if ((mgp->dev->real_num_tx_queues > 1) && tx->queue_active == 0) {
 		tx->queue_active = 1;
 		put_be32(htonl(1), tx->send_go);
+		mb();
 		mmiowb();
 	}
 	tx->pkt_start++;
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 5051554..1f26ab0 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -2050,7 +2050,9 @@ err_out:
  */
 static int smc911x_drv_probe(struct platform_device *pdev)
 {
+#ifdef SMC_DYNAMIC_BUS_CONFIG
 	struct smc911x_platdata *pd = pdev->dev.platform_data;
+#endif
 	struct net_device *ndev;
 	struct resource *res;
 	struct smc911x_local *lp;
@@ -2182,9 +2184,9 @@ static int smc911x_drv_resume(struct platform_device *dev)
 
 		if (netif_running(ndev)) {
 			smc911x_reset(ndev);
-			smc911x_enable(ndev);
 			if (lp->phy_type != 0)
 				smc911x_phy_configure(&lp->phy_configure);
+			smc911x_enable(ndev);
 			netif_device_attach(ndev);
 		}
 	}

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [git patches] net driver fixes for 2.6.28-rc
  2008-11-04  7:51 Jonathan McDowell
  2008-11-04  8:27 ` Marcel Holtmann
@ 2008-11-06  5:42 ` Jeff Garzik
  1 sibling, 0 replies; 16+ messages in thread
From: Jeff Garzik @ 2008-11-06  5:42 UTC (permalink / raw)
  To: Jonathan McDowell; +Cc: netdev, linux-kernel

Jonathan McDowell wrote:
> In article <490F824E.3070809@garzik.org> (earth.lists.linux-kernel) you wrote:
>> Marcel Holtmann wrote:
>>> are you also queuing patches for drivers/net/usb/hso.c, because the 
>>> current state of that driver is fully broken. It oopses and shows up 
>>> with a WLAN RFKILL switch instead of WWAN. Also it has some weird 
>>> disconnect race with the TTY layer. Some patches have been posted, but 
>>> seems that nobody has picked them up so far.
> 
>> Last patch sent me was sent on 9/16 by Denis Joseph Barrow; I replied 
>> and never received a response after that.
> 
>> Patches welcome...
> 
>> I don't see any hso patches on
>> http://patchwork.ozlabs.org/project/netdev/list/ nor in my inbox, so I'm 
>> guessing that no one sent me or netdev any hso patches.
> 
> I sent the below to netdev@, Greg K-H and Andrew Bird (the people listed
> in hso.c). I can't see it in the netdev archives but it did hit lkml ok
> at:
> 
> http://lkml.org/lkml/2008/10/30/92
> 
> A subsequent fix for the rfkill layer has also been sent (and that did
> hit netdev ok and got acked), but this hso cleanup is still appropriate.
> 
> The WLAN/WWAN change is obviously a one line fix but I didn't see any
> point sending a patch for it until I knew I was going to get some sort
> of response about it; I can knock one up if that's helpful.
> 
> Original message:
> 
> [PATCH] Cleanup hso rfkill error handling
> 
> Yup, this appears to be the problem, thanks. I think &hso_net->net->dev
> is more intuitive for the error message, so I've used that. I've also
> added missing line endings on the error messages and set our local
> rfkill structure element to NULL on failure so we don't try to call
> rfkill_unregister on driver removal if we failed to register at all.
> 
> The patch below Works For Me (TM); the device is detected fine, can be
> removed without problems and connects ok. I'll have a prod at why the
> rfkill stuff isn't working next, but I believe this cleanup of the error
> handling is appropriate no matter what the issue with registration is.
> 
> Signed-Off-By: Jonathan McDowell <noodles@earth.li>
> 
> -----
> diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
> index 1164c52..9d9622b 100644
> --- a/drivers/net/usb/hso.c
> +++ b/drivers/net/usb/hso.c
> @@ -2184,19 +2184,20 @@ static void hso_create_rfkill(struct hso_device *hso_dev,
>  			     struct usb_interface *interface)
>  {
>  	struct hso_net *hso_net = dev2net(hso_dev);
> -	struct device *dev = hso_dev->dev;
> +	struct device *dev = &hso_net->net->dev;
>  	char *rfkn;
>  
>  	hso_net->rfkill = rfkill_allocate(&interface_to_usbdev(interface)->dev,
>  				 RFKILL_TYPE_WLAN);
>  	if (!hso_net->rfkill) {
> -		dev_err(dev, "%s - Out of memory", __func__);
> +		dev_err(dev, "%s - Out of memory\n", __func__);
>  		return;
>  	}
>  	rfkn = kzalloc(20, GFP_KERNEL);
>  	if (!rfkn) {
>  		rfkill_free(hso_net->rfkill);
> -		dev_err(dev, "%s - Out of memory", __func__);
> +		hso_net->rfkill = NULL;
> +		dev_err(dev, "%s - Out of memory\n", __func__);
>  		return;
>  	}
>  	snprintf(rfkn, 20, "hso-%d",
> @@ -2209,7 +2210,8 @@ static void hso_create_rfkill(struct hso_device *hso_dev,
>  		kfree(rfkn);
>  		hso_net->rfkill->name = NULL;
>  		rfkill_free(hso_net->rfkill);
> -		dev_err(dev, "%s - Failed to register rfkill", __func__);
> +		hso_net->rfkill = NULL;
> +		dev_err(dev, "%s - Failed to register rfkill\n", __func__);
>  		return;

applied



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [git patches] net driver fixes for 2.6.28-rc
  2008-11-04  7:51 Jonathan McDowell
@ 2008-11-04  8:27 ` Marcel Holtmann
  2008-11-06  5:42 ` Jeff Garzik
  1 sibling, 0 replies; 16+ messages in thread
From: Marcel Holtmann @ 2008-11-04  8:27 UTC (permalink / raw)
  To: Jonathan McDowell; +Cc: Jeff Garzik, netdev, linux-kernel

Hi Jonathan,

>>> are you also queuing patches for drivers/net/usb/hso.c, because the
>>> current state of that driver is fully broken. It oopses and shows up
>>> with a WLAN RFKILL switch instead of WWAN. Also it has some weird
>>> disconnect race with the TTY layer. Some patches have been posted,  
>>> but
>>> seems that nobody has picked them up so far.
>
>> Last patch sent me was sent on 9/16 by Denis Joseph Barrow; I replied
>> and never received a response after that.
>
>> Patches welcome...
>
>> I don't see any hso patches on
>> http://patchwork.ozlabs.org/project/netdev/list/ nor in my inbox,  
>> so I'm
>> guessing that no one sent me or netdev any hso patches.
>
> I sent the below to netdev@, Greg K-H and Andrew Bird (the people  
> listed
> in hso.c). I can't see it in the netdev archives but it did hit lkml  
> ok
> at:
>
> http://lkml.org/lkml/2008/10/30/92
>
> A subsequent fix for the rfkill layer has also been sent (and that did
> hit netdev ok and got acked), but this hso cleanup is still  
> appropriate.

It is not only appropriate, it is needed, because otherwise the driver  
is oopsing.

> The WLAN/WWAN change is obviously a one line fix but I didn't see any
> point sending a patch for it until I knew I was going to get some sort
> of response about it; I can knock one up if that's helpful.

Send a patch for it.

> Original message:
>
> [PATCH] Cleanup hso rfkill error handling
>
> Yup, this appears to be the problem, thanks. I think &hso_net->net- 
> >dev
> is more intuitive for the error message, so I've used that. I've also
> added missing line endings on the error messages and set our local
> rfkill structure element to NULL on failure so we don't try to call
> rfkill_unregister on driver removal if we failed to register at all.
>
> The patch below Works For Me (TM); the device is detected fine, can be
> removed without problems and connects ok. I'll have a prod at why the
> rfkill stuff isn't working next, but I believe this cleanup of the  
> error
> handling is appropriate no matter what the issue with registration is.
>
> Signed-Off-By: Jonathan McDowell <noodles@earth.li>

I have this patch running now and it works. Without it the device is  
not usable at all.

Acked-by: Marcel Holtmann <marcel@holtmann.org>

Regards

Marcel


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [git patches] net driver fixes for 2.6.28-rc
@ 2008-11-04  7:51 Jonathan McDowell
  2008-11-04  8:27 ` Marcel Holtmann
  2008-11-06  5:42 ` Jeff Garzik
  0 siblings, 2 replies; 16+ messages in thread
From: Jonathan McDowell @ 2008-11-04  7:51 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, linux-kernel


In article <490F824E.3070809@garzik.org> (earth.lists.linux-kernel) you wrote:
> Marcel Holtmann wrote:
> > are you also queuing patches for drivers/net/usb/hso.c, because the 
> > current state of that driver is fully broken. It oopses and shows up 
> > with a WLAN RFKILL switch instead of WWAN. Also it has some weird 
> > disconnect race with the TTY layer. Some patches have been posted, but 
> > seems that nobody has picked them up so far.

> Last patch sent me was sent on 9/16 by Denis Joseph Barrow; I replied 
> and never received a response after that.

> Patches welcome...

> I don't see any hso patches on
> http://patchwork.ozlabs.org/project/netdev/list/ nor in my inbox, so I'm 
> guessing that no one sent me or netdev any hso patches.

I sent the below to netdev@, Greg K-H and Andrew Bird (the people listed
in hso.c). I can't see it in the netdev archives but it did hit lkml ok
at:

http://lkml.org/lkml/2008/10/30/92

A subsequent fix for the rfkill layer has also been sent (and that did
hit netdev ok and got acked), but this hso cleanup is still appropriate.

The WLAN/WWAN change is obviously a one line fix but I didn't see any
point sending a patch for it until I knew I was going to get some sort
of response about it; I can knock one up if that's helpful.

Original message:

[PATCH] Cleanup hso rfkill error handling

Yup, this appears to be the problem, thanks. I think &hso_net->net->dev
is more intuitive for the error message, so I've used that. I've also
added missing line endings on the error messages and set our local
rfkill structure element to NULL on failure so we don't try to call
rfkill_unregister on driver removal if we failed to register at all.

The patch below Works For Me (TM); the device is detected fine, can be
removed without problems and connects ok. I'll have a prod at why the
rfkill stuff isn't working next, but I believe this cleanup of the error
handling is appropriate no matter what the issue with registration is.

Signed-Off-By: Jonathan McDowell <noodles@earth.li>

-----
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 1164c52..9d9622b 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -2184,19 +2184,20 @@ static void hso_create_rfkill(struct hso_device *hso_dev,
 			     struct usb_interface *interface)
 {
 	struct hso_net *hso_net = dev2net(hso_dev);
-	struct device *dev = hso_dev->dev;
+	struct device *dev = &hso_net->net->dev;
 	char *rfkn;
 
 	hso_net->rfkill = rfkill_allocate(&interface_to_usbdev(interface)->dev,
 				 RFKILL_TYPE_WLAN);
 	if (!hso_net->rfkill) {
-		dev_err(dev, "%s - Out of memory", __func__);
+		dev_err(dev, "%s - Out of memory\n", __func__);
 		return;
 	}
 	rfkn = kzalloc(20, GFP_KERNEL);
 	if (!rfkn) {
 		rfkill_free(hso_net->rfkill);
-		dev_err(dev, "%s - Out of memory", __func__);
+		hso_net->rfkill = NULL;
+		dev_err(dev, "%s - Out of memory\n", __func__);
 		return;
 	}
 	snprintf(rfkn, 20, "hso-%d",
@@ -2209,7 +2210,8 @@ static void hso_create_rfkill(struct hso_device *hso_dev,
 		kfree(rfkn);
 		hso_net->rfkill->name = NULL;
 		rfkill_free(hso_net->rfkill);
-		dev_err(dev, "%s - Failed to register rfkill", __func__);
+		hso_net->rfkill = NULL;
+		dev_err(dev, "%s - Failed to register rfkill\n", __func__);
 		return;
 	}
 }
-----

J.

-- 
Web [     101 things you can't have too much of : 42 - Pepsi.      ]
site: http:// [                                          ]       Made by
www.earth.li/~noodles/  [                      ]         HuggieTag 0.0.23

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [git patches] net driver fixes for 2.6.28-rc
  2008-11-03 22:07 ` Marcel Holtmann
  2008-11-03 22:54   ` David Miller
@ 2008-11-03 22:59   ` Jeff Garzik
  1 sibling, 0 replies; 16+ messages in thread
From: Jeff Garzik @ 2008-11-03 22:59 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: David Miller, netdev, LKML

Marcel Holtmann wrote:
> Hi Jeff,
> 
>> Please pull from 'davem-fixes' branch of
>> master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git 
>> davem-fixes
>>
>> to receive the following updates:
>>
>> drivers/net/Kconfig                |   18 +++++++++++++++---
>> drivers/net/fs_enet/fs_enet-main.c |    6 ++++--
>> drivers/net/mv643xx_eth.c          |    9 ++++++---
>> 3 files changed, 25 insertions(+), 8 deletions(-)
> 
> are you also queuing patches for drivers/net/usb/hso.c, because the 
> current state of that driver is fully broken. It oopses and shows up 
> with a WLAN RFKILL switch instead of WWAN. Also it has some weird 
> disconnect race with the TTY layer. Some patches have been posted, but 
> seems that nobody has picked them up so far.

Last patch sent me was sent on 9/16 by Denis Joseph Barrow; I replied 
and never received a response after that.

Patches welcome...

I don't see any hso patches on
http://patchwork.ozlabs.org/project/netdev/list/ nor in my inbox, so I'm 
guessing that no one sent me or netdev any hso patches.

	Jeff



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [git patches] net driver fixes for 2.6.28-rc
  2008-11-03 22:07 ` Marcel Holtmann
@ 2008-11-03 22:54   ` David Miller
  2008-11-03 22:59   ` Jeff Garzik
  1 sibling, 0 replies; 16+ messages in thread
From: David Miller @ 2008-11-03 22:54 UTC (permalink / raw)
  To: marcel; +Cc: jeff, netdev, linux-kernel

From: Marcel Holtmann <marcel@holtmann.org>
Date: Mon, 3 Nov 2008 23:07:58 +0100

> are you also queuing patches for drivers/net/usb/hso.c, because the
> current state of that driver is fully broken. It oopses and shows up
> with a WLAN RFKILL switch instead of WWAN. Also it has some weird
> disconnect race with the TTY layer. Some patches have been posted,
> but seems that nobody has picked them up so far.

The person submitting those patches is, frankly, creating a lot
of confusion.

He can't clone my tree or pull from it, then Greg KH tries to
take the fixes from him, and that doesn't go smoothly either.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [git patches] net driver fixes for 2.6.28-rc
  2008-11-03 20:51 Jeff Garzik
  2008-11-03 21:28 ` David Miller
@ 2008-11-03 22:07 ` Marcel Holtmann
  2008-11-03 22:54   ` David Miller
  2008-11-03 22:59   ` Jeff Garzik
  1 sibling, 2 replies; 16+ messages in thread
From: Marcel Holtmann @ 2008-11-03 22:07 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: David Miller, netdev, LKML

Hi Jeff,

> Please pull from 'davem-fixes' branch of
> master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git  
> davem-fixes
>
> to receive the following updates:
>
> drivers/net/Kconfig                |   18 +++++++++++++++---
> drivers/net/fs_enet/fs_enet-main.c |    6 ++++--
> drivers/net/mv643xx_eth.c          |    9 ++++++---
> 3 files changed, 25 insertions(+), 8 deletions(-)

are you also queuing patches for drivers/net/usb/hso.c, because the  
current state of that driver is fully broken. It oopses and shows up  
with a WLAN RFKILL switch instead of WWAN. Also it has some weird  
disconnect race with the TTY layer. Some patches have been posted, but  
seems that nobody has picked them up so far.

Regards

Marcel


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [git patches] net driver fixes for 2.6.28-rc
  2008-11-03 20:51 Jeff Garzik
@ 2008-11-03 21:28 ` David Miller
  2008-11-03 22:07 ` Marcel Holtmann
  1 sibling, 0 replies; 16+ messages in thread
From: David Miller @ 2008-11-03 21:28 UTC (permalink / raw)
  To: jeff; +Cc: netdev, linux-kernel

From: Jeff Garzik <jeff@garzik.org>
Date: Mon, 3 Nov 2008 15:51:22 -0500

> 
> Please pull from 'davem-fixes' branch of
> master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git davem-fixes
> 
> to receive the following updates:

Pulled, thanks a lot Jeff.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [git patches] net driver fixes for 2.6.28-rc
@ 2008-11-03 20:51 Jeff Garzik
  2008-11-03 21:28 ` David Miller
  2008-11-03 22:07 ` Marcel Holtmann
  0 siblings, 2 replies; 16+ messages in thread
From: Jeff Garzik @ 2008-11-03 20:51 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, LKML


Please pull from 'davem-fixes' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git davem-fixes

to receive the following updates:

 drivers/net/Kconfig                |   18 +++++++++++++++---
 drivers/net/fs_enet/fs_enet-main.c |    6 ++++--
 drivers/net/mv643xx_eth.c          |    9 ++++++---
 3 files changed, 25 insertions(+), 8 deletions(-)

Alexey Dobriyan (1):
      fs_enet: fix polling

Jeff Kirsher (1):
      net: kconfig cleanup

Lennert Buytenhek (1):
      mv643xx_eth: fix SMI bus access timeouts

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index f749b40..11f143f 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2010,9 +2010,13 @@ config IGB_LRO
 	  If in doubt, say N.
 
 config IGB_DCA
-	bool "Enable DCA"
+	bool "Direct Cache Access (DCA) Support"
 	default y
 	depends on IGB && DCA && !(IGB=y && DCA=m)
+	---help---
+	  Say Y here if you want to use Direct Cache Access (DCA) in the
+	  driver.  DCA is a method for warming the CPU cache before data
+	  is used, with the intent of lessening the impact of cache misses.
 
 source "drivers/net/ixp2000/Kconfig"
 
@@ -2437,9 +2441,13 @@ config IXGBE
 	  will be called ixgbe.
 
 config IXGBE_DCA
-	bool
+	bool "Direct Cache Access (DCA) Support"
 	default y
 	depends on IXGBE && DCA && !(IXGBE=y && DCA=m)
+	---help---
+	  Say Y here if you want to use Direct Cache Access (DCA) in the
+	  driver.  DCA is a method for warming the CPU cache before data
+	  is used, with the intent of lessening the impact of cache misses.
 
 config IXGB
 	tristate "Intel(R) PRO/10GbE support"
@@ -2489,9 +2497,13 @@ config MYRI10GE
 	  will be called myri10ge.
 
 config MYRI10GE_DCA
-	bool
+	bool "Direct Cache Access (DCA) Support"
 	default y
 	depends on MYRI10GE && DCA && !(MYRI10GE=y && DCA=m)
+	---help---
+	  Say Y here if you want to use Direct Cache Access (DCA) in the
+	  driver.  DCA is a method for warming the CPU cache before data
+	  is used, with the intent of lessening the impact of cache misses.
 
 config NETXEN_NIC
 	tristate "NetXen Multi port (1/10) Gigabit Ethernet NIC"
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index cb51c1f..a6f49d0 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -1099,7 +1099,9 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
 	ndev->stop = fs_enet_close;
 	ndev->get_stats = fs_enet_get_stats;
 	ndev->set_multicast_list = fs_set_multicast_list;
-
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	ndev->poll_controller = fs_enet_netpoll;
+#endif
 	if (fpi->use_napi)
 		netif_napi_add(ndev, &fep->napi, fs_enet_rx_napi,
 		               fpi->napi_weight);
@@ -1209,7 +1211,7 @@ static void __exit fs_cleanup(void)
 static void fs_enet_netpoll(struct net_device *dev)
 {
        disable_irq(dev->irq);
-       fs_enet_interrupt(dev->irq, dev, NULL);
+       fs_enet_interrupt(dev->irq, dev);
        enable_irq(dev->irq);
 }
 #endif
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index a9c8c08..b9dcdbd 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -1066,9 +1066,12 @@ static int smi_wait_ready(struct mv643xx_eth_shared_private *msp)
 		return 0;
 	}
 
-	if (!wait_event_timeout(msp->smi_busy_wait, smi_is_done(msp),
-				msecs_to_jiffies(100)))
-		return -ETIMEDOUT;
+	if (!smi_is_done(msp)) {
+		wait_event_timeout(msp->smi_busy_wait, smi_is_done(msp),
+				   msecs_to_jiffies(100));
+		if (!smi_is_done(msp))
+			return -ETIMEDOUT;
+	}
 
 	return 0;
 }

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [git patches] net driver fixes for 2.6.28-rc
  2008-10-31  5:09 Jeff Garzik
@ 2008-10-31  6:52 ` David Miller
  0 siblings, 0 replies; 16+ messages in thread
From: David Miller @ 2008-10-31  6:52 UTC (permalink / raw)
  To: jeff; +Cc: netdev, linux-kernel

From: Jeff Garzik <jeff@garzik.org>
Date: Fri, 31 Oct 2008 01:09:10 -0400

> 
> Please pull from 'davem-fixes' branch of
> master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git davem-fixes
> 
> to receive the following updates:

Pulled, thanks a lot Jeff!

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [git patches] net driver fixes for 2.6.28-rc
@ 2008-10-31  5:09 Jeff Garzik
  2008-10-31  6:52 ` David Miller
  0 siblings, 1 reply; 16+ messages in thread
From: Jeff Garzik @ 2008-10-31  5:09 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, LKML


Please pull from 'davem-fixes' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git davem-fixes

to receive the following updates:

 arch/powerpc/sysdev/fsl_soc.c   |   26 +++++++++++++++++++
 drivers/net/amd8111e.c          |    9 +++---
 drivers/net/arm/at91_ether.c    |    6 +++-
 drivers/net/atlx/atl1.c         |    7 +++--
 drivers/net/atlx/atl1.h         |    2 +-
 drivers/net/bonding/bond_alb.c  |   13 ++++++---
 drivers/net/bonding/bond_main.c |   52 +++++++++++++++++++++++++-------------
 drivers/net/gianfar.c           |   16 ++++++++++++
 drivers/net/gianfar_mii.c       |   21 +++++++++++++++
 drivers/net/gianfar_mii.h       |    3 ++
 drivers/net/myri10ge/myri10ge.c |    4 ++-
 drivers/net/smc91x.c            |    2 -
 include/linux/fsl_devices.h     |    3 +-
 13 files changed, 127 insertions(+), 37 deletions(-)

Andy Gospodarek (1):
      bonding: fix panic when taking bond interface down before removing module

Brice Goglin (1):
      myri10ge: fix stop/go mmio ordering

Chunbo Luo (1):
      amd8111e: fix dma_free_coherent context

David Brownell (1):
      at91_ether: request/free GPIO for PHY interrupt

Jay Cliburn (1):
      atl1: fix vlan tag regression

Jay Vosburgh (2):
      bonding: fix miimon failure counter
      bonding: Clean up resource leaks

Mike Frysinger (1):
      SMC91x: delete unused local variable "lp"

Trent Piepho (2):
      gianfar: Fix race in TBI/SerDes configuration
      gianfar: Don't reset TBI<->SerDes link if it's already up

diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 01b884b..26ecb96 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -223,6 +223,8 @@ static int gfar_mdio_of_init_one(struct device_node *np)
 	if (ret)
 		return ret;
 
+	/* The gianfar device will try to use the same ID created below to find
+	 * this bus, to coordinate register access (since they share).  */
 	mdio_dev = platform_device_register_simple("fsl-gianfar_mdio",
 			res.start&0xfffff, &res, 1);
 	if (IS_ERR(mdio_dev))
@@ -394,6 +396,30 @@ static int __init gfar_of_init(void)
 			of_node_put(mdio);
 		}
 
+		/* Get MDIO bus controlled by this eTSEC, if any.  Normally only
+		 * eTSEC 1 will control an MDIO bus, not necessarily the same
+		 * bus that its PHY is on ('mdio' above), so we can't just use
+		 * that.  What we do is look for a gianfar mdio device that has
+		 * overlapping registers with this device.  That's really the
+		 * whole point, to find the device sharing our registers to
+		 * coordinate access with it.
+		 */
+		for_each_compatible_node(mdio, NULL, "fsl,gianfar-mdio") {
+			if (of_address_to_resource(mdio, 0, &res))
+				continue;
+
+			if (res.start >= r[0].start && res.end <= r[0].end) {
+				/* Get the ID the mdio bus platform device was
+				 * registered with.  gfar_data.bus_id is
+				 * different because it's for finding a PHY,
+				 * while this is for finding a MII bus.
+				 */
+				gfar_data.mdio_bus = res.start&0xfffff;
+				of_node_put(mdio);
+				break;
+			}
+		}
+
 		ret =
 		    platform_device_add_data(gfar_dev, &gfar_data,
 					     sizeof(struct
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c
index ba1be0b..07a6697 100644
--- a/drivers/net/amd8111e.c
+++ b/drivers/net/amd8111e.c
@@ -644,10 +644,6 @@ This function frees the  transmiter and receiver descriptor rings.
 */
 static void amd8111e_free_ring(struct amd8111e_priv* lp)
 {
-
-	/* Free transmit and receive skbs */
-	amd8111e_free_skbs(lp->amd8111e_net_dev);
-
 	/* Free transmit and receive descriptor rings */
 	if(lp->rx_ring){
 		pci_free_consistent(lp->pci_dev,
@@ -1233,7 +1229,9 @@ static int amd8111e_close(struct net_device * dev)
 
 	amd8111e_disable_interrupt(lp);
 	amd8111e_stop_chip(lp);
-	amd8111e_free_ring(lp);
+
+	/* Free transmit and receive skbs */
+	amd8111e_free_skbs(lp->amd8111e_net_dev);
 
 	netif_carrier_off(lp->amd8111e_net_dev);
 
@@ -1243,6 +1241,7 @@ static int amd8111e_close(struct net_device * dev)
 
 	spin_unlock_irq(&lp->lock);
 	free_irq(dev->irq, dev);
+	amd8111e_free_ring(lp);
 
 	/* Update the statistics before closing */
 	amd8111e_get_stats(dev);
diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c
index 0fa5346..6f431a8 100644
--- a/drivers/net/arm/at91_ether.c
+++ b/drivers/net/arm/at91_ether.c
@@ -1080,7 +1080,8 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add
 		init_timer(&lp->check_timer);
 		lp->check_timer.data = (unsigned long)dev;
 		lp->check_timer.function = at91ether_check_link;
-	}
+	} else if (lp->board_data.phy_irq_pin >= 32)
+		gpio_request(lp->board_data.phy_irq_pin, "ethernet_phy");
 
 	/* Display ethernet banner */
 	printk(KERN_INFO "%s: AT91 ethernet at 0x%08x int=%d %s%s (%s)\n",
@@ -1167,6 +1168,9 @@ static int __devexit at91ether_remove(struct platform_device *pdev)
 	struct net_device *dev = platform_get_drvdata(pdev);
 	struct at91_private *lp = netdev_priv(dev);
 
+	if (lp->board_data.phy_irq_pin >= 32)
+		gpio_free(lp->board_data.phy_irq_pin);
+
 	unregister_netdev(dev);
 	free_irq(dev->irq, dev);
 	dma_free_coherent(NULL, sizeof(struct recv_desc_bufs), lp->dlist, (dma_addr_t)lp->dlist_phys);
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 3cf59a7..246d92b 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -2310,7 +2310,8 @@ static void atl1_tx_queue(struct atl1_adapter *adapter, u16 count,
 		if (tpd != ptpd)
 			memcpy(tpd, ptpd, sizeof(struct tx_packet_desc));
 		tpd->buffer_addr = cpu_to_le64(buffer_info->dma);
-		tpd->word2 = (cpu_to_le16(buffer_info->length) &
+		tpd->word2 &= ~(TPD_BUFLEN_MASK << TPD_BUFLEN_SHIFT);
+		tpd->word2 |= (cpu_to_le16(buffer_info->length) &
 			TPD_BUFLEN_MASK) << TPD_BUFLEN_SHIFT;
 
 		/*
@@ -2409,8 +2410,8 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
 		vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) |
 			((vlan_tag >> 9) & 0x8);
 		ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT;
-		ptpd->word3 |= (vlan_tag & TPD_VL_TAGGED_MASK) <<
-			TPD_VL_TAGGED_SHIFT;
+		ptpd->word2 |= (vlan_tag & TPD_VLANTAG_MASK) <<
+			TPD_VLANTAG_SHIFT;
 	}
 
 	tso = atl1_tso(adapter, skb, ptpd);
diff --git a/drivers/net/atlx/atl1.h b/drivers/net/atlx/atl1.h
index a5015b1..ffa73fc 100644
--- a/drivers/net/atlx/atl1.h
+++ b/drivers/net/atlx/atl1.h
@@ -504,7 +504,7 @@ struct rx_free_desc {
 #define TPD_PKTNT_MASK		0x0001
 #define TPD_PKTINT_SHIFT	15
 #define TPD_VLANTAG_MASK	0xFFFF
-#define TPD_VLAN_SHIFT		16
+#define TPD_VLANTAG_SHIFT	16
 
 /* tpd word 3 bits 0:13 */
 #define TPD_EOP_MASK		0x0001
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index ade5f3f..87437c7 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -169,11 +169,14 @@ static void tlb_clear_slave(struct bonding *bond, struct slave *slave, int save_
 	/* clear slave from tx_hashtbl */
 	tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl;
 
-	index = SLAVE_TLB_INFO(slave).head;
-	while (index != TLB_NULL_INDEX) {
-		u32 next_index = tx_hash_table[index].next;
-		tlb_init_table_entry(&tx_hash_table[index], save_load);
-		index = next_index;
+	/* skip this if we've already freed the tx hash table */
+	if (tx_hash_table) {
+		index = SLAVE_TLB_INFO(slave).head;
+		while (index != TLB_NULL_INDEX) {
+			u32 next_index = tx_hash_table[index].next;
+			tlb_init_table_entry(&tx_hash_table[index], save_load);
+			index = next_index;
+		}
 	}
 
 	tlb_init_slave(slave);
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 832739f..a3efba5 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1979,6 +1979,20 @@ void bond_destroy(struct bonding *bond)
 	unregister_netdevice(bond->dev);
 }
 
+static void bond_destructor(struct net_device *bond_dev)
+{
+	struct bonding *bond = bond_dev->priv;
+
+	if (bond->wq)
+		destroy_workqueue(bond->wq);
+
+	netif_addr_lock_bh(bond_dev);
+	bond_mc_list_destroy(bond);
+	netif_addr_unlock_bh(bond_dev);
+
+	free_netdev(bond_dev);
+}
+
 /*
 * First release a slave and than destroy the bond if no more slaves iare left.
 * Must be under rtnl_lock when this function is called.
@@ -2376,6 +2390,9 @@ static void bond_miimon_commit(struct bonding *bond)
 			continue;
 
 		case BOND_LINK_DOWN:
+			if (slave->link_failure_count < UINT_MAX)
+				slave->link_failure_count++;
+
 			slave->link = BOND_LINK_DOWN;
 
 			if (bond->params.mode == BOND_MODE_ACTIVEBACKUP ||
@@ -4550,7 +4567,7 @@ static int bond_init(struct net_device *bond_dev, struct bond_params *params)
 
 	bond_set_mode_ops(bond, bond->params.mode);
 
-	bond_dev->destructor = free_netdev;
+	bond_dev->destructor = bond_destructor;
 
 	/* Initialize the device options */
 	bond_dev->tx_queue_len = 0;
@@ -4589,20 +4606,6 @@ static int bond_init(struct net_device *bond_dev, struct bond_params *params)
 	return 0;
 }
 
-/* De-initialize device specific data.
- * Caller must hold rtnl_lock.
- */
-static void bond_deinit(struct net_device *bond_dev)
-{
-	struct bonding *bond = bond_dev->priv;
-
-	list_del(&bond->bond_list);
-
-#ifdef CONFIG_PROC_FS
-	bond_remove_proc_entry(bond);
-#endif
-}
-
 static void bond_work_cancel_all(struct bonding *bond)
 {
 	write_lock_bh(&bond->lock);
@@ -4624,6 +4627,22 @@ static void bond_work_cancel_all(struct bonding *bond)
 		cancel_delayed_work(&bond->ad_work);
 }
 
+/* De-initialize device specific data.
+ * Caller must hold rtnl_lock.
+ */
+static void bond_deinit(struct net_device *bond_dev)
+{
+	struct bonding *bond = bond_dev->priv;
+
+	list_del(&bond->bond_list);
+
+	bond_work_cancel_all(bond);
+
+#ifdef CONFIG_PROC_FS
+	bond_remove_proc_entry(bond);
+#endif
+}
+
 /* Unregister and free all bond devices.
  * Caller must hold rtnl_lock.
  */
@@ -4635,9 +4654,6 @@ static void bond_free_all(void)
 		struct net_device *bond_dev = bond->dev;
 
 		bond_work_cancel_all(bond);
-		netif_addr_lock_bh(bond_dev);
-		bond_mc_list_destroy(bond);
-		netif_addr_unlock_bh(bond_dev);
 		/* Release the bonded slaves */
 		bond_release_all(bond_dev);
 		bond_destroy(bond);
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 64b2011..83a5cb6 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -586,6 +586,18 @@ static void gfar_configure_serdes(struct net_device *dev)
 	struct gfar_mii __iomem *regs =
 			(void __iomem *)&priv->regs->gfar_mii_regs;
 	int tbipa = gfar_read(&priv->regs->tbipa);
+	struct mii_bus *bus = gfar_get_miibus(priv);
+
+	if (bus)
+		mutex_lock(&bus->mdio_lock);
+
+	/* If the link is already up, we must already be ok, and don't need to
+	 * configure and reset the TBI<->SerDes link.  Maybe U-Boot configured
+	 * everything for us?  Resetting it takes the link down and requires
+	 * several seconds for it to come back.
+	 */
+	if (gfar_local_mdio_read(regs, tbipa, MII_BMSR) & BMSR_LSTATUS)
+		goto done;
 
 	/* Single clk mode, mii mode off(for serdes communication) */
 	gfar_local_mdio_write(regs, tbipa, MII_TBICON, TBICON_CLK_SELECT);
@@ -596,6 +608,10 @@ static void gfar_configure_serdes(struct net_device *dev)
 
 	gfar_local_mdio_write(regs, tbipa, MII_BMCR, BMCR_ANENABLE |
 			BMCR_ANRESTART | BMCR_FULLDPLX | BMCR_SPEED1000);
+
+	done:
+	if (bus)
+		mutex_unlock(&bus->mdio_lock);
 }
 
 static void init_registers(struct net_device *dev)
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c
index bf73eea..0e2595d 100644
--- a/drivers/net/gianfar_mii.c
+++ b/drivers/net/gianfar_mii.c
@@ -269,6 +269,27 @@ static struct device_driver gianfar_mdio_driver = {
 	.remove = gfar_mdio_remove,
 };
 
+static int match_mdio_bus(struct device *dev, void *data)
+{
+	const struct gfar_private *priv = data;
+	const struct platform_device *pdev = to_platform_device(dev);
+
+	return !strcmp(pdev->name, gianfar_mdio_driver.name) &&
+		pdev->id == priv->einfo->mdio_bus;
+}
+
+/* Given a gfar_priv structure, find the mii_bus controlled by this device (not
+ * necessarily the same as the bus the gfar's PHY is on), if one exists.
+ * Normally only the first gianfar controls a mii_bus.  */
+struct mii_bus *gfar_get_miibus(const struct gfar_private *priv)
+{
+	/*const*/ struct device *d;
+
+	d = bus_find_device(gianfar_mdio_driver.bus, NULL, (void *)priv,
+			    match_mdio_bus);
+	return d ? dev_get_drvdata(d) : NULL;
+}
+
 int __init gfar_mdio_init(void)
 {
 	return driver_register(&gianfar_mdio_driver);
diff --git a/drivers/net/gianfar_mii.h b/drivers/net/gianfar_mii.h
index 2af28b1..02dc970 100644
--- a/drivers/net/gianfar_mii.h
+++ b/drivers/net/gianfar_mii.h
@@ -18,6 +18,8 @@
 #ifndef __GIANFAR_MII_H
 #define __GIANFAR_MII_H
 
+struct gfar_private; /* forward ref */
+
 #define MIIMIND_BUSY            0x00000001
 #define MIIMIND_NOTVALID        0x00000004
 
@@ -44,6 +46,7 @@ int gfar_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value);
 int gfar_local_mdio_write(struct gfar_mii __iomem *regs, int mii_id,
 			  int regnum, u16 value);
 int gfar_local_mdio_read(struct gfar_mii __iomem *regs, int mii_id, int regnum);
+struct mii_bus *gfar_get_miibus(const struct gfar_private *priv);
 int __init gfar_mdio_init(void);
 void gfar_mdio_exit(void);
 #endif /* GIANFAR_PHY_H */
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index b1556b2..a5f428b 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -75,7 +75,7 @@
 #include "myri10ge_mcp.h"
 #include "myri10ge_mcp_gen_header.h"
 
-#define MYRI10GE_VERSION_STR "1.4.3-1.371"
+#define MYRI10GE_VERSION_STR "1.4.3-1.375"
 
 MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
 MODULE_AUTHOR("Maintainer: help@myri.com");
@@ -1393,6 +1393,7 @@ myri10ge_tx_done(struct myri10ge_slice_state *ss, int mcp_index)
 		if (tx->req == tx->done) {
 			tx->queue_active = 0;
 			put_be32(htonl(1), tx->send_stop);
+			mmiowb();
 		}
 		__netif_tx_unlock(dev_queue);
 	}
@@ -2864,6 +2865,7 @@ again:
 	if ((mgp->dev->real_num_tx_queues > 1) && tx->queue_active == 0) {
 		tx->queue_active = 1;
 		put_be32(htonl(1), tx->send_go);
+		mmiowb();
 	}
 	tx->pkt_start++;
 	if ((avail - count) < MXGEFW_MAX_SEND_DESC) {
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index c70870e..6f9895d 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -2060,7 +2060,6 @@ static int smc_request_attrib(struct platform_device *pdev,
 			      struct net_device *ndev)
 {
 	struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
-	struct smc_local *lp = netdev_priv(ndev);
 
 	if (!res)
 		return 0;
@@ -2075,7 +2074,6 @@ static void smc_release_attrib(struct platform_device *pdev,
 			       struct net_device *ndev)
 {
 	struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
-	struct smc_local *lp = netdev_priv(ndev);
 
 	if (res)
 		release_mem_region(res->start, ATTRIB_SIZE);
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index 4e625e0..708bab5 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -49,7 +49,8 @@ struct gianfar_platform_data {
 	u32	device_flags;
 	/* board specific information */
 	u32	board_flags;
-	char	bus_id[MII_BUS_ID_SIZE];
+	int	mdio_bus;			/* Bus controlled by us */
+	char	bus_id[MII_BUS_ID_SIZE];	/* Bus PHY is on */
 	u32	phy_id;
 	u8	mac_addr[6];
 	phy_interface_t interface;

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-11-14 23:48 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-06  6:50 [git patches] net driver fixes for 2.6.28-rc Jeff Garzik
2008-11-06 23:50 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2008-11-14 23:25 Jeff Garzik
2008-11-14 23:48 ` David Miller
2008-11-11  8:58 Jeff Garzik
2008-11-12  0:42 ` David Miller
2008-11-04  7:51 Jonathan McDowell
2008-11-04  8:27 ` Marcel Holtmann
2008-11-06  5:42 ` Jeff Garzik
2008-11-03 20:51 Jeff Garzik
2008-11-03 21:28 ` David Miller
2008-11-03 22:07 ` Marcel Holtmann
2008-11-03 22:54   ` David Miller
2008-11-03 22:59   ` Jeff Garzik
2008-10-31  5:09 Jeff Garzik
2008-10-31  6:52 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).