All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Beisert <jbe@pengutronix.de>
To: linux-mtd@lists.infradead.org
Cc: David Brownell <david-b@pacbell.net>,
	Kay Sievers <kay.sievers@vrfy.org>,
	dwmw2@infradead.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [patch/rfc 2.6.29 1/2] MTD: driver model updates
Date: Wed, 1 Apr 2009 15:43:43 +0200	[thread overview]
Message-ID: <200904011543.44124.jbe@pengutronix.de> (raw)
In-Reply-To: <ac3eb2510903311651i4c5f6805tc74fe04ee765be9c@mail.gmail.com>

Hi David, Kay,

On Mittwoch, 1. April 2009, Kay Sievers wrote:
> On Tue, Mar 31, 2009 at 23:18, David Brownell <david-b@pacbell.net> wrote:
> > On Thursday 26 March 2009, David Brownell wrote:
> >> From: David Brownell <dbrownell@users.sourceforge.net>
> >>
> >> Update driver model support in the MTD framework, so it fits
> >> better into the current udev-based hotplug framework:
> >
> > Hmm, no comments?  I had understood there was interest over on
> > the MTD side of things in exposing more information through
> > sysfs, to help avoid the need to add Even More Ioctls as part
> > of support for things like NAND chips with 4KB pages, or which
> > handle more than 4GBytes ...
>
> Please have a look at this. We got asked repeatedly to provide better
> hotplug/udev integration, and the patches, and having the parent
> device properly assigned, would solve some of the problems people run
> into currently.

Without patch:
--------------

$ udevadm info -a -p /sys/block/mtdblock0
[...]
  looking at device '/devices/virtual/block/mtdblock0':
    KERNEL=="mtdblock0"
    SUBSYSTEM=="block"
    DRIVER==""
    ATTR{range}=="1"
    ATTR{removable}=="0"
    ATTR{size}=="256"
    ATTR{capability}=="10"
    ATTR{stat}=="       0        0        0        0        0        0        0        0        0        0        0"

And nearly the same data for the other flash device. No chance to detect if
this one is the NOR or the NAND type...

With the patch:
---------------

$ udevadm info -a -p /sys/block/mtdblock0
[...]
  looking at parent device '/devices/platform/physmap-flash.0':
    KERNELS=="physmap-flash.0"
    SUBSYSTEMS=="platform"
    DRIVERS=="physmap-flash"
    ATTRS{modalias}=="platform:physmap-flash"

The second flash device is of NAND type and 'udevadm' shows:

$ udevadm info -a -p /sys/block/mtdblock4
[...]
  looking at parent device '/devices/platform/mxc_nand.0':
    KERNELS=="mxc_nand.0"
    SUBSYSTEMS=="platform"
    DRIVERS=="mxc_nand"
    ATTRS{modalias}=="platform:mxc_nand"

\o/

I will try now to define some udev rules to match for my different flash
memories.

Thank you,
Juergen

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | Phone: +49-8766-939 228     |
Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |

WARNING: multiple messages have this Message-ID (diff)
From: Juergen Beisert <jbe@pengutronix.de>
To: linux-mtd@lists.infradead.org
Cc: Kay Sievers <kay.sievers@vrfy.org>,
	David Brownell <david-b@pacbell.net>,
	dwmw2@infradead.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [patch/rfc 2.6.29 1/2] MTD: driver model updates
Date: Wed, 1 Apr 2009 15:43:43 +0200	[thread overview]
Message-ID: <200904011543.44124.jbe@pengutronix.de> (raw)
In-Reply-To: <ac3eb2510903311651i4c5f6805tc74fe04ee765be9c@mail.gmail.com>

Hi David, Kay,

On Mittwoch, 1. April 2009, Kay Sievers wrote:
> On Tue, Mar 31, 2009 at 23:18, David Brownell <david-b@pacbell.net> wrote:
> > On Thursday 26 March 2009, David Brownell wrote:
> >> From: David Brownell <dbrownell@users.sourceforge.net>
> >>
> >> Update driver model support in the MTD framework, so it fits
> >> better into the current udev-based hotplug framework:
> >
> > Hmm, no comments?  I had understood there was interest over on
> > the MTD side of things in exposing more information through
> > sysfs, to help avoid the need to add Even More Ioctls as part
> > of support for things like NAND chips with 4KB pages, or which
> > handle more than 4GBytes ...
>
> Please have a look at this. We got asked repeatedly to provide better
> hotplug/udev integration, and the patches, and having the parent
> device properly assigned, would solve some of the problems people run
> into currently.

