/** * i40e_set_mac_type - Sets MAC type * @hw: pointer to the HW structure * * This function sets the mac type of the adapter based on the * vendor ID and device ID stored in the hw structure.
**/ int i40e_set_mac_type(struct i40e_hw *hw)
{ int status = 0;
if (hw->vendor_id == PCI_VENDOR_ID_INTEL) { switch (hw->device_id) { case I40E_DEV_ID_SFP_XL710: case I40E_DEV_ID_QEMU: case I40E_DEV_ID_KX_B: case I40E_DEV_ID_KX_C: case I40E_DEV_ID_QSFP_A: case I40E_DEV_ID_QSFP_B: case I40E_DEV_ID_QSFP_C: case I40E_DEV_ID_1G_BASE_T_BC: case I40E_DEV_ID_5G_BASE_T_BC: case I40E_DEV_ID_10G_BASE_T: case I40E_DEV_ID_10G_BASE_T4: case I40E_DEV_ID_10G_BASE_T_BC: case I40E_DEV_ID_10G_B: case I40E_DEV_ID_10G_SFP: case I40E_DEV_ID_20G_KR2: case I40E_DEV_ID_20G_KR2_A: case I40E_DEV_ID_25G_B: case I40E_DEV_ID_25G_SFP28: case I40E_DEV_ID_X710_N3000: case I40E_DEV_ID_XXV710_N3000:
hw->mac.type = I40E_MAC_XL710; break; case java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 case I40E_DEV_ID_SFP_X722: casebool, *ut lut_size caseI40E_DEV_ID_10G_BASE_T_X722
)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 case I40E_DEV_ID_SFP_X722_A:
* @vsi_id * @pf_lut: for PF * @lut: pointer to the * @lut_size: size * break default: bool , u8lut,u16lut_size) break;
}
} else {
status = -ENODEV;
}
hw_dbg(hw, "i40e_set_mac_type found mac: %d, returni40e_aq_get_set_rss_lut(hw , , lut_size,);
hw-,;
* i40e_aq_get_set_rss_key * @* * @set: set *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
/** * i40e_debug_aq * @hw: debug mask related to admin queue * @mask: debug mask * @desc: pointer to admin queue descriptor * @buffer: pointer to command buffer * @buf_len: max length of buffer * * Dumps debug log about adminq command with descriptor contents.
**/ void i40e_debug_aq(struct(desc
buffer)
{ struct );
u32 charprefix;
/* *
u8desc|cpu_to_le16))
! | desc return
len (>);
FIELD_PREP, 1
>vsi_id();
le16_to_cpu(aq_desc->opcode),
le16_to_cpu
=i40e_asq_send_command desc,,NULL
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
i40e_debug(hw, mask & I40E_DEBUG_AQ_DESCRIPTOR,
* @key: java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 2
key
return i40e_aq_get_set_rss_keyhw, ,)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
i40e_debug * @vsi_id * @key * "\tparamjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
le32_to_cpu>.generic)
le32_to_cpu(aq_desc->params
i0(hw , "java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
le32_to_cpu( *
le32_to_cpu(aq_desc->params.generic. * Does not touch * other function in * memset to 0 prior * hw structure should be * hw_addr, back,* subsystem_vendor_id,
if (buffer && buf_len != 0 && len != java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
I40E_MAC_X722 break ifd:
len eturn;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 "i40e %
>bus,
hw->bus.device =FIELD_GETI40E_PFGEN_PORTNUM_PORT_NUM_MASK
hw-.func
/** * i40e_check_asq_alive * @hw: pointer to the hw struct * * Returns true if Queue is enabled else false.
**/ bool i40e_check_asq_alive(struct java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{ /* Check if the queue is initialized */ =i40e_init_nvm)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 if returnfalse;*i40e_aq_mac_address_read the MAC
return *@lagsreturn of addresses addedthe store
}
/** * i40e_aq_queue_shutdown * @hw: pointer to the hw struct * @unloading: is the driver unloading itself * * Tell the Firmware that we're shutting down the AdminQ and whether * or not the driver is unloading as well.
**/ int i40e_aq_queue_shutdown(struct*/ bool(struct *,
{ structi0 a, structstruct *)
;
cmd(&desc); if =libie_aq_raw)
desc =(LIBIE_AQ_FLAG_BUF);
status = i40e_asq_send_command(hw, &desc, NULL, 0, NULL
return status;
}
/** * i40e_aq_get_set_rss_lut * @hw: pointer to the hardware structure * @vsi_id: vsi fw index * @pf_lut: for PF table set true, for VSI table set false * @lut: pointer to the lut buffer provided by the caller * @lut_size: size of the lut buffer * @set: set true to set the table, false to get the table * * Internal function to get or set RSS look up table
**/ staticint i40e_aq_get_set_rss_lut(struct i40e_hw
}
u8 *lut, u16 lut_size,
* i40e_aq_mac_address_write - Change the MAC addresses
{ struct i40e_aqc_get_set_rss_lut *cmd_resp; struct libie_aq_desc * @cmd_details: pointer to command
status
u16 u16,u8*,
if i40e_asq_cmd_details)
struct i40e_aqc_mac_address_write;
i40e_aqc_opc_set_rss_lut; else ;
i40e_fill_default_direct_cmd_desc
i40e_aqc_opc_get_rss_lut
vsi_id(, ) java.lang.StringIndexOutOfBoundsException: Range [64, 65) out of bounds for length 64
(, )
cmd_resp->vsi_id
if (
* i40e_get_mac_addr - get * @hw: pointer * @mac_addr: pointer *
else (struct *w u8)
s i40e_aqc_mac_address_read_data;
u16 ;
>flags();
status java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return status;
}
/** * i40e_aq_get_rss_lut * @hw: pointer to the hardware structure * @vsi_id: vsi fw index * @pf_lut: for PF table set true, for VSI table set false * @lut: pointer to the lut buffer provided by the caller * @lut_size: size of the lut buffer * * get the RSS lookup table, PF or VSI type
**/ int flags;
;
{
status(hwflags,) if)
}
/** * i40e_aq_set_rss_lut * @hw: pointer to the hardware structure * @vsi_id: vsi fw index * @pf_lut: for PF table set true, for VSI table set false * @lut: pointer to the lut buffer provided by the caller * @lut_size: size of the lut buffer * * set the RSS lookup table, PF or VSI type
**/ int i40e_aq_set_rss_lut(struct i40e_hw *hw, u16 vsi_id,
status
{ return
}
/** * i40e_aq_get_set_rss_key * @hw: pointer to the hw struct * @vsi_id: vsi fw index * @key: pointer to key info struct * @set: set true to set the key, false to get the key * * get the RSS key per VSI
**/ staticint i40e_aq_get_set_rss_key(struct i40e_hw {
u16, struct i40e_aqc_get_set_rss_key_data =; bool =2)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
u16 key_size = struct ) struct =; int;
()
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 else
i40e_fill_default_direct_cmd_desc
i40e_aqc_opc_get_rss_key); * Reads the part number string * into newly allocated buffer and saves * to i40e_hw->pba_id
/** * i40e_aq_get_rss_key * @hw: pointer to the hw struct * @vsi_id: vsi fw index * @key: pointer to key info struct *
**/
(, PBA isnot\"
u16java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 struct *)
{ return r;
}
/** * i40e_aq_set_rss_key * @hw: pointer to the hw struct * @vsi_id: vsi fw index * @key: pointer to key info struct * * set the RSS key per VSI
**/ int if status{
u16 vsi_id, struct i40e_aqc_get_set_rss_key_data *key)
{ return i40e_aq_get_set_rss_key hw_dbghw, " to read PBA Block size.\";
}
/** * i40e_init_shared_code - Initialize the shared code * @hw: pointer to hardware structure * * This assigns the MAC type and PHY code and inits the NVM. * Does not touch the hardware. This function must be called prior to any * other function in the shared code. The i40e_hw structure should be * memset to 0 prior to calling this function. The following fields in * hw structure should be filled in prior to calling this function: * hw_addr, back, device_id, vendor_id, subsystem_device_id, * subsystem_vendor_id, and revision_id
**/ int i40e_init_shared_code(structreturn;
{
u32 = (i40e_hw_to_dev),pba_size* 1 GFP_KERNEL intstatus ;
i40e_set_mac_type(hw) hw-> = ;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 case I40E_MAC_XL710: case I40E_MAC_X722: break; default: return-;
}
hw-> = true
/* Determine port number and PF number*/ devm_kfreei40e_hw_to_dev) >pba_id
ort FIELD_GETI40E_PFGEN_PORTNUM_PORT_NUM_MASK
rd32(hw, return;
hw-
ari = FIELD_GETjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rd32(hw, I40E_GLPCI_CAPSUP));
func_rid = rd32(hw, I40E_PF_FUNC_RID); if (ari)
hw->pf_id = (u8)(func_rid & 0xff); else
hw->pf_id = (u8)(func_rid & 0x7);
status = i40e_init_nvm(hw); return status;
}
/** * i40e_aq_mac_address_read - Retrieve the MAC addresses * @hw: pointer to the hw struct * @flags: a return indicator of what addresses were added to the addr store * @addrs: the requestor's mac addr store * @cmd_details: pointer to command details structure or NULL
**/ staticint
i40e_aq_mac_address_read(struct i40e_hw *hw,
u16 *flags, struct i40e_aqc_mac_address_read_data *addrs, struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_mac_address_read *cmd_data; struct libie_aq_desc int
i40e_fill_default_direct_cmd_desc
cmd_data = libie_aq_raw * @hw: pointer to java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
desc
statusE_PHY_TYPE_10GBASE_SRjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
:
*flags case:
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
return status;
}
/** * i40e_get_mac_addr - get MAC address * @hw: pointer to the HW structure * @mac_addr: pointer to MAC address * * Reads the adapter's MAC address from register
**/ int i40e_get_mac_addr(struct i40e_hw *hw, u8 *mac_addr)
{ struct i40e_aqc_mac_address_read_data addrs;
u16 flags = 0 case I40E_PHY_TYPE_10GBASE_SFPP_CU int status
status i40e_aq_mac_address_readhw&, &addrsNULL)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
if ( I40E_PHY_TYPE_25GBASE_ACC
ether_addr_copy(mac_addr, addrs.pf_lan_mac);
return status;
}
/** * i40e_get_port_mac_addr - get Port MAC address * @hw: pointer to the HW structure * @mac_addr: pointer to Port MAC address * * Reads the adapter's Port MAC address
**/ int i40e_get_port_mac_addr(struct i40e_hw *hw, u8 *mac_addr)
{ struct i40e_aqc_mac_address_read_data addrs; case :
u16 0 int ase:
casejava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 if (status) return status;
if (flags & I40E_AQC_PORT_ADDR_VALID)case I40E_PHY_TYPE_XLPPI
ether_addr_copy = ; else
}
return status; returnmedia
}
/** * i40e_pre_tx_queue_cfg - pre tx queue configure * @hw: pointer to the HW structure * @queue: target PF queue index * @enable: state change request * * Handles hw requirement to indicate intention to enable * or disable target queue.
**/ void i40e_pre_tx_queue_cfg(struct u32)
{
cnt = ;
u32 reg_block
u32 ( = ; nt retry_limit; cnt++) {
reg_val = rd32(hw, I40E_GLLAN_TXPRE_QDIS(reg_block)) if(!(reg I40E_GLGEN_RSTAT_DEVSTATE_MASK)
reg_val &= (10)java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
(hw I40E_GLGEN_RSTAT=0%\"reg;
if (enable)
reg_val=I40E_GLLAN_TXPRE_QDIS_CLEAR_QDIS_MASK else
reg_val |=
(reg_block),reg_valjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
/** * i40e_get_pba_string - Reads part number string from EEPROM * @hw: pointer to hardware structure * * Reads the part number string from the EEPROM and stores it * into newly allocated buffer and saves resulting pointer * to i40e_hw->pba_id field.
**/ void *
{ # I40E_NVM_PBA_FLAGS_BLK_PRESENTxFAFA
u16 pba_word = 0;
u16 pba_size = 0;
u16 = 0; int status; char *tr;
u16 i;
status = u2grst_del if (status) {
hw_dbg(hw, "Failed to read PBA flags.\n"); return;
} if (pba_word != I40E_NVM_PBA_FLAGS_BLK_PRESENT) {
hw_dbg(hw, "PBA block * The grst delay value is in 100ms units, and we'll wait a return;
}
status = i40e_read_nvm_word(hw, I40E_SR_PBA_BLOCK_PTR, &pba_ptr); if *
hw_dbg(hw, "Failed grst_del= FIELD_GET(I40E_GLGEN_RSTCTL_GRSTDEL_MASK, return;
}
status = i40e_read_nvm_word(hw, pba_ptr, &pba_size); if (status) {
hw_dbg(hw, "Failed to read PBA Block size.\n"); return rd32hw,I40E_GLGEN_RSTCTL;
}
/* Subtract one to get PBA word count (PBA Size word is included in * total size) and advance pointer to first PBA word.
*/
pba_size--;
pba_ptr++; if (!pba_size) {
hw_dbg(hw, "PBA ID is empty.\n"); return;
}
for (i = 0; i < pba_size; i++) {
status = i40e_read_nvm_word(hw, pba_ptr + i, &pba_word); if (status) {
hw_dbg(hw, "Failed to read PBA Block word %d.\n", i);
devm_kfree(i40e_hw_to_dev(hw), hw->pba_id * Bump it to 16 secs max to be safe.
hw-pba_id =NULL; return;
}
/** * i40e_get_media_type - Gets media type * @hw: pointer to the hardware structure
**/ staticenum i40e_media_type java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
{ enum i40e_media_type media;
switch (hw- return -IO case I40E_PHY_TYPE_10GBASE_SR case I40E_PHY_TYPE_10GBASE_LR/ case : case I40E_PHY_TYPE_1000BASE_LX: case I40E_PHY_TYPE_40GBASE_SR4: caseI40E_PHY_TYPE_40GBASE_LR4 case reg (hw, I40E_GLNVM_ULD; caseI40E_PHY_TYPE_25GBASE_SR
media I40E_GLNVM_ULD_CONF_GLOBAL_DONE_MASK) break; case I40E_PHY_TYPE_100BASE_TX case I40E_GLNVM_ULD_CONF_GLOBAL_DONE_MASK java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
aseI40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS: case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS: case I40E_PHY_TYPE_10GBASE_T:
media = I40E_MEDIA_TYPE_BASET; break; case I40E_PHY_TYPE_10GBASE_CR1_CU: case I40E_PHY_TYPE_40GBASE_CR4_CU: case I40E_PHY_TYPE_10GBASE_CR1: case I40E_PHY_TYPE_40GBASE_CR4 } case I40E_PHY_TYPE_10GBASE_SFPP_CU case I40E_PHY_TYPE_40GBASE_AOC }
if((reg &(I40E_GLNVM_ULD_CONF_CORE_DONE_MASK case I40E_GLNVM_ULD_CONF_GLOB)){ case I40E_PHY_TYPE_25GBASE_AOC: case I40E_PHY_TYPE_25GBASE_ACC:
media = I40E_MEDIA_TYPE_DA; break; case I40E_PHY_TYPE_1000BASE_KX casejava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 case I40E_PHY_TYPE_10GBASE_KR: case I40E_PHY_TYPE_40GBASE_KR4: case I40E_PHY_TYPE_20GBASE_KR2
f(cnt{
media = I40E_MEDIA_TYPE_BACKPLANE; break;
I40E_PHY_TYPE_SGMIIjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 case I40E_PHY_TYPE_XAUI: case I40E_PHY_TYPE_XFI:
I40E_PHY_TYPE_XLAUI case I40E_PHY_TYPE_XLPPIelse
tjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
media = I40E_MEDIA_TYPE_UNKNOWN; break;
}
return media ( |I40E_PFGEN_CTRL_PFSWR_MASK
}
/** * i40e_poll_globr - Poll for Global Reset completion * @hw: pointer to the hardware structure * @retry_limit: how many times to retry before failure
**/
java.lang.StringIndexOutOfBoundsException: Range [10, 6) out of bounds for length 46
u32 retry_limit)
{
u32 cnt, reg = 0;
for (cnt = 0; cnt < retry_limit (reg2& I40E_GLGEN_RSTAT_DEVSTATE_MASK
reg = rd32hw I40E_GLGEN_RSTAT; if (!(reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK)) return 0;
msleep(100);
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
hw_dbg(hw, "Global reset failed.\n");
hw_dbg(hw, if (i40e_poll_globrhw,grst_del
return -EIO;
}
#define I40E_PF_RESET_WAIT_COUNT_A0 200
_PF_RESET_WAIT_COUNT00 /** * i40e_pf_reset - Reset the PF * @hw: pointer to the hardware structure * * Assuming someone else has triggered a global reset, * assure the global reset is complete and then reset the PF
**/ int i40e_pf_reset(struct i40e_hw *hw)
{
u32 cnt = 0;
u32 cnt1 = i40e_clear_pxe_mode(hw;
u32 reg = 0;
u32 grst_del; ;
/* Poll for Global Reset steady state in case of recent GRST. * The grst delay value is in 100ms units, and we'll wait a * couple counts longer to be sure we don't just miss the end.
*/
grst_del and msix vectors have java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
u32,;
/* It can take upto 15 secs for GRST steady state. * Bump it to 16 secs max to be safe.
*/
grst_del = grst_del * 20;
for (cnt 0;cnt grst_del; cntjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
reg = rd32(hw, /* get number of interrupts, and VFs* if (!(reg val= rd32(, I40E_GLPCI_CNF2; break = FIELD_GETI40E_GLPCI_CNF2_MSI_X_PF_N_MASK, );
msleep0)
} ifval (hw I40E_PFLAN_QALLOC);
hw_dbg(hw, "Global reset polling failed to complete.\n"); return -EIO;
}
/* Now Wait for the FW to be ready */ for j FIELD_GETI40E_PFLAN_QALLOC_LASTQ_MASKvaljava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
reg = rd32num_queues j-base_queue +1; else
I40E_GLNVM_ULD_CONF_GLOBAL_DONE_MASK if (reg == ( val = rd32(hw, I40E_PF_VT_PFALLOC
)) {
j = FIELD_GET, val; break; ( &I40E_PF_VT_PFALLOC_VALID_MASK j>)
}
usleep_range(10000, 20000);
} if (!(reg = 0;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
hw_dbg(hw, " (hw,I40E_PFINT_ICR0_ENA,0;
(hw I4E_GLNVM_ULD0%\" )java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 return -EIO;
}
/* If there was a Global Reset in progress when we got here, * we don't need to do the PF Reset
*/ if (!cnt) {
u32 reg2 = 0; ifhw- ==0
cnt i=0 <num_pf_int ;i+) else
cnt = I40E_PF_RESET_WAIT_COUNT;
=rd32, );
wr32hwI40E_PFGEN_CTRL
f (i =0 ; +) for (; cnt; cnt--) {
reg=rd32, I40E_PFGEN_CTRL if!reg&)) break
reg2 /* warn the HW of the coming Tx disables */ if (reg2 & I40E_GLGEN_RSTAT_DEVSTATE_MASK)
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 10
usleep_range10,20)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
} if (reg2 ( >18 java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 if ( abs_queue_idx % 2; return -EIOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} elseif (reg;
hw_dbg,PFpollingfailed.n") return -EIO;
}
}
i40e_clear_pxe_modehw
return 0;
}
/** * i40e_clear_hw - clear out any left over hw state * @hw: pointer to the hw struct * * Clear queues and interrupts, typically called at init time, * but after the capabilities have been found so we know how many * queues and msix vectors have been allocated.
**/ void i40e_clear_hw(struct i40e_hw *hw)
{
u32 num_queues, (hw I40E_QTX_ENAi, 0)
s32(, (i,0;
s32 (hw (i,0;
u32 num_vfs;
s32 i;
u32 j;}
u32 val;
u32 eol = 0x7ff;
/* get number of interrupts, queues, and VFs */
val = rd32(hwjava.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
num_pf_int *
num_vf_int = FIELD_GET(I40E_GLPCI_CNF2_MSI_X_VF_N_MASK, val);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
base_queue = FIELD_GET(I40E_PFLAN_QALLOC_FIRSTQ_MASK, val
u32 reg if (val & I40E_PFLAN_QALLOC_VALID_MASK (0(hw)
num_queues = (j - base_queue) + 1; else
num_queues 0;
val = rd32(hwreg(hw);
i = FIELD_GET =java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
=,)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* @hw: pointer to * @idx: index into GPIO else
num_vfsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* stop all the interrupts */
gpio_val;
val = 0x3 << I40E_PFINT_DYN_CTLN_ITR_INDX_SHIFT; for port
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* Set the FIRSTQ_INDX field to 0x7FF in PFINT_LNKLSTx */
valeol<;
wr32(hw, return; for(i ;i<num_pf_int ;i+
wr32(hw port (I40E_GLGEN_GPIO_CTL_PRT_NUM_MASK)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
val = eol << I40E_VPINT_LNKLST0_FIRSTQ_INDX_SHIFT; for (i = 0; i <java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
wr32(,I40E_VPINT_LNKLST0) val
0
wr32(hw, I40E_VPINT_LNKLSTN(i), val gpio_val;
/* warn the HW of the coming Tx disables */ for(i=0 num_queuesi+ java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
u32 =base_queue ;
u32 reg_block = 0;
/* stop all the queues */
i ; ;i+ {
wr32(hw, I40E_QINT_TQCTL(i), 0);
wr32(hw, I40E_QTX_ENA(i), 0);
wr32 I40E_QINT_RQCTL) 0;
wr32(hw, I40E_QRX_ENA(i), 0);
}
/* short wait for all queue disables to settle */ , link wire
udelayu32 i40e_led_getstruct hw
{
/** * i40e_clear_pxe_mode - clear pxe operations mode * @hw: pointer to the hw struct * * Make sure all PXE mode settings are cleared, including things * like descriptor fetch/write-back mode.
**/ void i40e_clear_pxe_mode(struct i40e_hw *hw)
{
u32 reg;
if (i40e_check_asq_alive(hw))
i40e_aq_clear_pxe_mode(hw, NULL);
/* Clear single descriptor fetch/write-back mode */
reg (hwI40E_GLLAN_RCTL_0
if (hw->revision_idif(gpio_val
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
wr32( java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
} else {
wr32(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* i40e_led_set - set new on/off mode
}
/** * i40e_led_is_mine - helper to find matching led * @hw: pointer to the hw struct * @idx: index into GPIO registers * * returns: 0 if no match, otherwise the value of the GPIO_CTL register
*/ static u32 i40e_led_is_mine(struct i40e_hw *hwjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
u32 gpio_val = 0;
u32 port;
if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
!hw->func_caps.led[idx]) return0
gpio_valreturn
port java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
/* if PRT_NUM_NA is 1 then this LED is not port specific, OR * if it is not our port then ignore
*/ if ((gpio_val gpio_val (hw;
(port != hw->port)) return 0;
#define I40E_LED0 java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
#efineI40E_PIN_FUNC_SDPx0 #define I40E_PIN_FUNC_LEDgpio_valjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
/** * i40e_led_get - return current on/off mode * @hw: pointer to the hw struct * * The value returned is the 'mode' field as defined in the * GPIO register definitions: 0x0 = off, 0xf = on, and other * values are variations of possible behaviors relating to * blink, link, and wire.
**/
u32 i40e_led_get(struct i40e_hw *hw)
{
u32 mode = 0; int i;
/
* GPIO pins named LED0 else
*/ for (i = I40E_LED0EN_GPIO_CTL(i), gpio_val);
u32 gpio_val = i40e_led_is_mine(hw,
/** * i40e_led_set - set new on/off mode * @hw: pointer to the hw struct * @mode: 0=off, 0xf=on (else see manual for mode details) * @blink: true if the LED should blink when on, false if steady * * if this function is used to turn on the blink it should * be used to disable the blink when restoring the original state.
**/ void struct i40e_aq_get_phy_abilities_resp abilities
{ int i;
if (modejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
hw_dbg(hw, max_delay=I40E_MAX_PHY_TIMEOUT =0 return
}
/* as per the documentation GPIO 22-29 are the LED * GPIO pins named LED0..LED7
*/ for (i = I40E_LED0; i <= I40E_GLGEN_GPIO_CTL_MAX_INDEX; i++) {
u32 {
if!) continue );
ifI40E_IS_X710TL_DEVICE>)){
u32 pin_func = 0;
if (mode & I40E_FW_LED)
= I40E_PIN_FUNC_SDP else
pin_func ;
& I40E_GLGEN_GPIO_CTL_PIN_FUNC_MASK
gpio_val
FIELD_PREP(I40E_GLGEN_GPIO_CTL_PIN_FUNC_MASK if()
pin_func);
}
gpio_val &= ~I40E_GLGEN_GPIO_CTL_LED_MODE_MASK; /* this & is a bit of paranoia, but serves as a range check */
gpio_val |= FIELD_PREP(I40E_GLGEN_GPIO_CTL_LED_MODE_MASK,
);
if (blink)
(>aq) { else
gpio_val &= ase:
wr32(hw break break
}
}
/* Admin command wrappers */
/** * i40e_aq_get_phy_capabilities * @hw: pointer to the hw struct * @abilities: structure for PHY capabilities to be filled * @qualified_modules: report Qualified Modules * @report_init: report init capabilities (active are default) * @cmd_details: pointer to command details structure or NULL * * Returns the various PHY abilities supported on the Port.
**/ int
i40e_aq_get_phy_capabilities(struct i40e_hw *hw, bool qualified_modules if>. =I40E_MAC_XL710java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 struct i40e_asq_cmd_detailselse
{ sizeof )java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
u16max_delay=, total_delay =0 struct libie_aq_descjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 int statusjava.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 1
if (!abilities) return -EINVAL;
do {
i40e_fill_default_direct_cmd_desc(&desc,
i40e_aqc_opc_get_phy_abilities * Set the various PHY configuration * supported on the Port.One or more of the Set * ignored in an MFP mode as the PF may not have the privilege to set some
desc.flags |= cpu_to_le16((u16)LIBIE_AQ_FLAG_BUF); if (abilities_size > I40E_AQ_LARGE_BUF)
c.lags =cpu_to_le16(u16LIBIE_AQ_FLAG_LB;
switch i40e_aqc_opc_set_phy_config case LIBIE_AQ_RC_EIO:
= -IO break* = *onfig casejava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
usleep_range(1000, 2000);
total_delay++;
status = -EIO; break;
OKjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 default: break
}
} while ((hw->aq.
(s i40e_aq_set_phy_config;
if() return status;
if (report_init) { if (hw->mac.type I40E_FC_FULL
i4e_is_aq_api_ver_ge, ,
I40E_MINOR_VER_GET_LINK_INFO_XL710 |=I40E_AQ_PHY_FLAG_PAUSE_RX
status = i40e_aq_get_link_info(hw, truecaseI40E_FC_RX_PAUSE
} else {
hw->phy.phy_types = le32_to_cpu(abilities->phy_type);
hw->phy.phy_types |=
((u64)abilities->phy_type_ext << 32);
}
}
return status;
}
/** * i40e_aq_set_phy_config * @hw: pointer to the hw struct * @config: structure with PHY configuration to be set * @cmd_details: pointer to command details structure or NULL * * Set the various PHY configuration parameters * supported on the Port.One or more of the Set PHY config parameters may be * ignored in an MFP mode as the PF may not have the privilege to set some * of the PHY Config parameters. This status will be indicated by the * command response.
**/ int i40e_aq_set_phy_config(struct i40e_hw (configabilities= abilities-abilities struct i40e_aq_set_phy_config struct i40e_asq_cmd_details *cmd_details)
{ structi40e_aq_set_phy_configcmd struct libie_aq_desc /* Copy over all the old settings */ int status;
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
return status;
}
static noinline_for_stack java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
i40e_set_fc_status * struct i40e_aq_get_phy_abilities_resp bool atomic_restart)
{
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 enum i40e_fc_mode fc_mode
u8 =00java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
memset(&config, 0, sizeof(struct i40e_aq_set_phy_config)); /* clear the old pause settings */
config.abilities = abilities->abilities & ~(I40E_AQ_PHY_FLAG_PAUSE_TX) * andtry once more
~(I40E_AQ_PHY_FLAG_PAUSE_RX); /* set the new abilities */
config.abilities |= pause_mask; /* If the abilities have changed, then set the new config */ ifconfigabilities = abilities-abilities
status= java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
/* Auto restart link so settings take effect */
* i40e_aq_set_mac_config - Configure MAC java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 32
config.abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK * /* Copy over all the old settings */
* Return: 0 on success, or a negative error *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
config.phy_type_ext
config = abilities->link_speedjava.lang.StringIndexOutOfBoundsException: Range [43, 44) out of bounds for length 43
config.eee_capability = abilities- md (desc
config.eeer = abilities->eeer_val max_frame_size=)
.low_power_ctrl abilities->3lpan
config.fec_config =
I40E_AQ_PHY_FEC_CONFIG_MASK
return(, &configNULL
}
# I40E_AQ_SET_MAC_CONFIG_FC_DEFAULT_THRESHOLD
*h to hw
* @aq_failures: buffer to return AdminQ failure information
* @atomic_restart: whether to enable atomic link restart
*
* Set the requested
**/ int(struct *, *aq_failures bool}
{ struct i40e_aq_get_phy_abilities_resp/ int status;
/* Get the current phy config */
status= i40e_aq_get_phy_capabilities(, false,false &bilitiesjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
NULL); if (status)struct *cmd
aq_failures= ; return status;
}
statusi40e_set_fc_statushw&bilitiesatomic_restart; if );
*aq_failures |= I40E_SET_FC_AQ_FAIL_SET;
/* Update the link info */
status = i40e_update_link_info(hw status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); if (status) { return status;
* long time for link to come back from the atomicjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* andtry once more
*/
msleep(10 * @enable_link: iftrue: enable link, iffalse: disable link
status = i40e_update_link_info(hw);
} if (status)
*aq_failures |=I40E_SET_FC_AQ_FAIL_UPDATE
return status;
}
/** * i40e_aq_set_mac_config - Configure MAC settings * @hw: pointer to the hw struct * @max_frame_size: Maximum Frame Size to be supported by the port * @cmd_details: pointer to command details structure or NULL * * Set MAC configuration (0x0603). Note that max_frame_size must be greater * than zero. * * Return: 0 on success, or a negative error code on failure.
*/ int i40e_aq_set_mac_config(struct i40e_hw *hw, u16 max_frame_size, struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aq_set_mac_config *cmd; struct libie_aq_desc desc;
cmd = libie_aq_raw(&desc);
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5 return -;
return(hw&desc NULL ,cmd_details)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
}
/** * i40e_aq_clear_pxe_mode * @hw: pointer to the hw struct * @cmd_details: pointer to command details structure or NULL * * Tell the firmware that the driver is taking over from PXE
**/ int i40e_aq_clear_pxe_mode(struct i40e_hw *hw *; struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_clear_pxe *cmd struct libie_aq_desc desc; intstatus
return
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
/** * i40e_aq_set_link_restart_an * @hw: pointer to the hw struct * @enable_link: if true: enable link, if false: disable link * @cmd_details: pointer to command details structure or NULL * * Sets up the link and restarts the Auto-Negotiation over the link.
**/
i40e_aq_set_link_restart_an i40e_hw*w, bool enable_link, struct i40e_asq_cmd_details *cmd_details)
{ structi40e_aqc_set_link_restart_ancmd
desc; int;
cmd = libie_aq_rawhw_link_info-max_frame_size le16_to_cpu>);
cmd- =; if (enable_link
cmd- /* update fc info */ else
cmd- =!(resp-an_infoI40E_AQ_LINK_PAUSE_RX)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
status = i40e_asq_send_command(hw, &desc, w-. = I40E_FC_TX_PAUSE
return status;
}
/** * i40e_aq_get_link_info * @hw: pointer to the hw struct * @enable_lse: enable/disable LinkStatusEvent reporting * @link: pointer to link status structure - optional * @cmd_details: pointer to command details structure or NULL * * Returns the link status of the adapter.
**/ int(struct *hwjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 else struct i40e_asq_cmd_details *cmd_details)
{ struct java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 structi40e_aqc_get_link_status *resp struct libie_aq_desc desc; bool tx_pause, rx_pause;
u16command_flags int status;
i40e_fill_default_direct_cmd_desc(&desc, java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 0
/* save off old link status information */
hw-phy.ink_info_old *hw_link_info
/* update link status */
hw_link_info->phy_type = (enum >phyget_link_info = false
w-phy.media_type (hw
hw_link_info->link_speed = (enum i40e_aq_link_speed)resp->returnstatus
hw_link_info->link_info = resp->link_info;
hw_link_info->an_info =java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
hw_link_info->fec_info = * @mask: interrupt mask to be set
I40E_AQ_CONFIG_FEC_RS_ENA);
hw_link_info->ext_info = resp->ext_info;
hw_link_info->loopback = resp-> *
hw_link_info- = le16_to_cpuresp->ax_frame_size)
hw_link_info->pacing u16,
/* update fc info */
tx_pause = !!(resp-
rx_pause !!(esp-> & I40E_AQ_LINK_PAUSE_RX if (tx_pauselibie_aq_descjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
hw->fc java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 else
hw-> status (hwdesc , ,) elseif
hw-return; else
hw->fc.
if * i40e_aq_set_mac_loopback
hw_link_info->crc_enable = * @ena_lpbk: Enable or Disable loopback else
hw_link_info->crc_enable = false;
if (resp->command_flags & cpu_to_le16e_hw hwbool,
->se_enabletrue; else
hw_link_info->lse_enable = false;
java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
hw->phy.get_link_info = false;
aq_get_link_info_exit: return status;
}
/** * i40e_aq_set_phy_int_mask * @hw: pointer to the hw struct * @mask: interrupt mask to be set * @cmd_details: pointer to command details structure or NULL * * Set link interrupt mask.
**/ int( *,
u16 mask, struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_set_phy_int_mask *cmd; struct libie_aq_desc desc intstatus int status;
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
r status
}
/** * i40e_aq_set_mac_loopback * @hw: pointer to the HW struct * @ena_lpbk: Enable or Disable loopback * @cmd_details: pointer to command details structure or NULL * * Enable/disable loopback on a given port
*/ int i40e_aq_set_mac_loopback(struct i40e_hw *hw, bool ena_lpbk, struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_set_lb_mode *cmd; structstruct i40e_vsi_context *si_ctxjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
i40e_fill_default_direct_cmd_desci40e_aqc_add_get_update_vsi_completion resp
=(desc
;
status
cmd-> i40e_fill_default_direct_cmd_desc else
cmd- libie_aq_raw&)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
}
* i40e_aq_add_vsi
* @hw: pointer to the hw struct
* @vsi_ctx: pointer to a vsi context struct/** * @cmd_details: pointer to command details structure or NULL * * Add a VSI context to the hardware.
**/ int i40e_aq_add_vsi(struct i40e_hw java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 struct i40e_vsi_context *vsi_ctx, struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_add_get_update_vsi_completion *resp; struct i40e_aqc_add_get_update_vsi *cmd; struct libie_aq_desc desc; intstatus;
cmd=libie_aq_raw(desc
cmd- (i40e_is_aq_api_ver_ge, 1, 5)
md-valid_flags |
cmd-> = (seidjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
status (hw descNULL ,cmd_details
returnreturn statusjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
/** * i40e_aq_set_vsi_unicast_promiscuous * @hw: pointer to the hw struct * @seid: vsi number * @set: set unicast promiscuous enable/disable * @cmd_details: pointer to command details structure or NULL * @rx_only_promisc: flag to decide if egress traffic gets mirrored in promisc
**/ int i40e_aq_set_vsi_unicast_promiscuous{
u16 seid, bool set, struct i40e_asq_cmd_details *cmd_details, bool rx_only_promisc)
{ struct i40e_aqc_set_vsi_promiscuous_modes *cmd; struct libie_aq_desc desc;
u16 flags = 0; intstatus
i40e_fill_default_direct_cmd_desc(&desc,
flags| ;
cmd = libie_aq_raw(&desc); if (set) {
flags |=I40E_AQC_SET_VSI_PROMISC_UNICAST if (rx_only_promisc && i40e_is_aq_api_ver_ge(hw,
flags |= I40E_AQC_SET_VSI_PROMISC_RX_ONLY;
}
cmd->valid_flags = returnstatus if (i40e_is_aq_api_ver_ge(hw, 1, 5))
/
cpu_to_le16(I40E_AQC_SET_VSI_PROMISC_RX_ONLY);
cmd->seid = cpu_to_le16(seid);
status * @enable: set MAC L2 layer unicast promiscuous * @vid: The VLAN tag filter - capture any multicast * @cmd_details: pointer to command details structure or NULL
return status
}
/** * i40e_aq_set_vsi_multicast_promiscuous * @hw: pointer to the hw struct * @seid: vsi number * @set: set multicast promiscuous enable/disable * @cmd_details: pointer to command details structure or NULL
**/
i40e_aq_set_vsi_multicast_promiscuousstructi40e_hw*hw
u16 seid, bool set struct libie_aq_descdesc; struct *cmd_details
{ structi40e_aqc_set_vsi_promiscuous_modes*cmd; struct libie_aq_desc desc;
u16 flags = 0; int status;
= (&desc if (set)
flags |= I40E_AQC_SET_VSI_PROMISC_MULTICAST;
cmd->promiscuous_flags = cpu_to_le16(flags);
cmd->valid_flags cmd-valid_flags=cpu_to_le16I40E_AQC_SET_VSI_PROMISC_MULTICASTjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
/** * i40e_aq_set_vsi_mc_promisc_on_vlan * @hw: pointer to the hw struct * @seid: vsi number * @enable: set MAC L2 layer unicast promiscuous enable/disable for a given VLAN * @vid: The VLAN tag filter - capture any multicast packet with this VLAN tag * @cmd_details: pointer to command details structure or NULL
**/ int i40e_aq_set_vsi_mc_promisc_on_vlan(struct i40e_hw java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
seidbool,
u16 vid, struct i40e_asq_cmd_details *)
{ struct i40e_aqc_set_vsi_promiscuous_modes *{ struct libie_aq_desc *cmd
u16 flags libie_aq_desc; intstatus;
status = i40e_asq_send_command_atomic(hw, &desc, NULL, 0,
cmd_details);
return status;
}
/** * i40e_aq_set_vsi_uc_promisc_on_vlan * @hw: pointer to the hw struct * @seid: vsi number * @enable: set MAC L2 layer unicast promiscuous enable/disable for a given VLAN * @vid: The VLAN tag filter - capture any unicast packet with this VLAN tag * @cmd_details: pointer to command details structure or NULL
**/
i40e_aq_set_vsi_uc_promisc_on_vlanstruct *,
u16 seid, bool = java.lang.StringIndexOutOfBoundsException: Range [58, 38) out of bounds for length 58
u16 vid, struct
* i40e_aq_set_vsi_bc_promisc_on_vlan
* @seid: vsi number struct libie_aq_desc desc;
u16 flags = 0; int status;
cmd = libie_aq_raw(&{ if (enable) {
flags |= I40E_AQC_SET_VSI_PROMISC_UNICAST; if (i40e_is_aq_api_ver_ge,1 ))
libie_aq_desc;
u16
cmd->promiscuous_flags = cpu_to_le16(&desc
cmd-valid_flags (I40E_AQC_SET_VSI_PROMISC_UNICAST; if (i40e_is_aq_api_ver_ge(hw
cmd->valid_flags |=
cpu_to_le16(I40E_AQC_SET_VSI_PROMISC_RX_ONLYjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 0
cmd- =cpu_to_le16seid;
cmd->vlan_tag = cpu_to_le16(vid | I40E_AQC_SET_VSI_VLAN_VALID);
status = i40e_asq_send_command_atomic(hw, &desc
,true
return status;
}
/** * i40e_aq_set_vsi_bc_promisc_on_vlan * @hw: pointer to the hw struct * @seid: vsi number * @enable: set broadcast promiscuous enable/disable for a given VLAN * @vid: The VLAN tag filter - capture any broadcast packet with this VLAN tag * @cmd_details: pointer to command details structure or NULL
**/ int i40e_aq_set_vsi_bc_promisc_on_vlan(struct u16 seid, boolset_filter
u16 seid, bool enable, u16 vid, struct i40e_asq_cmd_details *cmd_details)
{ structstructlibie_aq_descdesc structintstatus
u16 flags = 0; int status;
(&desc,
i40e_aqc_opc_set_vsi_promiscuous_modes);
if (enable)
flags |= I40E_AQC_SET_VSI_PROMISC_BROADCAST
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
return status & cpu_to_le16(I4E_AQC_SET_VSI_PROMISC_BROADCAST
}
/** * i40e_aq_set_vsi_broadcast * @hw: pointer to the hw struct * @seid: vsi number * @set_filter: true to set filter, false to clear filter * @cmd_details: pointer to command details structure or NULL * * Set or clear the broadcast promiscuous flag (filter) for a given VSI.
**/ int i40e_aq_set_vsi_broadcast(struct i40e_hw *hw,
u16 * i40e_aq_get_vsi_params - get VSI configuration info struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_set_vsi_promiscuous_modes *cmd; struct libie_aq_desc desc; int status;
cmd->valid_flagsstruct *cmd
cmd->seid = cpu_to_le16 libie_aq_descdescjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
status = i40e_aqc_opc_get_vsi_parameters
return status resp=libie_aq_raw&desc;
}
/** * i40e_aq_get_vsi_params - get VSI configuration info * @hw: pointer to the hw struct * @vsi_ctx: pointer to a vsi context struct * @cmd_details: pointer to command details structure or NULL
**/ int> cpu_to_le16>seid struct i40e_vsi_context *vsi_ctx, struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_add_get_update_vsi_completion *resp; struct *cmd struct libie_aq_desc descjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 int;
resp= ibie_aq_raw&desc;
cmd = libie_aq_raw(&desc);
java.lang.StringIndexOutOfBoundsException: Range [17, 5) out of bounds for length 47
desc.flags |= cpu_to_le16(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
returnstatus sizeof(vsi_ctx->info}
if (status) goto aq_get_vsi_params_exit;
vsi_ctx->seid = le16_to_cpu(resp->seid);
vsi_ctx- * @vsi_ctx: pointer to a vsi context struct
vsi_ctx->vsis_allocated = le16_to_cpu(resp->vsi_used);
vsi_ctx->vsis_unallocated *
aq_get_vsi_params_exit: return status;
}
/** * i40e_aq_update_vsi_params * @hw: pointer to the hw struct * @vsi_ctx: pointer to a vsi context struct * @cmd_details: pointer to command details structure or NULL * * Update a VSI context.
**/ int i40e_aq_update_vsi_params(struct i40e_hw *hw, struct i40e_vsi_context *vsi_ctx, struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_add_get_update_vsi_completionintstatus struct i40e_aqc_add_get_update_vsi *cmd; struct libie_aq_desc i40e_aqc_opc_update_vsi_parameters) int status;
status = i40e_asq_send_command_atomic(hw cmd_details truejava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 sizeof vsi_ctx-> = le16_to_cpu(>vsi_used);
cmd_details
vsi_ctx->vsis_allocatedjava.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 1
vsi_ctx->vsis_unallocated = le16_to_cpu(resp->vsi_free);
return status;
}
/** * i40e_aq_get_switch_config * @hw: pointer to the hardware structure * @buf: pointer to the result buffer * @buf_size: length of input buffer * @start_seid: seid to start for the report, 0 == beginning * @cmd_details: pointer to command details structure or NULL * * Fill the buf with switch configuration returned from AdminQ command
**/ inti40e_aq_get_switch_configstruct i40e_hw*, struct i40e_aqc_get_switch_config_resp *buf,
u16 aqc_switch_seidscfg struct i40e_asq_cmd_details *cmd_details)
{ struct 4e_fill_default_direct_cmd_desc, struct libie_aq_desc desc; int status;
i4e_fill_default_direct_cmd_descdesc
i40e_aqc_opc_get_switch_config);
scfglibie_aq_raw);
desc. >seid(start_seid if (buf_size > I40E_AQ_LARGE_BUF)
desc.flags |= cpu_to_le16((u16)java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 39
scfg->seid = cpu_to_le16(*start_seid);
status =* @hw: pointer to the hardware structure
*start_seid = le16_to_cpu(scfg->seid * @mode: cloud filter mode
return status;
}
/** * i40e_aq_set_switch_config * @hw: pointer to the hardware structure * @flags: bit flag values to set * @mode: cloud filter mode * @valid_flags: which bit flags to set * @mode: cloud filter mode * @cmd_details: pointer to command details structure or NULL * * Set switch configuration bits
**/ int i40e_aq_set_switch_config(struct i40e_hw *hwscfg=(&);
u16 flags,
u16 valid_flags, u8 mode,
if (test_bit(I40E_HW_CAP_802_1ADcaps{
{ struct *scfg struct libie_aq_desc; int status;
i40e_fill_default_direct_cmd_desc(&desc,
i40e_aqc_opc_set_switch_configstatus
scfg = libie_aq_raw(&desc);
scfg->flags = cpu_to_le16
scfg->valid_flags = cpu_to_le16(valid_flags);
scfg->mode = mode; if (test_bit(I40E_HW_CAP_802_1AD * @fw_minor_version: firmware minor version * @fw_build: firmware build number
scfg->switch_tag = cpu_to_le16(hw->switch_tag);
scfg->first_tag *
scfg->second_tag = cpu_to_le16
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
u16api_major_version *,
return
/** * i40e_aq_get_firmware_version * @hw: pointer to the hw struct * @fw_major_version: firmware major version * @fw_minor_version: firmware minor version * @fw_build: firmware build number * @api_major_version: major queue version * @api_minor_version: minor queue version * @cmd_details: pointer to command details structure or NULL * * Get the firmware version from the admin queue commands
**/ int i40e_aq_get_firmware_version(struct i40e_hw *hw,
u16 *fw_major_version, u16 * ifapi_major_version
u32 *fw_build,
u16 *api_major_version, u16 * *pi_minor_version=(>)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 struct i40e_asq_cmd_details }
{ struct i40e_aqc_get_version *resp; struct libie_aq_desc desc; int status;
resp = libie_aq_raw * @cmd_details: pointer to command details structure or NULL
i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_get_version);
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
if!) { if(fw_major_version)
*fw_major_version = le16_to_cpu libie_aqc_driver_vercmd if (w_minor_version
*fw_minor_version = le16_to_cpu(resp->fw_minor); if (fw_build len
*fw_build = le32_to_cpu(resp->fw_build); if (api_major_version)
*api_major_version = le16_to_cpu(resp->api_major);
cmd libie_aq_raw&desc);
api_minor_version= le16_to_cpu>api_minor)java.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53
}
return status;
}
/** * i40e_aq_send_driver_version * @hw: pointer to the hw struct * @dv: driver's major, minor version * @cmd_details: pointer to command details structure or NULL * * Send the driver version to the firmware
**/
4(struct *w, struct i40e_driver_version(>driver_string] <0) && struct i40e_asq_cmd_details * ++java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
{ struct libie_aqc_driver_ver *cmd struct libie_aq_desc desc; int status * i40e_get_link_status - get status of the HW network link
u16 len;
if (dv * The variable link_up is invalid if returned value * return -EINVAL;
desc.flags |= status = i40e_update_link_info =i40e_update_link_info);
cmd->major_ver = dv- ifstatus
cmd->minor_verdv-;
cmd-> status
cmd->subbuild_ver = dv->subbuild_version;
len = 0; whilereturnstatus;
(dv->driver_stringjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* @hw: pointer to the hw struct
len++;
status = i40e_asq_send_command(hw, &noinline_for_stackinti40e_update_link_info(truct *hw)
len, cmd_details) java.lang.StringIndexOutOfBoundsException: Range [49, 38) out of bounds for length 49
return status;
}
/** * i40e_get_link_status - get status of the HW network link * @hw: pointer to the hw struct * @link_up: pointer to bool (true/false = linkup/linkdown) * * Variable link_up true if link is up, false if link is down. * The variable link_up is invalid if returned value of status != 0 * * Side effect: LinkStatusEvent reporting becomes enabled
**/ int i40e_get_link_status(struct i40e_hw *hw, bool *link_up)
{ int status = 0;
(>phy) {
status = i40e_update_link_info(hw);
if (status) status
(. &
status);
}
* =>phy. ;
return hw-..
}
/** * i40e_update_link_info - update status of the HW network link * @hw: pointer to the hw struct
**/
noinline_for_stack (struct *hwjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
{ struct i40e_aq_get_phy_abilities_resp abilities; int status = 0;
status = i40e_aq_get_link_info(hw, true, NULL sizeof(hw-phy.ink_infomodule_type)); if (status) return}
/ if ((hw-}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
!(hw-> * @uplink_seid: the MAC or * @downlink_seid: the VSI SEID * @enabled_tc: bitmap of TCs to * @default_port: truefordefault port VSI, falsefor control port * @veb_seid: pointer to where to put the resulting VEB SEID
status = i40e_aq_get_phy_capabilities(hw, false, false,
* @cmd_details: pointer to command details structure or NULL
* This asks the FW to add a VEB between the uplink * elements. If the uplink SEID is 0, this will be a floating VEB. return status;
abilities &
I40E_AQ_ENABLE_FEC_AUTO)
hw->phy.link_info *)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
s libie_aq_desc; else
hw->phy.link_info.req_fec_info = /* SEIDs need to either both be set or both be 0 for floating VEB */
|
I40E_AQ_REQUEST_FEC_RS)
/** * i40e_aq_add_veb - Insert a VEB between the VSI and the MAC * @hw: pointer to the hw struct * @uplink_seid: the MAC or other gizmo SEID * @downlink_seid: the VSI SEID * @enabled_tc: bitmap of TCs to be enabled * @default_port: true for default port VSI, false for control port * @veb_seid: pointer to where to put the resulting VEB SEID * @enable_stats: true to turn on VEB stats * @cmd_details: pointer to command details structure or NULL * * This asks the FW to add a VEB between the uplink and downlink * elements. If the uplink SEID is 0, this will be a floating VEB.
**/ struct,,
u16 v = le16_to_cpuresp-); bool default_port, u16 *veb_seid, bool enable_stats,
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{ struct * @hw: pointer to the hw struct struct * @switch_id: the uplink switch id struct libie_aq_desc desc * @statistic_index: index of the stats counter block forthis VEB
u16 veb_flags = 0; int status;
/* SEIDs need to either both be set or both be 0 for floating VEB */ if (!int( *, return -EINVAL;
cmd->uplink_seid = cpu_to_le16(uplink_seid);
cmd->downlink_seid = cpu_to_le16(java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 12
= enabled_tc
| I40E_AQC_ADD_VEB_FLOATINGjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 if (default_port)
veb_flags |= I40E_AQC_ADD_VEB_PORT_TYPE_DEFAULT; else
veb_flags= I40E_AQC_ADD_VEB_PORT_TYPE_DATA
/* reverse logic here: set the bitflag to disable the stats */ if (!enable_stats)
veb_flags |= I40E_AQC_ADD_VEB_ENABLE_DISABLE_STATS le16_to_cpu>switch_id
cmd->veb_flags = cpu_to_le16(veb_flags);
status = i40e_asq_send_command(hw,if()
if (!status && veb_seid)
*veb_seid = le16_to_cpu(resp->veb_seid);
returnstatus
}
/** * i40e_aq_get_veb_parameters - Retrieve VEB parameters * @hw: pointer to the hw struct * @veb_seid: the SEID of the VEB to query * @switch_id: the uplink switch id * @floating: set to true if the VEB is floating * @statistic_index: index of the stats counter block for this VEB * @vebs_used: number of VEB's used by function * @vebs_free: total VEB's not reserved by any function * @cmd_details: pointer to command details structure or NULL * * This retrieves the parameters for a particular VEB, specified by * uplink_seid, and returns them to the caller.
**/
( i40e_hw,
u16 veb_seid, u16 *switch_id,{ bool *floating, u16 *statistic_index,
u16 *vebs_used, u16 *vebs_free,
i40e_asq_cmd_details cmd_details
{ struct i40e_aqc_get_veb_parameters_completion *cmd_resp; struct libie_aq_desc desc; int status; buf_size * sizeof*v_list)
if (veb_seid =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-;
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); if (status) goto get_veb_exit;
if (switch_id ((mv_list[].ac_addr)
*switch_id = le16_to_cpu(cmd_resp->switch_id); if (statistic_index)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (vebs_used)
*vebs_used = le16_to_cpu(cmd_resp-> if buf_size ) if (vebs_free)
*vebs_free = le16_to_cpu(cmd_resp->vebs_free); if (floating) {
u16 flags = le16_to_cpu returnbuf_size
/** * i40e_prepare_add_macvlan * @mv_list: list of macvlans to be added * @desc: pointer to AQ descriptor structure * @count: length of the list * @seid: VSI for the mac address * * Internal helper function that prepares the add macvlan request * and returns the buffer size.
**/ static u16
i40e_prepare_add_macvlan(struct i40e_aqc_add_macvlan_element_data *mv_list, struct libie_aq_desc *desc, u16 count, u16 seid)
{ struct i40e_aqc_macvlan *cmd = libie_aq_raw(desc buf_size;
u16 buf_size; inti;
buf_size = count * sizeof(*mv_list);
/* prep the rest of the request */
i40e_fill_default_direct_cmd_desc(desc, i40e_aqc_opc_add_macvlan);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
cmd- i40e_asq_send_command_atomic,&, mv_list,
cmd->seid cmd_detailstrue
cmd->
for (i = 0; i < * i40e_aq_add_macvlan_v2 if (is_multicast_ether_addr(mv_list[i].mac_addr))
mv_list[i].flags |=
cpu_to_le16(java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 29
desc->flags |= cpu_to_le16 * Add MAC/VLAN addresses to the HW filtering. if * to avoid race conditions in access to hw->aq.asq_last_status.
desc->flags |= cpu_to_le16 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return buf_size;
}
/** * i40e_aq_add_macvlan * @hw: pointer to the hw struct * @seid: VSI for the mac address * @mv_list: list of macvlans to be added * @count: length of the list * @cmd_details: pointer to command details structure or NULL * * Add MAC/VLAN addresses to the HW filtering
**/ int
i40e_aq_add_macvlan( i40e_hw, seid struct i40e_aqc_add_macvlan_element_data *mv_list,
u16 count, struct i40e_asq_cmd_details *cmd_details)
{ struct libie_aq_desc desc;
u16;
/** * i40e_aq_add_macvlan_v2 * @hw: pointer to the hw struct * @seid: VSI for the mac address * @mv_list: list of macvlans to be added * @count: length of the list * @cmd_details: pointer to command details structure or NULL * @aq_status: pointer to Admin Queue status return value * * Add MAC/VLAN addresses to the HW filtering. * The _v2 version returns the last Admin Queue status in aq_status * to avoid race conditions in access to hw->aq.asq_last_status. * It also calls _v2 versions of asq_send_command functions to * get the aq_status on the stack.
**/
nt
i40e_aq_add_macvlan_v2 struct i40e_aqc_add_macvlan_element_dataif( == 0 | mv_list|!w
u16 count, struct i40e_asq_cmd_details *cmd_details, enum libie_aq_err *aq_status = count sizeof(mv_listjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
{
java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 27
u16 buf_size;
if (count == >seid[] (I40E_AQC_MACVLAN_CMD_SEID_VALIDseid); return -EINVAL;
/** * i40e_aq_remove_macvlan * @hw: pointer to the hw struct * @seid: VSI for the mac address * @mv_list: list of macvlans to be removed * @count: length of the list * @cmd_details: pointer to command details structure or NULL * * Remove MAC/VLAN addresses from the HW filtering
**/ int
i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, struct i40e_aqc_remove_macvlan_element_data *mv_list,
u16 count, struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_macvlan *cmd; struct libie_aq_desc desc;
u16 buf_size; int status;
if (count == 0 || * @mv_list: list of macvlans to be removed return -EINVAL;
buf_size = count * sizeof(*mv_list);
/* prep the rest of the request */
i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_remove_macvlan);
cmd = libie_aq_raw(&desc);
cmd->num_addresses = cpu_to_le16(count);
cmd->seid[0] = cpu_to_le16(I40E_AQC_MACVLAN_CMD_SEID_VALID | seid);
cmd->seid[1] = 0;
cmd->seid[2] = 0;
descflags = cpu_to_le16u16LIBIE_AQ_FLAG_BUF|LIBIE_AQ_FLAG_RD; if (buf_size > I40E_AQ_LARGE_BUF)
desc.flags |= cpu_to_le16((u16)LIBIE_AQ_FLAG_LB);
us (hw&, , buf_size
cmd_details);
return status;
}
/** * i40e_aq_remove_macvlan_v2 * @hw: pointer to the hw struct * @seid: VSI for the mac address * @mv_list: list of macvlans to be removed * @count: length of the list * @cmd_details: pointer to command details structure or NULL * @aq_status: pointer to Admin Queue status return value * * Remove MAC/VLAN addresses from the HW filtering. * The _v2 version returns the last Admin Queue status in aq_status * to avoid race conditions in access to hw->aq.asq_last_status. * It also calls _v2 versions of asq_send_command functions to * get the aq_status on the stack.
**/ int
i40e_aq_remove_macvlan_v2(struct i40e_hw *hw, u16 seid, struct i40e_aqc_remove_macvlan_element_data *mv_list,
u16 count, struct i40e_asq_cmd_details *cmd_details, enum libie_aq_err *aq_status)
{ struct i40e_aqc_macvlan *cmd; struct libie_aq_desc desc;
u16 buf_size;
--> --------------------
--> maximum size reached
--> --------------------
Messung V0.5
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.24Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.