From: Greg Kroah-Hartman Date: Sat, 14 Sep 2024 07:11:13 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v6.1.111~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=60c476f6af23eaa33f60d82c4c7288e1fad815ac;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: soundwire-stream-revert-soundwire-stream-fix-programming-slave-ports-for-non-continous-port-maps.patch --- diff --git a/queue-4.19/net-dpaa-pad-packets-to-eth_zlen.patch b/queue-4.19/net-dpaa-pad-packets-to-eth_zlen.patch index 6cc3215f292..67e0a940cc1 100644 --- a/queue-4.19/net-dpaa-pad-packets-to-eth_zlen.patch +++ b/queue-4.19/net-dpaa-pad-packets-to-eth_zlen.patch @@ -22,11 +22,9 @@ Link: https://patch.msgid.link/20240910143144.1439910-1-sean.anderson@linux.dev Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- - drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 9 ++++++++- + drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c -index 4b21ae27a9fd..5c60f2a2b6d8 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -2055,12 +2055,12 @@ static netdev_tx_t @@ -43,7 +41,7 @@ index 4b21ae27a9fd..5c60f2a2b6d8 100644 int offset = 0; int err = 0; -@@ -2070,6 +2070,13 @@ dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev) +@@ -2070,6 +2070,13 @@ dpaa_start_xmit(struct sk_buff *skb, str qm_fd_clear_fd(&fd); @@ -57,6 +55,3 @@ index 4b21ae27a9fd..5c60f2a2b6d8 100644 if (!nonlinear) { /* We're going to store the skb backpointer at the beginning * of the data buffer, so we need a privately owned skb --- -2.43.0 - diff --git a/queue-4.19/series b/queue-4.19/series index 5182f9e8e7a..524529f570c 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -9,3 +9,4 @@ arm64-dts-rockchip-override-bios_disable-signal-via-gpio-hog-on-rk3399-puma.patc net-mlx5-update-the-list-of-the-pci-supported-device.patch net-ftgmac100-enable-tx-interrupt-to-avoid-tx-timeou.patch net-dpaa-pad-packets-to-eth_zlen.patch +soundwire-stream-revert-soundwire-stream-fix-programming-slave-ports-for-non-continous-port-maps.patch diff --git a/queue-4.19/soundwire-stream-revert-soundwire-stream-fix-programming-slave-ports-for-non-continous-port-maps.patch b/queue-4.19/soundwire-stream-revert-soundwire-stream-fix-programming-slave-ports-for-non-continous-port-maps.patch new file mode 100644 index 00000000000..cb180ad1501 --- /dev/null +++ b/queue-4.19/soundwire-stream-revert-soundwire-stream-fix-programming-slave-ports-for-non-continous-port-maps.patch @@ -0,0 +1,58 @@ +From 233a95fd574fde1c375c486540a90304a2d2d49f Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Mon, 9 Sep 2024 18:47:46 +0200 +Subject: soundwire: stream: Revert "soundwire: stream: fix programming slave ports for non-continous port maps" + +From: Krzysztof Kozlowski + +commit 233a95fd574fde1c375c486540a90304a2d2d49f upstream. + +This reverts commit ab8d66d132bc8f1992d3eb6cab8d32dda6733c84 because it +breaks codecs using non-continuous masks in source and sink ports. The +commit missed the point that port numbers are not used as indices for +iterating over prop.sink_ports or prop.source_ports. + +Soundwire core and existing codecs expect that the array passed as +prop.sink_ports and prop.source_ports is continuous. The port mask still +might be non-continuous, but that's unrelated. + +Reported-by: Bard Liao +Closes: https://lore.kernel.org/all/b6c75eee-761d-44c8-8413-2a5b34ee2f98@linux.intel.com/ +Fixes: ab8d66d132bc ("soundwire: stream: fix programming slave ports for non-continous port maps") +Acked-by: Bard Liao +Reviewed-by: Charles Keepax +Cc: stable@vger.kernel.org +Signed-off-by: Krzysztof Kozlowski +Tested-by: Peter Ujfalusi +Link: https://lore.kernel.org/r/20240909164746.136629-1-krzysztof.kozlowski@linaro.org +Signed-off-by: Vinod Koul +Signed-off-by: Greg Kroah-Hartman +--- + drivers/soundwire/stream.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/soundwire/stream.c ++++ b/drivers/soundwire/stream.c +@@ -1232,18 +1232,18 @@ struct sdw_dpn_prop *sdw_get_slave_dpn_p + unsigned int port_num) + { + struct sdw_dpn_prop *dpn_prop; +- unsigned long mask; ++ u8 num_ports; + int i; + + if (direction == SDW_DATA_DIR_TX) { +- mask = slave->prop.source_ports; ++ num_ports = hweight32(slave->prop.source_ports); + dpn_prop = slave->prop.src_dpn_prop; + } else { +- mask = slave->prop.sink_ports; ++ num_ports = hweight32(slave->prop.sink_ports); + dpn_prop = slave->prop.sink_dpn_prop; + } + +- for_each_set_bit(i, &mask, 32) { ++ for (i = 0; i < num_ports; i++) { + if (dpn_prop[i].num == port_num) + return &dpn_prop[i]; + }