Without patch:
--------------

$ udevadm info -a -p /sys/block/mtdblock0
[...]
  looking at device '/devices/virtual/block/mtdblock0':
    KERNEL=="mtdblock0"
    SUBSYSTEM=="block"
    DRIVER==""
    ATTR{range}=="1"
    ATTR{removable}=="0"
    ATTR{size}=="256"
    ATTR{capability}=="10"
    ATTR{stat}=="       0        0        0        0        0        0        0        0        0        0        0"

And nearly the same data for the other flash device. No chance to detect if
this one is the NOR or the NAND type...

With the patch:
---------------

$ udevadm info -a -p /sys/block/mtdblock0
[...]
  looking at parent device '/devices/platform/physmap-flash.0':
    KERNELS=="physmap-flash.0"
    SUBSYSTEMS=="platform"
    DRIVERS=="physmap-flash"
    ATTRS{modalias}=="platform:physmap-flash"

The second flash device is of NAND type and 'udevadm' shows:

$ udevadm info -a -p /sys/block/mtdblock4
[...]
  looking at parent device '/devices/platform/mxc_nand.0':
    KERNELS=="mxc_nand.0"
    SUBSYSTEMS=="platform"
    DRIVERS=="mxc_nand"
    ATTRS{modalias}=="platform:mxc_nand"

\o/

I will try now to define some udev rules to match for my different flash
memories.

Thank you,
Juergen

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | Phone: +49-8766-939 228     |
Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |

  reply	other threads:[~2009-04-01 13:44 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-26  7:42 [patch/rfc 2.6.29 1/2] MTD: driver model updates David Brownell
2009-03-31 21:18 ` David Brownell
2009-03-31 21:18   ` David Brownell
2009-03-31 23:51   ` Kay Sievers
2009-04-01 13:43     ` Juergen Beisert [this message]
2009-04-01 13:43       ` Juergen Beisert
2009-04-01  1:17   ` Kevin Cernekee
2009-04-01  1:17     ` Kevin Cernekee
2009-04-01  3:21     ` David Brownell
2009-04-01  3:21       ` David Brownell
2009-04-01  4:49       ` Kevin Cernekee
2009-04-01  4:49         ` Kevin Cernekee
2009-04-01  6:36         ` David Brownell
2009-04-01  6:36           ` David Brownell
2009-04-01  7:29   ` Ricard Wanderlof
2009-04-01  7:51     ` Artem Bityutskiy
2009-04-01  8:05     ` David Brownell
2009-04-01  8:25       ` Ricard Wanderlof
2009-04-01  8:28         ` Artem Bityutskiy
2009-04-02 23:41 ` Kevin Cernekee
2009-04-02 23:41   ` Kevin Cernekee
2009-04-03  7:03   ` Artem Bityutskiy
2009-04-03  7:09     ` Artem Bityutskiy
2009-04-03 20:00     ` Kevin Cernekee
2009-04-03 20:00       ` Kevin Cernekee
2009-04-04 14:36       ` David Woodhouse
2009-04-04 14:36         ` David Woodhouse
2009-04-04 16:17         ` Kevin Cernekee
2009-04-04 16:17           ` Kevin Cernekee
2009-04-04 16:20         ` David Brownell
2009-04-04 16:20           ` David Brownell
2009-04-04 16:29           ` David Woodhouse
2009-04-04 16:29             ` David Woodhouse
2009-04-04 17:18       ` David Brownell
2009-04-04 17:18         ` David Brownell
2009-04-06  5:34   ` Greg KH
2009-04-06  5:34     ` Greg KH
2009-04-03 10:04 ` David Woodhouse
2009-04-03 10:04   ` David Woodhouse
2009-04-03 17:24   ` David Brownell
2009-04-03 17:24     ` David Brownell

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=200904011543.44124.jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=david-b@pacbell.net \
    --cc=dwmw2@infradead.org \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.