From: Greg Kroah-Hartman Date: Wed, 20 May 2020 17:17:34 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v4.4.225~79 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4f404fe9d107f63628064ff771a16e02dc07c16c;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: igb-use-igb_adapter-io_addr-instead-of-e1000_hw-hw_addr.patch --- diff --git a/queue-4.4/igb-use-igb_adapter-io_addr-instead-of-e1000_hw-hw_addr.patch b/queue-4.4/igb-use-igb_adapter-io_addr-instead-of-e1000_hw-hw_addr.patch new file mode 100644 index 00000000000..544e95bee6f --- /dev/null +++ b/queue-4.4/igb-use-igb_adapter-io_addr-instead-of-e1000_hw-hw_addr.patch @@ -0,0 +1,70 @@ +From 629823b872402451b42462414da08dddd0e2c93d Mon Sep 17 00:00:00 2001 +From: Cao jin +Date: Tue, 8 Nov 2016 15:06:20 +0800 +Subject: igb: use igb_adapter->io_addr instead of e1000_hw->hw_addr + +From: Cao jin + +commit 629823b872402451b42462414da08dddd0e2c93d upstream. + +When running as guest, under certain condition, it will oops as following. +writel() in igb_configure_tx_ring() results in oops, because hw->hw_addr +is NULL. While other register access won't oops kernel because they use +wr32/rd32 which have a defense against NULL pointer. + + [ 141.225449] pcieport 0000:00:1c.0: AER: Multiple Uncorrected (Fatal) + error received: id=0101 + [ 141.225523] igb 0000:01:00.1: PCIe Bus Error: + severity=Uncorrected (Fatal), type=Unaccessible, + id=0101(Unregistered Agent ID) + [ 141.299442] igb 0000:01:00.1: broadcast error_detected message + [ 141.300539] igb 0000:01:00.0 enp1s0f0: PCIe link lost, device now + detached + [ 141.351019] igb 0000:01:00.1 enp1s0f1: PCIe link lost, device now + detached + [ 143.465904] pcieport 0000:00:1c.0: Root Port link has been reset + [ 143.465994] igb 0000:01:00.1: broadcast slot_reset message + [ 143.466039] igb 0000:01:00.0: enabling device (0000 -> 0002) + [ 144.389078] igb 0000:01:00.1: enabling device (0000 -> 0002) + [ 145.312078] igb 0000:01:00.1: broadcast resume message + [ 145.322211] BUG: unable to handle kernel paging request at + 0000000000003818 + [ 145.361275] IP: [] + igb_configure_tx_ring+0x14d/0x280 [igb] + [ 145.400048] PGD 0 + [ 145.438007] Oops: 0002 [#1] SMP + +A similar issue & solution could be found at: + http://patchwork.ozlabs.org/patch/689592/ + +Signed-off-by: Cao jin +Acked-by: Alexander Duyck +Tested-by: Aaron Brown +Signed-off-by: Jeff Kirsher +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/intel/igb/igb_main.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/intel/igb/igb_main.c ++++ b/drivers/net/ethernet/intel/igb/igb_main.c +@@ -3296,7 +3296,7 @@ void igb_configure_tx_ring(struct igb_ad + tdba & 0x00000000ffffffffULL); + wr32(E1000_TDBAH(reg_idx), tdba >> 32); + +- ring->tail = hw->hw_addr + E1000_TDT(reg_idx); ++ ring->tail = adapter->io_addr + E1000_TDT(reg_idx); + wr32(E1000_TDH(reg_idx), 0); + writel(0, ring->tail); + +@@ -3652,7 +3652,7 @@ void igb_configure_rx_ring(struct igb_ad + ring->count * sizeof(union e1000_adv_rx_desc)); + + /* initialize head and tail */ +- ring->tail = hw->hw_addr + E1000_RDT(reg_idx); ++ ring->tail = adapter->io_addr + E1000_RDT(reg_idx); + wr32(E1000_RDH(reg_idx), 0); + writel(0, ring->tail); + diff --git a/queue-4.4/series b/queue-4.4/series new file mode 100644 index 00000000000..531cdbf5b80 --- /dev/null +++ b/queue-4.4/series @@ -0,0 +1 @@ +igb-use-igb_adapter-io_addr-instead-of-e1000_hw-hw_addr.patch diff --git a/queue-4.9/series b/queue-4.9/series new file mode 100644 index 00000000000..531cdbf5b80 --- /dev/null +++ b/queue-4.9/series @@ -0,0 +1 @@ +igb-use-igb_adapter-io_addr-instead-of-e1000_hw-hw_addr.patch