Skip to content

Commit

Permalink
usb: cdnsp: Fixes incorrect value in ISOC TRB
Browse files Browse the repository at this point in the history
Fixes issue with priority of operator. Operator "|" priority is
higher then "? :".
To improve the readability the operator "? :" has been replaced with
"if ()" statement.

Fixes: 3d82904 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Signed-off-by: Peter Chen <peter.chen@kernel.org>
  • Loading branch information
pawellcdns authored and Peter Chen committed Mar 13, 2021
1 parent a38fd87 commit d0dcd90
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/usb/cdns3/cdnsp-ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -2197,7 +2197,10 @@ static int cdnsp_queue_isoc_tx(struct cdnsp_device *pdev,
* inverted in the first TDs isoc TRB.
*/
field = TRB_TYPE(TRB_ISOC) | TRB_TLBPC(last_burst_pkt) |
start_cycle ? 0 : 1 | TRB_SIA | TRB_TBC(burst_count);
TRB_SIA | TRB_TBC(burst_count);

if (!start_cycle)
field |= TRB_CYCLE;

/* Fill the rest of the TRB fields, and remaining normal TRBs. */
for (i = 0; i < trbs_per_td; i++) {
Expand Down

0 comments on commit d0dcd90

Please sign in to comment.