mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
28ea334bd1
The recent commit to always forward the VF MAC address to the PF for
approval may not work if the PF driver or the firmware is older. This
will cause the VF driver to fail during probe:
bnxt_en 0000:00:03.0 (unnamed net_device) (uninitialized): hwrm req_type 0xf seq id 0x5 error 0xffff
bnxt_en 0000:00:03.0 (unnamed net_device) (uninitialized): VF MAC address 00:00:17:02:05:d0 not approved by the PF
bnxt_en 0000:00:03.0: Unable to initialize mac address.
bnxt_en: probe of 0000:00:03.0 failed with error -99
We fix it by treating the error as fatal only if the VF MAC address is
locally generated by the VF.
Fixes: 707e7e9660
("bnxt_en: Always forward VF MAC address to the PF.")
Reported-by: Seth Forshee <seth.forshee@canonical.com>
Reported-by: Siwei Liu <loseweigh@gmail.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
44 lines
1.6 KiB
C
44 lines
1.6 KiB
C
/* Broadcom NetXtreme-C/E network driver.
|
|
*
|
|
* Copyright (c) 2014-2016 Broadcom Corporation
|
|
* Copyright (c) 2016-2018 Broadcom Limited
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef BNXT_SRIOV_H
|
|
#define BNXT_SRIOV_H
|
|
|
|
#define BNXT_FWD_RESP_SIZE_ERR(n) \
|
|
((offsetof(struct hwrm_fwd_resp_input, encap_resp) + n) > \
|
|
sizeof(struct hwrm_fwd_resp_input))
|
|
|
|
#define BNXT_EXEC_FWD_RESP_SIZE_ERR(n) \
|
|
((offsetof(struct hwrm_exec_fwd_resp_input, encap_request) + n) >\
|
|
offsetof(struct hwrm_exec_fwd_resp_input, encap_resp_target_id))
|
|
|
|
#define BNXT_REJ_FWD_RESP_SIZE_ERR(n) \
|
|
((offsetof(struct hwrm_reject_fwd_resp_input, encap_request) + n) >\
|
|
offsetof(struct hwrm_reject_fwd_resp_input, encap_resp_target_id))
|
|
|
|
#define BNXT_VF_MIN_RSS_CTX 1
|
|
#define BNXT_VF_MAX_RSS_CTX 1
|
|
#define BNXT_VF_MIN_L2_CTX 1
|
|
#define BNXT_VF_MAX_L2_CTX 4
|
|
|
|
int bnxt_get_vf_config(struct net_device *, int, struct ifla_vf_info *);
|
|
int bnxt_set_vf_mac(struct net_device *, int, u8 *);
|
|
int bnxt_set_vf_vlan(struct net_device *, int, u16, u8, __be16);
|
|
int bnxt_set_vf_bw(struct net_device *, int, int, int);
|
|
int bnxt_set_vf_link_state(struct net_device *, int, int);
|
|
int bnxt_set_vf_spoofchk(struct net_device *, int, bool);
|
|
int bnxt_set_vf_trust(struct net_device *dev, int vf_id, bool trust);
|
|
int bnxt_sriov_configure(struct pci_dev *pdev, int num_vfs);
|
|
void bnxt_sriov_disable(struct bnxt *);
|
|
void bnxt_hwrm_exec_fwd_req(struct bnxt *);
|
|
void bnxt_update_vf_mac(struct bnxt *);
|
|
int bnxt_approve_mac(struct bnxt *, u8 *, bool);
|
|
#endif
|