can not receive xfer interrupt after stop xfer is called intel XHCI Gemini Lake SOC

Shichun.Ma at dell.com Shichun.Ma at dell.com
Tue Dec 31 00:23:32 UTC 2019


Dell Customer Communication - Confidential

Hi HPS,

It's already in stopped status. I am also confusing on the root cause.
I attached the test application and my patch for the xhci stop xfer workaround solution.
The confusing points:
1. cancel xfer error can be reproduced on all CCID smart readers (I have tested three different model of readers);
2. keyboard has similar endpoint attribution, while I can't reproduce similar problem on the keyboard;

Do xfer and cancel xfer can be called umagic_sysctl_doxfer/umagic_sysctl_cancelxfer in umagic.c

Regards,

Horse Ma (Shichun Ma)

Software Engineer
Dell | Cloud client-computing - Wyse
office +86 10 82862579,  Mobile +86 13241851528

See our products at www.dell.com/wyse

-----Original Message-----
From: Hans Petter Selasky <hps at selasky.org> 
Sent: Friday, December 27, 2019 4:28 PM
To: Ma, Horse; freebsd-usb at freebsd.org
Cc: Hu, Shunchao
Subject: Re: can not receive xfer interrupt after stop xfer is called intel XHCI Gemini Lake SOC


[EXTERNAL EMAIL] 

On 2019-12-27 02:50, Shichun.Ma at dell.com wrote:
> Hi HPS,
> XHCI spec just tells:
> The configure Endpoint command TRB evalutes the bandwidth and resouce reqirement of the endpoints selected by the command.
> So I don't think this command can be call to one endpoint several times.

Hi,

When you have alternate interface settings for the same endpoint, how can you then update the max packet size, if the endpoint can't be re-configured?

Are we missing some XHCI command before configure, like stop endpoint?

> How, I tried to call configure endpoint with DC (disable configure), it can't help.
> 
>>From XHCI spec's view, "reset Endpoint command" is enough to stop xfer.
> 

In this piece of code, does it help to stop the endpoint before you configure?

>         /* configure endpoint */
> 
>         err = xhci_configure_endpoint_by_xfer(xfer);
> 
>         if (err != 0) {
>                 XHCI_CMD_UNLOCK(sc);
>                 return (err);
>         }
> 
>         /*
>          * Get the endpoint into the stopped state according to the
>          * endpoint context state diagram in the XHCI specification:
>          */
> 
>         err = xhci_cmd_stop_ep(sc, 0, epno, index);
> 
>         if (err != 0)
>                 DPRINTF("Could not stop endpoint %u\n", epno);

Thanks for notifying us about this issue.

--HPS
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: umagic.c
URL: <http://lists.freebsd.org/pipermail/freebsd-usb/attachments/20191231/8f75ba6a/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xhci_stop_xfer.diff
Type: application/octet-stream
Size: 4181 bytes
Desc: xhci_stop_xfer.diff
URL: <http://lists.freebsd.org/pipermail/freebsd-usb/attachments/20191231/8f75ba6a/attachment.obj>


More information about the freebsd-usb mailing list