[systemd-devel] [PATCH] Drop the udev firmware loader

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Thu May 29 18:40:52 PDT 2014


On Thu, May 29, 2014 at 08:54:22PM -0400, Cristian Rodríguez wrote:
> As discussed ad-nauseum previously, it is the kernel's task
> to load firmware, not udev's.
I think this patch is a bad idea - it makes things harder for people
who, for whatever reason, good or bad, run older kernels. At the same
time, our maintenance burden is pretty much zero.

Zbyszek


> ---
>  Makefile.am             |  8 --------
>  configure.ac            | 20 --------------------
>  src/udev/udev-builtin.c |  3 ---
>  src/udev/udev.h         |  6 ------
>  src/udev/udevd.c        | 13 -------------
>  5 files changed, 50 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 50e7560..2965966 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -2788,14 +2788,6 @@ libudev_core_la_CPPFLAGS = \
>  	$(AM_CPPFLAGS) \
>  	-DFIRMWARE_PATH="$(FIRMWARE_PATH)"
>  
> -if ENABLE_FIRMWARE
> -libudev_core_la_SOURCES += \
> -	src/udev/udev-builtin-firmware.c
> -
> -dist_udevrules_DATA += \
> -	rules/50-firmware.rules
> -endif
> -
>  if HAVE_KMOD
>  libudev_core_la_SOURCES += \
>  	src/udev/udev-builtin-kmod.c
> diff --git a/configure.ac b/configure.ac
> index be57e82..6c84c66 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -975,25 +975,6 @@ fi
>  AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
>  
>  # ------------------------------------------------------------------------------
> -AC_ARG_WITH(firmware-path,
> -       AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
> -          [Firmware search path (default="")]),
> -       [], [with_firmware_path=""])
> -OLD_IFS=$IFS
> -IFS=:
> -for i in $with_firmware_path; do
> -       if test "x${FIRMWARE_PATH}" = "x"; then
> -              FIRMWARE_PATH="\\\"${i}/\\\""
> -       else
> -              FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
> -       fi
> -done
> -IFS=$OLD_IFS
> -AC_SUBST(FIRMWARE_PATH)
> -AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
> -AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
> -
> -# ------------------------------------------------------------------------------
>  AC_ARG_ENABLE([gudev],
>         AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
>         [], [enable_gudev=yes])
> @@ -1215,7 +1196,6 @@ AC_MSG_RESULT([
>          Build Python:            ${PYTHON}
>          Installation Python:     ${PYTHON_BINARY}
>          sphinx binary:           ${SPHINX_BUILD}
> -        firmware path:           ${FIRMWARE_PATH}
>          PAM modules dir:         ${with_pamlibdir}
>          PAM configuration dir:   ${with_pamconfdir}
>          D-Bus policy dir:        ${with_dbuspolicydir}
> diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
> index fd373d0..dd44b2d 100644
> --- a/src/udev/udev-builtin.c
> +++ b/src/udev/udev-builtin.c
> @@ -34,9 +34,6 @@ static const struct udev_builtin *builtins[] = {
>          [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
>  #endif
>          [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
> -#ifdef HAVE_FIRMWARE
> -        [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
> -#endif
>          [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
>          [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
>          [UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard,
> diff --git a/src/udev/udev.h b/src/udev/udev.h
> index 62538bc..6f0a7bd 100644
> --- a/src/udev/udev.h
> +++ b/src/udev/udev.h
> @@ -141,9 +141,6 @@ enum udev_builtin_cmd {
>          UDEV_BUILTIN_BLKID,
>  #endif
>          UDEV_BUILTIN_BTRFS,
> -#ifdef HAVE_FIRMWARE
> -        UDEV_BUILTIN_FIRMWARE,
> -#endif
>          UDEV_BUILTIN_HWDB,
>          UDEV_BUILTIN_INPUT_ID,
>          UDEV_BUILTIN_KEYBOARD,
> @@ -172,9 +169,6 @@ struct udev_builtin {
>  extern const struct udev_builtin udev_builtin_blkid;
>  #endif
>  extern const struct udev_builtin udev_builtin_btrfs;
> -#ifdef HAVE_FIRMWARE
> -extern const struct udev_builtin udev_builtin_firmware;
> -#endif
>  extern const struct udev_builtin udev_builtin_hwdb;
>  extern const struct udev_builtin udev_builtin_input_id;
>  extern const struct udev_builtin udev_builtin_keyboard;
> diff --git a/src/udev/udevd.c b/src/udev/udevd.c
> index 1c9488e..7d7b17a 100644
> --- a/src/udev/udevd.c
> +++ b/src/udev/udevd.c
> @@ -98,9 +98,6 @@ struct event {
>          dev_t devnum;
>          int ifindex;
>          bool is_block;
> -#ifdef HAVE_FIRMWARE
> -        bool nodelay;
> -#endif
>  };
>  
>  static inline struct event *node_to_event(struct udev_list_node *node)
> @@ -465,10 +462,6 @@ static int event_queue_insert(struct udev_device *dev)
>          event->devnum = udev_device_get_devnum(dev);
>          event->is_block = streq("block", udev_device_get_subsystem(dev));
>          event->ifindex = udev_device_get_ifindex(dev);
> -#ifdef HAVE_FIRMWARE
> -        if (streq(udev_device_get_subsystem(dev), "firmware"))
> -                event->nodelay = true;
> -#endif
>  
>          log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev),
>               udev_device_get_action(dev), udev_device_get_subsystem(dev));
> @@ -547,12 +540,6 @@ static bool is_devpath_busy(struct event *event)
>                          return true;
>                  }
>  
> -#ifdef HAVE_FIRMWARE
> -                /* allow to bypass the dependency tracking */
> -                if (event->nodelay)
> -                        continue;
> -#endif
> -
>                  /* parent device event found */
>                  if (event->devpath[common] == '/') {
>                          event->delaying_seqnum = loop_event->seqnum;
> -- 
> 1.8.4.5
> 
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> 


More information about the systemd-devel mailing list