Set chain bit correctly. This will fix some problems sending and
receiving Zero Length Packets, ZLPs. See comment in code for more information. MFC after: 1 week Reported by: Kohji Okuno <okuno.kohji@jp.panasonic.com>
This commit is contained in:
parent
2634da8cd5
commit
27ce2fd67c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=259248
@ -1892,7 +1892,16 @@ xhci_setup_generic_chain_sub(struct xhci_std_temp *temp)
|
||||
td->td_trb[x].dwTrb2 = htole32(dword);
|
||||
|
||||
dword = XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_LINK) |
|
||||
XHCI_TRB_3_CYCLE_BIT | XHCI_TRB_3_IOC_BIT;
|
||||
XHCI_TRB_3_CYCLE_BIT | XHCI_TRB_3_IOC_BIT |
|
||||
/*
|
||||
* CHAIN-BIT: Ensure that a multi-TRB IN-endpoint
|
||||
* frame only receives a single short packet event
|
||||
* by setting the CHAIN bit in the LINK field. In
|
||||
* addition some XHCI controllers have problems
|
||||
* sending a ZLP unless the CHAIN-BIT is set in
|
||||
* the LINK TRB.
|
||||
*/
|
||||
XHCI_TRB_3_CHAIN_BIT;
|
||||
|
||||
td->td_trb[x].dwTrb3 = htole32(dword);
|
||||
|
||||
@ -1930,7 +1939,7 @@ xhci_setup_generic_chain_sub(struct xhci_std_temp *temp)
|
||||
}
|
||||
|
||||
/* clear TD SIZE to zero, hence this is the last TRB */
|
||||
/* remove chain bit because this is the last TRB in the chain */
|
||||
/* remove chain bit because this is the last data TRB in the chain */
|
||||
td->td_trb[td->ntrb - 1].dwTrb2 &= ~htole32(XHCI_TRB_2_TDSZ_SET(15));
|
||||
td->td_trb[td->ntrb - 1].dwTrb3 &= ~htole32(XHCI_TRB_3_CHAIN_BIT);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user