From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, ron.mercer@qlogic.com,
Dept_NX_Linux_NIC_Driver@qlogic.com,
Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Subject: [PATCH net-next 2/9] qlge: Cleanup atomic queue threshold check.
Date: Tue, 10 Jul 2012 20:57:32 -0400 [thread overview]
Message-ID: <1341968259-18931-3-git-send-email-jitendra.kalsaria@qlogic.com> (raw)
In-Reply-To: <1341968259-18931-1-git-send-email-jitendra.kalsaria@qlogic.com>
From: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
---
drivers/net/ethernet/qlogic/qlge/qlge.h | 1 -
drivers/net/ethernet/qlogic/qlge/qlge_main.c | 5 +----
2 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge.h b/drivers/net/ethernet/qlogic/qlge/qlge.h
index 5a639df..6e7050c 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge.h
+++ b/drivers/net/ethernet/qlogic/qlge/qlge.h
@@ -1397,7 +1397,6 @@ struct tx_ring {
struct tx_ring_desc *q; /* descriptor list for the queue */
spinlock_t lock;
atomic_t tx_count; /* counts down for every outstanding IO */
- atomic_t queue_stopped; /* Turns queue off when full. */
struct delayed_work tx_work;
struct ql_adapter *qdev;
u64 tx_packets;
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index ce2d37f..ee3457e 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -2173,8 +2173,7 @@ static int ql_clean_outbound_rx_ring(struct rx_ring *rx_ring)
ql_write_cq_idx(rx_ring);
tx_ring = &qdev->tx_ring[net_rsp->txq_idx];
if (__netif_subqueue_stopped(qdev->ndev, tx_ring->wq_id)) {
- if (atomic_read(&tx_ring->queue_stopped) &&
- (atomic_read(&tx_ring->tx_count) > (tx_ring->wq_len / 4)))
+ if ((atomic_read(&tx_ring->tx_count) > (tx_ring->wq_len / 4)))
/*
* The queue got stopped because the tx_ring was full.
* Wake it up, because it's now at least 25% empty.
@@ -2561,7 +2560,6 @@ static netdev_tx_t qlge_send(struct sk_buff *skb, struct net_device *ndev)
"%s: BUG! shutting down tx queue %d due to lack of resources.\n",
__func__, tx_ring_idx);
netif_stop_subqueue(ndev, tx_ring->wq_id);
- atomic_inc(&tx_ring->queue_stopped);
tx_ring->tx_errors++;
return NETDEV_TX_BUSY;
}
@@ -2690,7 +2688,6 @@ static void ql_init_tx_ring(struct ql_adapter *qdev, struct tx_ring *tx_ring)
tx_ring_desc++;
}
atomic_set(&tx_ring->tx_count, tx_ring->wq_len);
- atomic_set(&tx_ring->queue_stopped, 0);
}
static void ql_free_tx_resources(struct ql_adapter *qdev,
--
1.7.1
next prev parent reply other threads:[~2012-07-11 1:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-11 0:57 [PATCH net-next 0/9] qlge: bug fix Jitendra Kalsaria
2012-07-11 0:57 ` [PATCH net-next 1/9] qlge: Fix TX queue stoppage due to full condition Jitendra Kalsaria
2012-07-11 0:57 ` Jitendra Kalsaria [this message]
2012-07-11 0:57 ` [PATCH net-next 3/9] qlge: Fix ethtool WOL calls to operate only on devices that support WOL Jitendra Kalsaria
2012-07-11 0:57 ` [PATCH net-next 4/9] qlge: Clean up ethtool set WOL routine Jitendra Kalsaria
2012-07-11 0:57 ` [PATCH net-next 5/9] qlge: Added missing case statement to ethtool get_strings Jitendra Kalsaria
2012-07-11 0:57 ` [PATCH net-next 6/9] qlge: Fixed double pci free upon tx_ring->q allocation failure Jitendra Kalsaria
2012-07-11 0:57 ` [PATCH net-next 7/9] qlge: Moving low level frame error to ethtool statistics Jitendra Kalsaria
2012-07-11 0:57 ` [PATCH net-next 8/9] qlge: Refactoring of ethtool stats Jitendra Kalsaria
2012-07-11 0:57 ` [PATCH net-next 9/9] qlge: Bumped driver version to 1.00.00.31 Jitendra Kalsaria
2012-07-11 6:28 ` [PATCH net-next 0/9] qlge: bug fix 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=1341968259-18931-3-git-send-email-jitendra.kalsaria@qlogic.com \
--to=jitendra.kalsaria@qlogic.com \
--cc=Dept_NX_Linux_NIC_Driver@qlogic.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=ron.mercer@qlogic.com \
/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).