public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: qianfan <qianfanguijin@163.com>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Guenter Roeck <linux@roeck-us.net>,
	linux-watchdog@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-usb@vger.kernel.org
Subject: Re: linux resetting when the usb storage was removed while copying
Date: Wed, 30 Mar 2022 09:10:06 +0800	[thread overview]
Message-ID: <7ea53bf4-9f2f-2120-d7eb-b2292fa9f156@163.com> (raw)
In-Reply-To: <87ilrxgibb.fsf@mail.parknet.co.jp>


在 2022/3/29 18:32, OGAWA Hirofumi 写道:
> qianfan <qianfanguijin@163.com> writes:
>
>>> This limits the rate of messages. Can you try if a this patch fixes behavior?
>> Yes, this patch fixed the problem and watchdog doesn't reset again.
>>
>> Next is the console log when usb storage disconnected:
> [...]
>
>> cp: read error: Input/output error
>> # [  218.253995] FAT-fs (sda1): FAT read failed (blocknr 1130)
>>
>> 'FAT read failed' error message printed only once.
>>
>> Interesting.
> Hm, message should print 10 times, then is suppressed. So this time, the
> test may not reproduced. Can your test reproduces the issue reliably?

Right.

I found copy file from usb storage to tmpfs or ubifs has the different 
behaviors. I got only one error message when copy to tmpfs and got 10 error 
messages when copy to ubifs. Next is the log when copy to ubifs:

[  313.767873] musb-hdrc musb-hdrc.0: ep2 RX three-strikes error
[  314.594767] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 
driverbyte=DRIVER_OK cmd_age=0s
[  314.604930] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 03 92 b6 00 00 
f0 00
[  314.612882] blk_update_request: I/O error, dev sda, sector 234166 op 
0x0:(READ) flags 0x84700 phys_seg 2 prio class 0
[  314.625613] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 
driverbyte=DRIVER_OK cmd_age=0s
[  314.635768] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 03 93 a6 00 00 
10 00
[  314.643746] blk_update_request: I/O error, dev sda, sector 234406 op 
0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[  314.656025] usb 1-1: USB disconnect, device number 4
[  314.674700] blk_update_request: I/O error, dev sda, sector 1405 op 0x0:(READ) 
flags 0x0 phys_seg 1 prio class 0
[  314.685673] FAT-fs (sda1): FAT read failed (blocknr 1343)
[  314.691490] FAT-fs (sda1): FAT read failed (blocknr 1343)
[  314.697294] FAT-fs (sda1): FAT read failed (blocknr 1343)
[  314.702987] FAT-fs (sda1): FAT read failed (blocknr 1343)
[  314.708685] FAT-fs (sda1): FAT read failed (blocknr 1343)
[  314.714377] FAT-fs (sda1): FAT read failed (blocknr 1343)
[  314.720074] FAT-fs (sda1): FAT read failed (blocknr 1343)
[  314.725799] FAT-fs (sda1): FAT read failed (blocknr 1343)
[  314.731480] FAT-fs (sda1): FAT read failed (blocknr 1343)
[  314.737186] FAT-fs (sda1): FAT read failed (blocknr 1343)

My gpio watchdog toggle every 100ms and I sniffer watchdog toggle signal and 
uart console, watchdog toggle time is 119ms when those message printed, delayed 
19ms.

This patch can really solve this problem, thanks.

>
> Well, anyway, the patch looks like working.
>
> Thanks.


      reply	other threads:[~2022-03-30  1:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1cc135e3-741f-e7d6-5d0a-fef319832a4c@163.com>
2022-03-22  7:21 ` linux resetting when the usb storage was removed while copying OGAWA Hirofumi
2022-03-22  8:42   ` qianfan
2022-03-22 12:31     ` Guenter Roeck
2022-03-28  5:48       ` OGAWA Hirofumi
2022-03-29  9:08         ` qianfan
2022-03-29 10:32           ` OGAWA Hirofumi
2022-03-30  1:10             ` qianfan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ea53bf4-9f2f-2120-d7eb-b2292fa9f156@163.com \
    --to=qianfanguijin@163.com \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox