From: Amit Kumar Salecha <amit.salecha@qlogic.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, dhananjay.phadke@qlogic.com
Subject: [PATCH NEXT 2/4] netxen: fix endianness intr coalesce
Date: Thu, 14 Jan 2010 03:53:22 -0800 [thread overview]
Message-ID: <1263470004-30008-3-git-send-email-amit.salecha@qlogic.com> (raw)
In-Reply-To: <1263470004-30008-1-git-send-email-amit.salecha@qlogic.com>
Before sending Interrupt coalesce parameters to device,
convert them in little endian.
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
drivers/net/netxen/netxen_nic_hw.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index 0db36f1..9548e59 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -777,17 +777,20 @@ int netxen_p3_nic_set_mac_addr(struct netxen_adapter *adapter, u8 *addr)
int netxen_config_intr_coalesce(struct netxen_adapter *adapter)
{
nx_nic_req_t req;
- u64 word;
- int rv;
+ u64 word[6];
+ int rv, i;
memset(&req, 0, sizeof(nx_nic_req_t));
+ memset(word, 0, sizeof(word));
req.qhdr = cpu_to_le64(NX_HOST_REQUEST << 23);
- word = NETXEN_CONFIG_INTR_COALESCE | ((u64)adapter->portnum << 16);
- req.req_hdr = cpu_to_le64(word);
+ word[0] = NETXEN_CONFIG_INTR_COALESCE | ((u64)adapter->portnum << 16);
+ req.req_hdr = cpu_to_le64(word[0]);
- memcpy(&req.words[0], &adapter->coal, sizeof(adapter->coal));
+ memcpy(&word[0], &adapter->coal, sizeof(adapter->coal));
+ for (i = 0; i < 6; i++)
+ req.words[i] = cpu_to_le64(word[i]);
rv = netxen_send_cmd_descs(adapter, (struct cmd_desc_type0 *)&req, 1);
if (rv != 0) {
--
1.6.0.2
next prev parent reply other threads:[~2010-01-14 11:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-14 11:53 [PATCH NEXT 0/4]netxen: endianness fixes Amit Kumar Salecha
2010-01-14 11:53 ` [PATCH NEXT 1/4] netxen: fix endianness read mac address Amit Kumar Salecha
2010-01-14 11:53 ` Amit Kumar Salecha [this message]
2010-01-14 11:53 ` [PATCH NEXT 3/4] netxen: fix license header Amit Kumar Salecha
2010-01-14 11:53 ` [PATCH NEXT 4/4] netxen: fix sparse warning Amit Kumar Salecha
2010-01-15 9:37 ` [PATCH NEXT 0/4]netxen: endianness fixes 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=1263470004-30008-3-git-send-email-amit.salecha@qlogic.com \
--to=amit.salecha@qlogic.com \
--cc=davem@davemloft.net \
--cc=dhananjay.phadke@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).