Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCHv2] package/eudev: tweak initscript
@ 2014-10-20 18:26 Gustavo Zacarias
  2014-10-21 17:04 ` Yann E. MORIN
  2014-10-22 21:03 ` Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Gustavo Zacarias @ 2014-10-20 18:26 UTC (permalink / raw)
  To: buildroot

Make the udev initscript trigger in a coherent way, i.e. first set
subsystems, then device and then let the whole thing settle.
Otherwise for usb_modeswitch udev rules they never kick in since the
storage aspect (device) gets claimed first and the switch ignored.
Also set the settle timeout to a smaller value than the default
120 seconds to avoid stalling too much.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/eudev/S10udev | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/eudev/S10udev b/package/eudev/S10udev
index 107dfd5..c3eafce 100755
--- a/package/eudev/S10udev
+++ b/package/eudev/S10udev
@@ -30,8 +30,9 @@ case "$1" in
         printf "Populating ${udev_root:-/dev} using udev: "
         printf '\000\000\000\000' > /proc/sys/kernel/hotplug
         $UDEV_BIN -d || (echo "FAIL" && exit 1)
-        udevadm trigger --action=add
-        udevadm settle
+        udevadm trigger --type=subsystems --action=add
+        udevadm trigger --type=devices --action=add
+        udevadm settle --timeout=30 || echo "udevadm settle failed"
         echo "done"
         ;;
     stop)
-- 
2.0.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCHv2] package/eudev: tweak initscript
  2014-10-20 18:26 [Buildroot] [PATCHv2] package/eudev: tweak initscript Gustavo Zacarias
@ 2014-10-21 17:04 ` Yann E. MORIN
  2014-10-22 21:03 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2014-10-21 17:04 UTC (permalink / raw)
  To: buildroot

Gustavo, All,

On 2014-10-20 15:26 -0300, Gustavo Zacarias spake thusly:
> Make the udev initscript trigger in a coherent way, i.e. first set
> subsystems, then device and then let the whole thing settle.
> Otherwise for usb_modeswitch udev rules they never kick in since the
> storage aspect (device) gets claimed first and the switch ignored.
> Also set the settle timeout to a smaller value than the default
> 120 seconds to avoid stalling too much.
> 
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  package/eudev/S10udev | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/package/eudev/S10udev b/package/eudev/S10udev
> index 107dfd5..c3eafce 100755
> --- a/package/eudev/S10udev
> +++ b/package/eudev/S10udev
> @@ -30,8 +30,9 @@ case "$1" in
>          printf "Populating ${udev_root:-/dev} using udev: "
>          printf '\000\000\000\000' > /proc/sys/kernel/hotplug
>          $UDEV_BIN -d || (echo "FAIL" && exit 1)
> -        udevadm trigger --action=add
> -        udevadm settle
> +        udevadm trigger --type=subsystems --action=add
> +        udevadm trigger --type=devices --action=add
> +        udevadm settle --timeout=30 || echo "udevadm settle failed"
>          echo "done"
>          ;;
>      stop)
> -- 
> 2.0.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCHv2] package/eudev: tweak initscript
  2014-10-20 18:26 [Buildroot] [PATCHv2] package/eudev: tweak initscript Gustavo Zacarias
  2014-10-21 17:04 ` Yann E. MORIN
@ 2014-10-22 21:03 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2014-10-22 21:03 UTC (permalink / raw)
  To: buildroot

Dear Gustavo Zacarias,

On Mon, 20 Oct 2014 15:26:52 -0300, Gustavo Zacarias wrote:
> Make the udev initscript trigger in a coherent way, i.e. first set
> subsystems, then device and then let the whole thing settle.
> Otherwise for usb_modeswitch udev rules they never kick in since the
> storage aspect (device) gets claimed first and the switch ignored.
> Also set the settle timeout to a smaller value than the default
> 120 seconds to avoid stalling too much.
> 
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
>  package/eudev/S10udev | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Applied, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-22 21:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-20 18:26 [Buildroot] [PATCHv2] package/eudev: tweak initscript Gustavo Zacarias
2014-10-21 17:04 ` Yann E. MORIN
2014-10-22 21:03 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox