[PATCH v2] usb: xhci: fix lack of short packet event trb handling

Bin Meng bmeng.cn at gmail.com
Mon Nov 16 07:55:07 CET 2020


Hi Ran,

On Mon, Nov 16, 2020 at 2:38 PM Ran Wang <ran.wang_1 at nxp.com> wrote:
>
> For bulk IN transfer, the codes will set ISP flag to request event TRB
> being generated by xHC for case of short packet. So in

for the case of

> buffer-cross-64K-boundary case (which we will divide payload and enqueuqe
> more than 1 transfer TRB), if the first TRB ends up with a short packet
> condition it will trigger an short packet code transfer event per that
> flag and cause more than 1 event TRB gegerated for this transfer.

typo: generated

>
> However, current codes will only handle the first transfer event TRB
> then mark current transfer completed, which causing next transfer

which causing => causing

> failure due to event TRB mis-match.
>
> Such issue has been observed on some Layerscape platforms (LS1028A,
> LS1088A, etc) with USB ethernet device

nits: missing ending period

>
> This patch adds a loop to make sure the event TRB for last transfer TRB
> has been  handled in time.

nits: please remove one space before `handled`

>
> Signed-off-by: Ran Wang <ran.wang_1 at nxp.com>
> ---
> Change in v2:
>  - Re-write commit message to describe context more clearly.
>  - Add prefix 'le64_to_cpu' for 'event->trans_event.buffer'.
>
>  drivers/usb/host/xhci-ring.c | 17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
>

Other than above,
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>

Regards,
Bin


More information about the U-Boot mailing list