mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2015-02-23 This series contains updates to e1000e, igbvf, i40e and i40evf. David adds support for i219 devices to the e1000e driver. Jeff (me) provides two patches to cleanup igbvf, first cleans up the whitespace issues found and the second cleans up the usage of msleep(), min() and max() with usleep_range(), min_t() and max_t() respectively. Kamil updates the shadow RAM read/write functions by refactoring them to prepare for future work. Shannon renames the debugfs command "clear_stats pf" to clear_stats port" to clarify what the function really does. Mitch refactors the receive routine, by splitting the receive hot path code into two, one for packet split and one for single buffer, which improves receive performance. Disables NAPI polling sooner when closing the interface to fix an occasional panic during close which was caused by the driver trying to delete and clean rings at the same time. Also refactors reset for i40evf, since a recent change to the shutdown flow messed up the reset flow. Since i40evf_down() now holds the critical section lock, we cannot call it from the reset handler, which also holds the lock. Nicholas restricts the virtual channel opcodes should remain consistent between updates to the opcode enum. Neerav converts the VSI connection type to use a #define instead of using a magic number. Anjali updates the registers file to remove registers no longer available. Also fixes the EMPR interrupt handling, so that we won't trigger another EMPR when we receive an EMPR event. Catherine cleans up the variable an_enable since it was set and never used. Greg fixes the netdev op that allows the operator to turn MAC/VLAN spoof checking on and off so that it includes the flag for VLAN spoof checking. v2: Updated patch #10 in the series to use test_and_clear_bit() as suggested by Sergei Shtylyov ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -141,6 +141,7 @@
|
||||
#define E1000_RCTL_LBM_TCVR 0x000000C0 /* tcvr loopback mode */
|
||||
#define E1000_RCTL_DTYP_PS 0x00000400 /* Packet Split descriptor */
|
||||
#define E1000_RCTL_RDMTS_HALF 0x00000000 /* Rx desc min threshold size */
|
||||
#define E1000_RCTL_RDMTS_HEX 0x00010000
|
||||
#define E1000_RCTL_MO_SHIFT 12 /* multicast offset shift */
|
||||
#define E1000_RCTL_MO_3 0x00003000 /* multicast offset 15:4 */
|
||||
#define E1000_RCTL_BAM 0x00008000 /* broadcast enable */
|
||||
|
||||
@@ -132,6 +132,7 @@ enum e1000_boards {
|
||||
board_pchlan,
|
||||
board_pch2lan,
|
||||
board_pch_lpt,
|
||||
board_pch_spt
|
||||
};
|
||||
|
||||
struct e1000_ps_page {
|
||||
@@ -501,6 +502,7 @@ extern const struct e1000_info e1000_ich10_info;
|
||||
extern const struct e1000_info e1000_pch_info;
|
||||
extern const struct e1000_info e1000_pch2_info;
|
||||
extern const struct e1000_info e1000_pch_lpt_info;
|
||||
extern const struct e1000_info e1000_pch_spt_info;
|
||||
extern const struct e1000_info e1000_es2_info;
|
||||
|
||||
void e1000e_ptp_init(struct e1000_adapter *adapter);
|
||||
|
||||
@@ -896,18 +896,20 @@ static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data)
|
||||
case e1000_pchlan:
|
||||
case e1000_pch2lan:
|
||||
case e1000_pch_lpt:
|
||||
case e1000_pch_spt:
|
||||
mask |= (1 << 18);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (mac->type == e1000_pch_lpt)
|
||||
if ((mac->type == e1000_pch_lpt) || (mac->type == e1000_pch_spt))
|
||||
wlock_mac = (er32(FWSM) & E1000_FWSM_WLOCK_MAC_MASK) >>
|
||||
E1000_FWSM_WLOCK_MAC_SHIFT;
|
||||
|
||||
for (i = 0; i < mac->rar_entry_count; i++) {
|
||||
if (mac->type == e1000_pch_lpt) {
|
||||
if ((mac->type == e1000_pch_lpt) ||
|
||||
(mac->type == e1000_pch_spt)) {
|
||||
/* Cannot test write-protected SHRAL[n] registers */
|
||||
if ((wlock_mac == 1) || (wlock_mac && (i > wlock_mac)))
|
||||
continue;
|
||||
|
||||
@@ -87,6 +87,10 @@ struct e1000_hw;
|
||||
#define E1000_DEV_ID_PCH_I218_V2 0x15A1
|
||||
#define E1000_DEV_ID_PCH_I218_LM3 0x15A2 /* Wildcat Point PCH */
|
||||
#define E1000_DEV_ID_PCH_I218_V3 0x15A3 /* Wildcat Point PCH */
|
||||
#define E1000_DEV_ID_PCH_SPT_I219_LM 0x156F /* SPT PCH */
|
||||
#define E1000_DEV_ID_PCH_SPT_I219_V 0x1570 /* SPT PCH */
|
||||
#define E1000_DEV_ID_PCH_SPT_I219_LM2 0x15B7 /* SPT-H PCH */
|
||||
#define E1000_DEV_ID_PCH_SPT_I219_V2 0x15B8 /* SPT-H PCH */
|
||||
|
||||
#define E1000_REVISION_4 4
|
||||
|
||||
@@ -108,6 +112,7 @@ enum e1000_mac_type {
|
||||
e1000_pchlan,
|
||||
e1000_pch2lan,
|
||||
e1000_pch_lpt,
|
||||
e1000_pch_spt,
|
||||
};
|
||||
|
||||
enum e1000_media_type {
|
||||
@@ -153,6 +158,7 @@ enum e1000_bus_width {
|
||||
e1000_bus_width_pcie_x1,
|
||||
e1000_bus_width_pcie_x2,
|
||||
e1000_bus_width_pcie_x4 = 4,
|
||||
e1000_bus_width_pcie_x8 = 8,
|
||||
e1000_bus_width_32,
|
||||
e1000_bus_width_64,
|
||||
e1000_bus_width_reserved
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -95,9 +95,18 @@
|
||||
|
||||
#define E1000_FEXTNVM6_REQ_PLL_CLK 0x00000100
|
||||
#define E1000_FEXTNVM6_ENABLE_K1_ENTRY_CONDITION 0x00000200
|
||||
#define E1000_FEXTNVM6_K1_OFF_ENABLE 0x80000000
|
||||
/* bit for disabling packet buffer read */
|
||||
#define E1000_FEXTNVM7_DISABLE_PB_READ 0x00040000
|
||||
|
||||
#define E1000_FEXTNVM7_DISABLE_SMB_PERST 0x00000020
|
||||
|
||||
#define K1_ENTRY_LATENCY 0
|
||||
#define K1_MIN_TIME 1
|
||||
#define NVM_SIZE_MULTIPLIER 4096 /*multiplier for NVMS field */
|
||||
#define E1000_FLASH_BASE_ADDR 0xE000 /*offset of NVM access regs */
|
||||
#define E1000_CTRL_EXT_NVMVS 0x3 /*NVM valid sector */
|
||||
|
||||
#define PCIE_ICH8_SNOOP_ALL PCIE_NO_SNOOP_ALL
|
||||
|
||||
#define E1000_ICH_RAR_ENTRIES 7
|
||||
|
||||
@@ -70,6 +70,7 @@ static const struct e1000_info *e1000_info_tbl[] = {
|
||||
[board_pchlan] = &e1000_pch_info,
|
||||
[board_pch2lan] = &e1000_pch2_info,
|
||||
[board_pch_lpt] = &e1000_pch_lpt_info,
|
||||
[board_pch_spt] = &e1000_pch_spt_info,
|
||||
};
|
||||
|
||||
struct e1000_reg_info {
|
||||
@@ -1796,7 +1797,8 @@ static irqreturn_t e1000_intr_msi(int __always_unused irq, void *data)
|
||||
}
|
||||
|
||||
/* Reset on uncorrectable ECC error */
|
||||
if ((icr & E1000_ICR_ECCER) && (hw->mac.type == e1000_pch_lpt)) {
|
||||
if ((icr & E1000_ICR_ECCER) && ((hw->mac.type == e1000_pch_lpt) ||
|
||||
(hw->mac.type == e1000_pch_spt))) {
|
||||
u32 pbeccsts = er32(PBECCSTS);
|
||||
|
||||
adapter->corr_errors +=
|
||||
@@ -1876,7 +1878,8 @@ static irqreturn_t e1000_intr(int __always_unused irq, void *data)
|
||||
}
|
||||
|
||||
/* Reset on uncorrectable ECC error */
|
||||
if ((icr & E1000_ICR_ECCER) && (hw->mac.type == e1000_pch_lpt)) {
|
||||
if ((icr & E1000_ICR_ECCER) && ((hw->mac.type == e1000_pch_lpt) ||
|
||||
(hw->mac.type == e1000_pch_spt))) {
|
||||
u32 pbeccsts = er32(PBECCSTS);
|
||||
|
||||
adapter->corr_errors +=
|
||||
@@ -2257,7 +2260,8 @@ static void e1000_irq_enable(struct e1000_adapter *adapter)
|
||||
if (adapter->msix_entries) {
|
||||
ew32(EIAC_82574, adapter->eiac_mask & E1000_EIAC_MASK_82574);
|
||||
ew32(IMS, adapter->eiac_mask | E1000_IMS_OTHER | E1000_IMS_LSC);
|
||||
} else if (hw->mac.type == e1000_pch_lpt) {
|
||||
} else if ((hw->mac.type == e1000_pch_lpt) ||
|
||||
(hw->mac.type == e1000_pch_spt)) {
|
||||
ew32(IMS, IMS_ENABLE_MASK | E1000_IMS_ECCER);
|
||||
} else {
|
||||
ew32(IMS, IMS_ENABLE_MASK);
|
||||
@@ -3014,6 +3018,19 @@ static void e1000_configure_tx(struct e1000_adapter *adapter)
|
||||
ew32(TCTL, tctl);
|
||||
|
||||
hw->mac.ops.config_collision_dist(hw);
|
||||
|
||||
/* SPT Si errata workaround to avoid data corruption */
|
||||
if (hw->mac.type == e1000_pch_spt) {
|
||||
u32 reg_val;
|
||||
|
||||
reg_val = er32(IOSFPC);
|
||||
reg_val |= E1000_RCTL_RDMTS_HEX;
|
||||
ew32(IOSFPC, reg_val);
|
||||
|
||||
reg_val = er32(TARC(0));
|
||||
reg_val |= E1000_TARC0_CB_MULTIQ_3_REQ;
|
||||
ew32(TARC(0), reg_val);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3490,8 +3507,11 @@ s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca)
|
||||
struct e1000_hw *hw = &adapter->hw;
|
||||
u32 incvalue, incperiod, shift;
|
||||
|
||||
/* Make sure clock is enabled on I217 before checking the frequency */
|
||||
if ((hw->mac.type == e1000_pch_lpt) &&
|
||||
/* Make sure clock is enabled on I217/I218/I219 before checking
|
||||
* the frequency
|
||||
*/
|
||||
if (((hw->mac.type == e1000_pch_lpt) ||
|
||||
(hw->mac.type == e1000_pch_spt)) &&
|
||||
!(er32(TSYNCTXCTL) & E1000_TSYNCTXCTL_ENABLED) &&
|
||||
!(er32(TSYNCRXCTL) & E1000_TSYNCRXCTL_ENABLED)) {
|
||||
u32 fextnvm7 = er32(FEXTNVM7);
|
||||
@@ -3505,10 +3525,13 @@ s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca)
|
||||
switch (hw->mac.type) {
|
||||
case e1000_pch2lan:
|
||||
case e1000_pch_lpt:
|
||||
/* On I217, the clock frequency is 25MHz or 96MHz as
|
||||
* indicated by the System Clock Frequency Indication
|
||||
case e1000_pch_spt:
|
||||
/* On I217, I218 and I219, the clock frequency is 25MHz
|
||||
* or 96MHz as indicated by the System Clock Frequency
|
||||
* Indication
|
||||
*/
|
||||
if ((hw->mac.type != e1000_pch_lpt) ||
|
||||
if (((hw->mac.type != e1000_pch_lpt) &&
|
||||
(hw->mac.type != e1000_pch_spt)) ||
|
||||
(er32(TSYNCRXCTL) & E1000_TSYNCRXCTL_SYSCFI)) {
|
||||
/* Stable 96MHz frequency */
|
||||
incperiod = INCPERIOD_96MHz;
|
||||
@@ -3875,6 +3898,7 @@ void e1000e_reset(struct e1000_adapter *adapter)
|
||||
break;
|
||||
case e1000_pch2lan:
|
||||
case e1000_pch_lpt:
|
||||
case e1000_pch_spt:
|
||||
fc->refresh_time = 0x0400;
|
||||
|
||||
if (adapter->netdev->mtu <= ETH_DATA_LEN) {
|
||||
@@ -4759,7 +4783,8 @@ static void e1000e_update_stats(struct e1000_adapter *adapter)
|
||||
adapter->stats.mgpdc += er32(MGTPDC);
|
||||
|
||||
/* Correctable ECC Errors */
|
||||
if (hw->mac.type == e1000_pch_lpt) {
|
||||
if ((hw->mac.type == e1000_pch_lpt) ||
|
||||
(hw->mac.type == e1000_pch_spt)) {
|
||||
u32 pbeccsts = er32(PBECCSTS);
|
||||
|
||||
adapter->corr_errors +=
|
||||
@@ -6144,7 +6169,8 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool runtime)
|
||||
|
||||
if (adapter->hw.phy.type == e1000_phy_igp_3) {
|
||||
e1000e_igp3_phy_powerdown_workaround_ich8lan(&adapter->hw);
|
||||
} else if (hw->mac.type == e1000_pch_lpt) {
|
||||
} else if ((hw->mac.type == e1000_pch_lpt) ||
|
||||
(hw->mac.type == e1000_pch_spt)) {
|
||||
if (!(wufc & (E1000_WUFC_EX | E1000_WUFC_MC | E1000_WUFC_BC)))
|
||||
/* ULP does not support wake from unicast, multicast
|
||||
* or broadcast.
|
||||
@@ -7213,6 +7239,10 @@ static const struct pci_device_id e1000_pci_tbl[] = {
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_I218_V2), board_pch_lpt },
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_I218_LM3), board_pch_lpt },
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_I218_V3), board_pch_lpt },
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_LM), board_pch_spt },
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_V), board_pch_spt },
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_LM2), board_pch_spt },
|
||||
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_PCH_SPT_I219_V2), board_pch_spt },
|
||||
|
||||
{ 0, 0, 0, 0, 0, 0, 0 } /* terminate list */
|
||||
};
|
||||
|
||||
@@ -221,7 +221,9 @@ void e1000e_ptp_init(struct e1000_adapter *adapter)
|
||||
switch (hw->mac.type) {
|
||||
case e1000_pch2lan:
|
||||
case e1000_pch_lpt:
|
||||
if ((hw->mac.type != e1000_pch_lpt) ||
|
||||
case e1000_pch_spt:
|
||||
if (((hw->mac.type != e1000_pch_lpt) &&
|
||||
(hw->mac.type != e1000_pch_spt)) ||
|
||||
(er32(TSYNCRXCTL) & E1000_TSYNCRXCTL_SYSCFI)) {
|
||||
adapter->ptp_clock_info.max_adj = 24000000 - 1;
|
||||
break;
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#define E1000_FEXTNVM4 0x00024 /* Future Extended NVM 4 - RW */
|
||||
#define E1000_FEXTNVM6 0x00010 /* Future Extended NVM 6 - RW */
|
||||
#define E1000_FEXTNVM7 0x000E4 /* Future Extended NVM 7 - RW */
|
||||
#define E1000_PCIEANACFG 0x00F18 /* PCIE Analog Config */
|
||||
#define E1000_FCT 0x00030 /* Flow Control Type - RW */
|
||||
#define E1000_VET 0x00038 /* VLAN Ether Type - RW */
|
||||
#define E1000_ICR 0x000C0 /* Interrupt Cause Read - R/clr */
|
||||
@@ -67,6 +68,7 @@
|
||||
#define E1000_PBA 0x01000 /* Packet Buffer Allocation - RW */
|
||||
#define E1000_PBS 0x01008 /* Packet Buffer Size */
|
||||
#define E1000_PBECCSTS 0x0100C /* Packet Buffer ECC Status - RW */
|
||||
#define E1000_IOSFPC 0x00F28 /* TX corrupted data */
|
||||
#define E1000_EEMNGCTL 0x01010 /* MNG EEprom Control */
|
||||
#define E1000_EEWR 0x0102C /* EEPROM Write Register - RW */
|
||||
#define E1000_FLOP 0x0103C /* FLASH Opcode Register */
|
||||
@@ -121,6 +123,7 @@
|
||||
(0x054E4 + ((_i - 16) * 8)))
|
||||
#define E1000_SHRAL(_i) (0x05438 + ((_i) * 8))
|
||||
#define E1000_SHRAH(_i) (0x0543C + ((_i) * 8))
|
||||
#define E1000_TARC0_CB_MULTIQ_3_REQ (1 << 28 | 1 << 29)
|
||||
#define E1000_TDFH 0x03410 /* Tx Data FIFO Head - RW */
|
||||
#define E1000_TDFT 0x03418 /* Tx Data FIFO Tail - RW */
|
||||
#define E1000_TDFHS 0x03420 /* Tx Data FIFO Head Saved - RW */
|
||||
|
||||
@@ -140,6 +140,7 @@ enum i40e_state_t {
|
||||
__I40E_CORE_RESET_REQUESTED,
|
||||
__I40E_GLOBAL_RESET_REQUESTED,
|
||||
__I40E_EMP_RESET_REQUESTED,
|
||||
__I40E_EMP_RESET_INTR_RECEIVED,
|
||||
__I40E_FILTER_OVERFLOW_PROMISC,
|
||||
__I40E_SUSPENDED,
|
||||
__I40E_PTP_TX_IN_PROGRESS,
|
||||
|
||||
@@ -1297,14 +1297,14 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures,
|
||||
*aq_failures |= I40E_SET_FC_AQ_FAIL_SET;
|
||||
}
|
||||
/* Update the link info */
|
||||
status = i40e_update_link_info(hw, true);
|
||||
status = i40e_aq_get_link_info(hw, true, NULL, NULL);
|
||||
if (status) {
|
||||
/* Wait a little bit (on 40G cards it sometimes takes a really
|
||||
* long time for link to come back from the atomic reset)
|
||||
* and try once more
|
||||
*/
|
||||
msleep(1000);
|
||||
status = i40e_update_link_info(hw, true);
|
||||
status = i40e_aq_get_link_info(hw, true, NULL, NULL);
|
||||
}
|
||||
if (status)
|
||||
*aq_failures |= I40E_SET_FC_AQ_FAIL_UPDATE;
|
||||
@@ -1451,35 +1451,6 @@ aq_get_link_info_exit:
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_update_link_info
|
||||
* @hw: pointer to the hw struct
|
||||
* @enable_lse: enable/disable LinkStatusEvent reporting
|
||||
*
|
||||
* Returns the link status of the adapter
|
||||
**/
|
||||
i40e_status i40e_update_link_info(struct i40e_hw *hw, bool enable_lse)
|
||||
{
|
||||
struct i40e_aq_get_phy_abilities_resp abilities;
|
||||
i40e_status status;
|
||||
|
||||
status = i40e_aq_get_link_info(hw, enable_lse, NULL, NULL);
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
status = i40e_aq_get_phy_capabilities(hw, false, false,
|
||||
&abilities, NULL);
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
if (abilities.abilities & I40E_AQ_PHY_AN_ENABLED)
|
||||
hw->phy.link_info.an_enabled = true;
|
||||
else
|
||||
hw->phy.link_info.an_enabled = false;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_aq_set_phy_int_mask
|
||||
* @hw: pointer to the hw struct
|
||||
|
||||
@@ -1485,11 +1485,15 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
|
||||
} else {
|
||||
dev_info(&pf->pdev->dev, "clear_stats vsi [seid]\n");
|
||||
}
|
||||
} else if (strncmp(&cmd_buf[12], "pf", 2) == 0) {
|
||||
i40e_pf_reset_stats(pf);
|
||||
dev_info(&pf->pdev->dev, "pf clear stats called\n");
|
||||
} else if (strncmp(&cmd_buf[12], "port", 4) == 0) {
|
||||
if (pf->hw.partition_id == 1) {
|
||||
i40e_pf_reset_stats(pf);
|
||||
dev_info(&pf->pdev->dev, "port stats cleared\n");
|
||||
} else {
|
||||
dev_info(&pf->pdev->dev, "clear port stats not allowed on this port partition\n");
|
||||
}
|
||||
} else {
|
||||
dev_info(&pf->pdev->dev, "clear_stats vsi [seid] or clear_stats pf\n");
|
||||
dev_info(&pf->pdev->dev, "clear_stats vsi [seid] or clear_stats port\n");
|
||||
}
|
||||
} else if (strncmp(cmd_buf, "send aq_cmd", 11) == 0) {
|
||||
struct i40e_aq_desc *desc;
|
||||
@@ -1895,7 +1899,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
|
||||
dev_info(&pf->pdev->dev, " read <reg>\n");
|
||||
dev_info(&pf->pdev->dev, " write <reg> <value>\n");
|
||||
dev_info(&pf->pdev->dev, " clear_stats vsi [seid]\n");
|
||||
dev_info(&pf->pdev->dev, " clear_stats pf\n");
|
||||
dev_info(&pf->pdev->dev, " clear_stats port\n");
|
||||
dev_info(&pf->pdev->dev, " pfr\n");
|
||||
dev_info(&pf->pdev->dev, " corer\n");
|
||||
dev_info(&pf->pdev->dev, " globr\n");
|
||||
|
||||
@@ -113,7 +113,6 @@ static struct i40e_stats i40e_gstrings_stats[] = {
|
||||
I40E_PF_STAT("tx_broadcast", stats.eth.tx_broadcast),
|
||||
I40E_PF_STAT("tx_errors", stats.eth.tx_errors),
|
||||
I40E_PF_STAT("rx_dropped", stats.eth.rx_discards),
|
||||
I40E_PF_STAT("tx_dropped", stats.eth.tx_discards),
|
||||
I40E_PF_STAT("tx_dropped_link_down", stats.tx_dropped_link_down),
|
||||
I40E_PF_STAT("crc_errors", stats.crc_errors),
|
||||
I40E_PF_STAT("illegal_bytes", stats.illegal_bytes),
|
||||
@@ -621,7 +620,7 @@ static int i40e_set_settings(struct net_device *netdev,
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
status = i40e_update_link_info(hw, true);
|
||||
status = i40e_aq_get_link_info(hw, true, NULL, NULL);
|
||||
if (status)
|
||||
netdev_info(netdev, "Updating link info failed with error %d\n",
|
||||
status);
|
||||
@@ -767,7 +766,7 @@ static int i40e_set_pauseparam(struct net_device *netdev,
|
||||
err = -EAGAIN;
|
||||
}
|
||||
if (aq_failures & I40E_SET_FC_AQ_FAIL_UPDATE) {
|
||||
netdev_info(netdev, "Set fc failed on the update_link_info call with error %d and status %d\n",
|
||||
netdev_info(netdev, "Set fc failed on the get_link_info call with error %d and status %d\n",
|
||||
status, hw->aq.asq_last_status);
|
||||
err = -EAGAIN;
|
||||
}
|
||||
|
||||
@@ -381,7 +381,7 @@ int i40e_fcoe_vsi_init(struct i40e_vsi *vsi, struct i40e_vsi_context *ctxt)
|
||||
ctxt->pf_num = hw->pf_id;
|
||||
ctxt->vf_num = 0;
|
||||
ctxt->uplink_seid = vsi->uplink_seid;
|
||||
ctxt->connection_type = 0x1;
|
||||
ctxt->connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
|
||||
ctxt->flags = I40E_AQ_VSI_TYPE_PF;
|
||||
|
||||
/* FCoE VSI would need the following sections */
|
||||
|
||||
@@ -39,7 +39,7 @@ static const char i40e_driver_string[] =
|
||||
|
||||
#define DRV_VERSION_MAJOR 1
|
||||
#define DRV_VERSION_MINOR 2
|
||||
#define DRV_VERSION_BUILD 6
|
||||
#define DRV_VERSION_BUILD 8
|
||||
#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
|
||||
__stringify(DRV_VERSION_MINOR) "." \
|
||||
__stringify(DRV_VERSION_BUILD) DRV_KERN
|
||||
@@ -919,11 +919,6 @@ static void i40e_update_pf_stats(struct i40e_pf *pf)
|
||||
pf->stat_offsets_loaded,
|
||||
&osd->eth.rx_discards,
|
||||
&nsd->eth.rx_discards);
|
||||
i40e_stat_update32(hw, I40E_GLPRT_TDPC(hw->port),
|
||||
pf->stat_offsets_loaded,
|
||||
&osd->eth.tx_discards,
|
||||
&nsd->eth.tx_discards);
|
||||
|
||||
i40e_stat_update48(hw, I40E_GLPRT_UPRCH(hw->port),
|
||||
I40E_GLPRT_UPRCL(hw->port),
|
||||
pf->stat_offsets_loaded,
|
||||
@@ -2591,7 +2586,12 @@ static int i40e_configure_rx_ring(struct i40e_ring *ring)
|
||||
ring->tail = hw->hw_addr + I40E_QRX_TAIL(pf_q);
|
||||
writel(0, ring->tail);
|
||||
|
||||
i40e_alloc_rx_buffers(ring, I40E_DESC_UNUSED(ring));
|
||||
if (ring_is_ps_enabled(ring)) {
|
||||
i40e_alloc_rx_headers(ring);
|
||||
i40e_alloc_rx_buffers_ps(ring, I40E_DESC_UNUSED(ring));
|
||||
} else {
|
||||
i40e_alloc_rx_buffers_1buf(ring, I40E_DESC_UNUSED(ring));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -3171,7 +3171,7 @@ static irqreturn_t i40e_intr(int irq, void *data)
|
||||
pf->globr_count++;
|
||||
} else if (val == I40E_RESET_EMPR) {
|
||||
pf->empr_count++;
|
||||
set_bit(__I40E_EMP_RESET_REQUESTED, &pf->state);
|
||||
set_bit(__I40E_EMP_RESET_INTR_RECEIVED, &pf->state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5037,24 +5037,6 @@ void i40e_do_reset(struct i40e_pf *pf, u32 reset_flags)
|
||||
wr32(&pf->hw, I40E_GLGEN_RTRIG, val);
|
||||
i40e_flush(&pf->hw);
|
||||
|
||||
} else if (reset_flags & (1 << __I40E_EMP_RESET_REQUESTED)) {
|
||||
|
||||
/* Request a Firmware Reset
|
||||
*
|
||||
* Same as Global reset, plus restarting the
|
||||
* embedded firmware engine.
|
||||
*/
|
||||
/* enable EMP Reset */
|
||||
val = rd32(&pf->hw, I40E_GLGEN_RSTENA_EMP);
|
||||
val |= I40E_GLGEN_RSTENA_EMP_EMP_RST_ENA_MASK;
|
||||
wr32(&pf->hw, I40E_GLGEN_RSTENA_EMP, val);
|
||||
|
||||
/* force the reset */
|
||||
val = rd32(&pf->hw, I40E_GLGEN_RTRIG);
|
||||
val |= I40E_GLGEN_RTRIG_EMPFWR_MASK;
|
||||
wr32(&pf->hw, I40E_GLGEN_RTRIG, val);
|
||||
i40e_flush(&pf->hw);
|
||||
|
||||
} else if (reset_flags & (1 << __I40E_PF_RESET_REQUESTED)) {
|
||||
|
||||
/* Request a PF Reset
|
||||
@@ -6197,10 +6179,8 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
|
||||
}
|
||||
|
||||
/* re-verify the eeprom if we just had an EMP reset */
|
||||
if (test_bit(__I40E_EMP_RESET_REQUESTED, &pf->state)) {
|
||||
clear_bit(__I40E_EMP_RESET_REQUESTED, &pf->state);
|
||||
if (test_and_clear_bit(__I40E_EMP_RESET_INTR_RECEIVED, &pf->state))
|
||||
i40e_verify_eeprom(pf);
|
||||
}
|
||||
|
||||
i40e_clear_pxe_mode(hw);
|
||||
ret = i40e_get_capabilities(pf);
|
||||
@@ -7300,7 +7280,7 @@ static int i40e_sw_init(struct i40e_pf *pf)
|
||||
pf->flags = I40E_FLAG_RX_CSUM_ENABLED |
|
||||
I40E_FLAG_MSI_ENABLED |
|
||||
I40E_FLAG_MSIX_ENABLED |
|
||||
I40E_FLAG_RX_1BUF_ENABLED;
|
||||
I40E_FLAG_RX_PS_ENABLED;
|
||||
|
||||
/* Set default ITR */
|
||||
pf->rx_itr_default = I40E_ITR_DYNAMIC | I40E_ITR_RX_DEF;
|
||||
@@ -7858,7 +7838,7 @@ static int i40e_add_vsi(struct i40e_vsi *vsi)
|
||||
ctxt.pf_num = hw->pf_id;
|
||||
ctxt.vf_num = 0;
|
||||
ctxt.uplink_seid = vsi->uplink_seid;
|
||||
ctxt.connection_type = 0x1; /* regular data port */
|
||||
ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
|
||||
ctxt.flags = I40E_AQ_VSI_TYPE_PF;
|
||||
ctxt.info.valid_sections |=
|
||||
cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);
|
||||
@@ -7871,7 +7851,7 @@ static int i40e_add_vsi(struct i40e_vsi *vsi)
|
||||
ctxt.pf_num = hw->pf_id;
|
||||
ctxt.vf_num = 0;
|
||||
ctxt.uplink_seid = vsi->uplink_seid;
|
||||
ctxt.connection_type = 0x1; /* regular data port */
|
||||
ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
|
||||
ctxt.flags = I40E_AQ_VSI_TYPE_VMDQ2;
|
||||
|
||||
ctxt.info.valid_sections |= cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);
|
||||
@@ -7890,7 +7870,7 @@ static int i40e_add_vsi(struct i40e_vsi *vsi)
|
||||
ctxt.pf_num = hw->pf_id;
|
||||
ctxt.vf_num = vsi->vf_id + hw->func_caps.vf_base_id;
|
||||
ctxt.uplink_seid = vsi->uplink_seid;
|
||||
ctxt.connection_type = 0x1; /* regular data port */
|
||||
ctxt.connection_type = I40E_AQ_VSI_CONN_TYPE_NORMAL;
|
||||
ctxt.flags = I40E_AQ_VSI_TYPE_VF;
|
||||
|
||||
ctxt.info.valid_sections |= cpu_to_le16(I40E_AQ_VSI_PROP_SWITCH_VALID);
|
||||
@@ -8905,7 +8885,7 @@ static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit)
|
||||
i40e_config_rss(pf);
|
||||
|
||||
/* fill in link information and enable LSE reporting */
|
||||
i40e_update_link_info(&pf->hw, true);
|
||||
i40e_aq_get_link_info(&pf->hw, true, NULL, NULL);
|
||||
i40e_link_event(pf);
|
||||
|
||||
/* Initialize user-specific link properties */
|
||||
@@ -8913,7 +8893,7 @@ static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit)
|
||||
I40E_AQ_AN_COMPLETED) ? true : false);
|
||||
|
||||
/* fill in link information and enable LSE reporting */
|
||||
i40e_update_link_info(&pf->hw, true);
|
||||
i40e_aq_get_link_info(&pf->hw, true, NULL, NULL);
|
||||
i40e_link_event(pf);
|
||||
|
||||
/* Initialize user-specific link properties */
|
||||
|
||||
@@ -164,15 +164,15 @@ static i40e_status i40e_poll_sr_srctl_done_bit(struct i40e_hw *hw)
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_read_nvm_word - Reads Shadow RAM
|
||||
* i40e_read_nvm_word_srctl - Reads Shadow RAM via SRCTL register
|
||||
* @hw: pointer to the HW structure
|
||||
* @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF)
|
||||
* @data: word read from the Shadow RAM
|
||||
*
|
||||
* Reads one 16 bit word from the Shadow RAM using the GLNVM_SRCTL register.
|
||||
**/
|
||||
i40e_status i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
|
||||
u16 *data)
|
||||
i40e_status i40e_read_nvm_word_srctl(struct i40e_hw *hw, u16 offset,
|
||||
u16 *data)
|
||||
{
|
||||
i40e_status ret_code = I40E_ERR_TIMEOUT;
|
||||
u32 sr_reg;
|
||||
@@ -200,6 +200,7 @@ i40e_status i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
|
||||
*data = (u16)((sr_reg &
|
||||
I40E_GLNVM_SRDATA_RDDATA_MASK)
|
||||
>> I40E_GLNVM_SRDATA_RDDATA_SHIFT);
|
||||
*data = le16_to_cpu(*data);
|
||||
}
|
||||
}
|
||||
if (ret_code)
|
||||
@@ -211,6 +212,51 @@ read_nvm_exit:
|
||||
return ret_code;
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_read_nvm_word - Reads Shadow RAM
|
||||
* @hw: pointer to the HW structure
|
||||
* @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF)
|
||||
* @data: word read from the Shadow RAM
|
||||
*
|
||||
* Reads one 16 bit word from the Shadow RAM using the GLNVM_SRCTL register.
|
||||
**/
|
||||
i40e_status i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
|
||||
u16 *data)
|
||||
{
|
||||
return i40e_read_nvm_word_srctl(hw, offset, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_read_nvm_buffer_srctl - Reads Shadow RAM buffer via SRCTL register
|
||||
* @hw: pointer to the HW structure
|
||||
* @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF).
|
||||
* @words: (in) number of words to read; (out) number of words actually read
|
||||
* @data: words read from the Shadow RAM
|
||||
*
|
||||
* Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_srrd()
|
||||
* method. The buffer read is preceded by the NVM ownership take
|
||||
* and followed by the release.
|
||||
**/
|
||||
i40e_status i40e_read_nvm_buffer_srctl(struct i40e_hw *hw, u16 offset,
|
||||
u16 *words, u16 *data)
|
||||
{
|
||||
i40e_status ret_code = 0;
|
||||
u16 index, word;
|
||||
|
||||
/* Loop thru the selected region */
|
||||
for (word = 0; word < *words; word++) {
|
||||
index = offset + word;
|
||||
ret_code = i40e_read_nvm_word_srctl(hw, index, &data[word]);
|
||||
if (ret_code)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Update the number of words read from the Shadow RAM */
|
||||
*words = word;
|
||||
|
||||
return ret_code;
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_read_nvm_buffer - Reads Shadow RAM buffer
|
||||
* @hw: pointer to the HW structure
|
||||
@@ -223,23 +269,9 @@ read_nvm_exit:
|
||||
* and followed by the release.
|
||||
**/
|
||||
i40e_status i40e_read_nvm_buffer(struct i40e_hw *hw, u16 offset,
|
||||
u16 *words, u16 *data)
|
||||
u16 *words, u16 *data)
|
||||
{
|
||||
i40e_status ret_code = 0;
|
||||
u16 index, word;
|
||||
|
||||
/* Loop thru the selected region */
|
||||
for (word = 0; word < *words; word++) {
|
||||
index = offset + word;
|
||||
ret_code = i40e_read_nvm_word(hw, index, &data[word]);
|
||||
if (ret_code)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Update the number of words read from the Shadow RAM */
|
||||
*words = word;
|
||||
|
||||
return ret_code;
|
||||
return i40e_read_nvm_buffer_srctl(hw, offset, words, data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -302,11 +334,18 @@ static i40e_status i40e_calc_nvm_checksum(struct i40e_hw *hw,
|
||||
u16 *checksum)
|
||||
{
|
||||
i40e_status ret_code = 0;
|
||||
struct i40e_virt_mem vmem;
|
||||
u16 pcie_alt_module = 0;
|
||||
u16 checksum_local = 0;
|
||||
u16 vpd_module = 0;
|
||||
u16 word = 0;
|
||||
u32 i = 0;
|
||||
u16 *data;
|
||||
u16 i = 0;
|
||||
|
||||
ret_code = i40e_allocate_virt_mem(hw, &vmem,
|
||||
I40E_SR_SECTOR_SIZE_IN_WORDS * sizeof(u16));
|
||||
if (ret_code)
|
||||
goto i40e_calc_nvm_checksum_exit;
|
||||
data = (u16 *)vmem.va;
|
||||
|
||||
/* read pointer to VPD area */
|
||||
ret_code = i40e_read_nvm_word(hw, I40E_SR_VPD_PTR, &vpd_module);
|
||||
@@ -317,7 +356,7 @@ static i40e_status i40e_calc_nvm_checksum(struct i40e_hw *hw,
|
||||
|
||||
/* read pointer to PCIe Alt Auto-load module */
|
||||
ret_code = i40e_read_nvm_word(hw, I40E_SR_PCIE_ALT_AUTO_LOAD_PTR,
|
||||
&pcie_alt_module);
|
||||
&pcie_alt_module);
|
||||
if (ret_code) {
|
||||
ret_code = I40E_ERR_NVM_CHECKSUM;
|
||||
goto i40e_calc_nvm_checksum_exit;
|
||||
@@ -327,33 +366,40 @@ static i40e_status i40e_calc_nvm_checksum(struct i40e_hw *hw,
|
||||
* except the VPD and PCIe ALT Auto-load modules
|
||||
*/
|
||||
for (i = 0; i < hw->nvm.sr_size; i++) {
|
||||
/* Skip Checksum word */
|
||||
if (i == I40E_SR_SW_CHECKSUM_WORD)
|
||||
i++;
|
||||
/* Skip VPD module (convert byte size to word count) */
|
||||
if (i == (u32)vpd_module) {
|
||||
i += (I40E_SR_VPD_MODULE_MAX_SIZE / 2);
|
||||
if (i >= hw->nvm.sr_size)
|
||||
break;
|
||||
}
|
||||
/* Skip PCIe ALT module (convert byte size to word count) */
|
||||
if (i == (u32)pcie_alt_module) {
|
||||
i += (I40E_SR_PCIE_ALT_MODULE_MAX_SIZE / 2);
|
||||
if (i >= hw->nvm.sr_size)
|
||||
break;
|
||||
/* Read SR page */
|
||||
if ((i % I40E_SR_SECTOR_SIZE_IN_WORDS) == 0) {
|
||||
u16 words = I40E_SR_SECTOR_SIZE_IN_WORDS;
|
||||
|
||||
ret_code = i40e_read_nvm_buffer(hw, i, &words, data);
|
||||
if (ret_code) {
|
||||
ret_code = I40E_ERR_NVM_CHECKSUM;
|
||||
goto i40e_calc_nvm_checksum_exit;
|
||||
}
|
||||
}
|
||||
|
||||
ret_code = i40e_read_nvm_word(hw, (u16)i, &word);
|
||||
if (ret_code) {
|
||||
ret_code = I40E_ERR_NVM_CHECKSUM;
|
||||
goto i40e_calc_nvm_checksum_exit;
|
||||
/* Skip Checksum word */
|
||||
if (i == I40E_SR_SW_CHECKSUM_WORD)
|
||||
continue;
|
||||
/* Skip VPD module (convert byte size to word count) */
|
||||
if ((i >= (u32)vpd_module) &&
|
||||
(i < ((u32)vpd_module +
|
||||
(I40E_SR_VPD_MODULE_MAX_SIZE / 2)))) {
|
||||
continue;
|
||||
}
|
||||
checksum_local += word;
|
||||
/* Skip PCIe ALT module (convert byte size to word count) */
|
||||
if ((i >= (u32)pcie_alt_module) &&
|
||||
(i < ((u32)pcie_alt_module +
|
||||
(I40E_SR_PCIE_ALT_MODULE_MAX_SIZE / 2)))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
checksum_local += data[i % I40E_SR_SECTOR_SIZE_IN_WORDS];
|
||||
}
|
||||
|
||||
*checksum = (u16)I40E_SR_SW_CHECKSUM_BASE - checksum_local;
|
||||
|
||||
i40e_calc_nvm_checksum_exit:
|
||||
i40e_free_virt_mem(hw, &vmem);
|
||||
return ret_code;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,6 @@ i40e_status i40e_aq_set_link_restart_an(struct i40e_hw *hw,
|
||||
i40e_status i40e_aq_get_link_info(struct i40e_hw *hw,
|
||||
bool enable_lse, struct i40e_link_status *link,
|
||||
struct i40e_asq_cmd_details *cmd_details);
|
||||
i40e_status i40e_update_link_info(struct i40e_hw *hw, bool enable_lse);
|
||||
i40e_status i40e_aq_set_local_advt_reg(struct i40e_hw *hw,
|
||||
u64 advt_reg,
|
||||
struct i40e_asq_cmd_details *cmd_details);
|
||||
@@ -260,8 +259,6 @@ i40e_status i40e_init_nvm(struct i40e_hw *hw);
|
||||
i40e_status i40e_acquire_nvm(struct i40e_hw *hw,
|
||||
enum i40e_aq_resource_access_type access);
|
||||
void i40e_release_nvm(struct i40e_hw *hw);
|
||||
i40e_status i40e_read_nvm_srrd(struct i40e_hw *hw, u16 offset,
|
||||
u16 *data);
|
||||
i40e_status i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
|
||||
u16 *data);
|
||||
i40e_status i40e_read_nvm_buffer(struct i40e_hw *hw, u16 offset,
|
||||
|
||||
@@ -310,6 +310,10 @@
|
||||
#define I40E_PRTDCB_RUP2TC_UP6TC_MASK I40E_MASK(0x7, I40E_PRTDCB_RUP2TC_UP6TC_SHIFT)
|
||||
#define I40E_PRTDCB_RUP2TC_UP7TC_SHIFT 21
|
||||
#define I40E_PRTDCB_RUP2TC_UP7TC_MASK I40E_MASK(0x7, I40E_PRTDCB_RUP2TC_UP7TC_SHIFT)
|
||||
#define I40E_PRTDCB_RUPTQ(_i) (0x00122400 + ((_i) * 32)) /* _i=0...7 */ /* Reset: CORER */
|
||||
#define I40E_PRTDCB_RUPTQ_MAX_INDEX 7
|
||||
#define I40E_PRTDCB_RUPTQ_RXQNUM_SHIFT 0
|
||||
#define I40E_PRTDCB_RUPTQ_RXQNUM_MASK I40E_MASK(0x3FFF, I40E_PRTDCB_RUPTQ_RXQNUM_SHIFT)
|
||||
#define I40E_PRTDCB_TC2PFC 0x001C0980 /* Reset: CORER */
|
||||
#define I40E_PRTDCB_TC2PFC_TC2PFC_SHIFT 0
|
||||
#define I40E_PRTDCB_TC2PFC_TC2PFC_MASK I40E_MASK(0xFF, I40E_PRTDCB_TC2PFC_TC2PFC_SHIFT)
|
||||
@@ -421,6 +425,8 @@
|
||||
#define I40E_GLGEN_GPIO_CTL_OUT_DEFAULT_MASK I40E_MASK(0x1, I40E_GLGEN_GPIO_CTL_OUT_DEFAULT_SHIFT)
|
||||
#define I40E_GLGEN_GPIO_CTL_PHY_PIN_NAME_SHIFT 20
|
||||
#define I40E_GLGEN_GPIO_CTL_PHY_PIN_NAME_MASK I40E_MASK(0x3F, I40E_GLGEN_GPIO_CTL_PHY_PIN_NAME_SHIFT)
|
||||
#define I40E_GLGEN_GPIO_CTL_PRT_BIT_MAP_SHIFT 26
|
||||
#define I40E_GLGEN_GPIO_CTL_PRT_BIT_MAP_MASK I40E_MASK(0xF, I40E_GLGEN_GPIO_CTL_PRT_BIT_MAP_SHIFT)
|
||||
#define I40E_GLGEN_GPIO_SET 0x00088184 /* Reset: POR */
|
||||
#define I40E_GLGEN_GPIO_SET_GPIO_INDX_SHIFT 0
|
||||
#define I40E_GLGEN_GPIO_SET_GPIO_INDX_MASK I40E_MASK(0x1F, I40E_GLGEN_GPIO_SET_GPIO_INDX_SHIFT)
|
||||
@@ -484,7 +490,9 @@
|
||||
#define I40E_GLGEN_MDIO_CTRL_CONTMDC_SHIFT 17
|
||||
#define I40E_GLGEN_MDIO_CTRL_CONTMDC_MASK I40E_MASK(0x1, I40E_GLGEN_MDIO_CTRL_CONTMDC_SHIFT)
|
||||
#define I40E_GLGEN_MDIO_CTRL_LEGACY_RSVD1_SHIFT 18
|
||||
#define I40E_GLGEN_MDIO_CTRL_LEGACY_RSVD1_MASK I40E_MASK(0x3FFF, I40E_GLGEN_MDIO_CTRL_LEGACY_RSVD1_SHIFT)
|
||||
#define I40E_GLGEN_MDIO_CTRL_LEGACY_RSVD1_MASK I40E_MASK(0x7FF, I40E_GLGEN_MDIO_CTRL_LEGACY_RSVD1_SHIFT)
|
||||
#define I40E_GLGEN_MDIO_CTRL_LEGACY_RSVD0_SHIFT 29
|
||||
#define I40E_GLGEN_MDIO_CTRL_LEGACY_RSVD0_MASK I40E_MASK(0x7, I40E_GLGEN_MDIO_CTRL_LEGACY_RSVD0_SHIFT)
|
||||
#define I40E_GLGEN_MDIO_I2C_SEL(_i) (0x000881C0 + ((_i) * 4)) /* _i=0...3 */ /* Reset: POR */
|
||||
#define I40E_GLGEN_MDIO_I2C_SEL_MAX_INDEX 3
|
||||
#define I40E_GLGEN_MDIO_I2C_SEL_MDIO_I2C_SEL_SHIFT 0
|
||||
@@ -548,9 +556,6 @@
|
||||
#define I40E_GLGEN_RSTCTL_GRSTDEL_MASK I40E_MASK(0x3F, I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT)
|
||||
#define I40E_GLGEN_RSTCTL_ECC_RST_ENA_SHIFT 8
|
||||
#define I40E_GLGEN_RSTCTL_ECC_RST_ENA_MASK I40E_MASK(0x1, I40E_GLGEN_RSTCTL_ECC_RST_ENA_SHIFT)
|
||||
#define I40E_GLGEN_RSTENA_EMP 0x000B818C /* Reset: POR */
|
||||
#define I40E_GLGEN_RSTENA_EMP_EMP_RST_ENA_SHIFT 0
|
||||
#define I40E_GLGEN_RSTENA_EMP_EMP_RST_ENA_MASK I40E_MASK(0x1, I40E_GLGEN_RSTENA_EMP_EMP_RST_ENA_SHIFT)
|
||||
#define I40E_GLGEN_RTRIG 0x000B8190 /* Reset: CORER */
|
||||
#define I40E_GLGEN_RTRIG_CORER_SHIFT 0
|
||||
#define I40E_GLGEN_RTRIG_CORER_MASK I40E_MASK(0x1, I40E_GLGEN_RTRIG_CORER_SHIFT)
|
||||
@@ -1066,7 +1071,7 @@
|
||||
#define I40E_PFINT_RATEN_INTERVAL_MASK I40E_MASK(0x3F, I40E_PFINT_RATEN_INTERVAL_SHIFT)
|
||||
#define I40E_PFINT_RATEN_INTRL_ENA_SHIFT 6
|
||||
#define I40E_PFINT_RATEN_INTRL_ENA_MASK I40E_MASK(0x1, I40E_PFINT_RATEN_INTRL_ENA_SHIFT)
|
||||
#define I40E_PFINT_STAT_CTL0 0x00038400 /* Reset: PFR */
|
||||
#define I40E_PFINT_STAT_CTL0 0x00038400 /* Reset: CORER */
|
||||
#define I40E_PFINT_STAT_CTL0_OTHER_ITR_INDX_SHIFT 2
|
||||
#define I40E_PFINT_STAT_CTL0_OTHER_ITR_INDX_MASK I40E_MASK(0x3, I40E_PFINT_STAT_CTL0_OTHER_ITR_INDX_SHIFT)
|
||||
#define I40E_QINT_RQCTL(_Q) (0x0003A000 + ((_Q) * 4)) /* _i=0...1535 */ /* Reset: CORER */
|
||||
@@ -1171,7 +1176,7 @@
|
||||
#define I40E_VFINT_ITRN_MAX_INDEX 2
|
||||
#define I40E_VFINT_ITRN_INTERVAL_SHIFT 0
|
||||
#define I40E_VFINT_ITRN_INTERVAL_MASK I40E_MASK(0xFFF, I40E_VFINT_ITRN_INTERVAL_SHIFT)
|
||||
#define I40E_VFINT_STAT_CTL0(_VF) (0x0002A000 + ((_VF) * 4)) /* _i=0...127 */ /* Reset: VFR */
|
||||
#define I40E_VFINT_STAT_CTL0(_VF) (0x0002A000 + ((_VF) * 4)) /* _i=0...127 */ /* Reset: CORER */
|
||||
#define I40E_VFINT_STAT_CTL0_MAX_INDEX 127
|
||||
#define I40E_VFINT_STAT_CTL0_OTHER_ITR_INDX_SHIFT 2
|
||||
#define I40E_VFINT_STAT_CTL0_OTHER_ITR_INDX_MASK I40E_MASK(0x3, I40E_VFINT_STAT_CTL0_OTHER_ITR_INDX_SHIFT)
|
||||
@@ -1803,9 +1808,6 @@
|
||||
#define I40E_GLPCI_GSCN_0_3_MAX_INDEX 3
|
||||
#define I40E_GLPCI_GSCN_0_3_EVENT_COUNTER_SHIFT 0
|
||||
#define I40E_GLPCI_GSCN_0_3_EVENT_COUNTER_MASK I40E_MASK(0xFFFFFFFF, I40E_GLPCI_GSCN_0_3_EVENT_COUNTER_SHIFT)
|
||||
#define I40E_GLPCI_LATCT 0x0009C4B4 /* Reset: PCIR */
|
||||
#define I40E_GLPCI_LATCT_PCI_COUNT_LAT_CT_SHIFT 0
|
||||
#define I40E_GLPCI_LATCT_PCI_COUNT_LAT_CT_MASK I40E_MASK(0xFFFFFFFF, I40E_GLPCI_LATCT_PCI_COUNT_LAT_CT_SHIFT)
|
||||
#define I40E_GLPCI_LBARCTRL 0x000BE484 /* Reset: POR */
|
||||
#define I40E_GLPCI_LBARCTRL_PREFBAR_SHIFT 0
|
||||
#define I40E_GLPCI_LBARCTRL_PREFBAR_MASK I40E_MASK(0x1, I40E_GLPCI_LBARCTRL_PREFBAR_SHIFT)
|
||||
@@ -1902,6 +1904,11 @@
|
||||
#define I40E_GLPCI_VFSUP_VF_PREFETCH_MASK I40E_MASK(0x1, I40E_GLPCI_VFSUP_VF_PREFETCH_SHIFT)
|
||||
#define I40E_GLPCI_VFSUP_VR_BAR_TYPE_SHIFT 1
|
||||
#define I40E_GLPCI_VFSUP_VR_BAR_TYPE_MASK I40E_MASK(0x1, I40E_GLPCI_VFSUP_VR_BAR_TYPE_SHIFT)
|
||||
#define I40E_GLTPH_CTRL 0x000BE480 /* Reset: PCIR */
|
||||
#define I40E_GLTPH_CTRL_DESC_PH_SHIFT 9
|
||||
#define I40E_GLTPH_CTRL_DESC_PH_MASK I40E_MASK(0x3, I40E_GLTPH_CTRL_DESC_PH_SHIFT)
|
||||
#define I40E_GLTPH_CTRL_DATA_PH_SHIFT 11
|
||||
#define I40E_GLTPH_CTRL_DATA_PH_MASK I40E_MASK(0x3, I40E_GLTPH_CTRL_DATA_PH_SHIFT)
|
||||
#define I40E_PF_FUNC_RID 0x0009C000 /* Reset: PCIR */
|
||||
#define I40E_PF_FUNC_RID_FUNCTION_NUMBER_SHIFT 0
|
||||
#define I40E_PF_FUNC_RID_FUNCTION_NUMBER_MASK I40E_MASK(0x7, I40E_PF_FUNC_RID_FUNCTION_NUMBER_SHIFT)
|
||||
@@ -2374,20 +2381,20 @@
|
||||
#define I40E_GL_RXERR2_L_FCOEDIXAC_MASK I40E_MASK(0xFFFFFFFF, I40E_GL_RXERR2_L_FCOEDIXAC_SHIFT)
|
||||
#define I40E_GLPRT_BPRCH(_i) (0x003005E4 + ((_i) * 8)) /* _i=0...3 */ /* Reset: CORER */
|
||||
#define I40E_GLPRT_BPRCH_MAX_INDEX 3
|
||||
#define I40E_GLPRT_BPRCH_UPRCH_SHIFT 0
|
||||
#define I40E_GLPRT_BPRCH_UPRCH_MASK I40E_MASK(0xFFFF, I40E_GLPRT_BPRCH_UPRCH_SHIFT)
|
||||
#define I40E_GLPRT_BPRCH_BPRCH_SHIFT 0
|
||||
#define I40E_GLPRT_BPRCH_BPRCH_MASK I40E_MASK(0xFFFF, I40E_GLPRT_BPRCH_BPRCH_SHIFT)
|
||||
#define I40E_GLPRT_BPRCL(_i) (0x003005E0 + ((_i) * 8)) /* _i=0...3 */ /* Reset: CORER */
|
||||
#define I40E_GLPRT_BPRCL_MAX_INDEX 3
|
||||
#define I40E_GLPRT_BPRCL_UPRCH_SHIFT 0
|
||||
#define I40E_GLPRT_BPRCL_UPRCH_MASK I40E_MASK(0xFFFFFFFF, I40E_GLPRT_BPRCL_UPRCH_SHIFT)
|
||||
#define I40E_GLPRT_BPRCL_BPRCL_SHIFT 0
|
||||
#define I40E_GLPRT_BPRCL_BPRCL_MASK I40E_MASK(0xFFFFFFFF, I40E_GLPRT_BPRCL_BPRCL_SHIFT)
|
||||
#define I40E_GLPRT_BPTCH(_i) (0x00300A04 + ((_i) * 8)) /* _i=0...3 */ /* Reset: CORER */
|
||||
#define I40E_GLPRT_BPTCH_MAX_INDEX 3
|
||||
#define I40E_GLPRT_BPTCH_UPRCH_SHIFT 0
|
||||
#define I40E_GLPRT_BPTCH_UPRCH_MASK I40E_MASK(0xFFFF, I40E_GLPRT_BPTCH_UPRCH_SHIFT)
|
||||
#define I40E_GLPRT_BPTCH_BPTCH_SHIFT 0
|
||||
#define I40E_GLPRT_BPTCH_BPTCH_MASK I40E_MASK(0xFFFF, I40E_GLPRT_BPTCH_BPTCH_SHIFT)
|
||||
#define I40E_GLPRT_BPTCL(_i) (0x00300A00 + ((_i) * 8)) /* _i=0...3 */ /* Reset: CORER */
|
||||
#define I40E_GLPRT_BPTCL_MAX_INDEX 3
|
||||
#define I40E_GLPRT_BPTCL_UPRCH_SHIFT 0
|
||||
#define I40E_GLPRT_BPTCL_UPRCH_MASK I40E_MASK(0xFFFFFFFF, I40E_GLPRT_BPTCL_UPRCH_SHIFT)
|
||||
#define I40E_GLPRT_BPTCL_BPTCL_SHIFT 0
|
||||
#define I40E_GLPRT_BPTCL_BPTCL_MASK I40E_MASK(0xFFFFFFFF, I40E_GLPRT_BPTCL_BPTCL_SHIFT)
|
||||
#define I40E_GLPRT_CRCERRS(_i) (0x00300080 + ((_i) * 8)) /* _i=0...3 */ /* Reset: CORER */
|
||||
#define I40E_GLPRT_CRCERRS_MAX_INDEX 3
|
||||
#define I40E_GLPRT_CRCERRS_CRCERRS_SHIFT 0
|
||||
@@ -2620,10 +2627,6 @@
|
||||
#define I40E_GLPRT_TDOLD_MAX_INDEX 3
|
||||
#define I40E_GLPRT_TDOLD_GLPRT_TDOLD_SHIFT 0
|
||||
#define I40E_GLPRT_TDOLD_GLPRT_TDOLD_MASK I40E_MASK(0xFFFFFFFF, I40E_GLPRT_TDOLD_GLPRT_TDOLD_SHIFT)
|
||||
#define I40E_GLPRT_TDPC(_i) (0x00375400 + ((_i) * 8)) /* _i=0...3 */ /* Reset: CORER */
|
||||
#define I40E_GLPRT_TDPC_MAX_INDEX 3
|
||||
#define I40E_GLPRT_TDPC_TDPC_SHIFT 0
|
||||
#define I40E_GLPRT_TDPC_TDPC_MASK I40E_MASK(0xFFFFFFFF, I40E_GLPRT_TDPC_TDPC_SHIFT)
|
||||
#define I40E_GLPRT_UPRCH(_i) (0x003005A4 + ((_i) * 8)) /* _i=0...3 */ /* Reset: CORER */
|
||||
#define I40E_GLPRT_UPRCH_MAX_INDEX 3
|
||||
#define I40E_GLPRT_UPRCH_UPRCH_SHIFT 0
|
||||
@@ -2990,9 +2993,6 @@
|
||||
#define I40E_PRTTSYN_TXTIME_L 0x001E41C0 /* Reset: GLOBR */
|
||||
#define I40E_PRTTSYN_TXTIME_L_TXTIEM_L_SHIFT 0
|
||||
#define I40E_PRTTSYN_TXTIME_L_TXTIEM_L_MASK I40E_MASK(0xFFFFFFFF, I40E_PRTTSYN_TXTIME_L_TXTIEM_L_SHIFT)
|
||||
#define I40E_GLSCD_QUANTA 0x000B2080 /* Reset: CORER */
|
||||
#define I40E_GLSCD_QUANTA_TSCDQUANTA_SHIFT 0
|
||||
#define I40E_GLSCD_QUANTA_TSCDQUANTA_MASK I40E_MASK(0x7, I40E_GLSCD_QUANTA_TSCDQUANTA_SHIFT)
|
||||
#define I40E_GL_MDET_RX 0x0012A510 /* Reset: CORER */
|
||||
#define I40E_GL_MDET_RX_FUNCTION_SHIFT 0
|
||||
#define I40E_GL_MDET_RX_FUNCTION_MASK I40E_MASK(0xFF, I40E_GL_MDET_RX_FUNCTION_SHIFT)
|
||||
@@ -3258,7 +3258,7 @@
|
||||
#define I40E_VFINT_ITRN1_MAX_INDEX 2
|
||||
#define I40E_VFINT_ITRN1_INTERVAL_SHIFT 0
|
||||
#define I40E_VFINT_ITRN1_INTERVAL_MASK I40E_MASK(0xFFF, I40E_VFINT_ITRN1_INTERVAL_SHIFT)
|
||||
#define I40E_VFINT_STAT_CTL01 0x00005400 /* Reset: VFR */
|
||||
#define I40E_VFINT_STAT_CTL01 0x00005400 /* Reset: CORER */
|
||||
#define I40E_VFINT_STAT_CTL01_OTHER_ITR_INDX_SHIFT 2
|
||||
#define I40E_VFINT_STAT_CTL01_OTHER_ITR_INDX_MASK I40E_MASK(0x3, I40E_VFINT_STAT_CTL01_OTHER_ITR_INDX_SHIFT)
|
||||
#define I40E_QRX_TAIL1(_Q) (0x00002000 + ((_Q) * 4)) /* _i=0...15 */ /* Reset: CORER */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -96,6 +96,14 @@ enum i40e_dyn_idx_t {
|
||||
|
||||
/* How many Rx Buffers do we bundle into one write to the hardware ? */
|
||||
#define I40E_RX_BUFFER_WRITE 16 /* Must be power of 2 */
|
||||
#define I40E_RX_INCREMENT(r, i) \
|
||||
do { \
|
||||
(i)++; \
|
||||
if ((i) == (r)->count) \
|
||||
i = 0; \
|
||||
r->next_to_clean = i; \
|
||||
} while (0)
|
||||
|
||||
#define I40E_RX_NEXT_DESC(r, i, n) \
|
||||
do { \
|
||||
(i)++; \
|
||||
@@ -151,6 +159,7 @@ struct i40e_tx_buffer {
|
||||
|
||||
struct i40e_rx_buffer {
|
||||
struct sk_buff *skb;
|
||||
void *hdr_buf;
|
||||
dma_addr_t dma;
|
||||
struct page *page;
|
||||
dma_addr_t page_dma;
|
||||
@@ -223,8 +232,8 @@ struct i40e_ring {
|
||||
u16 rx_buf_len;
|
||||
u8 dtype;
|
||||
#define I40E_RX_DTYPE_NO_SPLIT 0
|
||||
#define I40E_RX_DTYPE_SPLIT_ALWAYS 1
|
||||
#define I40E_RX_DTYPE_HEADER_SPLIT 2
|
||||
#define I40E_RX_DTYPE_HEADER_SPLIT 1
|
||||
#define I40E_RX_DTYPE_SPLIT_ALWAYS 2
|
||||
u8 hsplit;
|
||||
#define I40E_RX_SPLIT_L2 0x1
|
||||
#define I40E_RX_SPLIT_IP 0x2
|
||||
@@ -280,7 +289,9 @@ struct i40e_ring_container {
|
||||
#define i40e_for_each_ring(pos, head) \
|
||||
for (pos = (head).ring; pos != NULL; pos = pos->next)
|
||||
|
||||
void i40e_alloc_rx_buffers(struct i40e_ring *rxr, u16 cleaned_count);
|
||||
void i40e_alloc_rx_buffers_ps(struct i40e_ring *rxr, u16 cleaned_count);
|
||||
void i40e_alloc_rx_buffers_1buf(struct i40e_ring *rxr, u16 cleaned_count);
|
||||
void i40e_alloc_rx_headers(struct i40e_ring *rxr);
|
||||
netdev_tx_t i40e_lan_xmit_frame(struct sk_buff *skb, struct net_device *netdev);
|
||||
void i40e_clean_tx_ring(struct i40e_ring *tx_ring);
|
||||
void i40e_clean_rx_ring(struct i40e_ring *rx_ring);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user