diff options
author | Amit Kumar Salecha <amit.salecha@qlogic.com> | 2010-01-13 20:53:22 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-15 04:37:24 -0500 |
commit | c070395009e1e153395837cd256dffc931dd6f98 (patch) | |
tree | 7eca4f766bfce736c78dd5d6129855e345111b98 /drivers/net/netxen | |
parent | a03d2451998e09e87eb573a9e04cc41fde2bb77f (diff) |
netxen: fix endianness intr coalesce
Before sending Interrupt coalesce parameters to device,
convert them in little endian.
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r-- | 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 0db36f190ba2..9548e5967399 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) | |||
777 | int netxen_config_intr_coalesce(struct netxen_adapter *adapter) | 777 | int netxen_config_intr_coalesce(struct netxen_adapter *adapter) |
778 | { | 778 | { |
779 | nx_nic_req_t req; | 779 | nx_nic_req_t req; |
780 | u64 word; | 780 | u64 word[6]; |
781 | int rv; | 781 | int rv, i; |
782 | 782 | ||
783 | memset(&req, 0, sizeof(nx_nic_req_t)); | 783 | memset(&req, 0, sizeof(nx_nic_req_t)); |
784 | memset(word, 0, sizeof(word)); | ||
784 | 785 | ||
785 | req.qhdr = cpu_to_le64(NX_HOST_REQUEST << 23); | 786 | req.qhdr = cpu_to_le64(NX_HOST_REQUEST << 23); |
786 | 787 | ||
787 | word = NETXEN_CONFIG_INTR_COALESCE | ((u64)adapter->portnum << 16); | 788 | word[0] = NETXEN_CONFIG_INTR_COALESCE | ((u64)adapter->portnum << 16); |
788 | req.req_hdr = cpu_to_le64(word); | 789 | req.req_hdr = cpu_to_le64(word[0]); |
789 | 790 | ||
790 | memcpy(&req.words[0], &adapter->coal, sizeof(adapter->coal)); | 791 | memcpy(&word[0], &adapter->coal, sizeof(adapter->coal)); |
792 | for (i = 0; i < 6; i++) | ||
793 | req.words[i] = cpu_to_le64(word[i]); | ||
791 | 794 | ||
792 | rv = netxen_send_cmd_descs(adapter, (struct cmd_desc_type0 *)&req, 1); | 795 | rv = netxen_send_cmd_descs(adapter, (struct cmd_desc_type0 *)&req, 1); |
793 | if (rv != 0) { | 796 | if (rv != 0) { |