public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Robert Stonehouse <rstonehouse@solarflare.com>
To: linux-mtd@lists.infradead.org
Cc: linux-net-drivers@solarflare.com, Steve Pope <spope@solarflare.com>
Subject: [PATCH] [MTD] [RFC] New Solarflare NIC EEPROM/Flash driver
Date: Thu, 10 Jan 2008 18:51:13 +0000	[thread overview]
Message-ID: <47866921.40904@solarflare.com> (raw)

Hi,

The company I work for (Solarflare Communications) produces a 10Gbit
network adapter and PHYs. We have a network driver (sfc.ko) which we are
currently in the process of submitting to linux-netdev.

One part of this is an MTD driver (sfc_mtd.ko) that gives access to the
EEPROM and flash parts on all our board designs. These should be useful
externally  e.g. programming the flash would be useful for people that want
to flash a PXE image onto the board for network booting.

One unusual aspect is that the MTD driver relies on HW initialisation from
the main network driver (as the registers needed to access the flash and
EEPROM are within a shared PCI BAR). There is a small API (that is named
driverlink in the code) that allows the sfc_mtd driver to detect when a
Solarflare NIC is present and to shutdown when it is removed.

In the last submission that we made to linux-netdev it was requested that
people knowledgeable about MTD drivers look over the code ... so I am sure
  I am in the right place

The thread mentioned was:
     http://marc.info/?l=linux-netdev&m=119825632209357&w=2

The complete network driver is a little too large to post to the list so:
     https://support.solarflare.com/netdev/4/net-2.6.25-sfc-2.2.0038.tgz
And for verification there is:
     https://support.solarflare.com/netdev/4/MD5SUMS

drivers/net/sfc/mtd.c contains the body of the MTD code. As the network
driver uses SPI itself (to read config data from the EEPROM) the MTD driver
uses the same access routines (in falcon.c and spi.h). falcon.c fills in a
struct efx_spi_device which includes function pointers for SPI reads and
writes an well as sizing info and this can be read after a NIC has been
detected, initialised and advertised to driverlink clients.

I would be very interested if anyone has the time to review this.

Many thanks

-- 
Rob Stonehouse

             reply	other threads:[~2008-01-10 19:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-10 18:51 Robert Stonehouse [this message]
2008-01-10 20:13 ` [PATCH] [MTD] [RFC] New Solarflare NIC EEPROM/Flash driver Jörn Engel
2008-01-10 23:16   ` Jörn Engel
2008-01-11 12:50   ` Ben Hutchings
2008-01-11 13:24     ` Jörn Engel
2008-01-11 18:55       ` Ben Hutchings
2008-01-11 19:57         ` Jörn Engel
2008-01-13 17:19         ` David Riddoch
2008-01-14 17:04 ` [PATCH] [MTD] [RFC] New Solarflare NIC EEPROM/Flash driver (2nd try) Ben Hutchings
2008-01-15 16:46   ` Jörn Engel
2008-01-15 17:35     ` Ben Hutchings
2008-01-15 17:55       ` Jörn Engel
2008-01-15 17:57     ` Ben Hutchings
2008-01-15 18:28       ` Jörn Engel

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=47866921.40904@solarflare.com \
    --to=rstonehouse@solarflare.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-net-drivers@solarflare.com \
    --cc=spope@solarflare.com \
    /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