The iMX51/53 Linux NAND flash driver hangup bug when system is busy (Such as many interrupts) -blog archive

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The iMX51/53 Linux NAND flash driver hangup bug when system is busy (Such as many interrupts) -blog archive

1,244 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

    For iMX51/53 Linux BSP, such as L2.6.35_11.09.01_ER, Android R10.4 BSP, there is a timeout issue in NAND flash driver.

In the driver file "drivers\mtd\nand\mxc_nd2.c", function wait_op_done().

    After a NAND command was send to NAND chip, this function will call wait_event_timeout() to wait the interrupt, and it will set timeout time to 1 second (TROP_US_DELAY), after NAND complete interrupt happens, the interrupt thread mxc_nfc_irq() will call wake_up(&irq_waitq); to notify the wait thread. In normal case it is OK. But when system is busy with many hardware interrupts, such as SDMMC card read/write, there is chance that the time maybe will be more than 1 second from "wake_up(&irq_waitq);" was called to wait_event_timeout() receive it. In this case, the function wait_op_done() will return fail with timeout. And the complete status bit in register REG_NFC_OPS_STAT will not be cleared, then system will hangup.

 

    The followed is the updated code for this issue, the modified code was marked with flag "qiang_debug".

Original Attachment has been moved to: mxc_nd2.c.zip

Labels (3)
Tags (1)
0 Kudos
Reply
2 Replies

745 Views
gregoryvonfange
Contributor I

I think i may have an issue similar to this.  Are you aware if android was able to log anything?  Specifically a message like "W/SharedBufferStack( 2401): waitForCondition(LockCondition) timed out (identity=11, status=0). CPU may be pegged. trying again."

0 Kudos
Reply

745 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

I can't remember if there is such information in Android, but when the issue happens, only NAND flash will fail to work, CPU is still working, from serial console, we still can do something. So I think it is not the same issue as yours.

0 Kudos
Reply