public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Adam Yergovich <ayergo@jkmicro.com>
To: hartleys <hartleys@visionengravers.com>
Cc: Wolfgang Wegner <wolfgang@leila.ping.de>,
	linux-mtd@lists.infradead.org,
	Mike Frysinger <vapier.adi@gmail.com>
Subject: Re: Access entire device with mtdblock0
Date: Thu, 05 Feb 2009 16:32:46 -0800	[thread overview]
Message-ID: <498B852E.6010809@jkmicro.com> (raw)
In-Reply-To: <BD79186B4FD85F4B8E60E381CAEE19090120BA94@mi8nycmail19.Mi8.com>

hartleys wrote:
> It appears this was originally thought about for mtd partitions.
> 
> In mdtpart.c, add_mtd_partitions() has a comment above it:
> 
> /*
>  * This function, given a master MTD object and a partition table,
> creates
>  * and registers slave MTD objects which are bound to the master
> according to
>  * the partition definitions.
>  * (Q: should we register the master MTD object as well?)
>  */
> 
> Maybe it was just never revisited?
> 

Could well be, some great sleuthing there.  I think the bigger question 
is "Does calling add_mtd_device() after the partitioning has been done 
work?"

I believe the answer to this is no, though some confirmation would be a 
good idea.

If that assumption is correct, I think it should be changed to either:

1) Call it before partitioning so it does add the device.

-or-

2) Change the function such that it works any time and thus the physmap 
call should work as originally written.

I'm not familiar enough with the intended function to know though.  The 
best i can say is that it seems to behave in this way, and it appears to 
me to have been intended to behave differently.

-Adam

  reply	other threads:[~2009-02-06  0:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-10  0:58 Access entire device with mtdblock0 Adam Yergovich
2009-01-10  1:51 ` Jamie Lokier
2009-01-13 23:10 ` Mike Frysinger
2009-01-14  9:00   ` Peter Korsgaard
2009-01-14 10:58     ` Mike Frysinger
2009-01-14 11:09       ` Peter Korsgaard
2009-01-14 11:25       ` Ricard Wanderlof
2009-01-14 11:50       ` Wolfgang Wegner
2009-01-14 17:06         ` Adam Yergovich
2009-01-31  0:08         ` Adam Yergovich
2009-02-05 22:56           ` hartleys
2009-02-06  0:32             ` Adam Yergovich [this message]
2009-02-09 13:15               ` Peter Korsgaard

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=498B852E.6010809@jkmicro.com \
    --to=ayergo@jkmicro.com \
    --cc=hartleys@visionengravers.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=vapier.adi@gmail.com \
    --cc=wolfgang@leila.ping.de \
    /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