Re: [PATCH] media: imon: make send_packet() more robust

From: Hillf Danton
Date: Wed Jul 16 2025 - 07:56:47 EST


On Wed, 16 Jul 2025 19:09:51 +0900 Tetsuo Handa wrote:
>On 2025/07/16 18:38, Sean Young wrote:
>> On Tue, Jul 15, 2025 at 09:30:02PM -0400, Alan Stern wrote:
>>> On Tue, Jul 15, 2025 at 09:19:18PM +0100, Sean Young wrote:
>>>> Hi Alan,
>>>>
>>>> On Sun, Jul 13, 2025 at 11:21:24AM -0400, Alan Stern wrote:
>>>>> On Sun, Jul 13, 2025 at 04:11:47PM +0800, Hillf Danton wrote:
>>>>>> [loop Alan in]
>>>>>
>>>>> I assume you're interested in the question of when to avoid resubmitting
>>>>> URBs.
>
> I think that what Hillf wanted to know (and I wanted maintainers of this
> driver to respond) is whether timeout of 10 seconds is reasonable
>
Yes. In product environments like car cockpit I have option like change
to BOM if urb 10s timedout in general could be reliably reproduced twice
a month for example.

> - /* Wait for transmission to complete (or abort) */
> - retval = wait_for_completion_interruptible(
> - &ictx->tx.finished);
> - if (retval) {
> + /* Wait for transmission to complete (or abort or timeout) */
> + retval = wait_for_completion_interruptible_timeout(&ictx->tx.finished, 10 * HZ);
>
> because the reproducer for this problem sometimes prevents
> usb_rx_callback_intf0() from being called. Unless we somehow
> handle such situation, the hung task reports won't go away.
>