]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.19
authorSasha Levin <sashal@kernel.org>
Wed, 29 Nov 2023 02:49:24 +0000 (21:49 -0500)
committerSasha Levin <sashal@kernel.org>
Wed, 29 Nov 2023 02:49:24 +0000 (21:49 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
14 files changed:
queue-4.19/amd-xgbe-handle-corner-case-during-sfp-hotplug.patch [new file with mode: 0644]
queue-4.19/amd-xgbe-handle-the-corner-case-during-tx-completion.patch [new file with mode: 0644]
queue-4.19/amd-xgbe-propagate-the-correct-speed-and-duplex-stat.patch [new file with mode: 0644]
queue-4.19/arm-xen-fix-xen_vcpu_info-allocation-alignment.patch [new file with mode: 0644]
queue-4.19/ata-pata_isapnp-add-missing-error-check-for-devm_iop.patch [new file with mode: 0644]
queue-4.19/drm-panel-simple-fix-innolux-g101ice-l01-timings.patch [new file with mode: 0644]
queue-4.19/drm-rockchip-vop-fix-color-for-rgb888-bgr888-format-.patch [new file with mode: 0644]
queue-4.19/hid-core-store-the-unique-system-identifier-in-hid_d.patch [new file with mode: 0644]
queue-4.19/hid-fix-hid-device-resource-race-between-hid-core-an.patch [new file with mode: 0644]
queue-4.19/ipv4-correct-silence-an-endian-warning-in-__ip_do_re.patch [new file with mode: 0644]
queue-4.19/mips-kvm-fix-a-build-warning-about-variable-set-but-.patch [new file with mode: 0644]
queue-4.19/net-axienet-fix-check-for-partial-tx-checksum.patch [new file with mode: 0644]
queue-4.19/net-usb-ax88179_178a-fix-failed-operations-during-ax.patch [new file with mode: 0644]
queue-4.19/series [new file with mode: 0644]

diff --git a/queue-4.19/amd-xgbe-handle-corner-case-during-sfp-hotplug.patch b/queue-4.19/amd-xgbe-handle-corner-case-during-sfp-hotplug.patch
new file mode 100644 (file)
index 0000000..abfb9c8
--- /dev/null
@@ -0,0 +1,55 @@
+From 45a5d83e43f940bddb2a79579acc6bb424f231e0 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 22 Nov 2023 00:44:33 +0530
+Subject: amd-xgbe: handle corner-case during sfp hotplug
+
+From: Raju Rangoju <Raju.Rangoju@amd.com>
+
+[ Upstream commit 676ec53844cbdf2f47e68a076cdff7f0ec6cbe3f ]
+
+Force the mode change for SFI in Fixed PHY configurations. Fixed PHY
+configurations needs PLL to be enabled while doing mode set. When the
+SFP module isn't connected during boot, driver assumes AN is ON and
+attempts auto-negotiation. However, if the connected SFP comes up in
+Fixed PHY configuration the link will not come up as PLL isn't enabled
+while the initial mode set command is issued. So, force the mode change
+for SFI in Fixed PHY configuration to fix link issues.
+
+Fixes: e57f7a3feaef ("amd-xgbe: Prepare for working with more than one type of phy")
+Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
+Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
+Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+index d291976d8b761..0e552022e659a 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+@@ -1178,7 +1178,19 @@ static int xgbe_phy_config_fixed(struct xgbe_prv_data *pdata)
+       if (pdata->phy.duplex != DUPLEX_FULL)
+               return -EINVAL;
+-      xgbe_set_mode(pdata, mode);
++      /* Force the mode change for SFI in Fixed PHY config.
++       * Fixed PHY configs needs PLL to be enabled while doing mode set.
++       * When the SFP module isn't connected during boot, driver assumes
++       * AN is ON and attempts autonegotiation. However, if the connected
++       * SFP comes up in Fixed PHY config, the link will not come up as
++       * PLL isn't enabled while the initial mode set command is issued.
++       * So, force the mode change for SFI in Fixed PHY configuration to
++       * fix link issues.
++       */
++      if (mode == XGBE_MODE_SFI)
++              xgbe_change_mode(pdata, mode);
++      else
++              xgbe_set_mode(pdata, mode);
+       return 0;
+ }
+-- 
+2.42.0
+
diff --git a/queue-4.19/amd-xgbe-handle-the-corner-case-during-tx-completion.patch b/queue-4.19/amd-xgbe-handle-the-corner-case-during-tx-completion.patch
new file mode 100644 (file)
index 0000000..2bd1351
--- /dev/null
@@ -0,0 +1,61 @@
+From 82d9e3703ea2bfb28a1c9a18a494225fc43750a1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 22 Nov 2023 00:44:34 +0530
+Subject: amd-xgbe: handle the corner-case during tx completion
+
+From: Raju Rangoju <Raju.Rangoju@amd.com>
+
+[ Upstream commit 7121205d5330c6a3cb3379348886d47c77b78d06 ]
+
+The existing implementation uses software logic to accumulate tx
+completions until the specified time (1ms) is met and then poll them.
+However, there exists a tiny gap which leads to a race between
+resetting and checking the tx_activate flag. Due to this the tx
+completions are not reported to upper layer and tx queue timeout
+kicks-in restarting the device.
+
+To address this, introduce a tx cleanup mechanism as part of the
+periodic maintenance process.
+
+Fixes: c5aa9e3b8156 ("amd-xgbe: Initial AMD 10GbE platform driver")
+Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
+Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
+Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+index c1fb1e62557c7..ec089b3a8aa2f 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+@@ -683,10 +683,24 @@ static void xgbe_service(struct work_struct *work)
+ static void xgbe_service_timer(struct timer_list *t)
+ {
+       struct xgbe_prv_data *pdata = from_timer(pdata, t, service_timer);
++      struct xgbe_channel *channel;
++      unsigned int i;
+       queue_work(pdata->dev_workqueue, &pdata->service_work);
+       mod_timer(&pdata->service_timer, jiffies + HZ);
++
++      if (!pdata->tx_usecs)
++              return;
++
++      for (i = 0; i < pdata->channel_count; i++) {
++              channel = pdata->channel[i];
++              if (!channel->tx_ring || channel->tx_timer_active)
++                      break;
++              channel->tx_timer_active = 1;
++              mod_timer(&channel->tx_timer,
++                        jiffies + usecs_to_jiffies(pdata->tx_usecs));
++      }
+ }
+ static void xgbe_init_timers(struct xgbe_prv_data *pdata)
+-- 
+2.42.0
+
diff --git a/queue-4.19/amd-xgbe-propagate-the-correct-speed-and-duplex-stat.patch b/queue-4.19/amd-xgbe-propagate-the-correct-speed-and-duplex-stat.patch
new file mode 100644 (file)
index 0000000..910a1f2
--- /dev/null
@@ -0,0 +1,51 @@
+From 17db54b4278d3e48796f4fa32fef86ec137783bd Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 22 Nov 2023 00:44:35 +0530
+Subject: amd-xgbe: propagate the correct speed and duplex status
+
+From: Raju Rangoju <Raju.Rangoju@amd.com>
+
+[ Upstream commit 7a2323ac24a50311f64a3a9b54ed5bef5821ecae ]
+
+xgbe_get_link_ksettings() does not propagate correct speed and duplex
+information to ethtool during cable unplug. Due to which ethtool reports
+incorrect values for speed and duplex.
+
+Address this by propagating correct information.
+
+Fixes: 7c12aa08779c ("amd-xgbe: Move the PHY support into amd-xgbe")
+Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
+Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
+Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
+index a880f10e3e703..d74f45ce06864 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c
+@@ -314,10 +314,15 @@ static int xgbe_get_link_ksettings(struct net_device *netdev,
+       cmd->base.phy_address = pdata->phy.address;
+-      cmd->base.autoneg = pdata->phy.autoneg;
+-      cmd->base.speed = pdata->phy.speed;
+-      cmd->base.duplex = pdata->phy.duplex;
++      if (netif_carrier_ok(netdev)) {
++              cmd->base.speed = pdata->phy.speed;
++              cmd->base.duplex = pdata->phy.duplex;
++      } else {
++              cmd->base.speed = SPEED_UNKNOWN;
++              cmd->base.duplex = DUPLEX_UNKNOWN;
++      }
++      cmd->base.autoneg = pdata->phy.autoneg;
+       cmd->base.port = PORT_NONE;
+       XGBE_LM_COPY(cmd, supported, lks, supported);
+-- 
+2.42.0
+
diff --git a/queue-4.19/arm-xen-fix-xen_vcpu_info-allocation-alignment.patch b/queue-4.19/arm-xen-fix-xen_vcpu_info-allocation-alignment.patch
new file mode 100644 (file)
index 0000000..606e5b3
--- /dev/null
@@ -0,0 +1,47 @@
+From 342ce4fb81f222595f0a20984dac594361512c69 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 22 Nov 2023 15:07:41 -0800
+Subject: arm/xen: fix xen_vcpu_info allocation alignment
+
+From: Stefano Stabellini <sstabellini@kernel.org>
+
+[ Upstream commit 7bf9a6b46549852a37e6d07e52c601c3c706b562 ]
+
+xen_vcpu_info is a percpu area than needs to be mapped by Xen.
+Currently, it could cross a page boundary resulting in Xen being unable
+to map it:
+
+[    0.567318] kernel BUG at arch/arm64/xen/../../arm/xen/enlighten.c:164!
+[    0.574002] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
+
+Fix the issue by using __alloc_percpu and requesting alignment for the
+memory allocation.
+
+Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
+
+Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2311221501340.2053963@ubuntu-linux-20-04-desktop
+Fixes: 24d5373dda7c ("arm/xen: Use alloc_percpu rather than __alloc_percpu")
+Reviewed-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/xen/enlighten.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
+index dd946c77e8015..1623bfab45131 100644
+--- a/arch/arm/xen/enlighten.c
++++ b/arch/arm/xen/enlighten.c
+@@ -388,7 +388,8 @@ static int __init xen_guest_init(void)
+        * for secondary CPUs as they are brought up.
+        * For uniformity we use VCPUOP_register_vcpu_info even on cpu0.
+        */
+-      xen_vcpu_info = alloc_percpu(struct vcpu_info);
++      xen_vcpu_info = __alloc_percpu(sizeof(struct vcpu_info),
++                                     1 << fls(sizeof(struct vcpu_info) - 1));
+       if (xen_vcpu_info == NULL)
+               return -ENOMEM;
+-- 
+2.42.0
+
diff --git a/queue-4.19/ata-pata_isapnp-add-missing-error-check-for-devm_iop.patch b/queue-4.19/ata-pata_isapnp-add-missing-error-check-for-devm_iop.patch
new file mode 100644 (file)
index 0000000..3bb872b
--- /dev/null
@@ -0,0 +1,38 @@
+From 46b6e462f584277d7122a0e7180434b25ec78ff1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 31 Oct 2023 04:00:07 +0000
+Subject: ata: pata_isapnp: Add missing error check for devm_ioport_map()
+
+From: Chen Ni <nichen@iscas.ac.cn>
+
+[ Upstream commit a6925165ea82b7765269ddd8dcad57c731aa00de ]
+
+Add missing error return check for devm_ioport_map() and return the
+error if this function call fails.
+
+Fixes: 0d5ff566779f ("libata: convert to iomap")
+Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
+Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
+Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/ata/pata_isapnp.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
+index 994f168b54a80..4ffbc2a63f8f5 100644
+--- a/drivers/ata/pata_isapnp.c
++++ b/drivers/ata/pata_isapnp.c
+@@ -81,6 +81,9 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev
+       if (pnp_port_valid(idev, 1)) {
+               ctl_addr = devm_ioport_map(&idev->dev,
+                                          pnp_port_start(idev, 1), 1);
++              if (!ctl_addr)
++                      return -ENOMEM;
++
+               ap->ioaddr.altstatus_addr = ctl_addr;
+               ap->ioaddr.ctl_addr = ctl_addr;
+               ap->ops = &isapnp_port_ops;
+-- 
+2.42.0
+
diff --git a/queue-4.19/drm-panel-simple-fix-innolux-g101ice-l01-timings.patch b/queue-4.19/drm-panel-simple-fix-innolux-g101ice-l01-timings.patch
new file mode 100644 (file)
index 0000000..4b0a0db
--- /dev/null
@@ -0,0 +1,56 @@
+From f38a71218389791a38ee954a38322ab7cb92394b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 9 Oct 2023 00:32:56 +0200
+Subject: drm/panel: simple: Fix Innolux G101ICE-L01 timings
+
+From: Marek Vasut <marex@denx.de>
+
+[ Upstream commit 3f9a91b6c00e655d27bd785dcda1742dbdc31bda ]
+
+The Innolux G101ICE-L01 datasheet [1] page 17 table
+6.1 INPUT SIGNAL TIMING SPECIFICATIONS
+indicates that maximum vertical blanking time is 40 lines.
+Currently the driver uses 29 lines.
+
+Fix it, and since this panel is a DE panel, adjust the timings
+to make them less hostile to controllers which cannot do 1 px
+HSA/VSA, distribute the delays evenly between all three parts.
+
+[1] https://www.data-modul.com/sites/default/files/products/G101ICE-L01-C2-specification-12042389.pdf
+
+Fixes: 1e29b840af9f ("drm/panel: simple: Add Innolux G101ICE-L01 panel")
+Signed-off-by: Marek Vasut <marex@denx.de>
+Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
+Link: https://patchwork.freedesktop.org/patch/msgid/20231008223256.279196-1-marex@denx.de
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/panel/panel-simple.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
+index 35771e0e69fa6..eb7717eb26147 100644
+--- a/drivers/gpu/drm/panel/panel-simple.c
++++ b/drivers/gpu/drm/panel/panel-simple.c
+@@ -1261,13 +1261,13 @@ static const struct panel_desc innolux_g070y2_l01 = {
+ static const struct display_timing innolux_g101ice_l01_timing = {
+       .pixelclock = { 60400000, 71100000, 74700000 },
+       .hactive = { 1280, 1280, 1280 },
+-      .hfront_porch = { 41, 80, 100 },
+-      .hback_porch = { 40, 79, 99 },
+-      .hsync_len = { 1, 1, 1 },
++      .hfront_porch = { 30, 60, 70 },
++      .hback_porch = { 30, 60, 70 },
++      .hsync_len = { 22, 40, 60 },
+       .vactive = { 800, 800, 800 },
+-      .vfront_porch = { 5, 11, 14 },
+-      .vback_porch = { 4, 11, 14 },
+-      .vsync_len = { 1, 1, 1 },
++      .vfront_porch = { 3, 8, 14 },
++      .vback_porch = { 3, 8, 14 },
++      .vsync_len = { 4, 7, 12 },
+       .flags = DISPLAY_FLAGS_DE_HIGH,
+ };
+-- 
+2.42.0
+
diff --git a/queue-4.19/drm-rockchip-vop-fix-color-for-rgb888-bgr888-format-.patch b/queue-4.19/drm-rockchip-vop-fix-color-for-rgb888-bgr888-format-.patch
new file mode 100644 (file)
index 0000000..ee0dac7
--- /dev/null
@@ -0,0 +1,76 @@
+From 103751e36b47269ee65724ae6542655a3a97c4db Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 26 Oct 2023 19:14:58 +0000
+Subject: drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full
+
+From: Jonas Karlman <jonas@kwiboo.se>
+
+[ Upstream commit bb0a05acd6121ff0e810b44fdc24dbdfaa46b642 ]
+
+Use of DRM_FORMAT_RGB888 and DRM_FORMAT_BGR888 on e.g. RK3288, RK3328
+and RK3399 result in wrong colors being displayed.
+
+The issue can be observed using modetest:
+
+  modetest -s <connector_id>@<crtc_id>:1920x1080-60@RG24
+  modetest -s <connector_id>@<crtc_id>:1920x1080-60@BG24
+
+Vendor 4.4 kernel apply an inverted rb swap for these formats on VOP
+full framework (IP version 3.x) compared to VOP little framework (2.x).
+
+Fix colors by applying different rb swap for VOP full framework (3.x)
+and VOP little framework (2.x) similar to vendor 4.4 kernel.
+
+Fixes: 85a359f25388 ("drm/rockchip: Add BGR formats to VOP")
+Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
+Tested-by: Diederik de Haas <didi.debian@cknow.org>
+Reviewed-by: Christopher Obbard <chris.obbard@collabora.com>
+Tested-by: Christopher Obbard <chris.obbard@collabora.com>
+Signed-off-by: Heiko Stuebner <heiko@sntech.de>
+Link: https://patchwork.freedesktop.org/patch/msgid/20231026191500.2994225-1-jonas@kwiboo.se
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+index ea692046be614..c502d24b8253e 100644
+--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
++++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+@@ -204,14 +204,22 @@ static inline void vop_cfg_done(struct vop *vop)
+       VOP_REG_SET(vop, common, cfg_done, 1);
+ }
+-static bool has_rb_swapped(uint32_t format)
++static bool has_rb_swapped(uint32_t version, uint32_t format)
+ {
+       switch (format) {
+       case DRM_FORMAT_XBGR8888:
+       case DRM_FORMAT_ABGR8888:
+-      case DRM_FORMAT_BGR888:
+       case DRM_FORMAT_BGR565:
+               return true;
++      /*
++       * full framework (IP version 3.x) only need rb swapped for RGB888 and
++       * little framework (IP version 2.x) only need rb swapped for BGR888,
++       * check for 3.x to also only rb swap BGR888 for unknown vop version
++       */
++      case DRM_FORMAT_RGB888:
++              return VOP_MAJOR(version) == 3;
++      case DRM_FORMAT_BGR888:
++              return VOP_MAJOR(version) != 3;
+       default:
+               return false;
+       }
+@@ -798,7 +806,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
+       VOP_WIN_SET(vop, win, dsp_info, dsp_info);
+       VOP_WIN_SET(vop, win, dsp_st, dsp_st);
+-      rb_swap = has_rb_swapped(fb->format->format);
++      rb_swap = has_rb_swapped(vop->data->version, fb->format->format);
+       VOP_WIN_SET(vop, win, rb_swap, rb_swap);
+       /*
+-- 
+2.42.0
+
diff --git a/queue-4.19/hid-core-store-the-unique-system-identifier-in-hid_d.patch b/queue-4.19/hid-core-store-the-unique-system-identifier-in-hid_d.patch
new file mode 100644 (file)
index 0000000..a587170
--- /dev/null
@@ -0,0 +1,60 @@
+From 1e0879218d0f299030b07acd4a7c3e2c720e6698 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 2 Sep 2022 15:29:23 +0200
+Subject: HID: core: store the unique system identifier in hid_device
+
+From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+
+[ Upstream commit 1e839143d674603b0bbbc4c513bca35404967dbc ]
+
+This unique identifier is currently used only for ensuring uniqueness in
+sysfs. However, this could be handful for userspace to refer to a specific
+hid_device by this id.
+
+2 use cases are in my mind: LEDs (and their naming convention), and
+HID-BPF.
+
+Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Link: https://lore.kernel.org/r/20220902132938.2409206-9-benjamin.tissoires@redhat.com
+Stable-dep-of: fc43e9c857b7 ("HID: fix HID device resource race between HID core and debugging support")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/hid/hid-core.c | 4 +++-
+ include/linux/hid.h    | 2 ++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
+index c8d687f795caa..99eb26bcb1dd3 100644
+--- a/drivers/hid/hid-core.c
++++ b/drivers/hid/hid-core.c
+@@ -2259,10 +2259,12 @@ int hid_add_device(struct hid_device *hdev)
+                       hid_warn(hdev, "bad device descriptor (%d)\n", ret);
+       }
++      hdev->id = atomic_inc_return(&id);
++
+       /* XXX hack, any other cleaner solution after the driver core
+        * is converted to allow more than 20 bytes as the device name? */
+       dev_set_name(&hdev->dev, "%04X:%04X:%04X.%04X", hdev->bus,
+-                   hdev->vendor, hdev->product, atomic_inc_return(&id));
++                   hdev->vendor, hdev->product, hdev->id);
+       hid_debug_register(hdev, dev_name(&hdev->dev));
+       ret = device_add(&hdev->dev);
+diff --git a/include/linux/hid.h b/include/linux/hid.h
+index 79c6c3b4e0044..10b41b2b20857 100644
+--- a/include/linux/hid.h
++++ b/include/linux/hid.h
+@@ -625,6 +625,8 @@ struct hid_device {                                                        /* device report descriptor */
+       struct list_head debug_list;
+       spinlock_t  debug_list_lock;
+       wait_queue_head_t debug_wait;
++
++      unsigned int id;                                                /* system unique id */
+ };
+ #define to_hid_device(pdev) \
+-- 
+2.42.0
+
diff --git a/queue-4.19/hid-fix-hid-device-resource-race-between-hid-core-an.patch b/queue-4.19/hid-fix-hid-device-resource-race-between-hid-core-an.patch
new file mode 100644 (file)
index 0000000..9f30b12
--- /dev/null
@@ -0,0 +1,149 @@
+From bae32fe66dfa811203ad598e76b685f0c8db359d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 31 Oct 2023 12:32:39 +0800
+Subject: HID: fix HID device resource race between HID core and debugging
+ support
+
+From: Charles Yi <be286@163.com>
+
+[ Upstream commit fc43e9c857b7aa55efba9398419b14d9e35dcc7d ]
+
+hid_debug_events_release releases resources bound to the HID device instance.
+hid_device_release releases the underlying HID device instance potentially
+before hid_debug_events_release has completed releasing debug resources bound
+to the same HID device instance.
+
+Reference count to prevent the HID device instance from being torn down
+preemptively when HID debugging support is used. When count reaches zero,
+release core resources of HID device instance using hiddev_free.
+
+The crash:
+
+[  120.728477][ T4396] kernel BUG at lib/list_debug.c:53!
+[  120.728505][ T4396] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
+[  120.739806][ T4396] Modules linked in: bcmdhd dhd_static_buf 8822cu pcie_mhi r8168
+[  120.747386][ T4396] CPU: 1 PID: 4396 Comm: hidt_bridge Not tainted 5.10.110 #257
+[  120.754771][ T4396] Hardware name: Rockchip RK3588 EVB4 LP4 V10 Board (DT)
+[  120.761643][ T4396] pstate: 60400089 (nZCv daIf +PAN -UAO -TCO BTYPE=--)
+[  120.768338][ T4396] pc : __list_del_entry_valid+0x98/0xac
+[  120.773730][ T4396] lr : __list_del_entry_valid+0x98/0xac
+[  120.779120][ T4396] sp : ffffffc01e62bb60
+[  120.783126][ T4396] x29: ffffffc01e62bb60 x28: ffffff818ce3a200
+[  120.789126][ T4396] x27: 0000000000000009 x26: 0000000000980000
+[  120.795126][ T4396] x25: ffffffc012431000 x24: ffffff802c6d4e00
+[  120.801125][ T4396] x23: ffffff8005c66f00 x22: ffffffc01183b5b8
+[  120.807125][ T4396] x21: ffffff819df2f100 x20: 0000000000000000
+[  120.813124][ T4396] x19: ffffff802c3f0700 x18: ffffffc01d2cd058
+[  120.819124][ T4396] x17: 0000000000000000 x16: 0000000000000000
+[  120.825124][ T4396] x15: 0000000000000004 x14: 0000000000003fff
+[  120.831123][ T4396] x13: ffffffc012085588 x12: 0000000000000003
+[  120.837123][ T4396] x11: 00000000ffffbfff x10: 0000000000000003
+[  120.843123][ T4396] x9 : 455103d46b329300 x8 : 455103d46b329300
+[  120.849124][ T4396] x7 : 74707572726f6320 x6 : ffffffc0124b8cb5
+[  120.855124][ T4396] x5 : ffffffffffffffff x4 : 0000000000000000
+[  120.861123][ T4396] x3 : ffffffc011cf4f90 x2 : ffffff81fee7b948
+[  120.867122][ T4396] x1 : ffffffc011cf4f90 x0 : 0000000000000054
+[  120.873122][ T4396] Call trace:
+[  120.876259][ T4396]  __list_del_entry_valid+0x98/0xac
+[  120.881304][ T4396]  hid_debug_events_release+0x48/0x12c
+[  120.886617][ T4396]  full_proxy_release+0x50/0xbc
+[  120.891323][ T4396]  __fput+0xdc/0x238
+[  120.895075][ T4396]  ____fput+0x14/0x24
+[  120.898911][ T4396]  task_work_run+0x90/0x148
+[  120.903268][ T4396]  do_exit+0x1bc/0x8a4
+[  120.907193][ T4396]  do_group_exit+0x8c/0xa4
+[  120.911458][ T4396]  get_signal+0x468/0x744
+[  120.915643][ T4396]  do_signal+0x84/0x280
+[  120.919650][ T4396]  do_notify_resume+0xd0/0x218
+[  120.924262][ T4396]  work_pending+0xc/0x3f0
+
+[ Rahul Rameshbabu <sergeantsagara@protonmail.com>: rework changelog ]
+Fixes: cd667ce24796 ("HID: use debugfs for events/reports dumping")
+Signed-off-by: Charles Yi <be286@163.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/hid/hid-core.c  | 12 ++++++++++--
+ drivers/hid/hid-debug.c |  3 +++
+ include/linux/hid.h     |  3 +++
+ 3 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
+index 99eb26bcb1dd3..dd1d8d0a46d12 100644
+--- a/drivers/hid/hid-core.c
++++ b/drivers/hid/hid-core.c
+@@ -701,15 +701,22 @@ static void hid_close_report(struct hid_device *device)
+  * Free a device structure, all reports, and all fields.
+  */
+-static void hid_device_release(struct device *dev)
++void hiddev_free(struct kref *ref)
+ {
+-      struct hid_device *hid = to_hid_device(dev);
++      struct hid_device *hid = container_of(ref, struct hid_device, ref);
+       hid_close_report(hid);
+       kfree(hid->dev_rdesc);
+       kfree(hid);
+ }
++static void hid_device_release(struct device *dev)
++{
++      struct hid_device *hid = to_hid_device(dev);
++
++      kref_put(&hid->ref, hiddev_free);
++}
++
+ /*
+  * Fetch a report description item from the data stream. We support long
+  * items, though they are not used yet.
+@@ -2307,6 +2314,7 @@ struct hid_device *hid_allocate_device(void)
+       spin_lock_init(&hdev->debug_list_lock);
+       sema_init(&hdev->driver_input_lock, 1);
+       mutex_init(&hdev->ll_open_lock);
++      kref_init(&hdev->ref);
+       return hdev;
+ }
+diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
+index 2abd30a4ff75d..64ff5bd6579e7 100644
+--- a/drivers/hid/hid-debug.c
++++ b/drivers/hid/hid-debug.c
+@@ -1096,6 +1096,7 @@ static int hid_debug_events_open(struct inode *inode, struct file *file)
+               goto out;
+       }
+       list->hdev = (struct hid_device *) inode->i_private;
++      kref_get(&list->hdev->ref);
+       file->private_data = list;
+       mutex_init(&list->read_mutex);
+@@ -1188,6 +1189,8 @@ static int hid_debug_events_release(struct inode *inode, struct file *file)
+       list_del(&list->node);
+       spin_unlock_irqrestore(&list->hdev->debug_list_lock, flags);
+       kfifo_free(&list->hid_debug_fifo);
++
++      kref_put(&list->hdev->ref, hiddev_free);
+       kfree(list);
+       return 0;
+diff --git a/include/linux/hid.h b/include/linux/hid.h
+index 10b41b2b20857..63c2333a57059 100644
+--- a/include/linux/hid.h
++++ b/include/linux/hid.h
+@@ -625,10 +625,13 @@ struct hid_device {                                                      /* device report descriptor */
+       struct list_head debug_list;
+       spinlock_t  debug_list_lock;
+       wait_queue_head_t debug_wait;
++      struct kref                     ref;
+       unsigned int id;                                                /* system unique id */
+ };
++void hiddev_free(struct kref *ref);
++
+ #define to_hid_device(pdev) \
+       container_of(pdev, struct hid_device, dev)
+-- 
+2.42.0
+
diff --git a/queue-4.19/ipv4-correct-silence-an-endian-warning-in-__ip_do_re.patch b/queue-4.19/ipv4-correct-silence-an-endian-warning-in-__ip_do_re.patch
new file mode 100644 (file)
index 0000000..f07e24f
--- /dev/null
@@ -0,0 +1,39 @@
+From aded8c3cf11c802c7d7b9e202f56746824349c1f Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 19 Nov 2023 22:17:59 +0800
+Subject: ipv4: Correct/silence an endian warning in __ip_do_redirect
+
+From: Kunwu Chan <chentao@kylinos.cn>
+
+[ Upstream commit c0e2926266af3b5acf28df0a8fc6e4d90effe0bb ]
+
+net/ipv4/route.c:783:46: warning: incorrect type in argument 2 (different base types)
+net/ipv4/route.c:783:46:    expected unsigned int [usertype] key
+net/ipv4/route.c:783:46:    got restricted __be32 [usertype] new_gw
+
+Fixes: 969447f226b4 ("ipv4: use new_gw for redirect neigh lookup")
+Suggested-by: Eric Dumazet <edumazet@google.com>
+Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
+Link: https://lore.kernel.org/r/20231119141759.420477-1-chentao@kylinos.cn
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/ipv4/route.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/net/ipv4/route.c b/net/ipv4/route.c
+index 9753d07bfc0bf..f4d41ceef9466 100644
+--- a/net/ipv4/route.c
++++ b/net/ipv4/route.c
+@@ -791,7 +791,7 @@ static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flow
+                       goto reject_redirect;
+       }
+-      n = __ipv4_neigh_lookup(rt->dst.dev, new_gw);
++      n = __ipv4_neigh_lookup(rt->dst.dev, (__force u32)new_gw);
+       if (!n)
+               n = neigh_create(&arp_tbl, &new_gw, rt->dst.dev);
+       if (!IS_ERR(n)) {
+-- 
+2.42.0
+
diff --git a/queue-4.19/mips-kvm-fix-a-build-warning-about-variable-set-but-.patch b/queue-4.19/mips-kvm-fix-a-build-warning-about-variable-set-but-.patch
new file mode 100644 (file)
index 0000000..1e3f8b8
--- /dev/null
@@ -0,0 +1,57 @@
+From 68de33c7bb408682a2358eb0cc689deae62bd51c Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 10 Oct 2023 16:54:34 +0800
+Subject: MIPS: KVM: Fix a build warning about variable set but not used
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Huacai Chen <chenhuacai@loongson.cn>
+
+[ Upstream commit 83767a67e7b6a0291cde5681ec7e3708f3f8f877 ]
+
+After commit 411740f5422a ("KVM: MIPS/MMU: Implement KVM_CAP_SYNC_MMU")
+old_pte is no longer used in kvm_mips_map_page(). So remove it to fix a
+build warning about variable set but not used:
+
+   arch/mips/kvm/mmu.c: In function 'kvm_mips_map_page':
+>> arch/mips/kvm/mmu.c:701:29: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
+     701 |         pte_t *ptep, entry, old_pte;
+         |                             ^~~~~~~
+
+Cc: stable@vger.kernel.org
+Fixes: 411740f5422a960 ("KVM: MIPS/MMU: Implement KVM_CAP_SYNC_MMU")
+Reported-by: kernel test robot <lkp@intel.com>
+Closes: https://lore.kernel.org/oe-kbuild-all/202310070530.aARZCSfh-lkp@intel.com/
+Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
+Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
+Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/mips/kvm/mmu.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/arch/mips/kvm/mmu.c b/arch/mips/kvm/mmu.c
+index 098a7afd4d384..8c466d6d4736f 100644
+--- a/arch/mips/kvm/mmu.c
++++ b/arch/mips/kvm/mmu.c
+@@ -692,7 +692,7 @@ static int kvm_mips_map_page(struct kvm_vcpu *vcpu, unsigned long gpa,
+       gfn_t gfn = gpa >> PAGE_SHIFT;
+       int srcu_idx, err;
+       kvm_pfn_t pfn;
+-      pte_t *ptep, entry, old_pte;
++      pte_t *ptep, entry;
+       bool writeable;
+       unsigned long prot_bits;
+       unsigned long mmu_seq;
+@@ -765,7 +765,6 @@ static int kvm_mips_map_page(struct kvm_vcpu *vcpu, unsigned long gpa,
+       entry = pfn_pte(pfn, __pgprot(prot_bits));
+       /* Write the PTE */
+-      old_pte = *ptep;
+       set_pte(ptep, entry);
+       err = 0;
+-- 
+2.42.0
+
diff --git a/queue-4.19/net-axienet-fix-check-for-partial-tx-checksum.patch b/queue-4.19/net-axienet-fix-check-for-partial-tx-checksum.patch
new file mode 100644 (file)
index 0000000..de7bd68
--- /dev/null
@@ -0,0 +1,38 @@
+From a801301eda9881aa4ea005ca14498a4a6cc1b115 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 21 Nov 2023 16:42:17 -0800
+Subject: net: axienet: Fix check for partial TX checksum
+
+From: Samuel Holland <samuel.holland@sifive.com>
+
+[ Upstream commit fd0413bbf8b11f56e8aa842783b0deda0dfe2926 ]
+
+Due to a typo, the code checked the RX checksum feature in the TX path.
+
+Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver")
+Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
+Link: https://lore.kernel.org/r/20231122004219.3504219-1-samuel.holland@sifive.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+index 5190402f779ec..299162a74939f 100644
+--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
++++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+@@ -702,7 +702,7 @@ axienet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+               if (lp->features & XAE_FEATURE_FULL_TX_CSUM) {
+                       /* Tx Full Checksum Offload Enabled */
+                       cur_p->app0 |= 2;
+-              } else if (lp->features & XAE_FEATURE_PARTIAL_RX_CSUM) {
++              } else if (lp->features & XAE_FEATURE_PARTIAL_TX_CSUM) {
+                       csum_start_off = skb_transport_offset(skb);
+                       csum_index_off = csum_start_off + skb->csum_offset;
+                       /* Tx Partial Checksum Offload Enabled */
+-- 
+2.42.0
+
diff --git a/queue-4.19/net-usb-ax88179_178a-fix-failed-operations-during-ax.patch b/queue-4.19/net-usb-ax88179_178a-fix-failed-operations-during-ax.patch
new file mode 100644 (file)
index 0000000..7f56e94
--- /dev/null
@@ -0,0 +1,66 @@
+From dd718acafb547c1e658b153bd0052da40bfd8bc9 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 20 Nov 2023 13:06:29 +0100
+Subject: net: usb: ax88179_178a: fix failed operations during ax88179_reset
+
+From: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
+
+[ Upstream commit 0739af07d1d947af27c877f797cb82ceee702515 ]
+
+Using generic ASIX Electronics Corp. AX88179 Gigabit Ethernet device,
+the following test cycle has been implemented:
+    - power on
+    - check logs
+    - shutdown
+    - after detecting the system shutdown, disconnect power
+    - after approximately 60 seconds of sleep, power is restored
+Running some cycles, sometimes error logs like this appear:
+    kernel: ax88179_178a 2-9:1.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -19
+    kernel: ax88179_178a 2-9:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0001: -19
+    ...
+These failed operation are happening during ax88179_reset execution, so
+the initialization could not be correct.
+
+In order to avoid this, we need to increase the delay after reset and
+clock initial operations. By using these larger values, many cycles
+have been run and no failed operations appear.
+
+It would be better to check some status register to verify when the
+operation has finished, but I do not have found any available information
+(neither in the public datasheets nor in the manufacturer's driver). The
+only available information for the necessary delays is the maufacturer's
+driver (original values) but the proposed values are not enough for the
+tested devices.
+
+Fixes: e2ca90c276e1f ("ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver")
+Reported-by: Herb Wei <weihao.bj@ieisystem.com>
+Tested-by: Herb Wei <weihao.bj@ieisystem.com>
+Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
+Link: https://lore.kernel.org/r/20231120120642.54334-1-jtornosm@redhat.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/usb/ax88179_178a.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
+index cf6ff8732fb2c..3df203feb09c5 100644
+--- a/drivers/net/usb/ax88179_178a.c
++++ b/drivers/net/usb/ax88179_178a.c
+@@ -1610,11 +1610,11 @@ static int ax88179_reset(struct usbnet *dev)
+       *tmp16 = AX_PHYPWR_RSTCTL_IPRL;
+       ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_PHYPWR_RSTCTL, 2, 2, tmp16);
+-      msleep(200);
++      msleep(500);
+       *tmp = AX_CLK_SELECT_ACS | AX_CLK_SELECT_BCS;
+       ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_CLK_SELECT, 1, 1, tmp);
+-      msleep(100);
++      msleep(200);
+       /* Ethernet PHY Auto Detach*/
+       ax88179_auto_detach(dev, 0);
+-- 
+2.42.0
+
diff --git a/queue-4.19/series b/queue-4.19/series
new file mode 100644 (file)
index 0000000..e57520e
--- /dev/null
@@ -0,0 +1,13 @@
+drm-panel-simple-fix-innolux-g101ice-l01-timings.patch
+ata-pata_isapnp-add-missing-error-check-for-devm_iop.patch
+drm-rockchip-vop-fix-color-for-rgb888-bgr888-format-.patch
+hid-core-store-the-unique-system-identifier-in-hid_d.patch
+hid-fix-hid-device-resource-race-between-hid-core-an.patch
+ipv4-correct-silence-an-endian-warning-in-__ip_do_re.patch
+net-usb-ax88179_178a-fix-failed-operations-during-ax.patch
+arm-xen-fix-xen_vcpu_info-allocation-alignment.patch
+amd-xgbe-handle-corner-case-during-sfp-hotplug.patch
+amd-xgbe-handle-the-corner-case-during-tx-completion.patch
+amd-xgbe-propagate-the-correct-speed-and-duplex-stat.patch
+net-axienet-fix-check-for-partial-tx-checksum.patch
+mips-kvm-fix-a-build-warning-about-variable-set-but-.patch