Commit 28710c55 authored by Kalesh AP's avatar Kalesh AP Committed by David S. Miller

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: default avatarKalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: default avatarSomnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 14d3692f
...@@ -2936,7 +2936,7 @@ static struct be_nic_resource_desc *be_get_nic_desc(u8 *buf, u32 desc_count, ...@@ -2936,7 +2936,7 @@ static struct be_nic_resource_desc *be_get_nic_desc(u8 *buf, u32 desc_count,
int i; int i;
for (i = 0; i < desc_count; i++) { for (i = 0; i < desc_count; i++) {
desc->desc_len = RESOURCE_DESC_SIZE; desc->desc_len = desc->desc_len ? : RESOURCE_DESC_SIZE;
if (((void *)desc + desc->desc_len) > if (((void *)desc + desc->desc_len) >
(void *)(buf + max_buf_size)) { (void *)(buf + max_buf_size)) {
desc = NULL; desc = NULL;
...@@ -2987,6 +2987,9 @@ int be_cmd_get_func_config(struct be_adapter *adapter) ...@@ -2987,6 +2987,9 @@ int be_cmd_get_func_config(struct be_adapter *adapter)
OPCODE_COMMON_GET_FUNC_CONFIG, OPCODE_COMMON_GET_FUNC_CONFIG,
cmd.size, wrb, &cmd); cmd.size, wrb, &cmd);
if (skyhawk_chip(adapter))
req->hdr.version = 1;
status = be_mbox_notify_wait(adapter); status = be_mbox_notify_wait(adapter);
if (!status) { if (!status) {
struct be_cmd_resp_get_func_config *resp = cmd.va; struct be_cmd_resp_get_func_config *resp = cmd.va;
......
...@@ -1741,7 +1741,7 @@ struct be_cmd_req_get_func_config { ...@@ -1741,7 +1741,7 @@ struct be_cmd_req_get_func_config {
}; };
struct be_cmd_resp_get_func_config { struct be_cmd_resp_get_func_config {
struct be_cmd_req_hdr hdr; struct be_cmd_resp_hdr hdr;
u32 desc_count; u32 desc_count;
u8 func_param[MAX_RESOURCE_DESC * RESOURCE_DESC_SIZE]; u8 func_param[MAX_RESOURCE_DESC * RESOURCE_DESC_SIZE];
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment