Skip to content

Commit

Permalink
be2net: fix mccq create for big endian architectures
Browse files Browse the repository at this point in the history
The request to create an mccq was being dispatched without
doing a byte swap of num_pages. This byte swap is necessary
for Big Endian systems like PPC. Not having this fix leads
mccq create to fail on BE ASICs running newer version of
firmware, thereby causing driver initialization failure.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ajit Khaparde authored and David S. Miller committed Mar 15, 2010
1 parent d4fdcd9 commit d4a2ac3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/benet/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ int be_cmd_mccq_create(struct be_adapter *adapter,
be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON,
OPCODE_COMMON_MCC_CREATE, sizeof(*req));

req->num_pages = PAGES_4K_SPANNED(q_mem->va, q_mem->size);
req->num_pages = cpu_to_le16(PAGES_4K_SPANNED(q_mem->va, q_mem->size));

AMAP_SET_BITS(struct amap_mcc_context, valid, ctxt, 1);
AMAP_SET_BITS(struct amap_mcc_context, ring_size, ctxt,
Expand Down

0 comments on commit d4a2ac3

Please sign in to comment.