mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Biederman <ebiederm@aristanetworks.com>
To: Chris Metcalf <cmetcalf@tilera.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Greg KH <gregkh@suse.de>,
	linux-kernel@vger.kernel.org, Chris Wright <chrisw@sous-sol.org>,
	Benjamin Thery <benjamin.thery@bull.net>,
	Phil Carmody <ext-phil.2.carmody@nokia.com>
Subject: Re: [PATCH] arch/tile: add arch/tile/drivers/ directory with SROM driver
Date: Sat, 21 May 2011 08:50:43 -0700	[thread overview]
Message-ID: <BANLkTim-d-8w1_idg4u302aB3MqTo7q4Sg@mail.gmail.com> (raw)
In-Reply-To: <4DD7C3A7.5010402@tilera.com>

On Sat, May 21, 2011 at 6:52 AM, Chris Metcalf <cmetcalf@tilera.com> wrote:
> Interesting!  I did in fact assume that most tools that read or write
> eeproms would tend to be "batch" tools, i.e. they would read or write
> whatever it was they wanted, then exit; the tool we have that modifies this
> EEPROM is written like that, for example.  It sounds like you're saying
> there are (or may be) tools that open the file descriptor and do writes to
> it, then don't exit or close the file descriptor, but expect the last write
> to have hit the device immediately.  It's fair to say that since my
> suggested API does defer the last sector's worth of writes until the app
> exits, it potentially violates that assumption, so it's a bad idea.

Plus the other gigantic difference that I have seen very few eeproms
that can hold a sectors worth of data.

My reading of this conversation is that you are confusing a configuration
eeprom with a nor flash boot device.  That is a bit like confusing a yellow
sticky not with the Encyclopedia Britannica.   They aren't at all the
same thing.

> On 5/21/2011 3:46 AM, Eric Biederman wrote:
>> What is wrong with an mtd driver?
>
> More backstory: we actually have an MTD driver for this device (in our
> local tree as drivers/mtd/devices/tile_srom.c) but we haven't yet tried to
> push it back to the community.  But it doesn't work for the most important
> purpose of this device, namely to serve as one of the possible boot streams
> at power-on.  For this, we have to control exactly what data is on what
> sector, which means a character (or sysfs) device.

How can an MTD driver not work to control exactly what data is on what
sector????  That is what MTD drivers do.

It sounds like you have a bug in either your userspace tools or your
implementation of your mtd driver.  That is definitely not a reason to
dump your device into a char device (mtdchar already exists).

> Sounds like the consensus is that a character driver is in fact the best
> option here.

I think the consensus is that your design is buggy.

Eric

  parent reply	other threads:[~2011-05-21 15:50 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-04 19:10 Chris Metcalf
2011-05-05  6:41 ` Arnd Bergmann
2011-05-06 19:37   ` Chris Metcalf
2011-05-20 18:05   ` Chris Metcalf
2011-05-20 18:46     ` Arnd Bergmann
2011-05-20 22:40       ` Eric Biederman
2011-05-20 23:39         ` Chris Metcalf
2011-05-21  3:21           ` Greg KH
2011-05-21  9:33             ` Arnd Bergmann
2011-05-21 13:52               ` Chris Metcalf
2011-05-21 15:02                 ` Arnd Bergmann
2011-05-21 15:31                   ` Chris Metcalf
2011-05-21 15:50                 ` Eric Biederman [this message]
2011-05-23 20:10                   ` Chris Metcalf
2011-05-28 15:13                   ` [PATCH v2] arch/tile: add hypervisor-based character driver for SPI flash ROM Chris Metcalf
2011-05-28 21:23                     ` Greg KH
2011-05-29  0:32                       ` Chris Metcalf
2011-05-29 11:45                         ` Greg KH
2011-05-29 12:18                           ` Chris Metcalf
2011-05-29 13:47                             ` Greg KH
2011-05-29 15:45                             ` Arnd Bergmann
2011-05-29 18:23                               ` Chris Metcalf
2011-06-02 15:04                   ` [PATCH v3] " Chris Metcalf
2011-06-10 16:41                     ` Arnd Bergmann
2011-05-21  7:46           ` [PATCH] arch/tile: add arch/tile/drivers/ directory with SROM driver Eric Biederman
2011-05-21  8:32             ` Arnd Bergmann
2011-05-22  0:54               ` Mike Frysinger

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=BANLkTim-d-8w1_idg4u302aB3MqTo7q4Sg@mail.gmail.com \
    --to=ebiederm@aristanetworks.com \
    --cc=arnd@arndb.de \
    --cc=benjamin.thery@bull.net \
    --cc=chrisw@sous-sol.org \
    --cc=cmetcalf@tilera.com \
    --cc=ext-phil.2.carmody@nokia.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®