aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x/bnx2x_dcb.c
diff options
context:
space:
mode:
authorDmitry Kravkov <dmitry@broadcom.com>2011-03-31 17:04:22 -0700
committerDavid S. Miller <davem@davemloft.net>2011-03-31 17:04:22 -0700
commitfab0dc89f0d98459c6ce7fa27422949ac15837fa (patch)
treecd7d169e81ff9028d746f2540302d677b17f30cf /drivers/net/bnx2x/bnx2x_dcb.c
parent3b7f817e47bb66ae4d82ed73689a521af70a5410 (diff)
downloadkernel_samsung_smdk4412-fab0dc89f0d98459c6ce7fa27422949ac15837fa.zip
kernel_samsung_smdk4412-fab0dc89f0d98459c6ce7fa27422949ac15837fa.tar.gz
kernel_samsung_smdk4412-fab0dc89f0d98459c6ce7fa27422949ac15837fa.tar.bz2
bnx2x, cnic: Disable iSCSI if DCBX negotiation is successful
With current bnx2x firmware 6.2.9, iSCSI is not supported in DCB network, so we need to disable it. Add cnic command to disconnect iSCSI connections and prevent future connections when DCBX negotiation succeeds. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_dcb.c')
-rw-r--r--drivers/net/bnx2x/bnx2x_dcb.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/net/bnx2x/bnx2x_dcb.c b/drivers/net/bnx2x/bnx2x_dcb.c
index 9a24d79..1214907 100644
--- a/drivers/net/bnx2x/bnx2x_dcb.c
+++ b/drivers/net/bnx2x/bnx2x_dcb.c
@@ -571,6 +571,28 @@ void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state)
{
switch (state) {
case BNX2X_DCBX_STATE_NEG_RECEIVED:
+#ifdef BCM_CNIC
+ if (bp->state != BNX2X_STATE_OPENING_WAIT4_LOAD) {
+ struct cnic_ops *c_ops;
+ struct cnic_eth_dev *cp = &bp->cnic_eth_dev;
+ bp->flags |= NO_ISCSI_OOO_FLAG | NO_ISCSI_FLAG;
+ cp->drv_state |= CNIC_DRV_STATE_NO_ISCSI_OOO;
+ cp->drv_state |= CNIC_DRV_STATE_NO_ISCSI;
+
+ rcu_read_lock();
+ c_ops = rcu_dereference(bp->cnic_ops);
+ if (c_ops) {
+ bnx2x_cnic_notify(bp, CNIC_CTL_STOP_ISCSI_CMD);
+ rcu_read_unlock();
+ return;
+ }
+ rcu_read_unlock();
+ }
+
+ /* fall through if no CNIC initialized */
+ case BNX2X_DCBX_STATE_ISCSI_STOPPED:
+#endif
+
{
DP(NETIF_MSG_LINK, "BNX2X_DCBX_STATE_NEG_RECEIVED\n");
#ifdef BCM_DCBNL