From: Greg Kroah-Hartman Date: Thu, 11 Jun 2020 11:21:24 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v5.4.47~139 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=32a9d0a491415161380e353fa56cf544adad2946;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: igb-improve-handling-of-disconnected-adapters.patch net-phy-marvell-limit-88m1101-autoneg-errata-to-88e1145-as-well.patch pwm-fsl-ftm-use-flat-regmap-cache.patch scsi-return-correct-blkprep-status-code-in-case-scsi_init_io-fails.patch --- diff --git a/queue-4.4/igb-improve-handling-of-disconnected-adapters.patch b/queue-4.4/igb-improve-handling-of-disconnected-adapters.patch new file mode 100644 index 00000000000..1187a94c659 --- /dev/null +++ b/queue-4.4/igb-improve-handling-of-disconnected-adapters.patch @@ -0,0 +1,66 @@ +From 7b06a6909555ffb0140733cc4420222604140b27 Mon Sep 17 00:00:00 2001 +From: Jarod Wilson +Date: Mon, 19 Oct 2015 11:52:04 -0400 +Subject: igb: improve handling of disconnected adapters + +From: Jarod Wilson + +commit 7b06a6909555ffb0140733cc4420222604140b27 upstream. + +Clean up array_rd32 so that it uses igb_rd32 the same as rd32, per the +suggestion of Alexander Duyck, and use io_addr in more places, so that +we don't have the need to call E1000_REMOVED (which simply looks for a +null hw_addr) nearly as much. + +Signed-off-by: Jarod Wilson +Acked-by: Alexander Duyck +Tested-by: Aaron Brown +Signed-off-by: Jeff Kirsher +Cc: Jeff Chase +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/intel/igb/e1000_regs.h | 3 +-- + drivers/net/ethernet/intel/igb/igb_main.c | 5 ++--- + 2 files changed, 3 insertions(+), 5 deletions(-) + +--- a/drivers/net/ethernet/intel/igb/e1000_regs.h ++++ b/drivers/net/ethernet/intel/igb/e1000_regs.h +@@ -386,8 +386,7 @@ do { \ + #define array_wr32(reg, offset, value) \ + wr32((reg) + ((offset) << 2), (value)) + +-#define array_rd32(reg, offset) \ +- (readl(hw->hw_addr + reg + ((offset) << 2))) ++#define array_rd32(reg, offset) (igb_rd32(hw, reg + ((offset) << 2))) + + /* DMA Coalescing registers */ + #define E1000_PCIEMISC 0x05BB8 /* PCIE misc config register */ +--- a/drivers/net/ethernet/intel/igb/igb_main.c ++++ b/drivers/net/ethernet/intel/igb/igb_main.c +@@ -946,7 +946,6 @@ static void igb_configure_msix(struct ig + static int igb_request_msix(struct igb_adapter *adapter) + { + struct net_device *netdev = adapter->netdev; +- struct e1000_hw *hw = &adapter->hw; + int i, err = 0, vector = 0, free_vector = 0; + + err = request_irq(adapter->msix_entries[vector].vector, +@@ -959,7 +958,7 @@ static int igb_request_msix(struct igb_a + + vector++; + +- q_vector->itr_register = hw->hw_addr + E1000_EITR(vector); ++ q_vector->itr_register = adapter->io_addr + E1000_EITR(vector); + + if (q_vector->rx.ring && q_vector->tx.ring) + sprintf(q_vector->name, "%s-TxRx-%u", netdev->name, +@@ -1230,7 +1229,7 @@ static int igb_alloc_q_vector(struct igb + q_vector->tx.work_limit = adapter->tx_work_limit; + + /* initialize ITR configuration */ +- q_vector->itr_register = adapter->hw.hw_addr + E1000_EITR(0); ++ q_vector->itr_register = adapter->io_addr + E1000_EITR(0); + q_vector->itr_val = IGB_START_ITR; + + /* initialize pointer to rings */ diff --git a/queue-4.4/net-phy-marvell-limit-88m1101-autoneg-errata-to-88e1145-as-well.patch b/queue-4.4/net-phy-marvell-limit-88m1101-autoneg-errata-to-88e1145-as-well.patch new file mode 100644 index 00000000000..c964fa3a9f8 --- /dev/null +++ b/queue-4.4/net-phy-marvell-limit-88m1101-autoneg-errata-to-88e1145-as-well.patch @@ -0,0 +1,31 @@ +From c505873eaece2b4aefd07d339dc7e1400e0235ac Mon Sep 17 00:00:00 2001 +From: Zhao Qiang +Date: Mon, 18 Dec 2017 10:26:43 +0800 +Subject: net: phy: marvell: Limit 88m1101 autoneg errata to 88E1145 as well. + +From: Zhao Qiang + +commit c505873eaece2b4aefd07d339dc7e1400e0235ac upstream. + +88E1145 also need this autoneg errata. + +Fixes: f2899788353c ("net: phy: marvell: Limit errata to 88m1101") +Signed-off-by: Zhao Qiang +Signed-off-by: David S. Miller +Signed-off-by: Nobuhiro Iwamatsu (CIP) +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/phy/marvell.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/phy/marvell.c ++++ b/drivers/net/phy/marvell.c +@@ -1091,7 +1091,7 @@ static struct phy_driver marvell_drivers + .features = PHY_GBIT_FEATURES, + .flags = PHY_HAS_INTERRUPT, + .config_init = &m88e1145_config_init, +- .config_aneg = &marvell_config_aneg, ++ .config_aneg = &m88e1101_config_aneg, + .read_status = &genphy_read_status, + .ack_interrupt = &marvell_ack_interrupt, + .config_intr = &marvell_config_intr, diff --git a/queue-4.4/pwm-fsl-ftm-use-flat-regmap-cache.patch b/queue-4.4/pwm-fsl-ftm-use-flat-regmap-cache.patch new file mode 100644 index 00000000000..0b9d5a3cafe --- /dev/null +++ b/queue-4.4/pwm-fsl-ftm-use-flat-regmap-cache.patch @@ -0,0 +1,44 @@ +From ad06fdeeef1cbadf86ebbe510e8079abada8b44e Mon Sep 17 00:00:00 2001 +From: Stefan Agner +Date: Wed, 20 Jan 2016 18:56:22 -0800 +Subject: pwm: fsl-ftm: Use flat regmap cache + +From: Stefan Agner + +commit ad06fdeeef1cbadf86ebbe510e8079abada8b44e upstream. + +Use flat regmap cache to avoid lockdep warning at probe: + +[ 0.697285] WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:2755 lockdep_trace_alloc+0x15c/0x160() +[ 0.697449] DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)) + +The RB-tree regmap cache needs to allocate new space on first writes. +However, allocations in an atomic context (e.g. when a spinlock is held) +are not allowed. The function regmap_write calls map->lock, which +acquires a spinlock in the fast_io case. Since the pwm-fsl-ftm driver +uses MMIO, the regmap bus of type regmap_mmio is being used which has +fast_io set to true. + +The MMIO space of the pwm-fsl-ftm driver is reasonable condense, hence +using the much faster flat regmap cache is anyway the better choice. + +Signed-off-by: Stefan Agner +Cc: Mark Brown +Signed-off-by: Thierry Reding +Signed-off-by: Krzysztof Kozlowski +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pwm/pwm-fsl-ftm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/pwm/pwm-fsl-ftm.c ++++ b/drivers/pwm/pwm-fsl-ftm.c +@@ -392,7 +392,7 @@ static const struct regmap_config fsl_pw + + .max_register = FTM_PWMLOAD, + .volatile_reg = fsl_pwm_volatile_reg, +- .cache_type = REGCACHE_RBTREE, ++ .cache_type = REGCACHE_FLAT, + }; + + static int fsl_pwm_probe(struct platform_device *pdev) diff --git a/queue-4.4/scsi-return-correct-blkprep-status-code-in-case-scsi_init_io-fails.patch b/queue-4.4/scsi-return-correct-blkprep-status-code-in-case-scsi_init_io-fails.patch new file mode 100644 index 00000000000..601bc221fe2 --- /dev/null +++ b/queue-4.4/scsi-return-correct-blkprep-status-code-in-case-scsi_init_io-fails.patch @@ -0,0 +1,51 @@ +From e7661a8e5ce10b5321882d0bbaf3f81070903319 Mon Sep 17 00:00:00 2001 +From: Johannes Thumshirn +Date: Wed, 12 Apr 2017 09:21:19 +0200 +Subject: scsi: return correct blkprep status code in case scsi_init_io() fails. + +From: Johannes Thumshirn + +commit e7661a8e5ce10b5321882d0bbaf3f81070903319 upstream. + +When instrumenting the SCSI layer to run into the +!blk_rq_nr_phys_segments(rq) case the following warning emitted from the +block layer: + +blk_peek_request: bad return=-22 + +This happens because since commit fd3fc0b4d730 ("scsi: don't BUG_ON() +empty DMA transfers") we return the wrong error value from +scsi_prep_fn() back to the block layer. + +[mkp: silenced checkpatch] + +Signed-off-by: Johannes Thumshirn +Fixes: fd3fc0b4d730 scsi: don't BUG_ON() empty DMA transfers +Cc: +Reviewed-by: Christoph Hellwig +Reviewed-by: Hannes Reinecke +Reviewed-by: Bart Van Assche +Signed-off-by: Martin K. Petersen +[iwamatsu: - backport for 4.4.y and 4.9.y + - Use rq->nr_phys_segments instead of blk_rq_nr_phys_segments] +Signed-off-by: Nobuhiro Iwamatsu +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/scsi_lib.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/scsi_lib.c ++++ b/drivers/scsi/scsi_lib.c +@@ -1118,10 +1118,10 @@ int scsi_init_io(struct scsi_cmnd *cmd) + struct scsi_device *sdev = cmd->device; + struct request *rq = cmd->request; + bool is_mq = (rq->mq_ctx != NULL); +- int error; ++ int error = BLKPREP_KILL; + + if (WARN_ON_ONCE(!rq->nr_phys_segments)) +- return -EINVAL; ++ goto err_exit; + + error = scsi_init_sgtable(rq, &cmd->sdb); + if (error) diff --git a/queue-4.4/series b/queue-4.4/series index 7aa47feaebb..115a5c2ec78 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -1,2 +1,6 @@ ipv6-fix-ipv6_addrform-operation-logic.patch vxlan-avoid-infinite-loop-when-suppressing-ns-messages-with-invalid-options.patch +scsi-return-correct-blkprep-status-code-in-case-scsi_init_io-fails.patch +net-phy-marvell-limit-88m1101-autoneg-errata-to-88e1145-as-well.patch +pwm-fsl-ftm-use-flat-regmap-cache.patch +igb-improve-handling-of-disconnected-adapters.patch