From: Greg Kroah-Hartman Date: Fri, 26 May 2023 18:39:33 +0000 (+0100) Subject: 6.1-stable patches X-Git-Tag: review~78 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7a43d50f35b270027e24d74f6bbba9a01c57b37a;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: drm-amd-display-hpd-rx-irq-not-working-with-edp-interface.patch net-dsa-mv88e6xxx-add-rgmii-delay-to-88e6320.patch ocfs2-switch-to-security_inode_init_security.patch --- diff --git a/queue-6.1/drm-amd-display-hpd-rx-irq-not-working-with-edp-interface.patch b/queue-6.1/drm-amd-display-hpd-rx-irq-not-working-with-edp-interface.patch new file mode 100644 index 00000000000..dfdbdbe1673 --- /dev/null +++ b/queue-6.1/drm-amd-display-hpd-rx-irq-not-working-with-edp-interface.patch @@ -0,0 +1,79 @@ +From eeefe7c4820b6baa0462a8b723ea0a3b5846ccae Mon Sep 17 00:00:00 2001 +From: Robin Chen +Date: Fri, 17 Feb 2023 20:47:57 +0800 +Subject: drm/amd/display: hpd rx irq not working with eDP interface + +From: Robin Chen + +commit eeefe7c4820b6baa0462a8b723ea0a3b5846ccae upstream. + +[Why] +This is the fix for the defect of commit ab144f0b4ad6 +("drm/amd/display: Allow individual control of eDP hotplug support"). + +[How] +To revise the default eDP hotplug setting and use the enum to git rid +of the magic number for different options. + +Fixes: ab144f0b4ad6 ("drm/amd/display: Allow individual control of eDP hotplug support") +Cc: stable@vger.kernel.org +Cc: Mario Limonciello +Reviewed-by: Wenjing Liu +Acked-by: Qingqing Zhuo +Signed-off-by: Robin Chen +Tested-by: Daniel Wheeler +Signed-off-by: Alex Deucher +(cherry picked from commit eeefe7c4820b6baa0462a8b723ea0a3b5846ccae) +Hand modified for missing file rename changes and symbol moves in 6.1.y. +Signed-off-by: Mario Limonciello +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/amd/display/dc/core/dc_link.c | 9 +++++++-- + drivers/gpu/drm/amd/display/dc/dc_types.h | 6 ++++++ + 2 files changed, 13 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c ++++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c +@@ -1634,14 +1634,18 @@ static bool dc_link_construct_legacy(str + link->irq_source_hpd = DC_IRQ_SOURCE_INVALID; + + switch (link->dc->config.allow_edp_hotplug_detection) { +- case 1: // only the 1st eDP handles hotplug ++ case HPD_EN_FOR_ALL_EDP: ++ link->irq_source_hpd_rx = ++ dal_irq_get_rx_source(link->hpd_gpio); ++ break; ++ case HPD_EN_FOR_PRIMARY_EDP_ONLY: + if (link->link_index == 0) + link->irq_source_hpd_rx = + dal_irq_get_rx_source(link->hpd_gpio); + else + link->irq_source_hpd = DC_IRQ_SOURCE_INVALID; + break; +- case 2: // only the 2nd eDP handles hotplug ++ case HPD_EN_FOR_SECONDARY_EDP_ONLY: + if (link->link_index == 1) + link->irq_source_hpd_rx = + dal_irq_get_rx_source(link->hpd_gpio); +@@ -1649,6 +1653,7 @@ static bool dc_link_construct_legacy(str + link->irq_source_hpd = DC_IRQ_SOURCE_INVALID; + break; + default: ++ link->irq_source_hpd = DC_IRQ_SOURCE_INVALID; + break; + } + } +--- a/drivers/gpu/drm/amd/display/dc/dc_types.h ++++ b/drivers/gpu/drm/amd/display/dc/dc_types.h +@@ -993,4 +993,10 @@ struct display_endpoint_id { + enum display_endpoint_type ep_type; + }; + ++enum dc_hpd_enable_select { ++ HPD_EN_FOR_ALL_EDP = 0, ++ HPD_EN_FOR_PRIMARY_EDP_ONLY, ++ HPD_EN_FOR_SECONDARY_EDP_ONLY, ++}; ++ + #endif /* DC_TYPES_H_ */ diff --git a/queue-6.1/net-dsa-mv88e6xxx-add-rgmii-delay-to-88e6320.patch b/queue-6.1/net-dsa-mv88e6xxx-add-rgmii-delay-to-88e6320.patch new file mode 100644 index 00000000000..0783c8420e6 --- /dev/null +++ b/queue-6.1/net-dsa-mv88e6xxx-add-rgmii-delay-to-88e6320.patch @@ -0,0 +1,90 @@ +From 91e87045a5ef6f7003e9a2cb7dfa435b9b002dbe Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Steffen=20B=C3=A4tz?= +Date: Fri, 28 Oct 2022 13:31:58 -0300 +Subject: net: dsa: mv88e6xxx: Add RGMII delay to 88E6320 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Steffen Bätz + +commit 91e87045a5ef6f7003e9a2cb7dfa435b9b002dbe upstream. + +Currently, the .port_set_rgmii_delay hook is missing for the 88E6320 +family, which causes failure to retrieve an IP address via DHCP. + +Add mv88e6320_port_set_rgmii_delay() that allows applying the RGMII +delay for ports 2, 5, and 6, which are the only ports that can be used +in RGMII mode. + +Tested on a custom i.MX8MN board connected to an 88E6320 switch. + +This change also applies safely to the 88E6321 variant. + +The only difference between 88E6320 versus 88E6321 is the temperature +grade and pinout. + +They share exactly the same MDIO register map for ports 2, 5, and 6, +which are the only ports that can be used in RGMII mode. + +Signed-off-by: Steffen Bätz +[fabio: Improved commit log and extended it to mv88e6321_ops] +Signed-off-by: Fabio Estevam +Reviewed-by: Andrew Lunn +Link: https://lore.kernel.org/r/20221028163158.198108-1-festevam@gmail.com +Signed-off-by: Jakub Kicinski +Cc: Fabio Estevam +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ + drivers/net/dsa/mv88e6xxx/port.c | 9 +++++++++ + drivers/net/dsa/mv88e6xxx/port.h | 2 ++ + 3 files changed, 13 insertions(+) + +--- a/drivers/net/dsa/mv88e6xxx/chip.c ++++ b/drivers/net/dsa/mv88e6xxx/chip.c +@@ -5044,6 +5044,7 @@ static const struct mv88e6xxx_ops mv88e6 + .phy_write = mv88e6xxx_g2_smi_phy_write, + .port_set_link = mv88e6xxx_port_set_link, + .port_sync_link = mv88e6xxx_port_sync_link, ++ .port_set_rgmii_delay = mv88e6320_port_set_rgmii_delay, + .port_set_speed_duplex = mv88e6185_port_set_speed_duplex, + .port_tag_remap = mv88e6095_port_tag_remap, + .port_set_frame_mode = mv88e6351_port_set_frame_mode, +@@ -5088,6 +5089,7 @@ static const struct mv88e6xxx_ops mv88e6 + .phy_write = mv88e6xxx_g2_smi_phy_write, + .port_set_link = mv88e6xxx_port_set_link, + .port_sync_link = mv88e6xxx_port_sync_link, ++ .port_set_rgmii_delay = mv88e6320_port_set_rgmii_delay, + .port_set_speed_duplex = mv88e6185_port_set_speed_duplex, + .port_tag_remap = mv88e6095_port_tag_remap, + .port_set_frame_mode = mv88e6351_port_set_frame_mode, +--- a/drivers/net/dsa/mv88e6xxx/port.c ++++ b/drivers/net/dsa/mv88e6xxx/port.c +@@ -133,6 +133,15 @@ int mv88e6390_port_set_rgmii_delay(struc + return mv88e6xxx_port_set_rgmii_delay(chip, port, mode); + } + ++int mv88e6320_port_set_rgmii_delay(struct mv88e6xxx_chip *chip, int port, ++ phy_interface_t mode) ++{ ++ if (port != 2 && port != 5 && port != 6) ++ return -EOPNOTSUPP; ++ ++ return mv88e6xxx_port_set_rgmii_delay(chip, port, mode); ++} ++ + int mv88e6xxx_port_set_link(struct mv88e6xxx_chip *chip, int port, int link) + { + u16 reg; +--- a/drivers/net/dsa/mv88e6xxx/port.h ++++ b/drivers/net/dsa/mv88e6xxx/port.h +@@ -332,6 +332,8 @@ int mv88e6xxx_port_wait_bit(struct mv88e + + int mv88e6185_port_set_pause(struct mv88e6xxx_chip *chip, int port, + int pause); ++int mv88e6320_port_set_rgmii_delay(struct mv88e6xxx_chip *chip, int port, ++ phy_interface_t mode); + int mv88e6352_port_set_rgmii_delay(struct mv88e6xxx_chip *chip, int port, + phy_interface_t mode); + int mv88e6390_port_set_rgmii_delay(struct mv88e6xxx_chip *chip, int port, diff --git a/queue-6.1/ocfs2-switch-to-security_inode_init_security.patch b/queue-6.1/ocfs2-switch-to-security_inode_init_security.patch new file mode 100644 index 00000000000..ed9aed5519b --- /dev/null +++ b/queue-6.1/ocfs2-switch-to-security_inode_init_security.patch @@ -0,0 +1,118 @@ +From de3004c874e740304cc4f4a83d6200acb511bbda Mon Sep 17 00:00:00 2001 +From: Roberto Sassu +Date: Tue, 14 Mar 2023 09:17:16 +0100 +Subject: ocfs2: Switch to security_inode_init_security() + +From: Roberto Sassu + +commit de3004c874e740304cc4f4a83d6200acb511bbda upstream. + +In preparation for removing security_old_inode_init_security(), switch to +security_inode_init_security(). + +Extend the existing ocfs2_initxattrs() to take the +ocfs2_security_xattr_info structure from fs_info, and populate the +name/value/len triple with the first xattr provided by LSMs. + +As fs_info was not used before, ocfs2_initxattrs() can now handle the case +of replicating the behavior of security_old_inode_init_security(), i.e. +just obtaining the xattr, in addition to setting all xattrs provided by +LSMs. + +Supporting multiple xattrs is not currently supported where +security_old_inode_init_security() was called (mknod, symlink), as it +requires non-trivial changes that can be done at a later time. Like for +reiserfs, even if EVM is invoked, it will not provide an xattr (if it is +not the first to set it, its xattr will be discarded; if it is the first, +it does not have xattrs to calculate the HMAC on). + +Finally, since security_inode_init_security(), unlike +security_old_inode_init_security(), returns zero instead of -EOPNOTSUPP if +no xattrs were provided by LSMs or if inodes are private, additionally +check in ocfs2_init_security_get() if the xattr name is set. + +If not, act as if security_old_inode_init_security() returned -EOPNOTSUPP, +and set si->enable to zero to notify to the functions following +ocfs2_init_security_get() that no xattrs are available. + +Signed-off-by: Roberto Sassu +Reviewed-by: Casey Schaufler +Acked-by: Joseph Qi +Reviewed-by: Mimi Zohar +Signed-off-by: Paul Moore +Signed-off-by: Greg Kroah-Hartman +--- + fs/ocfs2/namei.c | 2 ++ + fs/ocfs2/xattr.c | 30 ++++++++++++++++++++++++++---- + 2 files changed, 28 insertions(+), 4 deletions(-) + +--- a/fs/ocfs2/namei.c ++++ b/fs/ocfs2/namei.c +@@ -242,6 +242,7 @@ static int ocfs2_mknod(struct user_names + int want_meta = 0; + int xattr_credits = 0; + struct ocfs2_security_xattr_info si = { ++ .name = NULL, + .enable = 1, + }; + int did_quota_inode = 0; +@@ -1805,6 +1806,7 @@ static int ocfs2_symlink(struct user_nam + int want_clusters = 0; + int xattr_credits = 0; + struct ocfs2_security_xattr_info si = { ++ .name = NULL, + .enable = 1, + }; + int did_quota = 0, did_quota_inode = 0; +--- a/fs/ocfs2/xattr.c ++++ b/fs/ocfs2/xattr.c +@@ -7259,9 +7259,21 @@ static int ocfs2_xattr_security_set(cons + static int ocfs2_initxattrs(struct inode *inode, const struct xattr *xattr_array, + void *fs_info) + { ++ struct ocfs2_security_xattr_info *si = fs_info; + const struct xattr *xattr; + int err = 0; + ++ if (si) { ++ si->value = kmemdup(xattr_array->value, xattr_array->value_len, ++ GFP_KERNEL); ++ if (!si->value) ++ return -ENOMEM; ++ ++ si->name = xattr_array->name; ++ si->value_len = xattr_array->value_len; ++ return 0; ++ } ++ + for (xattr = xattr_array; xattr->name != NULL; xattr++) { + err = ocfs2_xattr_set(inode, OCFS2_XATTR_INDEX_SECURITY, + xattr->name, xattr->value, +@@ -7277,13 +7289,23 @@ int ocfs2_init_security_get(struct inode + const struct qstr *qstr, + struct ocfs2_security_xattr_info *si) + { ++ int ret; ++ + /* check whether ocfs2 support feature xattr */ + if (!ocfs2_supports_xattr(OCFS2_SB(dir->i_sb))) + return -EOPNOTSUPP; +- if (si) +- return security_old_inode_init_security(inode, dir, qstr, +- &si->name, &si->value, +- &si->value_len); ++ if (si) { ++ ret = security_inode_init_security(inode, dir, qstr, ++ &ocfs2_initxattrs, si); ++ /* ++ * security_inode_init_security() does not return -EOPNOTSUPP, ++ * we have to check the xattr ourselves. ++ */ ++ if (!ret && !si->name) ++ si->enable = 0; ++ ++ return ret; ++ } + + return security_inode_init_security(inode, dir, qstr, + &ocfs2_initxattrs, NULL); diff --git a/queue-6.1/series b/queue-6.1/series index b4f765129a7..3ef1b68c5ce 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -10,3 +10,6 @@ drm-amd-amdgpu-update-mes11-api-def.patch drm-amdgpu-mes11-enable-reg-active-poll.patch skbuff-proactively-round-up-to-kmalloc-bucket-size.patch platform-x86-hp-wmi-fix-cast-to-smaller-integer-type-warning.patch +net-dsa-mv88e6xxx-add-rgmii-delay-to-88e6320.patch +drm-amd-display-hpd-rx-irq-not-working-with-edp-interface.patch +ocfs2-switch-to-security_inode_init_security.patch