|
@@ -851,8 +851,10 @@ static int be_cmd_notify_wait(struct be_adapter *adapter,
|
|
|
return status;
|
|
|
|
|
|
dest_wrb = be_cmd_copy(adapter, wrb);
|
|
|
- if (!dest_wrb)
|
|
|
- return -EBUSY;
|
|
|
+ if (!dest_wrb) {
|
|
|
+ status = -EBUSY;
|
|
|
+ goto unlock;
|
|
|
+ }
|
|
|
|
|
|
if (use_mcc(adapter))
|
|
|
status = be_mcc_notify_wait(adapter);
|
|
@@ -862,6 +864,7 @@ static int be_cmd_notify_wait(struct be_adapter *adapter,
|
|
|
if (!status)
|
|
|
memcpy(wrb, dest_wrb, sizeof(*wrb));
|
|
|
|
|
|
+unlock:
|
|
|
be_cmd_unlock(adapter);
|
|
|
return status;
|
|
|
}
|
|
@@ -1984,6 +1987,8 @@ int be_cmd_rx_filter(struct be_adapter *adapter, u32 flags, u32 value)
|
|
|
be_if_cap_flags(adapter));
|
|
|
}
|
|
|
flags &= be_if_cap_flags(adapter);
|
|
|
+ if (!flags)
|
|
|
+ return -ENOTSUPP;
|
|
|
|
|
|
return __be_cmd_rx_filter(adapter, flags, value);
|
|
|
}
|
|
@@ -2887,6 +2892,7 @@ int be_cmd_get_cntl_attributes(struct be_adapter *adapter)
|
|
|
if (!status) {
|
|
|
attribs = attribs_cmd.va + sizeof(struct be_cmd_resp_hdr);
|
|
|
adapter->hba_port_num = attribs->hba_attribs.phy_port;
|
|
|
+ adapter->pci_func_num = attribs->pci_func_num;
|
|
|
serial_num = attribs->hba_attribs.controller_serial_number;
|
|
|
for (i = 0; i < CNTL_SERIAL_NUM_WORDS; i++)
|
|
|
adapter->serial_num[i] = le32_to_cpu(serial_num[i]) &
|
|
@@ -3709,7 +3715,6 @@ int be_cmd_get_func_config(struct be_adapter *adapter, struct be_resources *res)
|
|
|
status = -EINVAL;
|
|
|
goto err;
|
|
|
}
|
|
|
-
|
|
|
adapter->pf_number = desc->pf_num;
|
|
|
be_copy_nic_desc(res, desc);
|
|
|
}
|
|
@@ -3721,7 +3726,10 @@ err:
|
|
|
return status;
|
|
|
}
|
|
|
|
|
|
-/* Will use MBOX only if MCCQ has not been created */
|
|
|
+/* Will use MBOX only if MCCQ has not been created
|
|
|
+ * non-zero domain => a PF is querying this on behalf of a VF
|
|
|
+ * zero domain => a PF or a VF is querying this for itself
|
|
|
+ */
|
|
|
int be_cmd_get_profile_config(struct be_adapter *adapter,
|
|
|
struct be_resources *res, u8 query, u8 domain)
|
|
|
{
|
|
@@ -3748,10 +3756,15 @@ int be_cmd_get_profile_config(struct be_adapter *adapter,
|
|
|
OPCODE_COMMON_GET_PROFILE_CONFIG,
|
|
|
cmd.size, &wrb, &cmd);
|
|
|
|
|
|
- req->hdr.domain = domain;
|
|
|
if (!lancer_chip(adapter))
|
|
|
req->hdr.version = 1;
|
|
|
req->type = ACTIVE_PROFILE_TYPE;
|
|
|
+ /* When a function is querying profile information relating to
|
|
|
+ * itself hdr.pf_number must be set to it's pci_func_num + 1
|
|
|
+ */
|
|
|
+ req->hdr.domain = domain;
|
|
|
+ if (domain == 0)
|
|
|
+ req->hdr.pf_num = adapter->pci_func_num + 1;
|
|
|
|
|
|
/* When QUERY_MODIFIABLE_FIELDS_TYPE bit is set, cmd returns the
|
|
|
* descriptors with all bits set to "1" for the fields which can be
|
|
@@ -3921,12 +3934,16 @@ static void be_fill_vf_res_template(struct be_adapter *adapter,
|
|
|
vf_if_cap_flags &= ~(BE_IF_FLAGS_RSS |
|
|
|
BE_IF_FLAGS_DEFQ_RSS);
|
|
|
}
|
|
|
-
|
|
|
- nic_vft->cap_flags = cpu_to_le32(vf_if_cap_flags);
|
|
|
} else {
|
|
|
num_vf_qs = 1;
|
|
|
}
|
|
|
|
|
|
+ if (res_mod.vf_if_cap_flags & BE_IF_FLAGS_VLAN_PROMISCUOUS) {
|
|
|
+ nic_vft->flags |= BIT(IF_CAPS_FLAGS_VALID_SHIFT);
|
|
|
+ vf_if_cap_flags &= ~BE_IF_FLAGS_VLAN_PROMISCUOUS;
|
|
|
+ }
|
|
|
+
|
|
|
+ nic_vft->cap_flags = cpu_to_le32(vf_if_cap_flags);
|
|
|
nic_vft->rq_count = cpu_to_le16(num_vf_qs);
|
|
|
nic_vft->txq_count = cpu_to_le16(num_vf_qs);
|
|
|
nic_vft->rssq_count = cpu_to_le16(num_vf_qs);
|