diff options
author | Kalesh AP <kalesh.purayil@emulex.com> | 2013-04-28 18:21:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-29 15:14:02 -0400 |
commit | 28710c55f4a62b6c595d1a7134e7196c63838e1c (patch) | |
tree | 68b3a4089f9236adc220bf2288761766435538ce /drivers/net/ethernet/emulex | |
parent | 14d3692f04a050a0d1e4637b56f997a168c591f6 (diff) |
be2net: Use GET_FUNCTION_CONFIG V1 cmd
Skyhawk-R requires V1 version of GET_FUNCTION_CONFIG cmd to be used for
querrying resources available per function.
Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_cmds.c | 5 | ||||
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_cmds.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index d837e4c7ae8b..9080c2775e9f 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c | |||
@@ -2936,7 +2936,7 @@ static struct be_nic_resource_desc *be_get_nic_desc(u8 *buf, u32 desc_count, | |||
2936 | int i; | 2936 | int i; |
2937 | 2937 | ||
2938 | for (i = 0; i < desc_count; i++) { | 2938 | for (i = 0; i < desc_count; i++) { |
2939 | desc->desc_len = RESOURCE_DESC_SIZE; | 2939 | desc->desc_len = desc->desc_len ? : RESOURCE_DESC_SIZE; |
2940 | if (((void *)desc + desc->desc_len) > | 2940 | if (((void *)desc + desc->desc_len) > |
2941 | (void *)(buf + max_buf_size)) { | 2941 | (void *)(buf + max_buf_size)) { |
2942 | desc = NULL; | 2942 | desc = NULL; |
@@ -2987,6 +2987,9 @@ int be_cmd_get_func_config(struct be_adapter *adapter) | |||
2987 | OPCODE_COMMON_GET_FUNC_CONFIG, | 2987 | OPCODE_COMMON_GET_FUNC_CONFIG, |
2988 | cmd.size, wrb, &cmd); | 2988 | cmd.size, wrb, &cmd); |
2989 | 2989 | ||
2990 | if (skyhawk_chip(adapter)) | ||
2991 | req->hdr.version = 1; | ||
2992 | |||
2990 | status = be_mbox_notify_wait(adapter); | 2993 | status = be_mbox_notify_wait(adapter); |
2991 | if (!status) { | 2994 | if (!status) { |
2992 | struct be_cmd_resp_get_func_config *resp = cmd.va; | 2995 | struct be_cmd_resp_get_func_config *resp = cmd.va; |
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.h b/drivers/net/ethernet/emulex/benet/be_cmds.h index 0fc9b4775699..1b01e9b32794 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.h +++ b/drivers/net/ethernet/emulex/benet/be_cmds.h | |||
@@ -1741,7 +1741,7 @@ struct be_cmd_req_get_func_config { | |||
1741 | }; | 1741 | }; |
1742 | 1742 | ||
1743 | struct be_cmd_resp_get_func_config { | 1743 | struct be_cmd_resp_get_func_config { |
1744 | struct be_cmd_req_hdr hdr; | 1744 | struct be_cmd_resp_hdr hdr; |
1745 | u32 desc_count; | 1745 | u32 desc_count; |
1746 | u8 func_param[MAX_RESOURCE_DESC * RESOURCE_DESC_SIZE]; | 1746 | u8 func_param[MAX_RESOURCE_DESC * RESOURCE_DESC_SIZE]; |
1747 | }; | 1747 | }; |