From: Mieczyslaw Nalewaj Date: Mon, 9 Dec 2024 19:40:23 +0000 (+0100) Subject: generic: 6.12: manually rebuilding backport patches X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=557dd7b91e91106fdbd7e371a3a68f2477d258d9;p=openwrt%2Fstaging%2Fwigyori.git generic: 6.12: manually rebuilding backport patches Manually rebuilding backport patches: - 410-v6.13-01-block-add-support-for-defining-read-only-partitions.patch - 839-v6.13-net-phy-aquantia-allow-forcing-order-of-MDI-pairs.patch - 901-v6.13-net-dsa-mv88e6xxx-Support-LED-control.patch All other patches automatically rebased. Signed-off-by: Mieczyslaw Nalewaj --- diff --git a/target/linux/generic/backport-6.12/410-v6.13-01-block-add-support-for-defining-read-only-partitions.patch b/target/linux/generic/backport-6.12/410-v6.13-01-block-add-support-for-defining-read-only-partitions.patch index fabf16a2e6..ffd65253a5 100644 --- a/target/linux/generic/backport-6.12/410-v6.13-01-block-add-support-for-defining-read-only-partitions.patch +++ b/target/linux/generic/backport-6.12/410-v6.13-01-block-add-support-for-defining-read-only-partitions.patch @@ -19,7 +19,7 @@ Signed-off-by: Jens Axboe --- a/block/blk.h +++ b/block/blk.h -@@ -424,6 +424,7 @@ void blk_free_ext_minor(unsigned int min +@@ -564,6 +564,7 @@ void blk_free_ext_minor(unsigned int min #define ADDPART_FLAG_NONE 0 #define ADDPART_FLAG_RAID 1 #define ADDPART_FLAG_WHOLEDISK 2 @@ -41,12 +41,12 @@ Signed-off-by: Jens Axboe strscpy(info->volname, subpart->name, sizeof(info->volname)); --- a/block/partitions/core.c +++ b/block/partitions/core.c -@@ -392,6 +392,9 @@ static struct block_device *add_partitio +@@ -373,6 +373,9 @@ static struct block_device *add_partitio goto out_del; } + if (flags & ADDPART_FLAG_READONLY) -+ bdev->bd_read_only = true; ++ bdev_set_flag(bdev, BD_READ_ONLY); + /* everything is up and running, commence */ err = xa_insert(&disk->part_tbl, partno, bdev, GFP_KERNEL); diff --git a/target/linux/generic/backport-6.12/410-v6.13-03-block-introduce-add_disk_fwnode.patch b/target/linux/generic/backport-6.12/410-v6.13-03-block-introduce-add_disk_fwnode.patch index 41b51ab215..772584a9fd 100644 --- a/target/linux/generic/backport-6.12/410-v6.13-03-block-introduce-add_disk_fwnode.patch +++ b/target/linux/generic/backport-6.12/410-v6.13-03-block-introduce-add_disk_fwnode.patch @@ -48,7 +48,7 @@ Signed-off-by: Jens Axboe { struct device *ddev = disk_to_dev(disk); -@@ -451,6 +453,8 @@ int __must_check device_add_disk(struct +@@ -452,6 +454,8 @@ int __must_check device_add_disk(struct ddev->parent = parent; ddev->groups = groups; dev_set_name(ddev, "%s", disk->disk_name); @@ -57,7 +57,7 @@ Signed-off-by: Jens Axboe if (!(disk->flags & GENHD_FL_HIDDEN)) ddev->devt = MKDEV(disk->major, disk->first_minor); ret = device_add(ddev); -@@ -552,6 +556,22 @@ out_exit_elevator: +@@ -553,6 +557,22 @@ out_exit_elevator: elevator_exit(disk->queue); return ret; } @@ -82,7 +82,7 @@ Signed-off-by: Jens Axboe static void blk_report_disk_dead(struct gendisk *disk, bool surprise) --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h -@@ -741,6 +741,9 @@ static inline unsigned int blk_queue_dep +@@ -735,6 +735,9 @@ static inline unsigned int blk_queue_dep #define for_each_bio(_bio) \ for (; _bio; _bio = _bio->bi_next) diff --git a/target/linux/generic/backport-6.12/410-v6.13-04-mmc-block-attach-partitions-fwnode-if-found-in-mmc-c.patch b/target/linux/generic/backport-6.12/410-v6.13-04-mmc-block-attach-partitions-fwnode-if-found-in-mmc-c.patch index cf0d18cf06..0bdeaa85e4 100644 --- a/target/linux/generic/backport-6.12/410-v6.13-04-mmc-block-attach-partitions-fwnode-if-found-in-mmc-c.patch +++ b/target/linux/generic/backport-6.12/410-v6.13-04-mmc-block-attach-partitions-fwnode-if-found-in-mmc-c.patch @@ -26,7 +26,7 @@ Signed-off-by: Jens Axboe --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c -@@ -2455,6 +2455,56 @@ static inline int mmc_blk_readonly(struc +@@ -2517,6 +2517,56 @@ static inline int mmc_blk_readonly(struc !(card->csd.cmdclass & CCC_BLOCK_WRITE); } @@ -83,7 +83,7 @@ Signed-off-by: Jens Axboe static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card, struct device *parent, sector_t size, -@@ -2463,6 +2513,7 @@ static struct mmc_blk_data *mmc_blk_allo +@@ -2525,6 +2575,7 @@ static struct mmc_blk_data *mmc_blk_allo int area_type, unsigned int part_type) { @@ -91,7 +91,7 @@ Signed-off-by: Jens Axboe struct mmc_blk_data *md; int devidx, ret; char cap_str[10]; -@@ -2568,7 +2619,9 @@ static struct mmc_blk_data *mmc_blk_allo +@@ -2626,7 +2677,9 @@ static struct mmc_blk_data *mmc_blk_allo /* used in ->open, must be set before add_disk: */ if (area_type == MMC_BLK_DATA_AREA_MAIN) dev_set_drvdata(&card->dev, md); diff --git a/target/linux/generic/backport-6.12/839-v6.13-net-phy-aquantia-allow-forcing-order-of-MDI-pairs.patch b/target/linux/generic/backport-6.12/839-v6.13-net-phy-aquantia-allow-forcing-order-of-MDI-pairs.patch index c1655ce71e..aabaa33e2c 100644 --- a/target/linux/generic/backport-6.12/839-v6.13-net-phy-aquantia-allow-forcing-order-of-MDI-pairs.patch +++ b/target/linux/generic/backport-6.12/839-v6.13-net-phy-aquantia-allow-forcing-order-of-MDI-pairs.patch @@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski #include #include "aquantia.h" -@@ -70,6 +71,11 @@ +@@ -71,6 +72,11 @@ #define MDIO_AN_TX_VEND_INT_MASK2 0xd401 #define MDIO_AN_TX_VEND_INT_MASK2_LINK BIT(0) @@ -64,8 +64,8 @@ Signed-off-by: Jakub Kicinski #define MDIO_AN_RX_LP_STAT1 0xe820 #define MDIO_AN_RX_LP_STAT1_1000BASET_FULL BIT(15) #define MDIO_AN_RX_LP_STAT1_1000BASET_HALF BIT(14) -@@ -497,6 +503,29 @@ static int aqr107_wait_processor_intensi - return 0; +@@ -485,6 +491,29 @@ static void aqr107_chip_info(struct phy_ + fw_major, fw_minor, build_id, prov_id); } +static int aqr107_config_mdi(struct phy_device *phydev) @@ -94,7 +94,7 @@ Signed-off-by: Jakub Kicinski static int aqr107_config_init(struct phy_device *phydev) { struct aqr107_priv *priv = phydev->priv; -@@ -535,6 +564,10 @@ static int aqr107_config_init(struct phy +@@ -514,6 +543,10 @@ static int aqr107_config_init(struct phy if (ret) return ret; diff --git a/target/linux/generic/backport-6.12/840-v6.13-net-phy-aquantia-fix-return-value-check-in-aqr107_co.patch b/target/linux/generic/backport-6.12/840-v6.13-net-phy-aquantia-fix-return-value-check-in-aqr107_co.patch index 73be78a058..565edbd388 100644 --- a/target/linux/generic/backport-6.12/840-v6.13-net-phy-aquantia-fix-return-value-check-in-aqr107_co.patch +++ b/target/linux/generic/backport-6.12/840-v6.13-net-phy-aquantia-fix-return-value-check-in-aqr107_co.patch @@ -20,7 +20,7 @@ Signed-off-by: Daniel Golle --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c -@@ -512,7 +512,7 @@ static int aqr107_config_mdi(struct phy_ +@@ -500,7 +500,7 @@ static int aqr107_config_mdi(struct phy_ ret = of_property_read_u32(np, "marvell,mdi-cfg-order", &mdi_conf); /* Do nothing in case property "marvell,mdi-cfg-order" is not present */ diff --git a/target/linux/generic/backport-6.12/841-v6.13-net-phy-support-active-high-property-for-PHY-LEDs.patch b/target/linux/generic/backport-6.12/841-v6.13-net-phy-support-active-high-property-for-PHY-LEDs.patch index 729a315623..7781aa2c49 100644 --- a/target/linux/generic/backport-6.12/841-v6.13-net-phy-support-active-high-property-for-PHY-LEDs.patch +++ b/target/linux/generic/backport-6.12/841-v6.13-net-phy-support-active-high-property-for-PHY-LEDs.patch @@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -3220,11 +3220,17 @@ static int of_phy_led(struct phy_device +@@ -3358,11 +3358,17 @@ static int of_phy_led(struct phy_device if (index > U8_MAX) return -EINVAL; @@ -39,7 +39,7 @@ Signed-off-by: Paolo Abeni if (!phydev->drv->led_polarity_set) --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -872,8 +872,9 @@ struct phy_led { +@@ -877,8 +877,9 @@ struct phy_plca_status { /* Modes for PHY LED configuration */ enum phy_led_modes { diff --git a/target/linux/generic/backport-6.12/842-v6.13-net-phy-aquantia-correctly-describe-LED-polarity-ove.patch b/target/linux/generic/backport-6.12/842-v6.13-net-phy-aquantia-correctly-describe-LED-polarity-ove.patch index f26bb829e4..155f796f8c 100644 --- a/target/linux/generic/backport-6.12/842-v6.13-net-phy-aquantia-correctly-describe-LED-polarity-ove.patch +++ b/target/linux/generic/backport-6.12/842-v6.13-net-phy-aquantia-correctly-describe-LED-polarity-ove.patch @@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/phy/aquantia/aquantia.h +++ b/drivers/net/phy/aquantia/aquantia.h -@@ -169,6 +169,7 @@ static const struct aqr107_hw_stat aqr10 +@@ -177,6 +177,7 @@ static const struct aqr107_hw_stat aqr10 struct aqr107_priv { u64 sgmii_stats[AQR107_SGMII_STAT_SZ]; unsigned long leds_active_low; @@ -80,7 +80,7 @@ Signed-off-by: Paolo Abeni } --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c -@@ -529,7 +529,7 @@ static int aqr107_config_mdi(struct phy_ +@@ -517,7 +517,7 @@ static int aqr107_config_mdi(struct phy_ static int aqr107_config_init(struct phy_device *phydev) { struct aqr107_priv *priv = phydev->priv; @@ -89,7 +89,7 @@ Signed-off-by: Paolo Abeni int ret; /* Check that the PHY interface type is compatible */ -@@ -569,8 +569,14 @@ static int aqr107_config_init(struct phy +@@ -548,8 +548,14 @@ static int aqr107_config_init(struct phy return ret; /* Restore LED polarity state after reset */ diff --git a/target/linux/generic/backport-6.12/843-v6.13-net-phy-mxl-gpy-add-basic-LED-support.patch b/target/linux/generic/backport-6.12/843-v6.13-net-phy-mxl-gpy-add-basic-LED-support.patch index 2ceaa0ad3d..c785f8a98a 100644 --- a/target/linux/generic/backport-6.12/843-v6.13-net-phy-mxl-gpy-add-basic-LED-support.patch +++ b/target/linux/generic/backport-6.12/843-v6.13-net-phy-mxl-gpy-add-basic-LED-support.patch @@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski /* SGMII */ #define VSPEC1_SGMII_CTRL 0x08 #define VSPEC1_SGMII_CTRL_ANEN BIT(12) /* Aneg enable */ -@@ -827,6 +850,156 @@ static int gpy115_loopback(struct phy_de +@@ -835,6 +858,156 @@ static int gpy115_loopback(struct phy_de return genphy_soft_reset(phydev); } @@ -222,7 +222,7 @@ Signed-off-by: Jakub Kicinski static struct phy_driver gpy_drivers[] = { { PHY_ID_MATCH_MODEL(PHY_ID_GPY2xx), -@@ -844,6 +1017,11 @@ static struct phy_driver gpy_drivers[] = +@@ -852,6 +1025,11 @@ static struct phy_driver gpy_drivers[] = .set_wol = gpy_set_wol, .get_wol = gpy_get_wol, .set_loopback = gpy_loopback, @@ -234,7 +234,7 @@ Signed-off-by: Jakub Kicinski }, { .phy_id = PHY_ID_GPY115B, -@@ -862,6 +1040,11 @@ static struct phy_driver gpy_drivers[] = +@@ -870,6 +1048,11 @@ static struct phy_driver gpy_drivers[] = .set_wol = gpy_set_wol, .get_wol = gpy_get_wol, .set_loopback = gpy115_loopback, @@ -246,7 +246,7 @@ Signed-off-by: Jakub Kicinski }, { PHY_ID_MATCH_MODEL(PHY_ID_GPY115C), -@@ -879,6 +1062,11 @@ static struct phy_driver gpy_drivers[] = +@@ -887,6 +1070,11 @@ static struct phy_driver gpy_drivers[] = .set_wol = gpy_set_wol, .get_wol = gpy_get_wol, .set_loopback = gpy115_loopback, @@ -258,7 +258,7 @@ Signed-off-by: Jakub Kicinski }, { .phy_id = PHY_ID_GPY211B, -@@ -897,6 +1085,11 @@ static struct phy_driver gpy_drivers[] = +@@ -905,6 +1093,11 @@ static struct phy_driver gpy_drivers[] = .set_wol = gpy_set_wol, .get_wol = gpy_get_wol, .set_loopback = gpy_loopback, @@ -270,7 +270,7 @@ Signed-off-by: Jakub Kicinski }, { PHY_ID_MATCH_MODEL(PHY_ID_GPY211C), -@@ -914,6 +1107,11 @@ static struct phy_driver gpy_drivers[] = +@@ -922,6 +1115,11 @@ static struct phy_driver gpy_drivers[] = .set_wol = gpy_set_wol, .get_wol = gpy_get_wol, .set_loopback = gpy_loopback, @@ -282,7 +282,7 @@ Signed-off-by: Jakub Kicinski }, { .phy_id = PHY_ID_GPY212B, -@@ -932,6 +1130,11 @@ static struct phy_driver gpy_drivers[] = +@@ -940,6 +1138,11 @@ static struct phy_driver gpy_drivers[] = .set_wol = gpy_set_wol, .get_wol = gpy_get_wol, .set_loopback = gpy_loopback, @@ -294,7 +294,7 @@ Signed-off-by: Jakub Kicinski }, { PHY_ID_MATCH_MODEL(PHY_ID_GPY212C), -@@ -949,6 +1152,11 @@ static struct phy_driver gpy_drivers[] = +@@ -957,6 +1160,11 @@ static struct phy_driver gpy_drivers[] = .set_wol = gpy_set_wol, .get_wol = gpy_get_wol, .set_loopback = gpy_loopback, @@ -306,7 +306,7 @@ Signed-off-by: Jakub Kicinski }, { .phy_id = PHY_ID_GPY215B, -@@ -967,6 +1175,11 @@ static struct phy_driver gpy_drivers[] = +@@ -975,6 +1183,11 @@ static struct phy_driver gpy_drivers[] = .set_wol = gpy_set_wol, .get_wol = gpy_get_wol, .set_loopback = gpy_loopback, @@ -318,7 +318,7 @@ Signed-off-by: Jakub Kicinski }, { PHY_ID_MATCH_MODEL(PHY_ID_GPY215C), -@@ -984,6 +1197,11 @@ static struct phy_driver gpy_drivers[] = +@@ -992,6 +1205,11 @@ static struct phy_driver gpy_drivers[] = .set_wol = gpy_set_wol, .get_wol = gpy_get_wol, .set_loopback = gpy_loopback, diff --git a/target/linux/generic/backport-6.12/844-v6.13-net-phy-mxl-gpy-add-missing-support-for-TRIGGER_NETD.patch b/target/linux/generic/backport-6.12/844-v6.13-net-phy-mxl-gpy-add-missing-support-for-TRIGGER_NETD.patch index 067c62da11..39bef9b982 100644 --- a/target/linux/generic/backport-6.12/844-v6.13-net-phy-mxl-gpy-add-missing-support-for-TRIGGER_NETD.patch +++ b/target/linux/generic/backport-6.12/844-v6.13-net-phy-mxl-gpy-add-missing-support-for-TRIGGER_NETD.patch @@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/phy/mxl-gpy.c +++ b/drivers/net/phy/mxl-gpy.c -@@ -876,6 +876,7 @@ static int gpy_led_brightness_set(struct +@@ -884,6 +884,7 @@ static int gpy_led_brightness_set(struct } static const unsigned long supported_triggers = (BIT(TRIGGER_NETDEV_LINK) | diff --git a/target/linux/generic/backport-6.12/845-v6.13-net-phy-mxl-gpy-correctly-describe-LED-polarity.patch b/target/linux/generic/backport-6.12/845-v6.13-net-phy-mxl-gpy-correctly-describe-LED-polarity.patch index 5b88548dd0..5fd3dcc77b 100644 --- a/target/linux/generic/backport-6.12/845-v6.13-net-phy-mxl-gpy-correctly-describe-LED-polarity.patch +++ b/target/linux/generic/backport-6.12/845-v6.13-net-phy-mxl-gpy-correctly-describe-LED-polarity.patch @@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni --- a/drivers/net/phy/mxl-gpy.c +++ b/drivers/net/phy/mxl-gpy.c -@@ -981,7 +981,7 @@ static int gpy_led_hw_control_set(struct +@@ -989,7 +989,7 @@ static int gpy_led_hw_control_set(struct static int gpy_led_polarity_set(struct phy_device *phydev, int index, unsigned long modes) { @@ -29,7 +29,7 @@ Signed-off-by: Paolo Abeni u32 mode; if (index >= GPY_MAX_LEDS) -@@ -990,15 +990,23 @@ static int gpy_led_polarity_set(struct p +@@ -998,15 +998,23 @@ static int gpy_led_polarity_set(struct p for_each_set_bit(mode, &modes, __PHY_LED_MODES_NUM) { switch (mode) { case PHY_LED_ACTIVE_LOW: diff --git a/target/linux/generic/backport-6.12/901-v6.13-net-dsa-mv88e6xxx-Support-LED-control.patch b/target/linux/generic/backport-6.12/901-v6.13-net-dsa-mv88e6xxx-Support-LED-control.patch index 711246da61..84d760a836 100644 --- a/target/linux/generic/backport-6.12/901-v6.13-net-dsa-mv88e6xxx-Support-LED-control.patch +++ b/target/linux/generic/backport-6.12/901-v6.13-net-dsa-mv88e6xxx-Support-LED-control.patch @@ -127,7 +127,7 @@ Signed-off-by: Linus Walleij #include #include #include -@@ -3235,14 +3236,43 @@ static int mv88e6xxx_setup_upstream_port +@@ -3371,14 +3372,43 @@ static int mv88e6xxx_setup_upstream_port static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port) { struct device_node *phy_handle = NULL; @@ -173,7 +173,7 @@ Signed-off-by: Linus Walleij err = mv88e6xxx_port_setup_mac(chip, port, LINK_UNFORCED, SPEED_UNFORCED, DUPLEX_UNFORCED, -@@ -4461,6 +4491,7 @@ static const struct mv88e6xxx_ops mv88e6 +@@ -4597,6 +4627,7 @@ static const struct mv88e6xxx_ops mv88e6 .port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit, .port_disable_pri_override = mv88e6xxx_port_disable_pri_override, .port_get_cmode = mv88e6352_port_get_cmode, @@ -181,7 +181,7 @@ Signed-off-by: Linus Walleij .port_setup_message_port = mv88e6xxx_setup_message_port, .stats_snapshot = mv88e6320_g1_stats_snapshot, .stats_set_histogram = mv88e6095_g1_stats_set_histogram, -@@ -4563,6 +4594,7 @@ static const struct mv88e6xxx_ops mv88e6 +@@ -4699,6 +4730,7 @@ static const struct mv88e6xxx_ops mv88e6 .port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit, .port_disable_pri_override = mv88e6xxx_port_disable_pri_override, .port_get_cmode = mv88e6352_port_get_cmode, @@ -189,7 +189,7 @@ Signed-off-by: Linus Walleij .port_setup_message_port = mv88e6xxx_setup_message_port, .stats_snapshot = mv88e6320_g1_stats_snapshot, .stats_set_histogram = mv88e6095_g1_stats_set_histogram, -@@ -4838,6 +4870,7 @@ static const struct mv88e6xxx_ops mv88e6 +@@ -4974,6 +5006,7 @@ static const struct mv88e6xxx_ops mv88e6 .port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit, .port_disable_pri_override = mv88e6xxx_port_disable_pri_override, .port_get_cmode = mv88e6352_port_get_cmode, @@ -197,7 +197,7 @@ Signed-off-by: Linus Walleij .port_setup_message_port = mv88e6xxx_setup_message_port, .stats_snapshot = mv88e6320_g1_stats_snapshot, .stats_set_histogram = mv88e6095_g1_stats_set_histogram, -@@ -5260,6 +5293,7 @@ static const struct mv88e6xxx_ops mv88e6 +@@ -5396,6 +5429,7 @@ static const struct mv88e6xxx_ops mv88e6 .port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit, .port_disable_pri_override = mv88e6xxx_port_disable_pri_override, .port_get_cmode = mv88e6352_port_get_cmode, @@ -237,7 +237,7 @@ Signed-off-by: Linus Walleij /* MacAuth Bypass control flag */ bool mab; }; -@@ -563,6 +571,9 @@ struct mv88e6xxx_ops { +@@ -574,6 +582,9 @@ struct mv88e6xxx_ops { phy_interface_t mode); int (*port_get_cmode)(struct mv88e6xxx_chip *chip, int port, u8 *cmode); @@ -973,8 +973,8 @@ Signed-off-by: Linus Walleij + dp = dsa_to_port(p->chip->ds, p->port); + if (!dp) + return NULL; -+ if (dp->slave) -+ return &dp->slave->dev; ++ if (dp->user) ++ return &dp->user->dev; + return NULL; +} +