|
@@ -1780,6 +1780,23 @@ static irqreturn_t e1000_intr_msi(int irq, void *data)
|
|
|
mod_timer(&adapter->watchdog_timer, jiffies + 1);
|
|
|
}
|
|
|
|
|
|
+ /* Reset on uncorrectable ECC error */
|
|
|
+ if ((icr & E1000_ICR_ECCER) && (hw->mac.type == e1000_pch_lpt)) {
|
|
|
+ u32 pbeccsts = er32(PBECCSTS);
|
|
|
+
|
|
|
+ adapter->corr_errors +=
|
|
|
+ pbeccsts & E1000_PBECCSTS_CORR_ERR_CNT_MASK;
|
|
|
+ adapter->uncorr_errors +=
|
|
|
+ (pbeccsts & E1000_PBECCSTS_UNCORR_ERR_CNT_MASK) >>
|
|
|
+ E1000_PBECCSTS_UNCORR_ERR_CNT_SHIFT;
|
|
|
+
|
|
|
+ /* Do the reset outside of interrupt context */
|
|
|
+ schedule_work(&adapter->reset_task);
|
|
|
+
|
|
|
+ /* return immediately since reset is imminent */
|
|
|
+ return IRQ_HANDLED;
|
|
|
+ }
|
|
|
+
|
|
|
if (napi_schedule_prep(&adapter->napi)) {
|
|
|
adapter->total_tx_bytes = 0;
|
|
|
adapter->total_tx_packets = 0;
|
|
@@ -1843,6 +1860,23 @@ static irqreturn_t e1000_intr(int irq, void *data)
|
|
|
mod_timer(&adapter->watchdog_timer, jiffies + 1);
|
|
|
}
|
|
|
|
|
|
+ /* Reset on uncorrectable ECC error */
|
|
|
+ if ((icr & E1000_ICR_ECCER) && (hw->mac.type == e1000_pch_lpt)) {
|
|
|
+ u32 pbeccsts = er32(PBECCSTS);
|
|
|
+
|
|
|
+ adapter->corr_errors +=
|
|
|
+ pbeccsts & E1000_PBECCSTS_CORR_ERR_CNT_MASK;
|
|
|
+ adapter->uncorr_errors +=
|
|
|
+ (pbeccsts & E1000_PBECCSTS_UNCORR_ERR_CNT_MASK) >>
|
|
|
+ E1000_PBECCSTS_UNCORR_ERR_CNT_SHIFT;
|
|
|
+
|
|
|
+ /* Do the reset outside of interrupt context */
|
|
|
+ schedule_work(&adapter->reset_task);
|
|
|
+
|
|
|
+ /* return immediately since reset is imminent */
|
|
|
+ return IRQ_HANDLED;
|
|
|
+ }
|
|
|
+
|
|
|
if (napi_schedule_prep(&adapter->napi)) {
|
|
|
adapter->total_tx_bytes = 0;
|
|
|
adapter->total_tx_packets = 0;
|
|
@@ -2206,6 +2240,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) {
|
|
|
+ ew32(IMS, IMS_ENABLE_MASK | E1000_IMS_ECCER);
|
|
|
} else {
|
|
|
ew32(IMS, IMS_ENABLE_MASK);
|
|
|
}
|
|
@@ -4619,6 +4655,16 @@ static void e1000e_update_stats(struct e1000_adapter *adapter)
|
|
|
adapter->stats.mgptc += er32(MGTPTC);
|
|
|
adapter->stats.mgprc += er32(MGTPRC);
|
|
|
adapter->stats.mgpdc += er32(MGTPDC);
|
|
|
+
|
|
|
+ /* Correctable ECC Errors */
|
|
|
+ if (hw->mac.type == e1000_pch_lpt) {
|
|
|
+ u32 pbeccsts = er32(PBECCSTS);
|
|
|
+ adapter->corr_errors +=
|
|
|
+ pbeccsts & E1000_PBECCSTS_CORR_ERR_CNT_MASK;
|
|
|
+ adapter->uncorr_errors +=
|
|
|
+ (pbeccsts & E1000_PBECCSTS_UNCORR_ERR_CNT_MASK) >>
|
|
|
+ E1000_PBECCSTS_UNCORR_ERR_CNT_SHIFT;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|