lkml.org 
[lkml]   [2011]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] arch/tile: add arch/tile/drivers/ directory with SROM driver
Date
On Friday 20 May 2011 20:05:05 Chris Metcalf wrote:
> This works well, except for the fact that we take advantage of the fact
> that the hypervisor driver internally buffers up writes to the current
> EEPROM sector, and flushes it to hardware only when explicitly told to do
> so, or when we start writing to another sector. This avoids excessive wear
> on the EEPROM and also handles detection of whether we need to do a sector
> erase before the re-write. However, it also means that we need to be able
> to issue the final explicit flush, or else the last write just sits in the
> hypervisor buffer indefinitely. To make that happen I think I need to
> extend the bin_attribute structure, and the bin.c release() function, slightly:

Yes, that would work. Another option would be to add a flush() callback
to the bin_attribute. Since filp_close calls both fops->flush and
fops->release, that would also make it possible to flush the buffer
without closing it, if necessary.

Arnd


\
 
 \ /
  Last update: 2011-05-20 20:49    [W:0.269 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site