mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-11 23:22:11 -05:00
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.43 Removed upstreamed: generic/backport-6.12/612-07-v6.17-net-dsa-b53-prevent-SWITCH_CTRL-access-on-BCM5325.patch[1] generic-backport/612-08-v6.17-net-dsa-b53-fix-IP_MULTICAST_CTRL-on-BCM5325.patch[2] generic-backport/612-09-v6.17-net-dsa-b53-prevent-DIS_LEARNING-access-on-BCM5325.patch[3] generic-backport/612-11-v6.17-net-dsa-b53-prevent-GMII_PORT_OVERRIDE_CTRL-access-on-BCM5325.patch[4] generic-backport/612-14-v6.17-net-dsa-b53-ensure-BCM5325-PHYs-are-enabled.patch[5] generic-backport/830-v6.17-Revert-leds-trigger-netdev-Configure-LED-blink-inter.patch[6] bcm27xx/patches-6.12/950-0100-media-tc358743-Increase-FIFO-level-to-374.patch[7] bcm27xx/patches-6.12/950-0102-media-tc358743-Check-I2C-succeeded-during-probe.patch[8] bcm27xx/patches-6.12/950-0107-media-tc358743-Return-an-appropriate-colorspace-from.patch[9] bcm27xx/patches-6.12/950-0341-Allow-RESET_BRCMSTB-on-ARCH_BCM2835.patch[10] lantiq/patches-6.12/102-11-v6.17-MIPS-lantiq-falcon-sysctrl-fix-request-memory-check-.patch[11] lantiq/patches-6.12/102-12-v6.17-MIPS-vpe-mt-add-missing-prototypes-for-vpe_-alloc-st.patch[12] qualcommax/patches-6.12/0170-clk-qcom-gcc-ipq8074-fix-broken-freq-table-for-nss_port6_tx_clk_src.patch[13] generic/backport-6.12/612-13-v6.17-net-dsa-b53-fix-b53_imp_vlan_setup-for-BCM5325.patch[14] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=f16f96ccfe56ef2d627c20ba47f6d9d7dea40f5b 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=394bd12d1f93ed2fa0fa1d8f31ffd3c344681e85 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=9f45e4858f8096bb27f9a2c75fc24a538dffad67 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=15cf46cc6ecc7a54b397294675d11c379ddf69ef 5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=0d250ad617a035904744cef74a5d5dc43d0199b9 6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=cb9bb872366e10fa42e1e0200a0c2e5d05a27bec 7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=f25d566c5674decd0051a3e624805fc1524729bf 8. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=3e03ee3b65baeac4c253b30650492ffffad9b608 9. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=b42b107293b52ac8d46238815b1071138a47a7e4 10. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=e285cdb9d2e4ba2e4515ae898f92e9f38be64eb3 11. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=1e9079ff83eac962bc3b1e2fbad73b2f7d5256f4 12. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=8520c843d9a2770012f23da08e4e2ccf1bb05ba6 13. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=f1c5c55fb6cda312f5ed15505588caaf05a69043 14. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=757955c80663ac3df7053abaf6fcc75051ef7a7c Build system: x86/64 (Intel N150 based) Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc Signed-off-by: John Audia <therealgraysky@proton.me> Link: https://github.com/openwrt/openwrt/pull/19618 Signed-off-by: Robert Marko <robimarko@gmail.com>
95 lines
3.4 KiB
Diff
95 lines
3.4 KiB
Diff
From e5f587242b6072ffab4f4a084a459a59f3035873 Mon Sep 17 00:00:00 2001
|
|
From: Christian Marangi <ansuelsmth@gmail.com>
|
|
Date: Thu, 3 Oct 2024 00:11:43 +0200
|
|
Subject: [PATCH 3/5] block: introduce add_disk_fwnode()
|
|
|
|
Introduce add_disk_fwnode() as a replacement of device_add_disk() that
|
|
permits to pass and attach a fwnode to disk dev.
|
|
|
|
This variant can be useful for eMMC that might have the partition table
|
|
for the disk defined in DT. A parser can later make use of the attached
|
|
fwnode to parse the related table and init the hardcoded partition for
|
|
the disk.
|
|
|
|
device_add_disk() is converted to a simple wrapper of add_disk_fwnode()
|
|
with the fwnode entry set as NULL.
|
|
|
|
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|
Reviewed-by: Christoph Hellwig <hch@lst.de>
|
|
Link: https://lore.kernel.org/r/20241002221306.4403-4-ansuelsmth@gmail.com
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
---
|
|
block/genhd.c | 28 ++++++++++++++++++++++++----
|
|
include/linux/blkdev.h | 3 +++
|
|
2 files changed, 27 insertions(+), 4 deletions(-)
|
|
|
|
--- a/block/genhd.c
|
|
+++ b/block/genhd.c
|
|
@@ -383,16 +383,18 @@ int disk_scan_partitions(struct gendisk
|
|
}
|
|
|
|
/**
|
|
- * device_add_disk - add disk information to kernel list
|
|
+ * add_disk_fwnode - add disk information to kernel list with fwnode
|
|
* @parent: parent device for the disk
|
|
* @disk: per-device partitioning information
|
|
* @groups: Additional per-device sysfs groups
|
|
+ * @fwnode: attached disk fwnode
|
|
*
|
|
* This function registers the partitioning information in @disk
|
|
- * with the kernel.
|
|
+ * with the kernel. Also attach a fwnode to the disk device.
|
|
*/
|
|
-int __must_check device_add_disk(struct device *parent, struct gendisk *disk,
|
|
- const struct attribute_group **groups)
|
|
+int __must_check add_disk_fwnode(struct device *parent, struct gendisk *disk,
|
|
+ const struct attribute_group **groups,
|
|
+ struct fwnode_handle *fwnode)
|
|
|
|
{
|
|
struct device *ddev = disk_to_dev(disk);
|
|
@@ -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);
|
|
+ if (fwnode)
|
|
+ device_set_node(ddev, fwnode);
|
|
if (!(disk->flags & GENHD_FL_HIDDEN))
|
|
ddev->devt = MKDEV(disk->major, disk->first_minor);
|
|
ret = device_add(ddev);
|
|
@@ -553,6 +557,22 @@ out_exit_elevator:
|
|
elevator_exit(disk->queue);
|
|
return ret;
|
|
}
|
|
+EXPORT_SYMBOL_GPL(add_disk_fwnode);
|
|
+
|
|
+/**
|
|
+ * device_add_disk - add disk information to kernel list
|
|
+ * @parent: parent device for the disk
|
|
+ * @disk: per-device partitioning information
|
|
+ * @groups: Additional per-device sysfs groups
|
|
+ *
|
|
+ * This function registers the partitioning information in @disk
|
|
+ * with the kernel.
|
|
+ */
|
|
+int __must_check device_add_disk(struct device *parent, struct gendisk *disk,
|
|
+ const struct attribute_group **groups)
|
|
+{
|
|
+ return add_disk_fwnode(parent, disk, groups, NULL);
|
|
+}
|
|
EXPORT_SYMBOL(device_add_disk);
|
|
|
|
static void blk_report_disk_dead(struct gendisk *disk, bool surprise)
|
|
--- a/include/linux/blkdev.h
|
|
+++ b/include/linux/blkdev.h
|
|
@@ -789,6 +789,9 @@ static inline unsigned int blk_queue_dep
|
|
#define for_each_bio(_bio) \
|
|
for (; _bio; _bio = _bio->bi_next)
|
|
|
|
+int __must_check add_disk_fwnode(struct device *parent, struct gendisk *disk,
|
|
+ const struct attribute_group **groups,
|
|
+ struct fwnode_handle *fwnode);
|
|
int __must_check device_add_disk(struct device *parent, struct gendisk *disk,
|
|
const struct attribute_group **groups);
|
|
static inline int __must_check add_disk(struct gendisk *disk)
|