[PATCH] [MTD] [RFC] New Solarflare NIC EEPROM/Flash driver

Jörn Engel joern at logfs.org
Fri Jan 11 14:57:26 EST 2008


On Fri, 11 January 2008 18:55:51 +0000, Ben Hutchings wrote:
> 
> It turns out that struct efx_mtd_operations is a redundant indirection
> layer, but I can introduce a dummy struct efx_spi_device which does
> the same thing.

Sounds good.

> > Ok.  A straight conversion to a mutex will likely cause trouble with
> > your reset routine.  Not sure what to do here.
> 
> We can use a mutex if the net driver is guaranteed to call
> reset_suspend() and reset_resume() in the same context.  This is
> currently true (they are always called in a pair by efx_reset() in
> efx.c) but I'm not sure we want to guarantee that.  Unfortunately it
> *is* sometimes necessary to reset the controller after it's been
> exposed through driverlink, so this is not something we can ignore.

I would try to move the lock as far down the callchain as possible.
If you can limit it to the raw bus access, your mtd driver doesn't need
locking at all.

Jörn

-- 
Joern's library part 12:
http://physics.nist.gov/cuu/Units/binary.html



More information about the linux-mtd mailing list