net/i40e/base: support disabling unused ports
authorGuinan Sun <guinanx.sun@intel.com>
Mon, 27 Jul 2020 05:34:49 +0000 (05:34 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:06 +0000 (18:55 +0200)
This patch adds support for disabling unused ports.

Signed-off-by: Damian Milosek <damian.milosek@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
drivers/net/i40e/base/i40e_adminq_cmd.h
drivers/net/i40e/base/i40e_common.c
drivers/net/i40e/base/i40e_type.h

index e1018ed..c7686b0 100644 (file)
@@ -440,6 +440,7 @@ struct i40e_aqc_list_capabilities_element_resp {
 #define I40E_AQ_CAP_ID_SDP             0x0062
 #define I40E_AQ_CAP_ID_MDIO            0x0063
 #define I40E_AQ_CAP_ID_WSR_PROT                0x0064
+#define I40E_AQ_CAP_ID_DIS_UNUSED_PORTS        0x0067
 #define I40E_AQ_CAP_ID_NVM_MGMT                0x0080
 #define I40E_AQ_CAP_ID_FLEX10          0x00F1
 #define I40E_AQ_CAP_ID_CEM             0x00F2
index 85c2284..65317f6 100644 (file)
@@ -4021,6 +4021,12 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
                                   "HW Capability: wr_csr_prot = 0x%llX\n\n",
                                   (p->wr_csr_prot & 0xffff));
                        break;
+               case I40E_AQ_CAP_ID_DIS_UNUSED_PORTS:
+                       p->dis_unused_ports = (bool)number;
+                       i40e_debug(hw, I40E_DEBUG_INIT,
+                                  "HW Capability: dis_unused_ports = %d\n\n",
+                                  p->dis_unused_ports);
+                       break;
                case I40E_AQ_CAP_ID_NVM_MGMT:
                        if (number & I40E_NVM_MGMT_SEC_REV_DISABLED)
                                p->sec_rev_disabled = true;
index 0eeb559..cf41345 100644 (file)
@@ -425,6 +425,7 @@ struct i40e_hw_capabilities {
        u32 enabled_tcmap;
        u32 maxtc;
        u64 wr_csr_prot;
+       bool dis_unused_ports;
        bool apm_wol_support;
        enum i40e_acpi_programming_method acpi_prog_method;
        bool proxy_support;