From: Petri Gynther <pgynther-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
To: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: Greg Kroah-Hartman <greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] eeprom: add non-cached sysfs read access to EEPROM data
Date: Wed, 2 Sep 2009 12:45:21 -0700 [thread overview]
Message-ID: <fc21faff0909021245k44e27206t65a268470065431a@mail.gmail.com> (raw)
In-Reply-To: <20090902103034.15f13e4d-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
Jean,
In 2.6.25, I used this patch successfully for read-only access to some
SFP EEPROMs:
- 0x50 - vendor/part info (caching OK)
- 0x51 - real-time diagnostics data (caching not OK)
I only care about read-only access to these EEPROMs. And, actually, I
don't want to provide write access at all.
In 2.6.31, I'd like to continue using this same legacy driver for SFP
EEPROM access, with the option of bypassing the cache.
-- Petri
On Wed, Sep 2, 2009 at 1:30 AM, Jean Delvare<khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org> wrote:
> Hi Petri,
>
> On Tue, 1 Sep 2009 16:15:00 -0700 (PDT), Petri Gynther wrote:
>> Add "eeprom-nc" sysfs attribute to provide non-cached read access
>> to EEPROM data. This is needed because some EEPROM-like devices
>> contain constantly changing real-time diagnostic data that cannot
>> be cached in kernel memory.
>>
>> Signed-off-by: Petri Gynther <pgynther-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
>> ---
>> drivers/misc/eeprom/eeprom.c | 30 +++++++++++++++++++++++++++---
>> 1 files changed, 27 insertions(+), 3 deletions(-)
>
> You are using the wrong driver for the task. The "eeprom" driver is a
> legacy driver solely meant for SPD and EDID EEPROMs, and these do never
> change, thus the caching mechanism. Please look at the new "at24"
> driver for accessing any other EEPROM type.
>
> --
> Jean Delvare
>
next prev parent reply other threads:[~2009-09-02 19:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-01 23:15 [PATCH] eeprom: add non-cached sysfs read access to EEPROM data Petri Gynther
2009-09-01 23:39 ` Greg KH
[not found] ` <20090901233948.GA3828-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2009-09-02 19:28 ` Petri Gynther
2009-09-02 8:30 ` Jean Delvare
[not found] ` <20090902103034.15f13e4d-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-09-02 19:45 ` Petri Gynther [this message]
[not found] ` <fc21faff0909021245k44e27206t65a268470065431a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-09-02 20:16 ` Jean Delvare
[not found] ` <20090902221651.10b13a5b-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-09-03 18:42 ` Petri Gynther
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=fc21faff0909021245k44e27206t65a268470065431a@mail.gmail.com \
--to=pgynther-hpiqsd4aklfqt0dzr+alfa@public.gmane.org \
--cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.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;
as well as URLs for NNTP newsgroup(s).