From: Scott Weaver on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2606 There are two significant problems with the existing hardware and driver maintenance process. It is not easy to determine if a driver or piece of hardware is supported, and it is not easy to determine if a driver or piece of hardware is deprecated. This changeset implements new 'centralized' call points to mark hardware and devices deprecated, unmaintained, or disabled. This removes per-driver code and reduces the amount of RHEL only code in the kernel. It is easiest to look at a comparison of the old and new processes. In this example, I will look at disabling a PCI card. In the old process, a bugzilla would be opened to mark the device as disabled, and it would be assigned to an engineer. That engineer would submit code and it would eventually be merged into the tree. The problem with this process is that it does not make it easy for others to determine the status of the device without examining the code. This led to situations where devices were assumed to be supported in RHEL9 but were not actually enabled. In addition to this, this process required per-driver changes which were spread throughout the kernel. The new process relies on a database that contains information on the status of a device. In order to disable a device the database must first be updated with the information. The database contains a utility to update the code which is then directly copied into the kernel as a Merge Request. As part of this change, the code is updated to have two main calling points to examine devices and drivers. The kernel module loading code is updated to check the status of a driver before loading it, and the PCI core driver code was updated to to check the status of a device before binding it to a driver. There is dead and existing code that is removed from the source code before any changes are made. Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx> Signed-off-by: Scott Weaver <scweaver@xxxxxxxxxx> --- drivers/message/fusion/mptsas.c | 5 - drivers/message/fusion/mptspi.c | 5 - drivers/pci/pci-driver.c | 83 +-------- include/linux/kernel.h | 9 +- include/linux/module.h | 4 + include/linux/pci.h | 19 +- init/main.c | 3 + kernel/module/main.c | 5 + kernel/rh_messages.c | 343 +++++++++++++++++++++++++++++++-------- kernel/rh_messages.h | 109 ++++++++++++ 10 files changed, 406 insertions(+), 179 deletions(-) _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue