summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/chelsio/cxgb4
diff options
context:
space:
mode:
authorVipul Pandya <vipul@chelsio.com>2013-04-29 04:04:41 +0000
committerDavid S. Miller <davem@davemloft.net>2013-04-29 15:24:44 -0400
commit94dace10142790ddeb0a3a7b8b33d9540d30c79f (patch)
tree3fdd26a665b6b47dca4afc75d1c83494a2d07fda /drivers/net/ethernet/chelsio/cxgb4
parentb407a4a90800ff4a89b7280302602245806bf498 (diff)
cxgb4vf: Support CPL_SGE_EGR_UPDATEs encapsulated in a CPL_FW4_MSG
Newer firmware can post CPL_SGE_EGR_UPDATE message encapsulated in a CPL_FW4_MSG as follows flit0 rss_header (if DropRSS == 0 in IQ context) flit1 CPL_FW4_MSG cpl flit2 rss_header w/opcode CPL_SGE_EGR_UPDATE flit3 CPL_SGE_EGR_UPDATE cpl So FW4_MSG CPLs with a newly created type of FW_TYPE_RSSCPL have the CPL_SGE_EGR_UPDATE CPL message in flit 2 of the FW4_MSG. Firmware can still post regular CPL_SGE_EGR_UPDATE messages, so the drivers need to handle both. This patch also writes a new parameter to firmware requesting encapsulated EGR_UPDATE. This allows firmware with this support to not break older drivers. Signed-off-by: Vipul Pandya <vipul@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/t4_msg.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h b/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h
index 357e297df1ab..01d484441200 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_msg.h
@@ -158,6 +158,7 @@ union opcode_tid {
};
#define CPL_OPCODE(x) ((x) << 24)
+#define G_CPL_OPCODE(x) (((x) >> 24) & 0xFF)
#define MK_OPCODE_TID(opcode, tid) (CPL_OPCODE(opcode) | (tid))
#define OPCODE_TID(cmd) ((cmd)->ot.opcode_tid)
#define GET_TID(cmd) (ntohl(OPCODE_TID(cmd)) & 0xFFFFFF)