netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] cnic: Do not allow iSCSI and FCoE on bnx2x multi-function mode
@ 2011-01-04  1:21 Michael Chan
  2011-01-04  1:21 ` [PATCH net-next 2/2] cnic: Do not call bnx2i when bnx2i is calling cnic_unregister_driver() Michael Chan
  2011-01-04  3:08 ` [PATCH net-next 1/2] cnic: Do not allow iSCSI and FCoE on bnx2x multi-function mode David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Chan @ 2011-01-04  1:21 UTC (permalink / raw)
  To: davem; +Cc: netdev

Because the hardware does not yet support these in this mode.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
---
 drivers/net/cnic.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index 4a9c628..41957fa 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -4826,12 +4826,8 @@ static void cnic_get_bnx2x_iscsi_info(struct cnic_dev *dev)
 		val = CNIC_RD(dev, addr);
 		val &= FUNC_MF_CFG_E1HOV_TAG_MASK;
 		if (val != FUNC_MF_CFG_E1HOV_TAG_DEFAULT) {
-			addr = BNX2X_MF_CFG_ADDR(mf_cfg_addr,
-				func_mf_config[func].config);
-			val = CNIC_RD(dev, addr);
-			val &= FUNC_MF_CFG_PROTOCOL_MASK;
-			if (val != FUNC_MF_CFG_PROTOCOL_ISCSI)
-				dev->max_iscsi_conn = 0;
+			dev->max_fcoe_conn = 0;
+			dev->max_iscsi_conn = 0;
 		}
 	}
 	if (!is_valid_ether_addr(dev->mac_addr))
-- 
1.6.4.GIT



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

* [PATCH net-next 2/2] cnic: Do not call bnx2i when bnx2i is calling cnic_unregister_driver()
  2011-01-04  1:21 [PATCH net-next 1/2] cnic: Do not allow iSCSI and FCoE on bnx2x multi-function mode Michael Chan
@ 2011-01-04  1:21 ` Michael Chan
  2011-01-04  3:08   ` David Miller
  2011-01-04  3:08 ` [PATCH net-next 1/2] cnic: Do not allow iSCSI and FCoE on bnx2x multi-function mode David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Michael Chan @ 2011-01-04  1:21 UTC (permalink / raw)
  To: davem; +Cc: netdev

We should call bnx2i to send the iSCSI netlink message earlier in
cnic_unregister_device().  By the time cnic_unregister_driver() is
called, bnx2i may have freed data structures used by the upcalls.

Update version to 2.2.12.

Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
---
 drivers/net/cnic.c    |   19 +++----------------
 drivers/net/cnic_if.h |    6 +++---
 2 files changed, 6 insertions(+), 19 deletions(-)

diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index 41957fa..6dfa564 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -426,19 +426,6 @@ static int cnic_abort_prep(struct cnic_sock *csk)
 	return 0;
 }
 
-static void cnic_uio_stop(void)
-{
-	struct cnic_dev *dev;
-
-	read_lock(&cnic_dev_lock);
-	list_for_each_entry(dev, &cnic_dev_list, list) {
-		struct cnic_local *cp = dev->cnic_priv;
-
-		cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL);
-	}
-	read_unlock(&cnic_dev_lock);
-}
-
 int cnic_register_driver(int ulp_type, struct cnic_ulp_ops *ulp_ops)
 {
 	struct cnic_dev *dev;
@@ -510,9 +497,6 @@ int cnic_unregister_driver(int ulp_type)
 	}
 	read_unlock(&cnic_dev_lock);
 
-	if (ulp_type == CNIC_ULP_ISCSI)
-		cnic_uio_stop();
-
 	rcu_assign_pointer(cnic_ulp_tbl[ulp_type], NULL);
 
 	mutex_unlock(&cnic_lock);
@@ -596,6 +580,9 @@ static int cnic_unregister_device(struct cnic_dev *dev, int ulp_type)
 	}
 	mutex_unlock(&cnic_lock);
 
+	if (ulp_type == CNIC_ULP_ISCSI)
+		cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL);
+
 	synchronize_rcu();
 
 	while (test_bit(ULP_F_CALL_PENDING, &cp->ulp_flags[ulp_type]) &&
diff --git a/drivers/net/cnic_if.h b/drivers/net/cnic_if.h
index ccd8140..9f44e0f 100644
--- a/drivers/net/cnic_if.h
+++ b/drivers/net/cnic_if.h
@@ -1,6 +1,6 @@
 /* cnic_if.h: Broadcom CNIC core network driver.
  *
- * Copyright (c) 2006-2010 Broadcom Corporation
+ * Copyright (c) 2006-2011 Broadcom Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -12,8 +12,8 @@
 #ifndef CNIC_IF_H
 #define CNIC_IF_H
 
-#define CNIC_MODULE_VERSION	"2.2.11"
-#define CNIC_MODULE_RELDATE	"Dec 22, 2010"
+#define CNIC_MODULE_VERSION	"2.2.12"
+#define CNIC_MODULE_RELDATE	"Jan 03, 2011"
 
 #define CNIC_ULP_RDMA		0
 #define CNIC_ULP_ISCSI		1
-- 
1.6.4.GIT



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

* Re: [PATCH net-next 1/2] cnic: Do not allow iSCSI and FCoE on bnx2x multi-function mode
  2011-01-04  1:21 [PATCH net-next 1/2] cnic: Do not allow iSCSI and FCoE on bnx2x multi-function mode Michael Chan
  2011-01-04  1:21 ` [PATCH net-next 2/2] cnic: Do not call bnx2i when bnx2i is calling cnic_unregister_driver() Michael Chan
@ 2011-01-04  3:08 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2011-01-04  3:08 UTC (permalink / raw)
  To: mchan; +Cc: netdev

From: "Michael Chan" <mchan@broadcom.com>
Date: Mon, 3 Jan 2011 17:21:45 -0800

> Because the hardware does not yet support these in this mode.
> 
> Reviewed-by: Benjamin Li <benli@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

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

* Re: [PATCH net-next 2/2] cnic: Do not call bnx2i when bnx2i is calling cnic_unregister_driver()
  2011-01-04  1:21 ` [PATCH net-next 2/2] cnic: Do not call bnx2i when bnx2i is calling cnic_unregister_driver() Michael Chan
@ 2011-01-04  3:08   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2011-01-04  3:08 UTC (permalink / raw)
  To: mchan; +Cc: netdev

From: "Michael Chan" <mchan@broadcom.com>
Date: Mon, 3 Jan 2011 17:21:46 -0800

> We should call bnx2i to send the iSCSI netlink message earlier in
> cnic_unregister_device().  By the time cnic_unregister_driver() is
> called, bnx2i may have freed data structures used by the upcalls.
> 
> Update version to 2.2.12.
> 
> Reviewed-by: Benjamin Li <benli@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

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

end of thread, other threads:[~2011-01-04  3:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-04  1:21 [PATCH net-next 1/2] cnic: Do not allow iSCSI and FCoE on bnx2x multi-function mode Michael Chan
2011-01-04  1:21 ` [PATCH net-next 2/2] cnic: Do not call bnx2i when bnx2i is calling cnic_unregister_driver() Michael Chan
2011-01-04  3:08   ` David Miller
2011-01-04  3:08 ` [PATCH net-next 1/2] cnic: Do not allow iSCSI and FCoE on bnx2x multi-function mode 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).