lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0h4sEBugBYe5G==pZc7ECkfEenD0v3SwkVFsst7mKLzxQ@mail.gmail.com>
Date: Tue, 18 Nov 2025 17:37:16 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: René Rebe <rene@...ctco.de>
Cc: linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org, 
	"Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH] PNP: Fix ISAPNP to generetae uevent to auto-load modules

On Tue, Nov 18, 2025 at 2:59 PM René Rebe <rene@...ctco.de> wrote:
>
> Currently ISAPNP devices do not generate an uevent for udev to
> auto-load the driver modules for Creative SoundBlaster or Gravis
> UltraSound to just work.
>
> Signed-off-by: René Rebe <rene@...ctco.de>
> ---
> Tested for a while in T2/Linux already.
> ---
>  drivers/pnp/driver.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>
> diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c
> index 7de7aabb275e..05e9840bc3d4 100644
> --- a/drivers/pnp/driver.c
> +++ b/drivers/pnp/driver.c
> @@ -150,6 +150,24 @@ static void pnp_device_shutdown(struct device *dev)
>                 drv->shutdown(pnp_dev);
>  }
>
> +static int pnp_uevent(const struct device *dev, struct kobj_uevent_env *env)
> +{
> +       struct pnp_id *pos;
> +       const struct pnp_dev *pnp_dev = to_pnp_dev(dev);
> +
> +       if (!dev)
> +               return -ENODEV;
> +
> +       pos = pnp_dev->id;
> +       while (pos) {
> +               if (add_uevent_var(env, "MODALIAS=pnp:d%s", pos->id))
> +                       return -ENOMEM;
> +               pos = pos->next;
> +       }
> +
> +       return 0;
> +}
> +
>  static int pnp_bus_match(struct device *dev, const struct device_driver *drv)
>  {
>         struct pnp_dev *pnp_dev = to_pnp_dev(dev);
> @@ -259,6 +277,7 @@ static const struct dev_pm_ops pnp_bus_dev_pm_ops = {
>  const struct bus_type pnp_bus_type = {
>         .name    = "pnp",
>         .match   = pnp_bus_match,
> +       .uevent  = pnp_uevent,
>         .probe   = pnp_device_probe,
>         .remove  = pnp_device_remove,
>         .shutdown = pnp_device_shutdown,
> --

Applied as 6.19 material with minor edits in the subject, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