netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-2.6] be2net: fix mccq create for big endian architectures
@ 2010-03-11 11:35 Ajit Khaparde
  2010-03-15 22:48 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Ajit Khaparde @ 2010-03-11 11:35 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

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>
---
 drivers/net/benet/be_cmds.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index c592153..50e6259 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -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,
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-2.6] be2net: fix mccq create for big endian architectures
  2010-03-11 11:35 [PATCH net-2.6] be2net: fix mccq create for big endian architectures Ajit Khaparde
@ 2010-03-15 22:48 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-03-15 22:48 UTC (permalink / raw)
  To: ajitk; +Cc: netdev

From: Ajit Khaparde <ajitk@serverengines.com>
Date: Thu, 11 Mar 2010 17:05:59 +0530

> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-15 22:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-11 11:35 [PATCH net-2.6] be2net: fix mccq create for big endian architectures Ajit Khaparde
2010-03-15 22:48 ` David Miller

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).