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 Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux