]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
rework some 4.19 patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jul 2024 10:20:46 +0000 (12:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jul 2024 10:20:46 +0000 (12:20 +0200)
queue-4.19/gpio-davinci-allocate-the-correct-amount-of-memory-f.patch [deleted file]
queue-4.19/gpio-davinci-use-dev-name-for-label-and-automatic-ba.patch [deleted file]
queue-4.19/gpio-davinci-validate-the-obtained-number-of-irqs.patch
queue-4.19/series
queue-4.19/virtio-net-ethtool-configurable-lro.patch [deleted file]
queue-4.19/virtio_net-checksum-offloading-handling-fix.patch

diff --git a/queue-4.19/gpio-davinci-allocate-the-correct-amount-of-memory-f.patch b/queue-4.19/gpio-davinci-allocate-the-correct-amount-of-memory-f.patch
deleted file mode 100644 (file)
index b8b5a5c..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-From b0ad83162efdc95b7465f188464ac62f4c769707 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 31 Aug 2018 14:13:24 -0500
-Subject: gpio: davinci: Allocate the correct amount of memory for controller
-
-From: Andrew F. Davis <afd@ti.com>
-
-[ Upstream commit c809e37a3b5a889063ae737ff8b54705219d1ddc ]
-
-Previously we created a controller structure per bank of GPIO pins. This
-has since been changed to one per controller, but the allocation size
-was not changed. Fix this here.
-
-This also leaves the variable 'nbank' unused, instead of removing it,
-move it down and use it to clean up a loop. For loops with multiple
-initializers and/or iteration expressions, especially ones that don't
-use those loop counters are quite hard to follow, fix this.
-
-Signed-off-by: Andrew F. Davis <afd@ti.com>
-Tested-by: Keerthy <j-keerthy@ti.com>
-Acked-by: Keerthy <j-keerthy@ti.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-Stable-dep-of: 7aa9b96e9a73 ("gpio: davinci: Validate the obtained number of IRQs")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/gpio/gpio-davinci.c | 10 ++++------
- 1 file changed, 4 insertions(+), 6 deletions(-)
-
-diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
-index c94890466fe9c..a807a84948b70 100644
---- a/drivers/gpio/gpio-davinci.c
-+++ b/drivers/gpio/gpio-davinci.c
-@@ -165,7 +165,7 @@ davinci_gpio_get_pdata(struct platform_device *pdev)
- static int davinci_gpio_probe(struct platform_device *pdev)
- {
--      int gpio, bank, i, ret = 0;
-+      int bank, i, ret = 0;
-       unsigned int ngpio, nbank, nirq;
-       struct davinci_gpio_controller *chips;
-       struct davinci_gpio_platform_data *pdata;
-@@ -204,10 +204,7 @@ static int davinci_gpio_probe(struct platform_device *pdev)
-       else
-               nirq = DIV_ROUND_UP(ngpio, 16);
--      nbank = DIV_ROUND_UP(ngpio, 32);
--      chips = devm_kcalloc(dev,
--                           nbank, sizeof(struct davinci_gpio_controller),
--                           GFP_KERNEL);
-+      chips = devm_kzalloc(dev, sizeof(*chips), GFP_KERNEL);
-       if (!chips)
-               return -ENOMEM;
-@@ -248,7 +245,8 @@ static int davinci_gpio_probe(struct platform_device *pdev)
- #endif
-       spin_lock_init(&chips->lock);
--      for (gpio = 0, bank = 0; gpio < ngpio; gpio += 32, bank++)
-+      nbank = DIV_ROUND_UP(ngpio, 32);
-+      for (bank = 0; bank < nbank; bank++)
-               chips->regs[bank] = gpio_base + offset_array[bank];
-       ret = devm_gpiochip_add_data(dev, &chips->chip, chips);
--- 
-2.43.0
-
diff --git a/queue-4.19/gpio-davinci-use-dev-name-for-label-and-automatic-ba.patch b/queue-4.19/gpio-davinci-use-dev-name-for-label-and-automatic-ba.patch
deleted file mode 100644 (file)
index 49c360e..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-From 95854f3c60ef5c638d38d0f81c6f4233485a77d5 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 31 Aug 2018 14:13:23 -0500
-Subject: gpio: davinci: Use dev name for label and automatic base selection
-
-From: Andrew F. Davis <afd@ti.com>
-
-[ Upstream commit 587f7a694f016b65f8de8ea8b5fb0402712b5475 ]
-
-Use dev_name to get a unique label and use -1 for a base to get our
-selection automatically. We pull in all GPIOs per chip now so this
-does not have the effect of out of order labels like before.
-
-We do these both together so we can drop all the static data in one
-patch. This also lets us normalize the return paths as we don't need
-any cleanup after this change.
-
-Signed-off-by: Andrew F. Davis <afd@ti.com>
-Tested-by: Keerthy <j-keerthy@ti.com>
-Acked-by: Keerthy <j-keerthy@ti.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-Stable-dep-of: 7aa9b96e9a73 ("gpio: davinci: Validate the obtained number of IRQs")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/gpio/gpio-davinci.c | 22 ++++------------------
- 1 file changed, 4 insertions(+), 18 deletions(-)
-
-diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
-index ead75c1062fbc..c94890466fe9c 100644
---- a/drivers/gpio/gpio-davinci.c
-+++ b/drivers/gpio/gpio-davinci.c
-@@ -41,7 +41,6 @@ struct davinci_gpio_regs {
- typedef struct irq_chip *(*gpio_get_irq_chip_cb_t)(unsigned int irq);
- #define BINTEN        0x8 /* GPIO Interrupt Per-Bank Enable Register */
--#define MAX_LABEL_SIZE 20
- static void __iomem *gpio_base;
- static unsigned int offset_array[5] = {0x10, 0x38, 0x60, 0x88, 0xb0};
-@@ -166,14 +165,12 @@ davinci_gpio_get_pdata(struct platform_device *pdev)
- static int davinci_gpio_probe(struct platform_device *pdev)
- {
--      static int ctrl_num, bank_base;
-       int gpio, bank, i, ret = 0;
-       unsigned int ngpio, nbank, nirq;
-       struct davinci_gpio_controller *chips;
-       struct davinci_gpio_platform_data *pdata;
-       struct device *dev = &pdev->dev;
-       struct resource *res;
--      char label[MAX_LABEL_SIZE];
-       pdata = davinci_gpio_get_pdata(pdev);
-       if (!pdata) {
-@@ -229,10 +226,7 @@ static int davinci_gpio_probe(struct platform_device *pdev)
-               }
-       }
--      snprintf(label, MAX_LABEL_SIZE, "davinci_gpio.%d", ctrl_num++);
--      chips->chip.label = devm_kstrdup(dev, label, GFP_KERNEL);
--              if (!chips->chip.label)
--                      return -ENOMEM;
-+      chips->chip.label = dev_name(dev);
-       chips->chip.direction_input = davinci_direction_in;
-       chips->chip.get = davinci_gpio_get;
-@@ -240,7 +234,7 @@ static int davinci_gpio_probe(struct platform_device *pdev)
-       chips->chip.set = davinci_gpio_set;
-       chips->chip.ngpio = ngpio;
--      chips->chip.base = bank_base;
-+      chips->chip.base = -1;
- #ifdef CONFIG_OF_GPIO
-       chips->chip.of_gpio_n_cells = 2;
-@@ -253,28 +247,20 @@ static int davinci_gpio_probe(struct platform_device *pdev)
-       }
- #endif
-       spin_lock_init(&chips->lock);
--      bank_base += ngpio;
-       for (gpio = 0, bank = 0; gpio < ngpio; gpio += 32, bank++)
-               chips->regs[bank] = gpio_base + offset_array[bank];
-       ret = devm_gpiochip_add_data(dev, &chips->chip, chips);
-       if (ret)
--              goto err;
-+              return ret;
-       platform_set_drvdata(pdev, chips);
-       ret = davinci_gpio_irq_setup(pdev);
-       if (ret)
--              goto err;
-+              return ret;
-       return 0;
--
--err:
--      /* Revert the static variable increments */
--      ctrl_num--;
--      bank_base -= ngpio;
--
--      return ret;
- }
- /*--------------------------------------------------------------------------*/
--- 
-2.43.0
-
index 00f516fa511b9c1364faf8bc355ea4d104ee92d5..eb0f5149c37d91670df38f748c8c1ca913303535 100644 (file)
@@ -23,14 +23,12 @@ Link: https://lore.kernel.org/r/20240618144344.16943-1-amishin@t-argos.ru
 Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- drivers/gpio/gpio-davinci.c | 5 +++++
+ drivers/gpio/gpio-davinci.c |    5 +++++
  1 file changed, 5 insertions(+)
 
-diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
-index a807a84948b70..ed273ae962df6 100644
 --- a/drivers/gpio/gpio-davinci.c
 +++ b/drivers/gpio/gpio-davinci.c
-@@ -204,6 +204,11 @@ static int davinci_gpio_probe(struct platform_device *pdev)
+@@ -207,6 +207,11 @@ static int davinci_gpio_probe(struct pla
        else
                nirq = DIV_ROUND_UP(ngpio, 16);
  
@@ -39,9 +37,6 @@ index a807a84948b70..ed273ae962df6 100644
 +              return -EINVAL;
 +      }
 +
-       chips = devm_kzalloc(dev, sizeof(*chips), GFP_KERNEL);
-       if (!chips)
-               return -ENOMEM;
--- 
-2.43.0
-
+       nbank = DIV_ROUND_UP(ngpio, 32);
+       chips = devm_kcalloc(dev,
+                            nbank, sizeof(struct davinci_gpio_controller),
index a2d055ab0296d6eb9750db22d69dc235b7108bb4..af05c41f3e4dbaa36a53c219acebd6c97cb8c35f 100644 (file)
@@ -72,7 +72,6 @@ cipso-fix-total-option-length-computation.patch
 netrom-fix-a-memory-leak-in-nr_heartbeat_expiry.patch
 ipv6-prevent-possible-null-dereference-in-rt6_probe.patch
 xfrm6-check-ip6_dst_idev-return-value-in-xfrm6_get_s.patch
-virtio-net-ethtool-configurable-lro.patch
 virtio_net-checksum-offloading-handling-fix.patch
 net-usb-rtl8150-fix-unintiatilzed-variables-in-rtl81.patch
 regulator-core-fix-modpost-error-regulator_get_regma.patch
@@ -111,8 +110,6 @@ alsa-emux-improve-patch-ioctl-data-validation.patch
 media-dvbdev-initialize-sbuf.patch
 soc-ti-wkup_m3_ipc-send-null-dummy-message-instead-o.patch
 nvme-fixup-comment-for-nvme-rdma-provider-type.patch
-gpio-davinci-use-dev-name-for-label-and-automatic-ba.patch
-gpio-davinci-allocate-the-correct-amount-of-memory-f.patch
 gpio-davinci-validate-the-obtained-number-of-irqs.patch
 i2c-ocores-stop-transfer-on-timeout.patch
 i2c-ocores-set-iack-bit-after-core-is-enabled.patch
diff --git a/queue-4.19/virtio-net-ethtool-configurable-lro.patch b/queue-4.19/virtio-net-ethtool-configurable-lro.patch
deleted file mode 100644 (file)
index 21e00ec..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-From 2ca7d15d6339c81cb8fca2e218f99ef724fd85fe Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Thu, 20 Dec 2018 17:14:54 -0500
-Subject: virtio-net: ethtool configurable LRO
-
-From: Willem de Bruijn <willemb@google.com>
-
-[ Upstream commit a02e8964eaf9271a8a5fcc0c55bd13f933bafc56 ]
-
-Virtio-net devices negotiate LRO support with the host.
-Display the initially negotiated state with ethtool -k.
-
-Also allow configuring it with ethtool -K, reusing the existing
-virtnet_set_guest_offloads helper that configures LRO for XDP.
-This is conditional on VIRTIO_NET_F_CTRL_GUEST_OFFLOADS.
-
-Virtio-net negotiates TSO4 and TSO6 separately, but ethtool does not
-distinguish between the two. Display LRO as on only if any offload
-is active.
-
-RTNL is held while calling virtnet_set_features, same as on the path
-from virtnet_xdp_set.
-
-Changes v1 -> v2
-  - allow ethtool config (-K) only if VIRTIO_NET_F_CTRL_GUEST_OFFLOADS
-  - show LRO as enabled if any LRO variant is enabled
-  - do not allow configuration while XDP is active
-  - differentiate current features from the capable set, to restore
-    on XDP down only those features that were active on XDP up
-  - move test out of VIRTIO_NET_F_CSUM/TSO branch, which is tx only
-
-Signed-off-by: Willem de Bruijn <willemb@google.com>
-Acked-by: Michael S. Tsirkin <mst@redhat.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Stable-dep-of: 604141c036e1 ("virtio_net: checksum offloading handling fix")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/net/virtio_net.c | 33 +++++++++++++++++++++++++++++++++
- 1 file changed, 33 insertions(+)
-
-diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
-index 2b012d7165cd0..cbe7be1b8452e 100644
---- a/drivers/net/virtio_net.c
-+++ b/drivers/net/virtio_net.c
-@@ -238,6 +238,7 @@ struct virtnet_info {
-       u32 speed;
-       unsigned long guest_offloads;
-+      unsigned long guest_offloads_capable;
-       /* failover when STANDBY feature enabled */
-       struct failover *failover;
-@@ -2548,6 +2549,31 @@ static int virtnet_get_phys_port_name(struct net_device *dev, char *buf,
-       return 0;
- }
-+static int virtnet_set_features(struct net_device *dev,
-+                              netdev_features_t features)
-+{
-+      struct virtnet_info *vi = netdev_priv(dev);
-+      u64 offloads;
-+      int err;
-+
-+      if ((dev->features ^ features) & NETIF_F_LRO) {
-+              if (vi->xdp_queue_pairs)
-+                      return -EBUSY;
-+
-+              if (features & NETIF_F_LRO)
-+                      offloads = vi->guest_offloads_capable;
-+              else
-+                      offloads = 0;
-+
-+              err = virtnet_set_guest_offloads(vi, offloads);
-+              if (err)
-+                      return err;
-+              vi->guest_offloads = offloads;
-+      }
-+
-+      return 0;
-+}
-+
- static const struct net_device_ops virtnet_netdev = {
-       .ndo_open            = virtnet_open,
-       .ndo_stop            = virtnet_close,
-@@ -2562,6 +2588,7 @@ static const struct net_device_ops virtnet_netdev = {
-       .ndo_xdp_xmit           = virtnet_xdp_xmit,
-       .ndo_features_check     = passthru_features_check,
-       .ndo_get_phys_port_name = virtnet_get_phys_port_name,
-+      .ndo_set_features       = virtnet_set_features,
- };
- static void virtnet_config_changed_work(struct work_struct *work)
-@@ -3022,6 +3049,11 @@ static int virtnet_probe(struct virtio_device *vdev)
-       }
-       if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_CSUM))
-               dev->features |= NETIF_F_RXCSUM;
-+      if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) ||
-+          virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO6))
-+              dev->features |= NETIF_F_LRO;
-+      if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_GUEST_OFFLOADS))
-+              dev->hw_features |= NETIF_F_LRO;
-       dev->vlan_features = dev->features;
-@@ -3157,6 +3189,7 @@ static int virtnet_probe(struct virtio_device *vdev)
-       for (i = 0; i < ARRAY_SIZE(guest_offloads); i++)
-               if (virtio_has_feature(vi->vdev, guest_offloads[i]))
-                       set_bit(guest_offloads[i], &vi->guest_offloads);
-+      vi->guest_offloads_capable = vi->guest_offloads;
-       pr_debug("virtnet: registered device %s with %d RX and TX vq's\n",
-                dev->name, max_queue_pairs);
--- 
-2.43.0
-
index ff4a5440c397b9a18975470b6ff6cd5e94e41f55..f3b9d37f43c425f0036c16237fa8495f47af0137 100644 (file)
@@ -33,14 +33,12 @@ Acked-by: Jason Wang <jasowang@redhat.com>
 Signed-off-by: David S. Miller <davem@davemloft.net>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- drivers/net/virtio_net.c | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
+ drivers/net/virtio_net.c |   11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
 
-diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
-index cbe7be1b8452e..7a6ebd2400526 100644
 --- a/drivers/net/virtio_net.c
 +++ b/drivers/net/virtio_net.c
-@@ -3047,8 +3047,16 @@ static int virtnet_probe(struct virtio_device *vdev)
+@@ -3020,8 +3020,15 @@ static int virtnet_probe(struct virtio_d
                        dev->features |= dev->hw_features & NETIF_F_ALL_TSO;
                /* (!csum && gso) case will be fixed by register_netdev() */
        }
@@ -55,10 +53,6 @@ index cbe7be1b8452e..7a6ebd2400526 100644
 +       * validating these packets' checksums, so the driver won't have to.
 +       */
 +      dev->features |= NETIF_F_RXCSUM;
-+
-       if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO4) ||
-           virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_TSO6))
-               dev->features |= NETIF_F_LRO;
--- 
-2.43.0
-
+       dev->vlan_features = dev->features;