From: Dhananjay Phadke <dhananjay@netxen.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net
Subject: [PATCHv2 6/7] netxen: hold tx lock while sending firmware commands
Date: Tue, 13 Jan 2009 11:52:43 -0800 [thread overview]
Message-ID: <1231876364-866-7-git-send-email-dhananjay@netxen.com> (raw)
In-Reply-To: <1231876364-866-1-git-send-email-dhananjay@netxen.com>
Some firmware commands like mac address addition/deletion are sent
on the transmit ring. So need to hold the tx lock before touching
tx producer/consumer indices.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
---
drivers/net/netxen/netxen_nic_hw.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index e2d2a2f..821cff6 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -503,6 +503,8 @@ netxen_send_cmd_descs(struct netxen_adapter *adapter,
i = 0;
+ netif_tx_lock_bh(adapter->netdev);
+
producer = adapter->cmd_producer;
do {
cmd_desc = &cmd_desc_arr[i];
@@ -527,6 +529,8 @@ netxen_send_cmd_descs(struct netxen_adapter *adapter,
netxen_nic_update_cmd_producer(adapter, adapter->cmd_producer);
+ netif_tx_unlock_bh(adapter->netdev);
+
return 0;
}
--
1.6.0.2
next prev parent reply other threads:[~2009-01-13 19:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-13 19:52 [PATCHv2 0/7] netxen bugfixes Dhananjay Phadke
2009-01-13 19:52 ` [PATCHv2 1/7] netxen: fix endianness in firmware commands Dhananjay Phadke
2009-01-13 19:52 ` [PATCHv2 2/7] netxen: fix ipv6 offload and tx cleanup Dhananjay Phadke
2009-01-13 19:52 ` [PATCHv2 3/7] netxen: fix link speed reporting for some boards Dhananjay Phadke
2009-01-13 19:52 ` [PATCHv2 4/7] netxen: firmware init fix Dhananjay Phadke
2009-01-13 19:52 ` [PATCHv2 5/7] netxen: cleanup mac list on driver unload Dhananjay Phadke
2009-01-13 19:52 ` Dhananjay Phadke [this message]
2009-01-13 19:52 ` [PATCHv2 7/7] netxen: handle dma mapping failures Dhananjay Phadke
2009-01-15 4:50 ` [PATCHv2 0/7] netxen bugfixes 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=1231876364-866-7-git-send-email-dhananjay@netxen.com \
--to=dhananjay@netxen.com \
--cc=davem@davemloft.net \
--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).