aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h96
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_prototype.h2
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h96
3 files changed, 161 insertions, 33 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
index f2ba4b76ecd3..15f289f2917f 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
@@ -34,7 +34,7 @@
34 */ 34 */
35 35
36#define I40E_FW_API_VERSION_MAJOR 0x0001 36#define I40E_FW_API_VERSION_MAJOR 0x0001
37#define I40E_FW_API_VERSION_MINOR 0x0001 37#define I40E_FW_API_VERSION_MINOR 0x0002
38 38
39struct i40e_aq_desc { 39struct i40e_aq_desc {
40 __le16 flags; 40 __le16 flags;
@@ -123,6 +123,7 @@ enum i40e_admin_queue_opc {
123 i40e_aqc_opc_get_version = 0x0001, 123 i40e_aqc_opc_get_version = 0x0001,
124 i40e_aqc_opc_driver_version = 0x0002, 124 i40e_aqc_opc_driver_version = 0x0002,
125 i40e_aqc_opc_queue_shutdown = 0x0003, 125 i40e_aqc_opc_queue_shutdown = 0x0003,
126 i40e_aqc_opc_set_pf_context = 0x0004,
126 127
127 /* resource ownership */ 128 /* resource ownership */
128 i40e_aqc_opc_request_resource = 0x0008, 129 i40e_aqc_opc_request_resource = 0x0008,
@@ -222,13 +223,15 @@ enum i40e_admin_queue_opc {
222 i40e_aqc_opc_get_partner_advt = 0x0616, 223 i40e_aqc_opc_get_partner_advt = 0x0616,
223 i40e_aqc_opc_set_lb_modes = 0x0618, 224 i40e_aqc_opc_set_lb_modes = 0x0618,
224 i40e_aqc_opc_get_phy_wol_caps = 0x0621, 225 i40e_aqc_opc_get_phy_wol_caps = 0x0621,
225 i40e_aqc_opc_set_phy_reset = 0x0622, 226 i40e_aqc_opc_set_phy_debug = 0x0622,
226 i40e_aqc_opc_upload_ext_phy_fm = 0x0625, 227 i40e_aqc_opc_upload_ext_phy_fm = 0x0625,
227 228
228 /* NVM commands */ 229 /* NVM commands */
229 i40e_aqc_opc_nvm_read = 0x0701, 230 i40e_aqc_opc_nvm_read = 0x0701,
230 i40e_aqc_opc_nvm_erase = 0x0702, 231 i40e_aqc_opc_nvm_erase = 0x0702,
231 i40e_aqc_opc_nvm_update = 0x0703, 232 i40e_aqc_opc_nvm_update = 0x0703,
233 i40e_aqc_opc_nvm_config_read = 0x0704,
234 i40e_aqc_opc_nvm_config_write = 0x0705,
232 235
233 /* virtualization commands */ 236 /* virtualization commands */
234 i40e_aqc_opc_send_msg_to_pf = 0x0801, 237 i40e_aqc_opc_send_msg_to_pf = 0x0801,
@@ -270,8 +273,6 @@ enum i40e_admin_queue_opc {
270 i40e_aqc_opc_debug_set_mode = 0xFF01, 273 i40e_aqc_opc_debug_set_mode = 0xFF01,
271 i40e_aqc_opc_debug_read_reg = 0xFF03, 274 i40e_aqc_opc_debug_read_reg = 0xFF03,
272 i40e_aqc_opc_debug_write_reg = 0xFF04, 275 i40e_aqc_opc_debug_write_reg = 0xFF04,
273 i40e_aqc_opc_debug_read_reg_sg = 0xFF05,
274 i40e_aqc_opc_debug_write_reg_sg = 0xFF06,
275 i40e_aqc_opc_debug_modify_reg = 0xFF07, 276 i40e_aqc_opc_debug_modify_reg = 0xFF07,
276 i40e_aqc_opc_debug_dump_internals = 0xFF08, 277 i40e_aqc_opc_debug_dump_internals = 0xFF08,
277 i40e_aqc_opc_debug_modify_internals = 0xFF09, 278 i40e_aqc_opc_debug_modify_internals = 0xFF09,
@@ -339,6 +340,14 @@ struct i40e_aqc_queue_shutdown {
339 340
340I40E_CHECK_CMD_LENGTH(i40e_aqc_queue_shutdown); 341I40E_CHECK_CMD_LENGTH(i40e_aqc_queue_shutdown);
341 342
343/* Set PF context (0x0004, direct) */
344struct i40e_aqc_set_pf_context {
345 u8 pf_id;
346 u8 reserved[15];
347};
348
349I40E_CHECK_CMD_LENGTH(i40e_aqc_set_pf_context);
350
342/* Request resource ownership (direct 0x0008) 351/* Request resource ownership (direct 0x0008)
343 * Release resource ownership (direct 0x0009) 352 * Release resource ownership (direct 0x0009)
344 */ 353 */
@@ -1404,11 +1413,12 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_configure_switching_comp_bw_limit);
1404struct i40e_aqc_configure_switching_comp_ets_data { 1413struct i40e_aqc_configure_switching_comp_ets_data {
1405 u8 reserved[4]; 1414 u8 reserved[4];
1406 u8 tc_valid_bits; 1415 u8 tc_valid_bits;
1407 u8 reserved1; 1416 u8 seepage;
1417#define I40E_AQ_ETS_SEEPAGE_EN_MASK 0x1
1408 u8 tc_strict_priority_flags; 1418 u8 tc_strict_priority_flags;
1409 u8 reserved2[17]; 1419 u8 reserved1[17];
1410 u8 tc_bw_share_credits[8]; 1420 u8 tc_bw_share_credits[8];
1411 u8 reserved3[96]; 1421 u8 reserved2[96];
1412}; 1422};
1413 1423
1414/* Configure Switching Component Bandwidth Limits per Tc (indirect 0x0416) */ 1424/* Configure Switching Component Bandwidth Limits per Tc (indirect 0x0416) */
@@ -1525,6 +1535,8 @@ enum i40e_aq_phy_type {
1525 I40E_PHY_TYPE_XLPPI = 0x9, 1535 I40E_PHY_TYPE_XLPPI = 0x9,
1526 I40E_PHY_TYPE_40GBASE_CR4_CU = 0xA, 1536 I40E_PHY_TYPE_40GBASE_CR4_CU = 0xA,
1527 I40E_PHY_TYPE_10GBASE_CR1_CU = 0xB, 1537 I40E_PHY_TYPE_10GBASE_CR1_CU = 0xB,
1538 I40E_PHY_TYPE_10GBASE_AOC = 0xC,
1539 I40E_PHY_TYPE_40GBASE_AOC = 0xD,
1528 I40E_PHY_TYPE_100BASE_TX = 0x11, 1540 I40E_PHY_TYPE_100BASE_TX = 0x11,
1529 I40E_PHY_TYPE_1000BASE_T = 0x12, 1541 I40E_PHY_TYPE_1000BASE_T = 0x12,
1530 I40E_PHY_TYPE_10GBASE_T = 0x13, 1542 I40E_PHY_TYPE_10GBASE_T = 0x13,
@@ -1535,7 +1547,10 @@ enum i40e_aq_phy_type {
1535 I40E_PHY_TYPE_40GBASE_CR4 = 0x18, 1547 I40E_PHY_TYPE_40GBASE_CR4 = 0x18,
1536 I40E_PHY_TYPE_40GBASE_SR4 = 0x19, 1548 I40E_PHY_TYPE_40GBASE_SR4 = 0x19,
1537 I40E_PHY_TYPE_40GBASE_LR4 = 0x1A, 1549 I40E_PHY_TYPE_40GBASE_LR4 = 0x1A,
1538 I40E_PHY_TYPE_20GBASE_KR2 = 0x1B, 1550 I40E_PHY_TYPE_1000BASE_SX = 0x1B,
1551 I40E_PHY_TYPE_1000BASE_LX = 0x1C,
1552 I40E_PHY_TYPE_1000BASE_T_OPTICAL = 0x1D,
1553 I40E_PHY_TYPE_20GBASE_KR2 = 0x1E,
1539 I40E_PHY_TYPE_MAX 1554 I40E_PHY_TYPE_MAX
1540}; 1555};
1541 1556
@@ -1679,6 +1694,7 @@ struct i40e_aqc_get_link_status {
1679#define I40E_AQ_LINK_TX_ACTIVE 0x00 1694#define I40E_AQ_LINK_TX_ACTIVE 0x00
1680#define I40E_AQ_LINK_TX_DRAINED 0x01 1695#define I40E_AQ_LINK_TX_DRAINED 0x01
1681#define I40E_AQ_LINK_TX_FLUSHED 0x03 1696#define I40E_AQ_LINK_TX_FLUSHED 0x03
1697#define I40E_AQ_LINK_FORCED_40G 0x10
1682 u8 loopback; /* use defines from i40e_aqc_set_lb_mode */ 1698 u8 loopback; /* use defines from i40e_aqc_set_lb_mode */
1683 __le16 max_frame_size; 1699 __le16 max_frame_size;
1684 u8 config; 1700 u8 config;
@@ -1730,14 +1746,21 @@ struct i40e_aqc_set_lb_mode {
1730 1746
1731I40E_CHECK_CMD_LENGTH(i40e_aqc_set_lb_mode); 1747I40E_CHECK_CMD_LENGTH(i40e_aqc_set_lb_mode);
1732 1748
1733/* Set PHY Reset command (0x0622) */ 1749/* Set PHY Debug command (0x0622) */
1734struct i40e_aqc_set_phy_reset { 1750struct i40e_aqc_set_phy_debug {
1735 u8 reset_flags; 1751 u8 command_flags;
1736#define I40E_AQ_PHY_RESET_REQUEST 0x02 1752#define I40E_AQ_PHY_DEBUG_RESET_INTERNAL 0x02
1753#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_SHIFT 2
1754#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_MASK (0x03 << \
1755 I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_SHIFT)
1756#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_NONE 0x00
1757#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_HARD 0x01
1758#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_SOFT 0x02
1759#define I40E_AQ_PHY_DEBUG_DISABLE_LINK_FW 0x10
1737 u8 reserved[15]; 1760 u8 reserved[15];
1738}; 1761};
1739 1762
1740I40E_CHECK_CMD_LENGTH(i40e_aqc_set_phy_reset); 1763I40E_CHECK_CMD_LENGTH(i40e_aqc_set_phy_debug);
1741 1764
1742enum i40e_aq_phy_reg_type { 1765enum i40e_aq_phy_reg_type {
1743 I40E_AQC_PHY_REG_INTERNAL = 0x1, 1766 I40E_AQC_PHY_REG_INTERNAL = 0x1,
@@ -1762,6 +1785,47 @@ struct i40e_aqc_nvm_update {
1762 1785
1763I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_update); 1786I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_update);
1764 1787
1788/* NVM Config Read (indirect 0x0704) */
1789struct i40e_aqc_nvm_config_read {
1790 __le16 cmd_flags;
1791#define ANVM_SINGLE_OR_MULTIPLE_FEATURES_MASK 1
1792#define ANVM_READ_SINGLE_FEATURE 0
1793#define ANVM_READ_MULTIPLE_FEATURES 1
1794 __le16 element_count;
1795 __le16 element_id; /* Feature/field ID */
1796 u8 reserved[2];
1797 __le32 address_high;
1798 __le32 address_low;
1799};
1800
1801I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_config_read);
1802
1803/* NVM Config Write (indirect 0x0705) */
1804struct i40e_aqc_nvm_config_write {
1805 __le16 cmd_flags;
1806 __le16 element_count;
1807 u8 reserved[4];
1808 __le32 address_high;
1809 __le32 address_low;
1810};
1811
1812I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_config_write);
1813
1814struct i40e_aqc_nvm_config_data_feature {
1815 __le16 feature_id;
1816 __le16 instance_id;
1817 __le16 feature_options;
1818 __le16 feature_selection;
1819};
1820
1821struct i40e_aqc_nvm_config_data_immediate_field {
1822#define ANVM_FEATURE_OR_IMMEDIATE_MASK 0x2
1823 __le16 field_id;
1824 __le16 instance_id;
1825 __le16 field_options;
1826 __le16 field_value;
1827};
1828
1765/* Send to PF command (indirect 0x0801) id is only used by PF 1829/* Send to PF command (indirect 0x0801) id is only used by PF
1766 * Send to VF command (indirect 0x0802) id is only used by PF 1830 * Send to VF command (indirect 0x0802) id is only used by PF
1767 * Send to Peer PF command (indirect 0x0803) 1831 * Send to Peer PF command (indirect 0x0803)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_prototype.h b/drivers/net/ethernet/intel/i40e/i40e_prototype.h
index 58c4e1eba5bf..a430699c41d5 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_prototype.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_prototype.h
@@ -70,7 +70,7 @@ i40e_status i40e_aq_get_firmware_version(struct i40e_hw *hw,
70 u16 *fw_major_version, u16 *fw_minor_version, 70 u16 *fw_major_version, u16 *fw_minor_version,
71 u16 *api_major_version, u16 *api_minor_version, 71 u16 *api_major_version, u16 *api_minor_version,
72 struct i40e_asq_cmd_details *cmd_details); 72 struct i40e_asq_cmd_details *cmd_details);
73i40e_status i40e_aq_set_phy_reset(struct i40e_hw *hw, 73i40e_status i40e_aq_set_phy_debug(struct i40e_hw *hw, u8 cmd_flags,
74 struct i40e_asq_cmd_details *cmd_details); 74 struct i40e_asq_cmd_details *cmd_details);
75i40e_status i40e_aq_set_default_vsi(struct i40e_hw *hw, u16 vsi_id, 75i40e_status i40e_aq_set_default_vsi(struct i40e_hw *hw, u16 vsi_id,
76 struct i40e_asq_cmd_details *cmd_details); 76 struct i40e_asq_cmd_details *cmd_details);
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
index 89d9209ff2bd..e656ea7a7920 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
@@ -34,7 +34,7 @@
34 */ 34 */
35 35
36#define I40E_FW_API_VERSION_MAJOR 0x0001 36#define I40E_FW_API_VERSION_MAJOR 0x0001
37#define I40E_FW_API_VERSION_MINOR 0x0001 37#define I40E_FW_API_VERSION_MINOR 0x0002
38#define I40E_FW_API_VERSION_A0_MINOR 0x0000 38#define I40E_FW_API_VERSION_A0_MINOR 0x0000
39 39
40struct i40e_aq_desc { 40struct i40e_aq_desc {
@@ -124,6 +124,7 @@ enum i40e_admin_queue_opc {
124 i40e_aqc_opc_get_version = 0x0001, 124 i40e_aqc_opc_get_version = 0x0001,
125 i40e_aqc_opc_driver_version = 0x0002, 125 i40e_aqc_opc_driver_version = 0x0002,
126 i40e_aqc_opc_queue_shutdown = 0x0003, 126 i40e_aqc_opc_queue_shutdown = 0x0003,
127 i40e_aqc_opc_set_pf_context = 0x0004,
127 128
128 /* resource ownership */ 129 /* resource ownership */
129 i40e_aqc_opc_request_resource = 0x0008, 130 i40e_aqc_opc_request_resource = 0x0008,
@@ -223,13 +224,15 @@ enum i40e_admin_queue_opc {
223 i40e_aqc_opc_get_partner_advt = 0x0616, 224 i40e_aqc_opc_get_partner_advt = 0x0616,
224 i40e_aqc_opc_set_lb_modes = 0x0618, 225 i40e_aqc_opc_set_lb_modes = 0x0618,
225 i40e_aqc_opc_get_phy_wol_caps = 0x0621, 226 i40e_aqc_opc_get_phy_wol_caps = 0x0621,
226 i40e_aqc_opc_set_phy_reset = 0x0622, 227 i40e_aqc_opc_set_phy_debug = 0x0622,
227 i40e_aqc_opc_upload_ext_phy_fm = 0x0625, 228 i40e_aqc_opc_upload_ext_phy_fm = 0x0625,
228 229
229 /* NVM commands */ 230 /* NVM commands */
230 i40e_aqc_opc_nvm_read = 0x0701, 231 i40e_aqc_opc_nvm_read = 0x0701,
231 i40e_aqc_opc_nvm_erase = 0x0702, 232 i40e_aqc_opc_nvm_erase = 0x0702,
232 i40e_aqc_opc_nvm_update = 0x0703, 233 i40e_aqc_opc_nvm_update = 0x0703,
234 i40e_aqc_opc_nvm_config_read = 0x0704,
235 i40e_aqc_opc_nvm_config_write = 0x0705,
233 236
234 /* virtualization commands */ 237 /* virtualization commands */
235 i40e_aqc_opc_send_msg_to_pf = 0x0801, 238 i40e_aqc_opc_send_msg_to_pf = 0x0801,
@@ -271,8 +274,6 @@ enum i40e_admin_queue_opc {
271 i40e_aqc_opc_debug_set_mode = 0xFF01, 274 i40e_aqc_opc_debug_set_mode = 0xFF01,
272 i40e_aqc_opc_debug_read_reg = 0xFF03, 275 i40e_aqc_opc_debug_read_reg = 0xFF03,
273 i40e_aqc_opc_debug_write_reg = 0xFF04, 276 i40e_aqc_opc_debug_write_reg = 0xFF04,
274 i40e_aqc_opc_debug_read_reg_sg = 0xFF05,
275 i40e_aqc_opc_debug_write_reg_sg = 0xFF06,
276 i40e_aqc_opc_debug_modify_reg = 0xFF07, 277 i40e_aqc_opc_debug_modify_reg = 0xFF07,
277 i40e_aqc_opc_debug_dump_internals = 0xFF08, 278 i40e_aqc_opc_debug_dump_internals = 0xFF08,
278 i40e_aqc_opc_debug_modify_internals = 0xFF09, 279 i40e_aqc_opc_debug_modify_internals = 0xFF09,
@@ -340,6 +341,14 @@ struct i40e_aqc_queue_shutdown {
340 341
341I40E_CHECK_CMD_LENGTH(i40e_aqc_queue_shutdown); 342I40E_CHECK_CMD_LENGTH(i40e_aqc_queue_shutdown);
342 343
344/* Set PF context (0x0004, direct) */
345struct i40e_aqc_set_pf_context {
346 u8 pf_id;
347 u8 reserved[15];
348};
349
350I40E_CHECK_CMD_LENGTH(i40e_aqc_set_pf_context);
351
343/* Request resource ownership (direct 0x0008) 352/* Request resource ownership (direct 0x0008)
344 * Release resource ownership (direct 0x0009) 353 * Release resource ownership (direct 0x0009)
345 */ 354 */
@@ -1408,11 +1417,12 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_configure_switching_comp_bw_limit);
1408struct i40e_aqc_configure_switching_comp_ets_data { 1417struct i40e_aqc_configure_switching_comp_ets_data {
1409 u8 reserved[4]; 1418 u8 reserved[4];
1410 u8 tc_valid_bits; 1419 u8 tc_valid_bits;
1411 u8 reserved1; 1420 u8 seepage;
1421#define I40E_AQ_ETS_SEEPAGE_EN_MASK 0x1
1412 u8 tc_strict_priority_flags; 1422 u8 tc_strict_priority_flags;
1413 u8 reserved2[17]; 1423 u8 reserved1[17];
1414 u8 tc_bw_share_credits[8]; 1424 u8 tc_bw_share_credits[8];
1415 u8 reserved3[96]; 1425 u8 reserved2[96];
1416}; 1426};
1417 1427
1418/* Configure Switching Component Bandwidth Limits per Tc (indirect 0x0416) */ 1428/* Configure Switching Component Bandwidth Limits per Tc (indirect 0x0416) */
@@ -1529,6 +1539,8 @@ enum i40e_aq_phy_type {
1529 I40E_PHY_TYPE_XLPPI = 0x9, 1539 I40E_PHY_TYPE_XLPPI = 0x9,
1530 I40E_PHY_TYPE_40GBASE_CR4_CU = 0xA, 1540 I40E_PHY_TYPE_40GBASE_CR4_CU = 0xA,
1531 I40E_PHY_TYPE_10GBASE_CR1_CU = 0xB, 1541 I40E_PHY_TYPE_10GBASE_CR1_CU = 0xB,
1542 I40E_PHY_TYPE_10GBASE_AOC = 0xC,
1543 I40E_PHY_TYPE_40GBASE_AOC = 0xD,
1532 I40E_PHY_TYPE_100BASE_TX = 0x11, 1544 I40E_PHY_TYPE_100BASE_TX = 0x11,
1533 I40E_PHY_TYPE_1000BASE_T = 0x12, 1545 I40E_PHY_TYPE_1000BASE_T = 0x12,
1534 I40E_PHY_TYPE_10GBASE_T = 0x13, 1546 I40E_PHY_TYPE_10GBASE_T = 0x13,
@@ -1539,7 +1551,10 @@ enum i40e_aq_phy_type {
1539 I40E_PHY_TYPE_40GBASE_CR4 = 0x18, 1551 I40E_PHY_TYPE_40GBASE_CR4 = 0x18,
1540 I40E_PHY_TYPE_40GBASE_SR4 = 0x19, 1552 I40E_PHY_TYPE_40GBASE_SR4 = 0x19,
1541 I40E_PHY_TYPE_40GBASE_LR4 = 0x1A, 1553 I40E_PHY_TYPE_40GBASE_LR4 = 0x1A,
1542 I40E_PHY_TYPE_20GBASE_KR2 = 0x1B, 1554 I40E_PHY_TYPE_1000BASE_SX = 0x1B,
1555 I40E_PHY_TYPE_1000BASE_LX = 0x1C,
1556 I40E_PHY_TYPE_1000BASE_T_OPTICAL = 0x1D,
1557 I40E_PHY_TYPE_20GBASE_KR2 = 0x1E,
1543 I40E_PHY_TYPE_MAX 1558 I40E_PHY_TYPE_MAX
1544}; 1559};
1545 1560
@@ -1683,6 +1698,7 @@ struct i40e_aqc_get_link_status {
1683#define I40E_AQ_LINK_TX_ACTIVE 0x00 1698#define I40E_AQ_LINK_TX_ACTIVE 0x00
1684#define I40E_AQ_LINK_TX_DRAINED 0x01 1699#define I40E_AQ_LINK_TX_DRAINED 0x01
1685#define I40E_AQ_LINK_TX_FLUSHED 0x03 1700#define I40E_AQ_LINK_TX_FLUSHED 0x03
1701#define I40E_AQ_LINK_FORCED_40G 0x10
1686 u8 loopback; /* use defines from i40e_aqc_set_lb_mode */ 1702 u8 loopback; /* use defines from i40e_aqc_set_lb_mode */
1687 __le16 max_frame_size; 1703 __le16 max_frame_size;
1688 u8 config; 1704 u8 config;
@@ -1734,14 +1750,21 @@ struct i40e_aqc_set_lb_mode {
1734 1750
1735I40E_CHECK_CMD_LENGTH(i40e_aqc_set_lb_mode); 1751I40E_CHECK_CMD_LENGTH(i40e_aqc_set_lb_mode);
1736 1752
1737/* Set PHY Reset command (0x0622) */ 1753/* Set PHY Debug command (0x0622) */
1738struct i40e_aqc_set_phy_reset { 1754struct i40e_aqc_set_phy_debug {
1739 u8 reset_flags; 1755 u8 command_flags;
1740#define I40E_AQ_PHY_RESET_REQUEST 0x02 1756#define I40E_AQ_PHY_DEBUG_RESET_INTERNAL 0x02
1757#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_SHIFT 2
1758#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_MASK (0x03 << \
1759 I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_SHIFT)
1760#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_NONE 0x00
1761#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_HARD 0x01
1762#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_SOFT 0x02
1763#define I40E_AQ_PHY_DEBUG_DISABLE_LINK_FW 0x10
1741 u8 reserved[15]; 1764 u8 reserved[15];
1742}; 1765};
1743 1766
1744I40E_CHECK_CMD_LENGTH(i40e_aqc_set_phy_reset); 1767I40E_CHECK_CMD_LENGTH(i40e_aqc_set_phy_debug);
1745 1768
1746enum i40e_aq_phy_reg_type { 1769enum i40e_aq_phy_reg_type {
1747 I40E_AQC_PHY_REG_INTERNAL = 0x1, 1770 I40E_AQC_PHY_REG_INTERNAL = 0x1,
@@ -1766,6 +1789,47 @@ struct i40e_aqc_nvm_update {
1766 1789
1767I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_update); 1790I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_update);
1768 1791
1792/* NVM Config Read (indirect 0x0704) */
1793struct i40e_aqc_nvm_config_read {
1794 __le16 cmd_flags;
1795#define ANVM_SINGLE_OR_MULTIPLE_FEATURES_MASK 1
1796#define ANVM_READ_SINGLE_FEATURE 0
1797#define ANVM_READ_MULTIPLE_FEATURES 1
1798 __le16 element_count;
1799 __le16 element_id; /* Feature/field ID */
1800 u8 reserved[2];
1801 __le32 address_high;
1802 __le32 address_low;
1803};
1804
1805I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_config_read);
1806
1807/* NVM Config Write (indirect 0x0705) */
1808struct i40e_aqc_nvm_config_write {
1809 __le16 cmd_flags;
1810 __le16 element_count;
1811 u8 reserved[4];
1812 __le32 address_high;
1813 __le32 address_low;
1814};
1815
1816I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_config_write);
1817
1818struct i40e_aqc_nvm_config_data_feature {
1819 __le16 feature_id;
1820 __le16 instance_id;
1821 __le16 feature_options;
1822 __le16 feature_selection;
1823};
1824
1825struct i40e_aqc_nvm_config_data_immediate_field {
1826#define ANVM_FEATURE_OR_IMMEDIATE_MASK 0x2
1827 __le16 field_id;
1828 __le16 instance_id;
1829 __le16 field_options;
1830 __le16 field_value;
1831};
1832
1769/* Send to PF command (indirect 0x0801) id is only used by PF 1833/* Send to PF command (indirect 0x0801) id is only used by PF
1770 * Send to VF command (indirect 0x0802) id is only used by PF 1834 * Send to VF command (indirect 0x0802) id is only used by PF
1771 * Send to Peer PF command (indirect 0x0803) 1835 * Send to Peer PF command (indirect 0x0803)