[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250205224511.00e52a44@foxbook>
Date: Wed, 5 Feb 2025 22:45:11 +0100
From: MichaĆ Pecio <michal.pecio@...il.com>
To: ki.chiang65@...il.com
Cc: gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org, mathias.nyman@...el.com, stable@...r.kernel.org
Subject: Re: [PATCH v4 1/1] xhci: Correctly handle last TRB of isoc TD on
Etron xHCI host
> case COMP_STOPPED:
> + /* Think of it as the final event if TD had an error */
> + if (td->error_mid_td)
> + td->error_mid_td = false;
> sum_trbs_for_length = true;
> break;
What was the reason for this part?
As written it is going to cause problems, the driver will forget about
earlier errors if the endpoint is stopped and resumed on the same TD.
I think that the whole patch could be much simpler, like:
case X_ERROR:
frame->status = X;
td->error_mid_td = true;
break;
case Y_ERROR:
frame->status = Y;
td->error_mid_td = true;
break;
and then
if (error_mid_td && (ep_trb != td->end_trb || ETRON && SUPERSPEED)) {
// error mid TD, wait for final event
}
finish_td()
Regards,
Michal
Powered by blists - more mailing lists