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

David Riddoch driddoch at solarflare.com
Sun Jan 13 12:19:33 EST 2008


Ben Hutchings wrote:
>>>>   struct semaphore access_lock; should become a mutex.
>>>>         
>>> Right.  We've tended to be quite conservative in using newer kernel
>>> features, since we also need to support old kernels, but we have a
>>> good backward-compatibility layer now (unifdef'd out of the submitted
>>> code) so this shouldn't be a problem.
>>>       
>> 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.
>   
reset_suspend() is documented as being called in a context that permits 
sleeping, and I can't see us ever changing that.  reset_resume() will 
also continue to permit sleeping (although that isn't currently documented).

Cheers,
David

-- 
David Riddoch  +++  Solarflare  +++  driddoch at solarflare.com




More information about the linux-mtd mailing list