aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_main.c')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 4d2dc17fd31b..bd8de67c17a9 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -4167,6 +4167,26 @@ static bool igb_thermal_sensor_event(struct e1000_hw *hw, u32 event)
4167} 4167}
4168 4168
4169/** 4169/**
4170 * igb_check_lvmmc - check for malformed packets received
4171 * and indicated in LVMMC register
4172 * @adapter: pointer to adapter
4173 **/
4174static void igb_check_lvmmc(struct igb_adapter *adapter)
4175{
4176 struct e1000_hw *hw = &adapter->hw;
4177 u32 lvmmc;
4178
4179 lvmmc = rd32(E1000_LVMMC);
4180 if (lvmmc) {
4181 if (unlikely(net_ratelimit())) {
4182 netdev_warn(adapter->netdev,
4183 "malformed Tx packet detected and dropped, LVMMC:0x%08x\n",
4184 lvmmc);
4185 }
4186 }
4187}
4188
4189/**
4170 * igb_watchdog - Timer Call-back 4190 * igb_watchdog - Timer Call-back
4171 * @data: pointer to adapter cast into an unsigned long 4191 * @data: pointer to adapter cast into an unsigned long
4172 **/ 4192 **/
@@ -4361,6 +4381,11 @@ static void igb_watchdog_task(struct work_struct *work)
4361 igb_spoof_check(adapter); 4381 igb_spoof_check(adapter);
4362 igb_ptp_rx_hang(adapter); 4382 igb_ptp_rx_hang(adapter);
4363 4383
4384 /* Check LVMMC register on i350/i354 only */
4385 if ((adapter->hw.mac.type == e1000_i350) ||
4386 (adapter->hw.mac.type == e1000_i354))
4387 igb_check_lvmmc(adapter);
4388
4364 /* Reset the timer */ 4389 /* Reset the timer */
4365 if (!test_bit(__IGB_DOWN, &adapter->state)) { 4390 if (!test_bit(__IGB_DOWN, &adapter->state)) {
4366 if (adapter->flags & IGB_FLAG_NEED_LINK_UPDATE) 4391 if (adapter->flags & IGB_FLAG_NEED_LINK_UPDATE)