Forum Discussion

Nicolas5's avatar
Nicolas5
Icon for New Contributor rankNew Contributor
4 years ago

JFFS2 errors on qspi with Arria10

Hi there,

I am encountering jffs2 errors on my Arria10 hps after i made a kernel update from 4.3 to 4.15.

The device is booting normaly, but the error occurs when transfering some files over scp to the device - sometimes multiple Transfers work fine but eventually it happens an i get a random number of error messages like:

[ 630.885149] jffs2: Node totlen on flash (0xc49d8ee2) != totlen from node ref (0x00000854)

[ 630.932352] jffs2: Node totlen on flash (0x86fd0cb7) != totlen from node ref (0x000008b0)

[ 630.978193] jffs2: Node totlen on flash (0x4e333c29) != totlen from node ref (0x000007b0)

most of the time the system continues to work. sometimes it just freezes!

after a reboot i am always presented with a broken filesystem:

[ 1.514192] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080804: 0x1081 instead

as implied, the old kernel 4.3 version has no issue with the jffs2 filesystem on the qspi flash.

I tried adjusting some timings in the devicetree without any luck.

Anyone has a idea on how to isolate the source of the problem?

Thanks & Regards,

Nicolas

5 Replies

  • tehjingy_Altera's avatar
    tehjingy_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi Nicolas


    Could you please share what changes you made to the device tree?

    If possible could you please send us the device tree for the kernel 4.3 and 4.15.


    Regards

    Jingyang, Teh


  • tehjingy_Altera's avatar
    tehjingy_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi Nicolas


    Since there are no feedback for this thread, I shall set this thread to close pending. If you still need further assistance, you are welcome reopen this thread within 20days or open a new thread, someone will be right with you.


    If you happened to close this thread you might receive a survey. If you think you would rank your support experience less than 10 out of 10, please allow me to correct it before closing or if the problem can’t be corrected, please let me know the cause so that I may improve your future service experience.


    Regards

    Jingyang, Teh


  • Nicolas5's avatar
    Nicolas5
    Icon for New Contributor rankNew Contributor

    Hi there,

    Thanks for your answers!

    I am sorry, i was unable to answer for some days.

    These are the qspi timings i use:

    https://github.com/enclustra-bsp/altera-linux/blob/master/arch/arm/boot/dts/socfpga_arria10_mercury_aa1.dts

    Altering these timing values did not improve the performance!

    for example: Kernel 4.3 does autodetection of read-delay to "2" - setting read delay to values of 2,3..6 on 4.15 doesn't change the behavior

    I did some further research in the code and discovered that the driver in version 4.3 does not use 4 channel communication with the qspi, but 4.15 does!

    So i patched the 4.15 driver to only use single channel qspi and this seem to work. This leads me to believe there might be a problem with the hardware.

    --> so this also confirms why changing any devicetree values do not help the problem.

    For Reference:

    driver 4.3: https://github.com/enclustra-bsp/altera-linux/blob/v1.6/drivers/mtd/spi-nor/cadence-quadspi.c

    driver 4.15: https://github.com/enclustra-bsp/altera-linux/blob/v1.8/drivers/mtd/spi-nor/cadence-quadspi.c