netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/4] bnx2: Always enable MSI-X on 5709.
@ 2010-07-04  6:42 Michael Chan
  2010-07-04  6:42 ` [PATCH net-next 2/4] bnx2: Add support for skb->rxhash Michael Chan
  2010-07-04 18:44 ` [PATCH net-next 1/4] bnx2: Always enable MSI-X on 5709 David Miller
  0 siblings, 2 replies; 8+ messages in thread
From: Michael Chan @ 2010-07-04  6:42 UTC (permalink / raw)
  To: davem; +Cc: netdev

Minor change to use MSI-X even if there is only one CPU.  This allows
the CNIC driver to always have a dedicated MSI-X vector to handle
iSCSI events, instead of sharing the MSI vector.

Signed-off-by: Michael Chan <mchan@broadcom.com>
---
 drivers/net/bnx2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index a5dd81f..0614ca0 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6185,7 +6185,7 @@ bnx2_setup_int_mode(struct bnx2 *bp, int dis_msi)
 	bp->irq_nvecs = 1;
 	bp->irq_tbl[0].vector = bp->pdev->irq;
 
-	if ((bp->flags & BNX2_FLAG_MSIX_CAP) && !dis_msi && cpus > 1)
+	if ((bp->flags & BNX2_FLAG_MSIX_CAP) && !dis_msi)
 		bnx2_enable_msix(bp, msix_vecs);
 
 	if ((bp->flags & BNX2_FLAG_MSI_CAP) && !dis_msi &&
-- 
1.6.4.GIT



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

* [PATCH net-next 2/4] bnx2: Add support for skb->rxhash.
  2010-07-04  6:42 [PATCH net-next 1/4] bnx2: Always enable MSI-X on 5709 Michael Chan
@ 2010-07-04  6:42 ` Michael Chan
  2010-07-04  6:42   ` [PATCH net-next 3/4] bnx2: Dump some config space registers during TX timeout Michael Chan
  2010-07-04 18:44   ` [PATCH net-next 2/4] bnx2: Add support for skb->rxhash David Miller
  2010-07-04 18:44 ` [PATCH net-next 1/4] bnx2: Always enable MSI-X on 5709 David Miller
  1 sibling, 2 replies; 8+ messages in thread
From: Michael Chan @ 2010-07-04  6:42 UTC (permalink / raw)
  To: davem; +Cc: netdev

Add skb->rxhash support for TCP packets only because the bnx2 RSS hash
does not hash UDP ports.

Signed-off-by: Michael Chan <mchan@broadcom.com>
---
 drivers/net/bnx2.c |   15 ++++++++++++++-
 drivers/net/bnx2.h |    3 +++
 2 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 0614ca0..1450c75 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -3219,6 +3219,10 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
 					      L2_FHDR_ERRORS_UDP_XSUM)) == 0))
 				skb->ip_summed = CHECKSUM_UNNECESSARY;
 		}
+		if ((bp->dev->features & NETIF_F_RXHASH) &&
+		    ((status & L2_FHDR_STATUS_USE_RXHASH) ==
+		     L2_FHDR_STATUS_USE_RXHASH))
+			skb->rxhash = rx_hdr->l2_fhdr_hash;
 
 		skb_record_rx_queue(skb, bnapi - &bp->bnx2_napi[0]);
 
@@ -7558,6 +7562,12 @@ bnx2_set_tx_csum(struct net_device *dev, u32 data)
 		return (ethtool_op_set_tx_csum(dev, data));
 }
 
