Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Floris Bos <bos@je-eigen-domein.nl>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] wf111: Add mdev dependency
Date: Wed, 12 Aug 2015 23:47:01 +0200	[thread overview]
Message-ID: <55CBBED5.80108@je-eigen-domein.nl> (raw)
In-Reply-To: <CAE21AQqpiDz0BEA4ruKVGA28k8b4+-NWAkCjKUqX+b=Qta1yrA@mail.gmail.com>

On 08/12/2015 10:49 PM, Charles Manning wrote:
> On Wed, Aug 12, 2015 at 10:29 PM, Floris Bos <bos@je-eigen-domein.nl> wrote:
>> On 08/11/2015 09:17 AM, Charles Manning wrote:
>>> wf111 really needs mdev
>>
>> Problem I have seen with mdev in its default configuration is that it
>> doesn't just handle firmware load requests, but also takes it upon itself to
>> create/delete the device nodes (even when that already is being handled by
>> devtmpfs), and does a bad job with that.
>>
>> It doesn't preserve sequencing by default, and events are processed
>> concurrently, and get out-of-order.
>>
>> Becomes a problem if your software for example does anything that causes the
>> kernel to re-read the partition table of your storage.
>> In that case the kernel sends events to delete all devices nodes of the
>> storage device, and add them again, right after each other.
>> However depending on your luck, they can get processed in reverse order:
>>
>> ==
>> mdev[598]: 9.191594 ACTION:add SUBSYSTEM:block DEVNAME:mmcblk0p6
>> DEVPATH:/devices/platform/soc/3f300000.mmc/mmc_host/mmc0/mmc0:1234/block/mmcblk0/mmcblk0p6
>> mdev[598]: dev 179,6
>> [...]
>> mdev[593]: 9.192168 ACTION:remove SUBSYSTEM:block DEVNAME:mmcblk0p6
>> DEVPATH:/devices/platform/soc/3f300000.mmc/mmc_host/mmc0/mmc0:1234/block/mmcblk0/mmcblk0p6
>> mdev[593]: rule matched, line -1
>> mdev[593]: unlink: mmcblk0p6
>> ==
>>
>> Add is processed before remove, with the end result that /dev/mmcblk0p6 goes
>> missing...
>>
>>
>> So please don't pull in mdev automatically just for firmware loading,
>> because it does more than just that, and can have serious side effects.
> Ok, now I'm stumped. People are telling me "don't use mdev", but
> nobody is providing a viable alternative.
>
> The situation is this:
> * I did not write wf111, it is not as if I am submitting a new package.
> * We have an existing package wf111.
> * The existing package does not work (ie. does not do fw loading)
> unless there is mdev or udev. Without fw loading wf111 is broken.

Suggest you double check there isn't a newer kernel version available 
for your target device.
Pretty sure newer kernels can also load the firmware straight from 
/lib/firmware without userspace helper.


Yours sincerely,

Floris Bos

  reply	other threads:[~2015-08-12 21:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11  7:17 [Buildroot] [PATCH] wf111: Add mdev dependency Charles Manning
2015-08-11 11:40 ` Baruch Siach
2015-08-11 20:11   ` Charles Manning
2015-08-12  4:38     ` Baruch Siach
2015-08-12  5:16       ` Charles Manning
2015-08-12  5:38         ` Baruch Siach
2015-08-12  5:56           ` Charles Manning
2015-08-12 22:54         ` Floris Bos
2015-08-12 10:29 ` Floris Bos
2015-08-12 20:49   ` Charles Manning
2015-08-12 21:47     ` Floris Bos [this message]
2015-08-18 20:28     ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55CBBED5.80108@je-eigen-domein.nl \
    --to=bos@je-eigen-domein.nl \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox