netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shahed Shaikh <shahed.shaikh@qlogic.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Dept_NX_Linux_NIC_Driver@qlogic.com,
	Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Subject: [PATCH net-next v2 4/7] qlcnic: Stop traffic before performing loopback test
Date: Wed, 17 Apr 2013 13:05:56 -0400	[thread overview]
Message-ID: <1366218359-17701-5-git-send-email-shahed.shaikh@qlogic.com> (raw)
In-Reply-To: <1366218359-17701-1-git-send-email-shahed.shaikh@qlogic.com>

From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>

Before conducting loopback test by sending packets, driver should stop transmit
queue and turn off carrier.

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
---
 .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c    |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
index e07aea8..7d0ebae 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
@@ -1566,6 +1566,12 @@ int qlcnic_83xx_loopback_test(struct net_device *netdev, u8 mode)
 		}
 	} while ((adapter->ahw->linkup && ahw->has_link_events) != 1);
 
+	/* Make sure carrier is off and queue is stopped during loopback */
+	if (netif_running(netdev)) {
+		netif_carrier_off(netdev);
+		netif_stop_queue(netdev);
+	}
+
 	ret = qlcnic_do_lb_test(adapter, mode);
 
 	qlcnic_83xx_clear_lb_mode(adapter, mode);
-- 
1.5.6

  parent reply	other threads:[~2013-04-17 17:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17 17:05 [PATCH net-next v2 0/7] Bug fixes and enhancements Shahed Shaikh
2013-04-17 17:05 ` [PATCH net-next v2 1/7] qlcnic: Fix typo in logs Shahed Shaikh
2013-04-17 17:05 ` [PATCH net-next v2 2/7] qlcnic: Enable Interrupt Coalescing for 83xx adapter Shahed Shaikh
2013-04-17 17:05 ` [PATCH net-next v2 3/7] qlcnic: Enhanced channel configuration logs Shahed Shaikh
2013-04-17 17:48   ` Sergei Shtylyov
2013-04-17 17:05 ` Shahed Shaikh [this message]
2013-04-17 17:05 ` [PATCH net-next v2 5/7] qlcnic: fix TSO race condition Shahed Shaikh
2013-04-17 18:36   ` Eric Dumazet
2013-04-17 17:05 ` [PATCH net-next v2 6/7] qlcnic: Fix endian data type Shahed Shaikh
2013-04-17 17:05 ` [PATCH net-next v2 7/7] qlcnic: Update version to 5.2.41 Shahed Shaikh
2013-04-17 17:32 ` [PATCH net-next v2 0/7] Bug fixes and enhancements David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1366218359-17701-5-git-send-email-shahed.shaikh@qlogic.com \
    --to=shahed.shaikh@qlogic.com \
    --cc=Dept_NX_Linux_NIC_Driver@qlogic.com \
    --cc=davem@davemloft.net \
    --cc=jitendra.kalsaria@qlogic.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).