]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Jun 2020 11:21:24 +0000 (13:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Jun 2020 11:21:24 +0000 (13:21 +0200)
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

queue-4.4/igb-improve-handling-of-disconnected-adapters.patch [new file with mode: 0644]
queue-4.4/net-phy-marvell-limit-88m1101-autoneg-errata-to-88e1145-as-well.patch [new file with mode: 0644]
queue-4.4/pwm-fsl-ftm-use-flat-regmap-cache.patch [new file with mode: 0644]
queue-4.4/scsi-return-correct-blkprep-status-code-in-case-scsi_init_io-fails.patch [new file with mode: 0644]
queue-4.4/series

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 (file)
index 0000000..1187a94
--- /dev/null
@@ -0,0 +1,66 @@
+From 7b06a6909555ffb0140733cc4420222604140b27 Mon Sep 17 00:00:00 2001
+From: Jarod Wilson <jarod@redhat.com>
+Date: Mon, 19 Oct 2015 11:52:04 -0400
+Subject: igb: improve handling of disconnected adapters
+
+From: Jarod Wilson <jarod@redhat.com>
+
+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 <jarod@redhat.com>
+Acked-by: Alexander Duyck <aduyck@mirantis.com>
+Tested-by: Aaron Brown <aaron.f.brown@intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Cc: Jeff Chase <jnchase@google.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 (file)
index 0000000..c964fa3
--- /dev/null
@@ -0,0 +1,31 @@
+From c505873eaece2b4aefd07d339dc7e1400e0235ac Mon Sep 17 00:00:00 2001
+From: Zhao Qiang <qiang.zhao@nxp.com>
+Date: Mon, 18 Dec 2017 10:26:43 +0800
+Subject: net: phy: marvell: Limit 88m1101 autoneg errata to 88E1145 as well.
+
+From: Zhao Qiang <qiang.zhao@nxp.com>
+
+commit c505873eaece2b4aefd07d339dc7e1400e0235ac upstream.
+
+88E1145 also need this autoneg errata.
+
+Fixes: f2899788353c ("net: phy: marvell: Limit errata to 88m1101")
+Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Nobuhiro Iwamatsu (CIP) <nobuhiro1.iwamatsu@toshiba.co.jp>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..0b9d5a3
--- /dev/null
@@ -0,0 +1,44 @@
+From ad06fdeeef1cbadf86ebbe510e8079abada8b44e Mon Sep 17 00:00:00 2001
+From: Stefan Agner <stefan@agner.ch>
+Date: Wed, 20 Jan 2016 18:56:22 -0800
+Subject: pwm: fsl-ftm: Use flat regmap cache
+
+From: Stefan Agner <stefan@agner.ch>
+
+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 <stefan@agner.ch>
+Cc: Mark Brown <broonie@kernel.org>
+Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
+Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..601bc22
--- /dev/null
@@ -0,0 +1,51 @@
+From e7661a8e5ce10b5321882d0bbaf3f81070903319 Mon Sep 17 00:00:00 2001
+From: Johannes Thumshirn <jthumshirn@suse.de>
+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 <jthumshirn@suse.de>
+
+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 <jthumshirn@suse.de>
+Fixes: fd3fc0b4d730 scsi: don't BUG_ON() empty DMA transfers
+Cc: <stable@vger.kernel.org>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Reviewed-by: Hannes Reinecke <hare@suse.com>
+Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+[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 <nobuhiro1.iwamatsu@toshiba.co.jp>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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)
index 7aa47feaebb7f028c6b21bd70c77e9ed3df4fd52..115a5c2ec78b0d0ffb7b956ec110c8ffec95b637 100644 (file)
@@ -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