lkml.org 
[lkml]   [2005]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: latest mtd changes broke collie
    From
    Date
    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
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2005-11-11 08:04    [W:3.291 / U:0.236 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site