This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fis write from linux kernel


Hi Andrew, Ian  (and all )

Problem is still not solved .. 
Locking was an issue, which was causing the write failures..
I noticed that  redboot locks this when you do fis init .. 
write call fails in the end and is detected well by the driver .. 

I removed locking part from redboot, and (/ or )
have called master->unlock before write 

I can write (apparently) as driver call (master->write) is not  failing now. 
but when I read back (or dump from redboot) , data is still not there .. 

Now, I am really curious (and on the fence due to deadline ! -:) )
to know what else could be the issue .. 

(read -modify - write to other areas are working fine)

you have any sample code , I can use as a reference / kickstart ?

2) I have done enough digging around kernel code, 
everything is boiling to do_write_buffer calls only .. which is
basically master->write ..
One thing I have noticed is that mtdblock.c for write requests is
calling erase first and then writes ..
ignore my ignorance of this mundane thing .. but why is this necessary .. ?
and erase call in mtd_info takes a struct erase_info structure .. 
which requires a call back function .. Can I implement / call this
while I am at ixp425_init.c ?? will wait q and all work at that level
?

Cheers,
Alfred

On Sat, 26 Feb 2005 12:22:37 +0000, Ian Campbell <ijc@hellion.org.uk> wrote:
> On Fri, 2005-02-25 at 06:15 -0500, alfred hitch wrote:
> > Hi,
> >
> > Some more debugging ,
> > I can write successfully to other areas of flash using my code .
> > so it seems that the redboot is locking that last erase block (fis
> > area) and so buffer_write mode fails ??
> >
> > if that the case, how can I verify and change this in the redboot code ?
> > Somone please tell me atleast this.
> >
> > I am running short of time to deadline here -:(
> > (murphy law of last minute crash , causing me to do these last minute changes.)
> 
> You can lock and unlock MTD partitions from Linux using an ioctl
> on /dev/mtdN, I forget what the ioctl is put a quick look through the
> Linux headers should throw it up. I believe there are utilities in the
> utils directory of MTD CVS called mtdlock and mtdunlock which implement
> it already.
> 
> Ian.
> --
> Ian Campbell
> 
> "MSDOS didn't get as bad as it is overnight -- it took over ten years
> of careful development."
> (By dmeggins@aix1.uottawa.ca)
> 
> 
>

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]