Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
Jeff Kirsher says: ==================== This series contains updates to ixgbe, ixgbevf, igbvf, igb and networking core (bridge). Most notably is the addition of support for local link multicast addresses in SR-IOV mode to the networking core. Also note, the ixgbe patch "ixgbe: Add support for pipeline reset" and "ixgbe: Fix return value from macvlan filter function" is revised based on community feedback. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -693,6 +693,7 @@ extern s32 ixgbe_fdir_erase_perfect_filter_82599(struct ixgbe_hw *hw,
|
||||
u16 soft_id);
|
||||
extern void ixgbe_atr_compute_perfect_hash_82599(union ixgbe_atr_input *input,
|
||||
union ixgbe_atr_input *mask);
|
||||
extern bool ixgbe_verify_lesm_fw_enabled_82599(struct ixgbe_hw *hw);
|
||||
extern void ixgbe_set_rx_mode(struct net_device *netdev);
|
||||
#ifdef CONFIG_IXGBE_DCB
|
||||
extern void ixgbe_set_rx_drop_en(struct ixgbe_adapter *adapter);
|
||||
|
@@ -62,7 +62,6 @@ static s32 ixgbe_setup_copper_link_82599(struct ixgbe_hw *hw,
|
||||
bool autoneg,
|
||||
bool autoneg_wait_to_complete);
|
||||
static s32 ixgbe_verify_fw_version_82599(struct ixgbe_hw *hw);
|
||||
static bool ixgbe_verify_lesm_fw_enabled_82599(struct ixgbe_hw *hw);
|
||||
|
||||
static void ixgbe_init_mac_link_ops_82599(struct ixgbe_hw *hw)
|
||||
{
|
||||
@@ -99,9 +98,8 @@ static void ixgbe_init_mac_link_ops_82599(struct ixgbe_hw *hw)
|
||||
static s32 ixgbe_setup_sfp_modules_82599(struct ixgbe_hw *hw)
|
||||
{
|
||||
s32 ret_val = 0;
|
||||
u32 reg_anlp1 = 0;
|
||||
u32 i = 0;
|
||||
u16 list_offset, data_offset, data_value;
|
||||
bool got_lock = false;
|
||||
|
||||
if (hw->phy.sfp_type != ixgbe_sfp_type_unknown) {
|
||||
ixgbe_init_mac_link_ops_82599(hw);
|
||||
@@ -137,28 +135,36 @@ static s32 ixgbe_setup_sfp_modules_82599(struct ixgbe_hw *hw)
|
||||
usleep_range(hw->eeprom.semaphore_delay * 1000,
|
||||
hw->eeprom.semaphore_delay * 2000);
|
||||
|
||||
/* Now restart DSP by setting Restart_AN and clearing LMS */
|
||||
IXGBE_WRITE_REG(hw, IXGBE_AUTOC, ((IXGBE_READ_REG(hw,
|
||||
IXGBE_AUTOC) & ~IXGBE_AUTOC_LMS_MASK) |
|
||||
IXGBE_AUTOC_AN_RESTART));
|
||||
/* Need SW/FW semaphore around AUTOC writes if LESM on,
|
||||
* likewise reset_pipeline requires lock as it also writes
|
||||
* AUTOC.
|
||||
*/
|
||||
if (ixgbe_verify_lesm_fw_enabled_82599(hw)) {
|
||||
ret_val = hw->mac.ops.acquire_swfw_sync(hw,
|
||||
IXGBE_GSSR_MAC_CSR_SM);
|
||||
if (ret_val)
|
||||
goto setup_sfp_out;
|
||||
|
||||
/* Wait for AN to leave state 0 */
|
||||
for (i = 0; i < 10; i++) {
|
||||
usleep_range(4000, 8000);
|
||||
reg_anlp1 = IXGBE_READ_REG(hw, IXGBE_ANLP1);
|
||||
if (reg_anlp1 & IXGBE_ANLP1_AN_STATE_MASK)
|
||||
break;
|
||||
got_lock = true;
|
||||
}
|
||||
if (!(reg_anlp1 & IXGBE_ANLP1_AN_STATE_MASK)) {
|
||||
hw_dbg(hw, "sfp module setup not complete\n");
|
||||
|
||||
/* Restart DSP and set SFI mode */
|
||||
IXGBE_WRITE_REG(hw, IXGBE_AUTOC, (IXGBE_READ_REG(hw,
|
||||
IXGBE_AUTOC) | IXGBE_AUTOC_LMS_10G_SERIAL));
|
||||
|
||||
ret_val = ixgbe_reset_pipeline_82599(hw);
|
||||
|
||||
if (got_lock) {
|
||||
hw->mac.ops.release_swfw_sync(hw,
|
||||
IXGBE_GSSR_MAC_CSR_SM);
|
||||
got_lock = false;
|
||||
}
|
||||
|
||||
if (ret_val) {
|
||||
hw_dbg(hw, " sfp module setup not complete\n");
|
||||
ret_val = IXGBE_ERR_SFP_SETUP_NOT_COMPLETE;
|
||||
goto setup_sfp_out;
|
||||
}
|
||||
|
||||
/* Restart DSP by setting Restart_AN and return to SFI mode */
|
||||
IXGBE_WRITE_REG(hw, IXGBE_AUTOC, (IXGBE_READ_REG(hw,
|
||||
IXGBE_AUTOC) | IXGBE_AUTOC_LMS_10G_SERIAL |
|
||||
IXGBE_AUTOC_AN_RESTART));
|
||||
}
|
||||
|
||||
setup_sfp_out:
|
||||
@@ -394,14 +400,26 @@ static s32 ixgbe_start_mac_link_82599(struct ixgbe_hw *hw,
|
||||
u32 links_reg;
|
||||
u32 i;
|
||||
s32 status = 0;
|
||||
bool got_lock = false;
|
||||
|
||||
if (ixgbe_verify_lesm_fw_enabled_82599(hw)) {
|
||||
status = hw->mac.ops.acquire_swfw_sync(hw,
|
||||
IXGBE_GSSR_MAC_CSR_SM);
|
||||
if (status)
|
||||
goto out;
|
||||
|
||||
got_lock = true;
|
||||
}
|
||||
|
||||
/* Restart link */
|
||||
autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
|
||||
autoc_reg |= IXGBE_AUTOC_AN_RESTART;
|
||||
IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc_reg);
|
||||
ixgbe_reset_pipeline_82599(hw);
|
||||
|
||||
if (got_lock)
|
||||
hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_MAC_CSR_SM);
|
||||
|
||||
/* Only poll for autoneg to complete if specified to do so */
|
||||
if (autoneg_wait_to_complete) {
|
||||
autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
|
||||
if ((autoc_reg & IXGBE_AUTOC_LMS_MASK) ==
|
||||
IXGBE_AUTOC_LMS_KX4_KX_KR ||
|
||||
(autoc_reg & IXGBE_AUTOC_LMS_MASK) ==
|
||||
@@ -425,6 +443,7 @@ static s32 ixgbe_start_mac_link_82599(struct ixgbe_hw *hw,
|
||||
/* Add delay to filter out noises during initial link setup */
|
||||
msleep(50);
|
||||
|
||||
out:
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -779,6 +798,7 @@ static s32 ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw,
|
||||
u32 links_reg;
|
||||
u32 i;
|
||||
ixgbe_link_speed link_capabilities = IXGBE_LINK_SPEED_UNKNOWN;
|
||||
bool got_lock = false;
|
||||
|
||||
/* Check to see if speed passed in is supported. */
|
||||
status = hw->mac.ops.get_link_capabilities(hw, &link_capabilities,
|
||||
@@ -836,9 +856,26 @@ static s32 ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw,
|
||||
}
|
||||
|
||||
if (autoc != start_autoc) {
|
||||
/* Need SW/FW semaphore around AUTOC writes if LESM is on,
|
||||
* likewise reset_pipeline requires us to hold this lock as
|
||||
* it also writes to AUTOC.
|
||||
*/
|
||||
if (ixgbe_verify_lesm_fw_enabled_82599(hw)) {
|
||||
status = hw->mac.ops.acquire_swfw_sync(hw,
|
||||
IXGBE_GSSR_MAC_CSR_SM);
|
||||
if (status != 0)
|
||||
goto out;
|
||||
|
||||
got_lock = true;
|
||||
}
|
||||
|
||||
/* Restart link */
|
||||
autoc |= IXGBE_AUTOC_AN_RESTART;
|
||||
IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc);
|
||||
ixgbe_reset_pipeline_82599(hw);
|
||||
|
||||
if (got_lock)
|
||||
hw->mac.ops.release_swfw_sync(hw,
|
||||
IXGBE_GSSR_MAC_CSR_SM);
|
||||
|
||||
/* Only poll for autoneg to complete if specified to do so */
|
||||
if (autoneg_wait_to_complete) {
|
||||
@@ -994,9 +1031,28 @@ mac_reset_top:
|
||||
hw->mac.orig_autoc2 = autoc2;
|
||||
hw->mac.orig_link_settings_stored = true;
|
||||
} else {
|
||||
if (autoc != hw->mac.orig_autoc)
|
||||
IXGBE_WRITE_REG(hw, IXGBE_AUTOC, (hw->mac.orig_autoc |
|
||||
IXGBE_AUTOC_AN_RESTART));
|
||||
if (autoc != hw->mac.orig_autoc) {
|
||||
/* Need SW/FW semaphore around AUTOC writes if LESM is
|
||||
* on, likewise reset_pipeline requires us to hold
|
||||
* this lock as it also writes to AUTOC.
|
||||
*/
|
||||
bool got_lock = false;
|
||||
if (ixgbe_verify_lesm_fw_enabled_82599(hw)) {
|
||||
status = hw->mac.ops.acquire_swfw_sync(hw,
|
||||
IXGBE_GSSR_MAC_CSR_SM);
|
||||
if (status)
|
||||
goto reset_hw_out;
|
||||
|
||||
got_lock = true;
|
||||
}
|
||||
|
||||
IXGBE_WRITE_REG(hw, IXGBE_AUTOC, hw->mac.orig_autoc);
|
||||
ixgbe_reset_pipeline_82599(hw);
|
||||
|
||||
if (got_lock)
|
||||
hw->mac.ops.release_swfw_sync(hw,
|
||||
IXGBE_GSSR_MAC_CSR_SM);
|
||||
}
|
||||
|
||||
if ((autoc2 & IXGBE_AUTOC2_UPPER_MASK) !=
|
||||
(hw->mac.orig_autoc2 & IXGBE_AUTOC2_UPPER_MASK)) {
|
||||
@@ -1983,7 +2039,7 @@ fw_version_out:
|
||||
* Returns true if the LESM FW module is present and enabled. Otherwise
|
||||
* returns false. Smart Speed must be disabled if LESM FW module is enabled.
|
||||
**/
|
||||
static bool ixgbe_verify_lesm_fw_enabled_82599(struct ixgbe_hw *hw)
|
||||
bool ixgbe_verify_lesm_fw_enabled_82599(struct ixgbe_hw *hw)
|
||||
{
|
||||
bool lesm_enabled = false;
|
||||
u16 fw_offset, fw_lesm_param_offset, fw_lesm_state;
|
||||
|
@@ -90,6 +90,7 @@ static s32 ixgbe_setup_fc(struct ixgbe_hw *hw)
|
||||
s32 ret_val = 0;
|
||||
u32 reg = 0, reg_bp = 0;
|
||||
u16 reg_cu = 0;
|
||||
bool got_lock = false;
|
||||
|
||||
/*
|
||||
* Validate the requested mode. Strict IEEE mode does not allow
|
||||
@@ -210,8 +211,29 @@ static s32 ixgbe_setup_fc(struct ixgbe_hw *hw)
|
||||
*
|
||||
*/
|
||||
if (hw->phy.media_type == ixgbe_media_type_backplane) {
|
||||
reg_bp |= IXGBE_AUTOC_AN_RESTART;
|
||||
/* Need the SW/FW semaphore around AUTOC writes if 82599 and
|
||||
* LESM is on, likewise reset_pipeline requries the lock as
|
||||
* it also writes AUTOC.
|
||||
*/
|
||||
if ((hw->mac.type == ixgbe_mac_82599EB) &&
|
||||
ixgbe_verify_lesm_fw_enabled_82599(hw)) {
|
||||
ret_val = hw->mac.ops.acquire_swfw_sync(hw,
|
||||
IXGBE_GSSR_MAC_CSR_SM);
|
||||
if (ret_val)
|
||||
goto out;
|
||||
|
||||
got_lock = true;
|
||||
}
|
||||
|
||||
IXGBE_WRITE_REG(hw, IXGBE_AUTOC, reg_bp);
|
||||
|
||||
if (hw->mac.type == ixgbe_mac_82599EB)
|
||||
ixgbe_reset_pipeline_82599(hw);
|
||||
|
||||
if (got_lock)
|
||||
hw->mac.ops.release_swfw_sync(hw,
|
||||
IXGBE_GSSR_MAC_CSR_SM);
|
||||
|
||||
} else if ((hw->phy.media_type == ixgbe_media_type_copper) &&
|
||||
(ixgbe_device_supports_autoneg_fc(hw) == 0)) {
|
||||
hw->phy.ops.write_reg(hw, MDIO_AN_ADVERTISE,
|
||||
@@ -2616,6 +2638,7 @@ s32 ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, u32 index)
|
||||
bool link_up = false;
|
||||
u32 autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
|
||||
u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
|
||||
s32 ret_val = 0;
|
||||
|
||||
/*
|
||||
* Link must be up to auto-blink the LEDs;
|
||||
@@ -2624,10 +2647,28 @@ s32 ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, u32 index)
|
||||
hw->mac.ops.check_link(hw, &speed, &link_up, false);
|
||||
|
||||
if (!link_up) {
|
||||
/* Need the SW/FW semaphore around AUTOC writes if 82599 and
|
||||
* LESM is on.
|
||||
*/
|
||||
bool got_lock = false;
|
||||
|
||||
if ((hw->mac.type == ixgbe_mac_82599EB) &&
|
||||
ixgbe_verify_lesm_fw_enabled_82599(hw)) {
|
||||
ret_val = hw->mac.ops.acquire_swfw_sync(hw,
|
||||
IXGBE_GSSR_MAC_CSR_SM);
|
||||
if (ret_val)
|
||||
goto out;
|
||||
|
||||
got_lock = true;
|
||||
}
|
||||
autoc_reg |= IXGBE_AUTOC_AN_RESTART;
|
||||
autoc_reg |= IXGBE_AUTOC_FLU;
|
||||
IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc_reg);
|
||||
IXGBE_WRITE_FLUSH(hw);
|
||||
|
||||
if (got_lock)
|
||||
hw->mac.ops.release_swfw_sync(hw,
|
||||
IXGBE_GSSR_MAC_CSR_SM);
|
||||
usleep_range(10000, 20000);
|
||||
}
|
||||
|
||||
@@ -2636,7 +2677,8 @@ s32 ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, u32 index)
|
||||
IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg);
|
||||
IXGBE_WRITE_FLUSH(hw);
|
||||
|
||||
return 0;
|
||||
out:
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2648,18 +2690,40 @@ s32 ixgbe_blink_led_stop_generic(struct ixgbe_hw *hw, u32 index)
|
||||
{
|
||||
u32 autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
|
||||
u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
|
||||
s32 ret_val = 0;
|
||||
bool got_lock = false;
|
||||
|
||||
/* Need the SW/FW semaphore around AUTOC writes if 82599 and
|
||||
* LESM is on.
|
||||
*/
|
||||
if ((hw->mac.type == ixgbe_mac_82599EB) &&
|
||||
ixgbe_verify_lesm_fw_enabled_82599(hw)) {
|
||||
ret_val = hw->mac.ops.acquire_swfw_sync(hw,
|
||||
IXGBE_GSSR_MAC_CSR_SM);
|
||||
if (ret_val)
|
||||
goto out;
|
||||
|
||||
got_lock = true;
|
||||
}
|
||||
|
||||
autoc_reg &= ~IXGBE_AUTOC_FLU;
|
||||
autoc_reg |= IXGBE_AUTOC_AN_RESTART;
|
||||
IXGBE_WRITE_REG(hw, IXGBE_AUTOC, autoc_reg);
|
||||
|
||||
if (hw->mac.type == ixgbe_mac_82599EB)
|
||||
ixgbe_reset_pipeline_82599(hw);
|
||||
|
||||
if (got_lock)
|
||||
hw->mac.ops.release_swfw_sync(hw, IXGBE_GSSR_MAC_CSR_SM);
|
||||
|
||||
led_reg &= ~IXGBE_LED_MODE_MASK(index);
|
||||
led_reg &= ~IXGBE_LED_BLINK(index);
|
||||
led_reg |= IXGBE_LED_LINK_ACTIVE << IXGBE_LED_MODE_SHIFT(index);
|
||||
IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, led_reg);
|
||||
IXGBE_WRITE_FLUSH(hw);
|
||||
|
||||
return 0;
|
||||
out:
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -356,13 +356,37 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)
|
||||
|
||||
/* Transmit Descriptor Formats
|
||||
*
|
||||
* Advanced Transmit Descriptor
|
||||
* 82598 Advanced Transmit Descriptor
|
||||
* +--------------------------------------------------------------+
|
||||
* 0 | Buffer Address [63:0] |
|
||||
* +--------------------------------------------------------------+
|
||||
* 8 | PAYLEN | PORTS | IDX | STA | DCMD |DTYP | RSV | DTALEN |
|
||||
* 8 | PAYLEN | POPTS | IDX | STA | DCMD |DTYP | RSV | DTALEN |
|
||||
* +--------------------------------------------------------------+
|
||||
* 63 46 45 40 39 36 35 32 31 24 23 20 19 0
|
||||
*
|
||||
* 82598 Advanced Transmit Descriptor (Write-Back Format)
|
||||
* +--------------------------------------------------------------+
|
||||
* 0 | RSV [63:0] |
|
||||
* +--------------------------------------------------------------+
|
||||
* 8 | RSV | STA | NXTSEQ |
|
||||
* +--------------------------------------------------------------+
|
||||
* 63 36 35 32 31 0
|
||||
*
|
||||
* 82599+ Advanced Transmit Descriptor
|
||||
* +--------------------------------------------------------------+
|
||||
* 0 | Buffer Address [63:0] |
|
||||
* +--------------------------------------------------------------+
|
||||
* 8 |PAYLEN |POPTS|CC|IDX |STA |DCMD |DTYP |MAC |RSV |DTALEN |
|
||||
* +--------------------------------------------------------------+
|
||||
* 63 46 45 40 39 38 36 35 32 31 24 23 20 19 18 17 16 15 0
|
||||
*
|
||||
* 82599+ Advanced Transmit Descriptor (Write-Back Format)
|
||||
* +--------------------------------------------------------------+
|
||||
* 0 | RSV [63:0] |
|
||||
* +--------------------------------------------------------------+
|
||||
* 8 | RSV | STA | RSV |
|
||||
* +--------------------------------------------------------------+
|
||||
* 63 36 35 32 31 0
|
||||
*/
|
||||
|
||||
for (n = 0; n < adapter->num_tx_queues; n++) {
|
||||
@@ -423,7 +447,9 @@ rx_ring_summary:
|
||||
|
||||
dev_info(&adapter->pdev->dev, "RX Rings Dump\n");
|
||||
|
||||
/* Advanced Receive Descriptor (Read) Format
|
||||
/* Receive Descriptor Formats
|
||||
*
|
||||
* 82598 Advanced Receive Descriptor (Read) Format
|
||||
* 63 1 0
|
||||
* +-----------------------------------------------------+
|
||||
* 0 | Packet Buffer Address [63:1] |A0/NSE|
|
||||
@@ -432,17 +458,40 @@ rx_ring_summary:
|
||||
* +-----------------------------------------------------+
|
||||
*
|
||||
*
|
||||
* Advanced Receive Descriptor (Write-Back) Format
|
||||
* 82598 Advanced Receive Descriptor (Write-Back) Format
|
||||
*
|
||||
* 63 48 47 32 31 30 21 20 16 15 4 3 0
|
||||
* +------------------------------------------------------+
|
||||
* 0 | Packet IP |SPH| HDR_LEN | RSV|Packet| RSS |
|
||||
* | Checksum Ident | | | | Type | Type |
|
||||
* 0 | RSS Hash / |SPH| HDR_LEN | RSV |Packet| RSS |
|
||||
* | Packet | IP | | | | Type | Type |
|
||||
* | Checksum | Ident | | | | | |
|
||||
* +------------------------------------------------------+
|
||||
* 8 | VLAN Tag | Length | Extended Error | Extended Status |
|
||||
* +------------------------------------------------------+
|
||||
* 63 48 47 32 31 20 19 0
|
||||
*
|
||||
* 82599+ Advanced Receive Descriptor (Read) Format
|
||||
* 63 1 0
|
||||
* +-----------------------------------------------------+
|
||||
* 0 | Packet Buffer Address [63:1] |A0/NSE|
|
||||
* +----------------------------------------------+------+
|
||||
* 8 | Header Buffer Address [63:1] | DD |
|
||||
* +-----------------------------------------------------+
|
||||
*
|
||||
*
|
||||
* 82599+ Advanced Receive Descriptor (Write-Back) Format
|
||||
*
|
||||
* 63 48 47 32 31 30 21 20 17 16 4 3 0
|
||||
* +------------------------------------------------------+
|
||||
* 0 |RSS / Frag Checksum|SPH| HDR_LEN |RSC- |Packet| RSS |
|
||||
* |/ RTT / PCoE_PARAM | | | CNT | Type | Type |
|
||||
* |/ Flow Dir Flt ID | | | | | |
|
||||
* +------------------------------------------------------+
|
||||
* 8 | VLAN Tag | Length |Extended Error| Xtnd Status/NEXTP |
|
||||
* +------------------------------------------------------+
|
||||
* 63 48 47 32 31 20 19 0
|
||||
*/
|
||||
|
||||
for (n = 0; n < adapter->num_rx_queues; n++) {
|
||||
rx_ring = adapter->rx_ring[n];
|
||||
pr_info("------------------------------------\n");
|
||||
@@ -1795,7 +1844,7 @@ dma_sync:
|
||||
**/
|
||||
static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
|
||||
struct ixgbe_ring *rx_ring,
|
||||
int budget)
|
||||
const int budget)
|
||||
{
|
||||
unsigned int total_rx_bytes = 0, total_rx_packets = 0;
|
||||
#ifdef IXGBE_FCOE
|
||||
@@ -1846,7 +1895,6 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
|
||||
|
||||
/* probably a little skewed due to removing CRC */
|
||||
total_rx_bytes += skb->len;
|
||||
total_rx_packets++;
|
||||
|
||||
/* populate checksum, timestamp, VLAN, and protocol */
|
||||
ixgbe_process_skb_fields(rx_ring, rx_desc, skb);
|
||||
@@ -1879,8 +1927,8 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
|
||||
ixgbe_rx_skb(q_vector, skb);
|
||||
|
||||
/* update budget accounting */
|
||||
budget--;
|
||||
} while (likely(budget));
|
||||
total_rx_packets++;
|
||||
} while (likely(total_rx_packets < budget));
|
||||
|
||||
u64_stats_update_begin(&rx_ring->syncp);
|
||||
rx_ring->stats.packets += total_rx_packets;
|
||||
@@ -1892,7 +1940,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
|
||||
if (cleaned_count)
|
||||
ixgbe_alloc_rx_buffers(rx_ring, cleaned_count);
|
||||
|
||||
return !!budget;
|
||||
return (total_rx_packets < budget);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4085,11 +4133,8 @@ static void ixgbe_up_complete(struct ixgbe_adapter *adapter)
|
||||
else
|
||||
ixgbe_configure_msi_and_legacy(adapter);
|
||||
|
||||
/* enable the optics for both mult-speed fiber and 82599 SFP+ fiber */
|
||||
if (hw->mac.ops.enable_tx_laser &&
|
||||
((hw->phy.multispeed_fiber) ||
|
||||
((hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) &&
|
||||
(hw->mac.type == ixgbe_mac_82599EB))))
|
||||
/* enable the optics for 82599 SFP+ fiber */
|
||||
if (hw->mac.ops.enable_tx_laser)
|
||||
hw->mac.ops.enable_tx_laser(hw);
|
||||
|
||||
clear_bit(__IXGBE_DOWN, &adapter->state);
|
||||
@@ -4411,11 +4456,8 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
|
||||
if (!pci_channel_offline(adapter->pdev))
|
||||
ixgbe_reset(adapter);
|
||||
|
||||
/* power down the optics for multispeed fiber and 82599 SFP+ fiber */
|
||||
if (hw->mac.ops.disable_tx_laser &&
|
||||
((hw->phy.multispeed_fiber) ||
|
||||
((hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) &&
|
||||
(hw->mac.type == ixgbe_mac_82599EB))))
|
||||
/* power down the optics for 82599 SFP+ fiber */
|
||||
if (hw->mac.ops.disable_tx_laser)
|
||||
hw->mac.ops.disable_tx_laser(hw);
|
||||
|
||||
ixgbe_clean_all_tx_rings(adapter);
|
||||
@@ -5048,14 +5090,8 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake)
|
||||
if (wufc) {
|
||||
ixgbe_set_rx_mode(netdev);
|
||||
|
||||
/*
|
||||
* enable the optics for both mult-speed fiber and
|
||||
* 82599 SFP+ fiber as we can WoL.
|
||||
*/
|
||||
if (hw->mac.ops.enable_tx_laser &&
|
||||
(hw->phy.multispeed_fiber ||
|
||||
(hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber &&
|
||||
hw->mac.type == ixgbe_mac_82599EB)))
|
||||
/* enable the optics for 82599 SFP+ fiber as we can WoL */
|
||||
if (hw->mac.ops.enable_tx_laser)
|
||||
hw->mac.ops.enable_tx_laser(hw);
|
||||
|
||||
/* turn on all-multi mode if wake on multicast is enabled */
|
||||
@@ -6965,7 +7001,7 @@ static int ixgbe_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (is_unicast_ether_addr(addr)) {
|
||||
if (is_unicast_ether_addr(addr) || is_link_local(addr)) {
|
||||
u32 rar_uc_entries = IXGBE_MAX_PF_MACVLANS;
|
||||
|
||||
if (netdev_uc_count(dev) < rar_uc_entries)
|
||||
@@ -7521,11 +7557,8 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
||||
if (err)
|
||||
goto err_register;
|
||||
|
||||
/* power down the optics for multispeed fiber and 82599 SFP+ fiber */
|
||||
if (hw->mac.ops.disable_tx_laser &&
|
||||
((hw->phy.multispeed_fiber) ||
|
||||
((hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) &&
|
||||
(hw->mac.type == ixgbe_mac_82599EB))))
|
||||
/* power down the optics for 82599 SFP+ fiber */
|
||||
if (hw->mac.ops.disable_tx_laser)
|
||||
hw->mac.ops.disable_tx_laser(hw);
|
||||
|
||||
/* carrier off reporting is important to ethtool even BEFORE open */
|
||||
|
@@ -554,12 +554,14 @@ void ixgbe_ptp_rx_hwtstamp(struct ixgbe_q_vector *q_vector,
|
||||
adapter = q_vector->adapter;
|
||||
hw = &adapter->hw;
|
||||
|
||||
if (likely(!ixgbe_ptp_match(skb, adapter->rx_hwtstamp_filter)))
|
||||
return;
|
||||
|
||||
tsyncrxctl = IXGBE_READ_REG(hw, IXGBE_TSYNCRXCTL);
|
||||
|
||||
/* Check if we have a valid timestamp and make sure the skb should
|
||||
* have been timestamped */
|
||||
if (likely(!(tsyncrxctl & IXGBE_TSYNCRXCTL_VALID) ||
|
||||
!ixgbe_ptp_match(skb, adapter->rx_hwtstamp_filter)))
|
||||
if (!(tsyncrxctl & IXGBE_TSYNCRXCTL_VALID))
|
||||
return;
|
||||
|
||||
/*
|
||||
|
@@ -678,7 +678,7 @@ static int ixgbe_set_vf_mac_addr(struct ixgbe_adapter *adapter,
|
||||
return -1;
|
||||
}
|
||||
|
||||
return ixgbe_set_vf_mac(adapter, vf, new_mac);
|
||||
return ixgbe_set_vf_mac(adapter, vf, new_mac) < 0;
|
||||
}
|
||||
|
||||
static int ixgbe_set_vf_vlan_msg(struct ixgbe_adapter *adapter,
|
||||
@@ -745,7 +745,8 @@ static int ixgbe_set_vf_macvlan_msg(struct ixgbe_adapter *adapter,
|
||||
e_warn(drv,
|
||||
"VF %d has requested a MACVLAN filter but there is no space for it\n",
|
||||
vf);
|
||||
return err;
|
||||
|
||||
return err < 0;
|
||||
}
|
||||
|
||||
static int ixgbe_negotiate_vf_api(struct ixgbe_adapter *adapter,
|
||||
|
Reference in New Issue
Block a user