+static int
+bnx2_set_flags(struct net_device *dev, u32 data)
+{
+	return ethtool_op_set_flags(dev, data, ETH_FLAG_RXHASH);
+}
+
 static const struct ethtool_ops bnx2_ethtool_ops = {
 	.get_settings		= bnx2_get_settings,
 	.set_settings		= bnx2_set_settings,
@@ -7587,6 +7597,8 @@ static const struct ethtool_ops bnx2_ethtool_ops = {
 	.phys_id		= bnx2_phys_id,
 	.get_ethtool_stats	= bnx2_get_ethtool_stats,
 	.get_sset_count		= bnx2_get_sset_count,
+	.set_flags		= bnx2_set_flags,
+	.get_flags		= ethtool_op_get_flags,
 };
 
 /* Called with rtnl_lock */
@@ -8333,7 +8345,8 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	memcpy(dev->dev_addr, bp->mac_addr, 6);
 	memcpy(dev->perm_addr, bp->mac_addr, 6);
 
-	dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_GRO;
+	dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_GRO |
+			 NETIF_F_RXHASH;
 	vlan_features_add(dev, NETIF_F_IP_CSUM | NETIF_F_SG);
 	if (CHIP_NUM(bp) == CHIP_NUM_5709) {
 		dev->features |= NETIF_F_IPV6_CSUM;
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index ddaa3fc..b9af6bc 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -295,6 +295,9 @@ struct l2_fhdr {
 		#define L2_FHDR_ERRORS_TCP_XSUM		(1<<28)
 		#define L2_FHDR_ERRORS_UDP_XSUM		(1<<31)
 
+		#define L2_FHDR_STATUS_USE_RXHASH	\
+			(L2_FHDR_STATUS_TCP_SEGMENT | L2_FHDR_STATUS_RSS_HASH)
+
 	u32 l2_fhdr_hash;
 #if defined(__BIG_ENDIAN)
 	u16 l2_fhdr_pkt_len;
-- 
1.6.4.GIT



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

* [PATCH net-next 3/4] bnx2: Dump some config space registers during TX timeout.
  2010-07-04  6:42 ` [PATCH net-next 2/4] bnx2: Add support for skb->rxhash Michael Chan
@ 2010-07-04  6:42   ` Michael Chan
  2010-07-04  6:42     ` [PATCH net-next 4/4] bnx2: Update version to 2.0.16 Michael Chan
  2010-07-04 18:44     ` [PATCH net-next 3/4] bnx2: Dump some config space registers during TX timeout David Miller
  2010-07-04 18:44   ` [PATCH net-next 2/4] bnx2: Add support for skb->rxhash David Miller
  1 sibling, 2 replies; 8+ messages in thread
From: Michael Chan @ 2010-07-04  6:42 UTC (permalink / raw)
  To: davem; +Cc: netdev

These config register values will be useful when the memory registers
are returning 0xffffffff which has been reported.

Signed-off-by: Michael Chan <mchan@broadcom.com>
---
 drivers/net/bnx2.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index ae0a9af..22fa1e9 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6313,9 +6313,14 @@ static void
 bnx2_dump_state(struct bnx2 *bp)
 {
 	struct net_device *dev = bp->dev;
-	u32 mcp_p0, mcp_p1;
-
-	netdev_err(dev, "DEBUG: intr_sem[%x]\n", atomic_read(&bp->intr_sem));
+	u32 mcp_p0, mcp_p1, val1, val2;
+
+	pci_read_config_dword(bp->pdev, PCI_COMMAND, &val1);
+	netdev_err(dev, "DEBUG: intr_sem[%x] PCI_CMD[%08x]\n",
+		   atomic_read(&bp->intr_sem), val1);
+	pci_read_config_dword(bp->pdev, bp->pm_cap + PCI_PM_CTRL, &val1);
+	pci_read_config_dword(bp->pdev, BNX2_PCICFG_MISC_CONFIG, &val2);
+	netdev_err(dev, "DEBUG: PCI_PM[%08x] PCI_MISC_CFG[%08x]\n", val1, val2);
 	netdev_err(dev, "DEBUG: EMAC_TX_STATUS[%08x] EMAC_RX_STATUS[%08x]\n",
 		   REG_RD(bp, BNX2_EMAC_TX_STATUS),
 		   REG_RD(bp, BNX2_EMAC_RX_STATUS));
-- 
1.6.4.GIT



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

* [PATCH net-next 4/4] bnx2: Update version to 2.0.16.
  2010-07-04  6:42   ` [PATCH net-next 3/4] bnx2: Dump some config space registers during TX timeout Michael Chan
@ 2010-07-04  6:42     ` Michael Chan
  2010-07-04 18:44       ` David Miller
  2010-07-04 18:44     ` [PATCH net-next 3/4] bnx2: Dump some config space registers during TX timeout David Miller
  1 sibling, 1 reply; 8+ messages in thread
From: Michael Chan @ 2010-07-04  6:42 UTC (permalink / raw)
  To: davem; +Cc: netdev

Signed-off-by: Michael Chan <mchan@broadcom.com>
---
 drivers/net/bnx2.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 1450c75..ae0a9af 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -58,8 +58,8 @@
 #include "bnx2_fw.h"
 
 #define DRV_MODULE_NAME		"bnx2"
-#define DRV_MODULE_VERSION	"2.0.15"
-#define DRV_MODULE_RELDATE	"May 4, 2010"
+#define DRV_MODULE_VERSION	"2.0.16"
+#define DRV_MODULE_RELDATE	"July 2, 2010"
 #define FW_MIPS_FILE_06		"bnx2/bnx2-mips-06-5.0.0.j6.fw"
 #define FW_RV2P_FILE_06		"bnx2/bnx2-rv2p-06-5.0.0.j3.fw"
 #define FW_MIPS_FILE_09		"bnx2/bnx2-mips-09-5.0.0.j15.fw"
-- 
1.6.4.GIT



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

* Re: [PATCH net-next 1/4] bnx2: Always enable MSI-X on 5709.
  2010-07-04  6:42 [PATCH net-next 1/4] bnx2: Always enable MSI-X on 5709 Michael Chan
  2010-07-04  6:42 ` [PATCH net-next 2/4] bnx2: Add support for skb->rxhash Michael Chan
@ 2010-07-04 18:44 ` David Miller
  1 sibling, 0 replies; 8+ messages in thread
From: David Miller @ 2010-07-04 18:44 UTC (permalink / raw)
  To: mchan; +Cc: netdev

From: "Michael Chan" <mchan@broadcom.com>
Date: Sat, 3 Jul 2010 23:42:15 -0700

> Minor change to use MSI-X even if there is only one CPU.  This allows
> the CNIC driver to always have a dedicated MSI-X vector to handle
> iSCSI events, instead of sharing the MSI vector.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

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

* Re: [PATCH net-next 2/4] bnx2: Add support for skb->rxhash.
  2010-07-04  6:42 ` [PATCH net-next 2/4] bnx2: Add support for skb->rxhash Michael Chan
  2010-07-04  6:42   ` [PATCH net-next 3/4] bnx2: Dump some config space registers during TX timeout Michael Chan
@ 2010-07-04 18:44   ` David Miller
  1 sibling, 0 replies; 8+ messages in thread
From: David Miller @ 2010-07-04 18:44 UTC (permalink / raw)
  To: mchan; +Cc: netdev

From: "Michael Chan" <mchan@broadcom.com>
Date: Sat, 3 Jul 2010 23:42:16 -0700

> Add skb->rxhash support for TCP packets only because the bnx2 RSS hash
> does not hash UDP ports.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

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

* Re: [PATCH net-next 3/4] bnx2: Dump some config space registers during TX timeout.
  2010-07-04  6:42   ` [PATCH net-next 3/4] bnx2: Dump some config space registers during TX timeout Michael Chan
  2010-07-04  6:42     ` [PATCH net-next 4/4] bnx2: Update version to 2.0.16 Michael Chan
@ 2010-07-04 18:44     ` David Miller
  1 sibling, 0 replies; 8+ messages in thread
From: David Miller @ 2010-07-04 18:44 UTC (permalink / raw)
  To: mchan; +Cc: netdev

From: "Michael Chan" <mchan@broadcom.com>
Date: Sat, 3 Jul 2010 23:42:17 -0700

> These config register values will be useful when the memory registers
> are returning 0xffffffff which has been reported.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

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

* Re: [PATCH net-next 4/4] bnx2: Update version to 2.0.16.
  2010-07-04  6:42     ` [PATCH net-next 4/4] bnx2: Update version to 2.0.16 Michael Chan
@ 2010-07-04 18:44       ` David Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2010-07-04 18:44 UTC (permalink / raw)
  To: mchan; +Cc: netdev

From: "Michael Chan" <mchan@broadcom.com>
Date: Sat, 3 Jul 2010 23:42:18 -0700

> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

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

end of thread, other threads:[~2010-07-04 18:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-04  6:42 [PATCH net-next 1/4] bnx2: Always enable MSI-X on 5709 Michael Chan
2010-07-04  6:42 ` [PATCH net-next 2/4] bnx2: Add support for skb->rxhash Michael Chan
2010-07-04  6:42   ` [PATCH net-next 3/4] bnx2: Dump some config space registers during TX timeout Michael Chan
2010-07-04  6:42     ` [PATCH net-next 4/4] bnx2: Update version to 2.0.16 Michael Chan
2010-07-04 18:44       ` David Miller
2010-07-04 18:44     ` [PATCH net-next 3/4] bnx2: Dump some config space registers during TX timeout David Miller
2010-07-04 18:44   ` [PATCH net-next 2/4] bnx2: Add support for skb->rxhash David Miller
2010-07-04 18:44 ` [PATCH net-next 1/4] bnx2: Always enable MSI-X on 5709 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).