From: Sasha Levin Date: Sat, 24 Feb 2024 03:37:45 +0000 (-0500) Subject: Fixes for 5.4 X-Git-Tag: v4.19.308~79 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a85c2a8bb5c82d5997d50bea6f65a32641dabd50;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.4 Signed-off-by: Sasha Levin --- diff --git a/queue-5.4/pmdomain-renesas-r8a77980-sysc-cr7-must-be-always-on.patch b/queue-5.4/pmdomain-renesas-r8a77980-sysc-cr7-must-be-always-on.patch new file mode 100644 index 00000000000..174571b1ed7 --- /dev/null +++ b/queue-5.4/pmdomain-renesas-r8a77980-sysc-cr7-must-be-always-on.patch @@ -0,0 +1,47 @@ +From a204887524abe9b42f0dfda1101743dc9e6ccab6 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 12 Jan 2024 17:33:55 +0100 +Subject: pmdomain: renesas: r8a77980-sysc: CR7 must be always on +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Geert Uytterhoeven + +[ Upstream commit f0e4a1356466ec1858ae8e5c70bea2ce5e55008b ] + +The power domain containing the Cortex-R7 CPU core on the R-Car V3H SoC +must always be in power-on state, unlike on other SoCs in the R-Car Gen3 +family. See Table 9.4 "Power domains" in the R-Car Series, 3rd +Generation Hardware User’s Manual Rev.1.00 and later. + +Fix this by marking the domain as a CPU domain without control +registers, so the driver will not touch it. + +Fixes: 41d6d8bd8ae9 ("soc: renesas: rcar-sysc: add R8A77980 support") +Signed-off-by: Geert Uytterhoeven +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/fdad9a86132d53ecddf72b734dac406915c4edc0.1705076735.git.geert+renesas@glider.be +Signed-off-by: Ulf Hansson +Signed-off-by: Sasha Levin +--- + drivers/soc/renesas/r8a77980-sysc.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/soc/renesas/r8a77980-sysc.c b/drivers/soc/renesas/r8a77980-sysc.c +index a8dbe55e8ba82..3d1ea245681b0 100644 +--- a/drivers/soc/renesas/r8a77980-sysc.c ++++ b/drivers/soc/renesas/r8a77980-sysc.c +@@ -25,7 +25,8 @@ static const struct rcar_sysc_area r8a77980_areas[] __initconst = { + PD_CPU_NOCR }, + { "ca53-cpu3", 0x200, 3, R8A77980_PD_CA53_CPU3, R8A77980_PD_CA53_SCU, + PD_CPU_NOCR }, +- { "cr7", 0x240, 0, R8A77980_PD_CR7, R8A77980_PD_ALWAYS_ON }, ++ { "cr7", 0x240, 0, R8A77980_PD_CR7, R8A77980_PD_ALWAYS_ON, ++ PD_CPU_NOCR }, + { "a3ir", 0x180, 0, R8A77980_PD_A3IR, R8A77980_PD_ALWAYS_ON }, + { "a2ir0", 0x400, 0, R8A77980_PD_A2IR0, R8A77980_PD_A3IR }, + { "a2ir1", 0x400, 1, R8A77980_PD_A2IR1, R8A77980_PD_A3IR }, +-- +2.43.0 + diff --git a/queue-5.4/s390-qeth-fix-potential-loss-of-l3-ip-in-case-of-net.patch b/queue-5.4/s390-qeth-fix-potential-loss-of-l3-ip-in-case-of-net.patch new file mode 100644 index 00000000000..a9818535af1 --- /dev/null +++ b/queue-5.4/s390-qeth-fix-potential-loss-of-l3-ip-in-case-of-net.patch @@ -0,0 +1,77 @@ +From 1fbc7fc5f8e90792ee1c8500f1b572257d8b5456 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 6 Feb 2024 09:58:49 +0100 +Subject: s390/qeth: Fix potential loss of L3-IP@ in case of network issues + +From: Alexandra Winter + +[ Upstream commit 2fe8a236436fe40d8d26a1af8d150fc80f04ee1a ] + +Symptom: +In case of a bad cable connection (e.g. dirty optics) a fast sequence of +network DOWN-UP-DOWN-UP could happen. UP triggers recovery of the qeth +interface. In case of a second DOWN while recovery is still ongoing, it +can happen that the IP@ of a Layer3 qeth interface is lost and will not +be recovered by the second UP. + +Problem: +When registration of IP addresses with Layer 3 qeth devices fails, (e.g. +because of bad address format) the respective IP address is deleted from +its hash-table in the driver. If registration fails because of a ENETDOWN +condition, the address should stay in the hashtable, so a subsequent +recovery can restore it. + +3caa4af834df ("qeth: keep ip-address after LAN_OFFLINE failure") +fixes this for registration failures during normal operation, but not +during recovery. + +Solution: +Keep L3-IP address in case of ENETDOWN in qeth_l3_recover_ip(). For +consistency with qeth_l3_add_ip() we also keep it in case of EADDRINUSE, +i.e. for some reason the card already/still has this address registered. + +Fixes: 4a71df50047f ("qeth: new qeth device driver") +Cc: stable@vger.kernel.org +Signed-off-by: Alexandra Winter +Link: https://lore.kernel.org/r/20240206085849.2902775-1-wintera@linux.ibm.com +Signed-off-by: Paolo Abeni +Signed-off-by: Sasha Levin +--- + drivers/s390/net/qeth_l3_main.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c +index 8dee16aca421f..fe2bea2409427 100644 +--- a/drivers/s390/net/qeth_l3_main.c ++++ b/drivers/s390/net/qeth_l3_main.c +@@ -305,9 +305,10 @@ static void qeth_l3_clear_ip_htable(struct qeth_card *card, int recover) + if (!recover) { + hash_del(&addr->hnode); + kfree(addr); +- continue; ++ } else { ++ /* prepare for recovery */ ++ addr->disp_flag = QETH_DISP_ADDR_ADD; + } +- addr->disp_flag = QETH_DISP_ADDR_ADD; + } + + mutex_unlock(&card->ip_lock); +@@ -335,11 +336,13 @@ static void qeth_l3_recover_ip(struct qeth_card *card) + } else + rc = qeth_l3_register_addr_entry(card, addr); + +- if (!rc) { ++ if (!rc || rc == -EADDRINUSE || rc == -ENETDOWN) { ++ /* keep it in the records */ + addr->disp_flag = QETH_DISP_ADDR_DO_NOTHING; + if (addr->ref_counter < 1) + qeth_l3_delete_ip(card, addr); + } else { ++ /* bad address */ + hash_del(&addr->hnode); + kfree(addr); + } +-- +2.43.0 + diff --git a/queue-5.4/series b/queue-5.4/series index 882a1b30866..3c411413d81 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -27,3 +27,5 @@ hwmon-coretemp-enlarge-per-package-core-count-limit.patch scsi-lpfc-use-unsigned-type-for-num_sge.patch firewire-core-send-bus-reset-promptly-on-gap-count-e.patch virtio-blk-ensure-no-requests-in-virtqueues-before-d.patch +s390-qeth-fix-potential-loss-of-l3-ip-in-case-of-net.patch +pmdomain-renesas-r8a77980-sysc-cr7-must-be-always-on.patch