netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] be2net: pass if_id for v1 and V2 versions of TX_CREATE cmd
@ 2013-10-17  6:17 Sathya Perla
  2013-10-18 20:33 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Sathya Perla @ 2013-10-17  6:17 UTC (permalink / raw)
  To: netdev

From: Vasundhara Volam <vasundhara.volam@emulex.com>

It is a required field for all TX_CREATE cmd versions > 0.
This fixes a driver initialization failure, caused by recent SH-R Firmwares
(versions > 10.0.639.0) failing the TX_CREATE cmd when if_id field is
not passed.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
---

Dave, pls consider queuing this patch for -stable tree as it fixes
a driver load failure. Thanks.

 drivers/net/ethernet/emulex/benet/be_cmds.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index bd0e0c0..c08fd32 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -1198,7 +1198,6 @@ int be_cmd_txq_create(struct be_adapter *adapter, struct be_tx_obj *txo)
 
 	if (lancer_chip(adapter)) {
 		req->hdr.version = 1;
-		req->if_id = cpu_to_le16(adapter->if_handle);
 	} else if (BEx_chip(adapter)) {
 		if (adapter->function_caps & BE_FUNCTION_CAPS_SUPER_NIC)
 			req->hdr.version = 2;
@@ -1206,6 +1205,8 @@ int be_cmd_txq_create(struct be_adapter *adapter, struct be_tx_obj *txo)
 		req->hdr.version = 2;
 	}
 
+	if (req->hdr.version > 0)
+		req->if_id = cpu_to_le16(adapter->if_handle);
 	req->num_pages = PAGES_4K_SPANNED(q_mem->va, q_mem->size);
 	req->ulp_num = BE_ULP1_NUM;
 	req->type = BE_ETH_TX_RING_TYPE_STANDARD;
-- 
1.7.1

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

* Re: [PATCH] be2net: pass if_id for v1 and V2 versions of TX_CREATE cmd
  2013-10-17  6:17 [PATCH] be2net: pass if_id for v1 and V2 versions of TX_CREATE cmd Sathya Perla
@ 2013-10-18 20:33 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-10-18 20:33 UTC (permalink / raw)
  To: sathya.perla; +Cc: netdev

From: Sathya Perla <sathya.perla@emulex.com>
Date: Thu, 17 Oct 2013 11:47:14 +0530

> From: Vasundhara Volam <vasundhara.volam@emulex.com>
> 
> It is a required field for all TX_CREATE cmd versions > 0.
> This fixes a driver initialization failure, caused by recent SH-R Firmwares
> (versions > 10.0.639.0) failing the TX_CREATE cmd when if_id field is
> not passed.
> 
> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
> ---
> 
> Dave, pls consider queuing this patch for -stable tree as it fixes
> a driver load failure. Thanks.

Applied and queued up for -stable, thanks.

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

end of thread, other threads:[~2013-10-18 20:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-17  6:17 [PATCH] be2net: pass if_id for v1 and V2 versions of TX_CREATE cmd Sathya Perla
2013-10-18 20:33 ` 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).