Re: latest mtd changes broke collie

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2005-11-11 at 01:16 +0100, Pavel Machek wrote:
> Hi!
> 
> > >With these hacks, I'm able to mount flash at least read-only. On
> > >attempt to remount read-write, I get 
> > >
> > >"Write error in obliterating obsoleted node at 0x00bc0000: -30
> > >...
> > >Erase at 0x00c00000 failed immediately: -EROFS. Is the sector locked?"
> > >
> > >Is it good news?
> > 
> > I see the old sharp driver has a normally-not-defined AUTOUNLOCK symbol 
> > that would enable some code to unlock blocks before writing/erasing 
> > (which isn't recommended since the code doesn't know the policy on 
> > whether the block is supposed to be locked).  The tree previously in use 
> > may have had something similar setup.  It seems these flashes have all 
> > blocks locked by default at power up.
> 
> Is there some quick hack I can do in kernel to unlock it?

I use the following on my device:

        mtd = do_map_probe(...);
        
        if (!mtd) { ...err... }
        
        mtd->owner = THIS_MODULE;
        
        mtd->unlock(mtd,0,mtd->size);
        
> Is it possible to accidentally unlock "BIOS" area and brick the device?

Yep, but you could modify the parameters to unlock to no do so.
Depending on you partitioning scheme you might be able to use that to
figure out what to unlock...

Ian.

-- 
Ian Campbell

The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..."
		-- Isaac Asimov

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux