On 3/22/22 01:42, qianfan wrote:
在 2022/3/22 15:21, OGAWA Hirofumi 写道:
qianfan <qianfanguijin@xxxxxxx> writes:
Hi:
I am tesing usb storage on linux v5.15, found that the system is resetting when the
usb storage(fat32 format) was removed while copying. Besides my custom board
has a gpio-watchdog with 1.6s timeout.
Looks like I/O error by unplugging usb while reading data pages for
readahead, then your watchdog detected some state to reset system.
If you disabled watchdog, it works as normal soon or later? If so, FAT
would not be able to do much (maybe ratelimit I/O error to mitigate
serial console overhead), request is from userspace or upper layer in
kernel.
I had changed console to ttynull and the system doesn't reset again. kernel driver generate lots of error messages when usb storage is disconnected:
$ dmesg | grep 'FAT read failed' | wc -l
608
usb storage can work again when reconnected.
The gpio watchdog depends on hrtimer, maybe printk in ISR delayed hrtimer that cause watchdog reset.
Exactly. We had a similar problem recently, also related to the gpio watchdog.
I think the system ends up in a loop, retrying block 1162. Key for fixing
the problem will be to find the function causing the loop.
Guenter