Commit 82581174 authored by Amit S. Kale's avatar Amit S. Kale Committed by Jeff Garzik

NetXen: Fix to get the driver working after sparse changes

Signed-off-by: default avatarAmit S. Kale <amitkale@netxen.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 11cc3bb5
...@@ -252,7 +252,7 @@ typedef u32 netxen_ctx_msg; ...@@ -252,7 +252,7 @@ typedef u32 netxen_ctx_msg;
#define netxen_set_msg_ctxid(config_word, val) \ #define netxen_set_msg_ctxid(config_word, val) \
((config_word) &= ~(0x3ff<<18), (config_word) |= (val & 0x3ff) << 18) ((config_word) &= ~(0x3ff<<18), (config_word) |= (val & 0x3ff) << 18)
#define netxen_set_msg_opcode(config_word, val) \ #define netxen_set_msg_opcode(config_word, val) \
((config_word) &= ~(0xf<<24), (config_word) |= (val & 0xf) << 24) ((config_word) &= ~(0xf<<28), (config_word) |= (val & 0xf) << 28)
struct netxen_rcv_context { struct netxen_rcv_context {
__le64 rcv_ring_addr; __le64 rcv_ring_addr;
...@@ -303,14 +303,14 @@ struct netxen_ring_ctx { ...@@ -303,14 +303,14 @@ struct netxen_ring_ctx {
(cmd_desc)->flags_opcode |= cpu_to_le16((val) & 0x7f)) (cmd_desc)->flags_opcode |= cpu_to_le16((val) & 0x7f))
#define netxen_set_cmd_desc_opcode(cmd_desc, val) \ #define netxen_set_cmd_desc_opcode(cmd_desc, val) \
((cmd_desc)->flags_opcode &= ~cpu_to_le16(0x3f<<7), \ ((cmd_desc)->flags_opcode &= ~cpu_to_le16(0x3f<<7), \
(cmd_desc)->flags_opcode |= cpu_to_le16((val) & (0x3f<<7))) (cmd_desc)->flags_opcode |= cpu_to_le16(((val & 0x3f)<<7)))
#define netxen_set_cmd_desc_num_of_buff(cmd_desc, val) \ #define netxen_set_cmd_desc_num_of_buff(cmd_desc, val) \
((cmd_desc)->num_of_buffers_total_length &= ~cpu_to_le32(0xff), \ ((cmd_desc)->num_of_buffers_total_length &= ~cpu_to_le32(0xff), \
(cmd_desc)->num_of_buffers_total_length |= cpu_to_le32((val) & 0xff)) (cmd_desc)->num_of_buffers_total_length |= cpu_to_le32((val) & 0xff))
#define netxen_set_cmd_desc_totallength(cmd_desc, val) \ #define netxen_set_cmd_desc_totallength(cmd_desc, val) \
((cmd_desc)->num_of_buffers_total_length &= cpu_to_le32(0xff), \ ((cmd_desc)->num_of_buffers_total_length &= ~cpu_to_le32(0xffffff00), \
(cmd_desc)->num_of_buffers_total_length |= cpu_to_le32(val << 24)) (cmd_desc)->num_of_buffers_total_length |= cpu_to_le32(val << 8))
#define netxen_get_cmd_desc_opcode(cmd_desc) \ #define netxen_get_cmd_desc_opcode(cmd_desc) \
((le16_to_cpu((cmd_desc)->flags_opcode) >> 7) & 0x003F) ((le16_to_cpu((cmd_desc)->flags_opcode) >> 7) & 0x003F)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment