Flashdisk failing at rtems_fdisk_compact() - shouldn't I get a device node regardless?
Nick Withers
nick.withers at anu.edu.au
Wed Jan 15 08:03:27 UTC 2014
On Wed, 2014-01-15 at 08:24 +0100, Sebastian Huber wrote:
> On 2014-01-15 03:08, Nick Withers wrote:
> >>>> I would only use the
> >>>> > >>low-level flash driver (rtems_fdisk_driver_handlers).
> >>> > >
> >>> > >Cheers - I'll have a gander at that.
> >> >
> >> >If this works out, and I see no reason for it not to, it might be a good
> >> >idea to move these handlers and the interface into something different
> >> >to avoid confusion.
> > It turns out that the libchip am29lv160 stuff ain't for me, as my BSP
> > (MVME3100) has two of them in parallel (which changes their interface).
> >
> > This'd explain the dramas I was having with the Flashdisk driver earlier
> > (http://www.rtems.org/pipermail/rtems-users/2013-August/011806.html ),
> > too.
> >
> > Luckily, and once again, Till's been here before so there's
> > libbsp/powerpc/shared/flash/spansionFlash.c.
> >
> > So I've knocked up a wrapper around it for JFFS2. I can't spot anything
> > obviously wrong with it, but am encountering an error when writing a
> > file to a newly formatted FS that seems to be fairly common - "Node
> > totlen on flash (0xFFFFFFFF) != totlen from node ref (0x00000044)" (the
> > whole struct jffs2_unknown_node's all-1s).
> >
> > Solutions suggested through good ol' Google seem to be related to the
> > type of flash in use / Linux-specifics / big-file-relative-to-FS (this
> > isn't), etc.; Nothing that would seem to apply here...?
> > ____
> >
> > [/] # ls -l/etc/daq/
> > total 0
> > -rw-r--r-- 1 root root 68 Jan 15 01:43 crate
> > -rw-r--r-- 1 root root 141 Jan 15 01:43 daq
> > drwxr-xr-x 1 root root 0 Jan 1 1970 nv
> > [/] # ls -l /etc/daq/nv
> > [/] # cp /etc/daq/daq /etc/daq/nv/daq
> > [DEBUG] mvme3100_flash.c:305: mvme3100_flash_device_write(): 12 B to 0xf80000
> > ERASING DONE
>
> Who prints this "ERASING DONE"?
That's from c/src/lib/libbsp/powerpc/shared/flash/flash.c
(BSP_flashErase()), which uses the spansionFlash driver.
> > [DEBUG] mvme3100_flash.c:305: mvme3100_flash_device_write(): 68 B to 0xf8000c
> > [DEBUG] mvme3100_flash.c:305: mvme3100_flash_device_write(): 40 B to 0xf80050
> > [DEBUG] mvme3100_flash.c:305: mvme3100_flash_device_write(): 4 B to 0xf80078
> > [DEBUG] mvme3100_flash.c:305: mvme3100_flash_device_write(): 68 B to 0xf8007c
> > [DEBUG] mvme3100_flash.c:305: mvme3100_flash_device_write(): 12 B to 0xf8000c
> > ERASING DONE
> > [DEBUG] mvme3100_flash.c:305: mvme3100_flash_device_write(): 68 B to 0xf800c0
> > [DEBUG] mvme3100_flash.c:305: mvme3100_flash_device_write(): 144 B to 0xf80104
> > Node totlen on flash (0xFFFFFFFF) != totlen from node ref (0x00000044)
>
> I would make sure that the callback functions do what they are supposed to do.
> For me this looks like a problem with the flash driver routines.
>
Righto - I'll keep digging.
Thanks!
--
Nick Withers
Embedded Systems Programmer
Room 2.26, Building 57
Department of Nuclear Physics
Research School of Physics and Engineering
The Australian National University (CRICOS: 00120C)
eMail: nick.withers at anu.edu.au
Phone: +61 2 6125 2091
Mobile: +61 414 397 446
More information about the users
mailing list