]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2019 12:31:09 +0000 (13:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2019 12:31:09 +0000 (13:31 +0100)
added patches:
drm-atmel-hlcdc-revert-shift-by-8.patch
ext4-add-more-paranoia-checking-in-ext4_expand_extra_isize-handling.patch
mailbox-stm32_ipcc-add-spinlock-to-fix-channels-concurrent-access.patch
mtd-rawnand-atmel-fix-possible-object-reference-leak.patch
mtd-rawnand-atmel-fix-spelling-mistake-in-error-message.patch
mtd-spi-nor-cast-to-u64-to-avoid-uint-overflows.patch
net-macb-driver-check-for-skbtx_hw_tstamp.patch
net-macb-fix-subns-increment-and-increase-resolution.patch
watchdog-sama5d4-fix-wdd-value-to-be-always-set-to-max.patch

queue-4.19/drm-atmel-hlcdc-revert-shift-by-8.patch [new file with mode: 0644]
queue-4.19/ext4-add-more-paranoia-checking-in-ext4_expand_extra_isize-handling.patch [new file with mode: 0644]
queue-4.19/mailbox-stm32_ipcc-add-spinlock-to-fix-channels-concurrent-access.patch [new file with mode: 0644]
queue-4.19/mtd-rawnand-atmel-fix-possible-object-reference-leak.patch [new file with mode: 0644]
queue-4.19/mtd-rawnand-atmel-fix-spelling-mistake-in-error-message.patch [new file with mode: 0644]
queue-4.19/mtd-spi-nor-cast-to-u64-to-avoid-uint-overflows.patch [new file with mode: 0644]
queue-4.19/net-macb-driver-check-for-skbtx_hw_tstamp.patch [new file with mode: 0644]
queue-4.19/net-macb-fix-subns-increment-and-increase-resolution.patch [new file with mode: 0644]
queue-4.19/series
queue-4.19/watchdog-sama5d4-fix-wdd-value-to-be-always-set-to-max.patch [new file with mode: 0644]

diff --git a/queue-4.19/drm-atmel-hlcdc-revert-shift-by-8.patch b/queue-4.19/drm-atmel-hlcdc-revert-shift-by-8.patch
new file mode 100644 (file)
index 0000000..320d4f3
--- /dev/null
@@ -0,0 +1,35 @@
+From cbb32079149dbf557fa3f7bab8fa3c5fec857da7 Mon Sep 17 00:00:00 2001
+From: Claudiu Beznea <claudiu.beznea@microchip.com>
+Date: Thu, 25 Apr 2019 12:36:39 +0000
+Subject: drm/atmel-hlcdc: revert shift by 8
+
+From: Claudiu Beznea <claudiu.beznea@microchip.com>
+
+commit cbb32079149dbf557fa3f7bab8fa3c5fec857da7 upstream.
+
+Revert shift by 8 of state->base.alpha. This introduced a
+regression on planes.
+
+Fixes: 7f73c10b256b ("drm/atmel-hclcdc: Convert to the new generic alpha property")
+Cc: Maxime Ripard <maxime.ripard@bootlin.com>
+Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
+Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
+Link: https://patchwork.freedesktop.org/patch/msgid/1556195748-11106-7-git-send-email-claudiu.beznea@microchip.com
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
++++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
+@@ -382,7 +382,7 @@ atmel_hlcdc_plane_update_general_setting
+                       cfg |= ATMEL_HLCDC_LAYER_LAEN;
+               else
+                       cfg |= ATMEL_HLCDC_LAYER_GAEN |
+-                             ATMEL_HLCDC_LAYER_GA(state->base.alpha >> 8);
++                             ATMEL_HLCDC_LAYER_GA(state->base.alpha);
+       }
+       if (state->disc_h && state->disc_w)
diff --git a/queue-4.19/ext4-add-more-paranoia-checking-in-ext4_expand_extra_isize-handling.patch b/queue-4.19/ext4-add-more-paranoia-checking-in-ext4_expand_extra_isize-handling.patch
new file mode 100644 (file)
index 0000000..d482379
--- /dev/null
@@ -0,0 +1,93 @@
+From 4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Thu, 7 Nov 2019 21:43:41 -0500
+Subject: ext4: add more paranoia checking in ext4_expand_extra_isize handling
+
+From: Theodore Ts'o <tytso@mit.edu>
+
+commit 4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a upstream.
+
+It's possible to specify a non-zero s_want_extra_isize via debugging
+option, and this can cause bad things(tm) to happen when using a file
+system with an inode size of 128 bytes.
+
+Add better checking when the file system is mounted, as well as when
+we are actually doing the trying to do the inode expansion.
+
+Link: https://lore.kernel.org/r/20191110121510.GH23325@mit.edu
+Reported-by: syzbot+f8d6f8386ceacdbfff57@syzkaller.appspotmail.com
+Reported-by: syzbot+33d7ea72e47de3bdf4e1@syzkaller.appspotmail.com
+Reported-by: syzbot+44b6763edfc17144296f@syzkaller.appspotmail.com
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Cc: stable@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/ext4/inode.c |   15 +++++++++++++++
+ fs/ext4/super.c |   21 ++++++++++++---------
+ 2 files changed, 27 insertions(+), 9 deletions(-)
+
+--- a/fs/ext4/inode.c
++++ b/fs/ext4/inode.c
+@@ -5904,8 +5904,23 @@ static int __ext4_expand_extra_isize(str
+ {
+       struct ext4_inode *raw_inode;
+       struct ext4_xattr_ibody_header *header;
++      unsigned int inode_size = EXT4_INODE_SIZE(inode->i_sb);
++      struct ext4_inode_info *ei = EXT4_I(inode);
+       int error;
++      /* this was checked at iget time, but double check for good measure */
++      if ((EXT4_GOOD_OLD_INODE_SIZE + ei->i_extra_isize > inode_size) ||
++          (ei->i_extra_isize & 3)) {
++              EXT4_ERROR_INODE(inode, "bad extra_isize %u (inode size %u)",
++                               ei->i_extra_isize,
++                               EXT4_INODE_SIZE(inode->i_sb));
++              return -EFSCORRUPTED;
++      }
++      if ((new_extra_isize < ei->i_extra_isize) ||
++          (new_extra_isize < 4) ||
++          (new_extra_isize > inode_size - EXT4_GOOD_OLD_INODE_SIZE))
++              return -EINVAL; /* Should never happen */
++
+       raw_inode = ext4_raw_inode(iloc);
+       header = IHDR(inode, raw_inode);
+--- a/fs/ext4/super.c
++++ b/fs/ext4/super.c
+@@ -3517,12 +3517,15 @@ static void ext4_clamp_want_extra_isize(
+ {
+       struct ext4_sb_info *sbi = EXT4_SB(sb);
+       struct ext4_super_block *es = sbi->s_es;
++      unsigned def_extra_isize = sizeof(struct ext4_inode) -
++                                              EXT4_GOOD_OLD_INODE_SIZE;
+-      /* determine the minimum size of new large inodes, if present */
+-      if (sbi->s_inode_size > EXT4_GOOD_OLD_INODE_SIZE &&
+-          sbi->s_want_extra_isize == 0) {
+-              sbi->s_want_extra_isize = sizeof(struct ext4_inode) -
+-                                                   EXT4_GOOD_OLD_INODE_SIZE;
++      if (sbi->s_inode_size == EXT4_GOOD_OLD_INODE_SIZE) {
++              sbi->s_want_extra_isize = 0;
++              return;
++      }
++      if (sbi->s_want_extra_isize < 4) {
++              sbi->s_want_extra_isize = def_extra_isize;
+               if (ext4_has_feature_extra_isize(sb)) {
+                       if (sbi->s_want_extra_isize <
+                           le16_to_cpu(es->s_want_extra_isize))
+@@ -3535,10 +3538,10 @@ static void ext4_clamp_want_extra_isize(
+               }
+       }
+       /* Check if enough inode space is available */
+-      if (EXT4_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize >
+-                                                      sbi->s_inode_size) {
+-              sbi->s_want_extra_isize = sizeof(struct ext4_inode) -
+-                                                     EXT4_GOOD_OLD_INODE_SIZE;
++      if ((sbi->s_want_extra_isize > sbi->s_inode_size) ||
++          (EXT4_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize >
++                                                      sbi->s_inode_size)) {
++              sbi->s_want_extra_isize = def_extra_isize;
+               ext4_msg(sb, KERN_INFO,
+                        "required extra inode space not available");
+       }
diff --git a/queue-4.19/mailbox-stm32_ipcc-add-spinlock-to-fix-channels-concurrent-access.patch b/queue-4.19/mailbox-stm32_ipcc-add-spinlock-to-fix-channels-concurrent-access.patch
new file mode 100644 (file)
index 0000000..3601e29
--- /dev/null
@@ -0,0 +1,135 @@
+From dba9a3dfe912dc47c9dbc9ba1f5f65adbf9aea0f Mon Sep 17 00:00:00 2001
+From: Arnaud Pouliquen <arnaud.pouliquen@st.com>
+Date: Wed, 22 May 2019 10:25:35 +0200
+Subject: mailbox: stm32_ipcc: add spinlock to fix channels concurrent access
+
+From: Arnaud Pouliquen <arnaud.pouliquen@st.com>
+
+commit dba9a3dfe912dc47c9dbc9ba1f5f65adbf9aea0f upstream.
+
+Add spinlock protection on IPCC register update to avoid race condition.
+Without this fix, stm32_ipcc_set_bits and stm32_ipcc_clr_bits can be
+called in parallel for different channels. This results in register
+corruptions.
+
+Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
+Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com>
+Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
+Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mailbox/stm32-ipcc.c |   37 +++++++++++++++++++++++++++----------
+ 1 file changed, 27 insertions(+), 10 deletions(-)
+
+--- a/drivers/mailbox/stm32-ipcc.c
++++ b/drivers/mailbox/stm32-ipcc.c
+@@ -50,6 +50,7 @@ struct stm32_ipcc {
+       void __iomem *reg_base;
+       void __iomem *reg_proc;
+       struct clk *clk;
++      spinlock_t lock; /* protect access to IPCC registers */
+       int irqs[IPCC_IRQ_NUM];
+       int wkp;
+       u32 proc_id;
+@@ -58,14 +59,24 @@ struct stm32_ipcc {
+       u32 xmr;
+ };
+-static inline void stm32_ipcc_set_bits(void __iomem *reg, u32 mask)
++static inline void stm32_ipcc_set_bits(spinlock_t *lock, void __iomem *reg,
++                                     u32 mask)
+ {
++      unsigned long flags;
++
++      spin_lock_irqsave(lock, flags);
+       writel_relaxed(readl_relaxed(reg) | mask, reg);
++      spin_unlock_irqrestore(lock, flags);
+ }
+-static inline void stm32_ipcc_clr_bits(void __iomem *reg, u32 mask)
++static inline void stm32_ipcc_clr_bits(spinlock_t *lock, void __iomem *reg,
++                                     u32 mask)
+ {
++      unsigned long flags;
++
++      spin_lock_irqsave(lock, flags);
+       writel_relaxed(readl_relaxed(reg) & ~mask, reg);
++      spin_unlock_irqrestore(lock, flags);
+ }
+ static irqreturn_t stm32_ipcc_rx_irq(int irq, void *data)
+@@ -92,7 +103,7 @@ static irqreturn_t stm32_ipcc_rx_irq(int
+               mbox_chan_received_data(&ipcc->controller.chans[chan], NULL);
+-              stm32_ipcc_set_bits(ipcc->reg_proc + IPCC_XSCR,
++              stm32_ipcc_set_bits(&ipcc->lock, ipcc->reg_proc + IPCC_XSCR,
+                                   RX_BIT_CHAN(chan));
+               ret = IRQ_HANDLED;
+@@ -121,7 +132,7 @@ static irqreturn_t stm32_ipcc_tx_irq(int
+               dev_dbg(dev, "%s: chan:%d tx\n", __func__, chan);
+               /* mask 'tx channel free' interrupt */
+-              stm32_ipcc_set_bits(ipcc->reg_proc + IPCC_XMR,
++              stm32_ipcc_set_bits(&ipcc->lock, ipcc->reg_proc + IPCC_XMR,
+                                   TX_BIT_CHAN(chan));
+               mbox_chan_txdone(&ipcc->controller.chans[chan], 0);
+@@ -141,10 +152,12 @@ static int stm32_ipcc_send_data(struct m
+       dev_dbg(ipcc->controller.dev, "%s: chan:%d\n", __func__, chan);
+       /* set channel n occupied */
+-      stm32_ipcc_set_bits(ipcc->reg_proc + IPCC_XSCR, TX_BIT_CHAN(chan));
++      stm32_ipcc_set_bits(&ipcc->lock, ipcc->reg_proc + IPCC_XSCR,
++                          TX_BIT_CHAN(chan));
+       /* unmask 'tx channel free' interrupt */
+-      stm32_ipcc_clr_bits(ipcc->reg_proc + IPCC_XMR, TX_BIT_CHAN(chan));
++      stm32_ipcc_clr_bits(&ipcc->lock, ipcc->reg_proc + IPCC_XMR,
++                          TX_BIT_CHAN(chan));
+       return 0;
+ }
+@@ -163,7 +176,8 @@ static int stm32_ipcc_startup(struct mbo
+       }
+       /* unmask 'rx channel occupied' interrupt */
+-      stm32_ipcc_clr_bits(ipcc->reg_proc + IPCC_XMR, RX_BIT_CHAN(chan));
++      stm32_ipcc_clr_bits(&ipcc->lock, ipcc->reg_proc + IPCC_XMR,
++                          RX_BIT_CHAN(chan));
+       return 0;
+ }
+@@ -175,7 +189,7 @@ static void stm32_ipcc_shutdown(struct m
+                                              controller);
+       /* mask rx/tx interrupt */
+-      stm32_ipcc_set_bits(ipcc->reg_proc + IPCC_XMR,
++      stm32_ipcc_set_bits(&ipcc->lock, ipcc->reg_proc + IPCC_XMR,
+                           RX_BIT_CHAN(chan) | TX_BIT_CHAN(chan));
+       clk_disable_unprepare(ipcc->clk);
+@@ -208,6 +222,8 @@ static int stm32_ipcc_probe(struct platf
+       if (!ipcc)
+               return -ENOMEM;
++      spin_lock_init(&ipcc->lock);
++
+       /* proc_id */
+       if (of_property_read_u32(np, "st,proc-id", &ipcc->proc_id)) {
+               dev_err(dev, "Missing st,proc-id\n");
+@@ -259,9 +275,10 @@ static int stm32_ipcc_probe(struct platf
+       }
+       /* mask and enable rx/tx irq */
+-      stm32_ipcc_set_bits(ipcc->reg_proc + IPCC_XMR,
++      stm32_ipcc_set_bits(&ipcc->lock, ipcc->reg_proc + IPCC_XMR,
+                           RX_BIT_MASK | TX_BIT_MASK);
+-      stm32_ipcc_set_bits(ipcc->reg_proc + IPCC_XCR, XCR_RXOIE | XCR_TXOIE);
++      stm32_ipcc_set_bits(&ipcc->lock, ipcc->reg_proc + IPCC_XCR,
++                          XCR_RXOIE | XCR_TXOIE);
+       /* wakeup */
+       if (of_property_read_bool(np, "wakeup-source")) {
diff --git a/queue-4.19/mtd-rawnand-atmel-fix-possible-object-reference-leak.patch b/queue-4.19/mtd-rawnand-atmel-fix-possible-object-reference-leak.patch
new file mode 100644 (file)
index 0000000..54c76ac
--- /dev/null
@@ -0,0 +1,83 @@
+From a12085d13997ed15f745f33a0e01002541160179 Mon Sep 17 00:00:00 2001
+From: Wen Yang <yellowriver2010@hotmail.com>
+Date: Thu, 7 Feb 2019 03:50:55 +0000
+Subject: mtd: rawnand: atmel: fix possible object reference leak
+
+From: Wen Yang <yellowriver2010@hotmail.com>
+
+commit a12085d13997ed15f745f33a0e01002541160179 upstream.
+
+of_find_device_by_node() takes a reference to the struct device
+when it finds a match via get_device, there is no need to call
+get_device() twice.
+We also should make sure to drop the reference to the device
+taken by of_find_device_by_node() on driver unbind.
+
+Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
+Signed-off-by: Wen Yang <yellowriver2010@hotmail.com>
+Suggested-by: Boris Brezillon <bbrezillon@kernel.org>
+Reviewed-by: Boris Brezillon <bbrezillon@kernel.org>
+Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
+Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
+Cc: Tudor Ambarus <tudor.ambarus@microchip.com>
+Cc: Boris Brezillon <bbrezillon@kernel.org>
+Cc: Miquel Raynal <miquel.raynal@bootlin.com>
+Cc: Richard Weinberger <richard@nod.at>
+Cc: David Woodhouse <dwmw2@infradead.org>
+Cc: Brian Norris <computersforpeace@gmail.com>
+Cc: Marek Vasut <marek.vasut@gmail.com>
+Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
+Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
+Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
+Cc: linux-mtd@lists.infradead.org
+Cc: linux-arm-kernel@lists.infradead.org
+Cc: linux-kernel@vger.kernel.org
+Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mtd/nand/raw/atmel/pmecc.c |   21 +++++++++++++++------
+ 1 file changed, 15 insertions(+), 6 deletions(-)
+
+--- a/drivers/mtd/nand/raw/atmel/pmecc.c
++++ b/drivers/mtd/nand/raw/atmel/pmecc.c
+@@ -876,23 +876,32 @@ static struct atmel_pmecc *atmel_pmecc_g
+ {
+       struct platform_device *pdev;
+       struct atmel_pmecc *pmecc, **ptr;
++      int ret;
+       pdev = of_find_device_by_node(np);
+-      if (!pdev || !platform_get_drvdata(pdev))
++      if (!pdev)
+               return ERR_PTR(-EPROBE_DEFER);
++      pmecc = platform_get_drvdata(pdev);
++      if (!pmecc) {
++              ret = -EPROBE_DEFER;
++              goto err_put_device;
++      }
+       ptr = devres_alloc(devm_atmel_pmecc_put, sizeof(*ptr), GFP_KERNEL);
+-      if (!ptr)
+-              return ERR_PTR(-ENOMEM);
+-
+-      get_device(&pdev->dev);
+-      pmecc = platform_get_drvdata(pdev);
++      if (!ptr) {
++              ret = -ENOMEM;
++              goto err_put_device;
++      }
+       *ptr = pmecc;
+       devres_add(userdev, ptr);
+       return pmecc;
++
++err_put_device:
++      put_device(&pdev->dev);
++      return ERR_PTR(ret);
+ }
+ static const int atmel_pmecc_strengths[] = { 2, 4, 8, 12, 24, 32 };
diff --git a/queue-4.19/mtd-rawnand-atmel-fix-spelling-mistake-in-error-message.patch b/queue-4.19/mtd-rawnand-atmel-fix-spelling-mistake-in-error-message.patch
new file mode 100644 (file)
index 0000000..f7f9961
--- /dev/null
@@ -0,0 +1,33 @@
+From e39bb786816453788836c367caefd72eceea380c Mon Sep 17 00:00:00 2001
+From: Miquel Raynal <miquel.raynal@bootlin.com>
+Date: Mon, 1 Apr 2019 16:49:01 +0200
+Subject: mtd: rawnand: atmel: Fix spelling mistake in error message
+
+From: Miquel Raynal <miquel.raynal@bootlin.com>
+
+commit e39bb786816453788836c367caefd72eceea380c upstream.
+
+Wrong copy/paste from the previous block, the error message should
+refer to #size-cells instead of #address-cells.
+
+Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
+Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
+Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mtd/nand/raw/atmel/nand-controller.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/mtd/nand/raw/atmel/nand-controller.c
++++ b/drivers/mtd/nand/raw/atmel/nand-controller.c
+@@ -1826,7 +1826,7 @@ static int atmel_nand_controller_add_nan
+       ret = of_property_read_u32(np, "#size-cells", &val);
+       if (ret) {
+-              dev_err(dev, "missing #address-cells property\n");
++              dev_err(dev, "missing #size-cells property\n");
+               return ret;
+       }
diff --git a/queue-4.19/mtd-spi-nor-cast-to-u64-to-avoid-uint-overflows.patch b/queue-4.19/mtd-spi-nor-cast-to-u64-to-avoid-uint-overflows.patch
new file mode 100644 (file)
index 0000000..dd68314
--- /dev/null
@@ -0,0 +1,37 @@
+From 84a1c2109d23df3543d96231c4fee1757299bb1a Mon Sep 17 00:00:00 2001
+From: "huijin.park" <huijin.park@samsung.com>
+Date: Wed, 28 Nov 2018 03:02:14 -0500
+Subject: mtd: spi-nor: cast to u64 to avoid uint overflows
+
+From: huijin.park <huijin.park@samsung.com>
+
+commit 84a1c2109d23df3543d96231c4fee1757299bb1a upstream.
+
+The "params->size" is defined as "u64".
+And "info->sector_size" and "info->n_sectors" are defined as
+unsigned int and u16.
+Thus, u64 data might have strange data(loss data) if the result
+overflows an unsigned int.
+This patch casts "info->sector_size" to an u64.
+
+Signed-off-by: huijin.park <huijin.park@samsung.com>
+Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mtd/spi-nor/spi-nor.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/mtd/spi-nor/spi-nor.c
++++ b/drivers/mtd/spi-nor/spi-nor.c
+@@ -2459,7 +2459,7 @@ static int spi_nor_init_params(struct sp
+       memset(params, 0, sizeof(*params));
+       /* Set SPI NOR sizes. */
+-      params->size = info->sector_size * info->n_sectors;
++      params->size = (u64)info->sector_size * info->n_sectors;
+       params->page_size = info->page_size;
+       /* (Fast) Read settings. */
diff --git a/queue-4.19/net-macb-driver-check-for-skbtx_hw_tstamp.patch b/queue-4.19/net-macb-driver-check-for-skbtx_hw_tstamp.patch
new file mode 100644 (file)
index 0000000..534960d
--- /dev/null
@@ -0,0 +1,36 @@
+From a62520473f15750cd1432d36b377a06cd7cff8d2 Mon Sep 17 00:00:00 2001
+From: Paul Thomas <pthomas8589@gmail.com>
+Date: Mon, 8 Apr 2019 15:37:54 -0400
+Subject: net: macb driver, check for SKBTX_HW_TSTAMP
+
+From: Paul Thomas <pthomas8589@gmail.com>
+
+commit a62520473f15750cd1432d36b377a06cd7cff8d2 upstream.
+
+Make sure SKBTX_HW_TSTAMP (i.e. SOF_TIMESTAMPING_TX_HARDWARE) has been
+enabled for this skb. It does fix the issue where normal socks that
+aren't expecting a timestamp will not wake up on select, but when a
+user does want a SOF_TIMESTAMPING_TX_HARDWARE it does work.
+
+Signed-off-by: Paul Thomas <pthomas8589@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/cadence/macb_main.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/cadence/macb_main.c
++++ b/drivers/net/ethernet/cadence/macb_main.c
+@@ -860,7 +860,9 @@ static void macb_tx_interrupt(struct mac
+                       /* First, update TX stats if needed */
+                       if (skb) {
+-                              if (gem_ptp_do_txstamp(queue, skb, desc) == 0) {
++                              if (unlikely(skb_shinfo(skb)->tx_flags &
++                                           SKBTX_HW_TSTAMP) &&
++                                  gem_ptp_do_txstamp(queue, skb, desc) == 0) {
+                                       /* skb now belongs to timestamp buffer
+                                        * and will be removed later
+                                        */
diff --git a/queue-4.19/net-macb-fix-subns-increment-and-increase-resolution.patch b/queue-4.19/net-macb-fix-subns-increment-and-increase-resolution.patch
new file mode 100644 (file)
index 0000000..5572408
--- /dev/null
@@ -0,0 +1,55 @@
+From 7ad342bc58cc5197cd2f12a3c30b3949528c6d83 Mon Sep 17 00:00:00 2001
+From: Harini Katakam <harini.katakam@xilinx.com>
+Date: Thu, 27 Jun 2019 11:51:00 +0530
+Subject: net: macb: Fix SUBNS increment and increase resolution
+
+From: Harini Katakam <harini.katakam@xilinx.com>
+
+commit 7ad342bc58cc5197cd2f12a3c30b3949528c6d83 upstream.
+
+The subns increment register has 24 bits as follows:
+RegBit[15:0] = Subns[23:8]; RegBit[31:24] = Subns[7:0]
+
+Fix the same in the driver and increase sub ns resolution to the
+best capable, 24 bits. This should be the case on all GEM versions
+that this PTP driver supports.
+
+Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/ethernet/cadence/macb.h     |    6 +++++-
+ drivers/net/ethernet/cadence/macb_ptp.c |    5 ++++-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/cadence/macb.h
++++ b/drivers/net/ethernet/cadence/macb.h
+@@ -499,7 +499,11 @@
+ /* Bitfields in TISUBN */
+ #define GEM_SUBNSINCR_OFFSET                  0
+-#define GEM_SUBNSINCR_SIZE                    16
++#define GEM_SUBNSINCRL_OFFSET                 24
++#define GEM_SUBNSINCRL_SIZE                   8
++#define GEM_SUBNSINCRH_OFFSET                 0
++#define GEM_SUBNSINCRH_SIZE                   16
++#define GEM_SUBNSINCR_SIZE                    24
+ /* Bitfields in TI */
+ #define GEM_NSINCR_OFFSET                     0
+--- a/drivers/net/ethernet/cadence/macb_ptp.c
++++ b/drivers/net/ethernet/cadence/macb_ptp.c
+@@ -115,7 +115,10 @@ static int gem_tsu_incr_set(struct macb
+        * to take effect.
+        */
+       spin_lock_irqsave(&bp->tsu_clk_lock, flags);
+-      gem_writel(bp, TISUBN, GEM_BF(SUBNSINCR, incr_spec->sub_ns));
++      /* RegBit[15:0] = Subns[23:8]; RegBit[31:24] = Subns[7:0] */
++      gem_writel(bp, TISUBN, GEM_BF(SUBNSINCRL, incr_spec->sub_ns) |
++                 GEM_BF(SUBNSINCRH, (incr_spec->sub_ns >>
++                        GEM_SUBNSINCRL_SIZE)));
+       gem_writel(bp, TI, GEM_BF(NSINCR, incr_spec->ns));
+       spin_unlock_irqrestore(&bp->tsu_clk_lock, flags);
index 8619308cf8bde178aed61aa51de39f4b67e40aa8..be0138560e3eddb7692f9fc069d5a44f71dc50d7 100644 (file)
@@ -292,3 +292,12 @@ tipc-fix-link-name-length-check.patch
 sctp-cache-netns-in-sctp_ep_common.patch
 net-sched-fix-tc-s-class-show-no-bstats-on-class-with-nolock-subqueues.patch
 net-macb-add-missed-tasklet_kill.patch
+ext4-add-more-paranoia-checking-in-ext4_expand_extra_isize-handling.patch
+watchdog-sama5d4-fix-wdd-value-to-be-always-set-to-max.patch
+net-macb-fix-subns-increment-and-increase-resolution.patch
+net-macb-driver-check-for-skbtx_hw_tstamp.patch
+mtd-rawnand-atmel-fix-spelling-mistake-in-error-message.patch
+mtd-rawnand-atmel-fix-possible-object-reference-leak.patch
+mtd-spi-nor-cast-to-u64-to-avoid-uint-overflows.patch
+drm-atmel-hlcdc-revert-shift-by-8.patch
+mailbox-stm32_ipcc-add-spinlock-to-fix-channels-concurrent-access.patch
diff --git a/queue-4.19/watchdog-sama5d4-fix-wdd-value-to-be-always-set-to-max.patch b/queue-4.19/watchdog-sama5d4-fix-wdd-value-to-be-always-set-to-max.patch
new file mode 100644 (file)
index 0000000..1353d01
--- /dev/null
@@ -0,0 +1,44 @@
+From 8632944841d41a36d77dd1fa88d4201b5291100f Mon Sep 17 00:00:00 2001
+From: Eugen Hristev <eugen.hristev@microchip.com>
+Date: Wed, 8 May 2019 14:15:03 +0000
+Subject: watchdog: sama5d4: fix WDD value to be always set to max
+
+From: Eugen Hristev <eugen.hristev@microchip.com>
+
+commit 8632944841d41a36d77dd1fa88d4201b5291100f upstream.
+
+WDD value must be always set to max (0xFFF) otherwise the hardware
+block will reset the board on the first ping of the watchdog.
+
+Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
+Reviewed-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
+Signed-off-by: Lee Jones <lee.jones@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/watchdog/sama5d4_wdt.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/watchdog/sama5d4_wdt.c
++++ b/drivers/watchdog/sama5d4_wdt.c
+@@ -111,9 +111,7 @@ static int sama5d4_wdt_set_timeout(struc
+       u32 value = WDT_SEC2TICKS(timeout);
+       wdt->mr &= ~AT91_WDT_WDV;
+-      wdt->mr &= ~AT91_WDT_WDD;
+       wdt->mr |= AT91_WDT_SET_WDV(value);
+-      wdt->mr |= AT91_WDT_SET_WDD(value);
+       /*
+        * WDDIS has to be 0 when updating WDD/WDV. The datasheet states: When
+@@ -251,7 +249,7 @@ static int sama5d4_wdt_probe(struct plat
+       timeout = WDT_SEC2TICKS(wdd->timeout);
+-      wdt->mr |= AT91_WDT_SET_WDD(timeout);
++      wdt->mr |= AT91_WDT_SET_WDD(WDT_SEC2TICKS(MAX_WDT_TIMEOUT));
+       wdt->mr |= AT91_WDT_SET_WDV(timeout);
+       ret = sama5d4_wdt_init(wdt);