Re: [PATCH v4 1/1] xhci: Correctly handle last TRB of isoc TD on Etron xHCI host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  	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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux