summaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdnsp-ring.c
diff options
context:
space:
mode:
authorPawel Laszczak <pawell@cadence.com>2021-03-08 10:31:03 +0300
committerPeter Chen <peter.chen@kernel.org>2021-03-13 17:03:24 +0300
commitd0dcd90b7f472691de122515eb0d1765808b6d91 (patch)
tree9953504c43b595f6015c6d847894e68a330e490b /drivers/usb/cdns3/cdnsp-ring.c
parenta38fd8748464831584a19438cbb3082b5a2dab15 (diff)
downloadlinux-d0dcd90b7f472691de122515eb0d1765808b6d91.tar.xz
usb: cdnsp: Fixes incorrect value in ISOC TRB
Fixes issue with priority of operator. Operator "|" priority is higher then "? :". To improve the readability the operator "? :" has been replaced with "if ()" statement. Fixes: 3d82904559f4 ("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>
Diffstat (limited to 'drivers/usb/cdns3/cdnsp-ring.c')
-rw-r--r--drivers/usb/cdns3/cdnsp-ring.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/cdns3/cdnsp-ring.c b/drivers/usb/cdns3/cdnsp-ring.c
index f9170d177a89..5f0513c96c04 100644
--- a/drivers/usb/cdns3/cdnsp-ring.c
+++ b/drivers/usb/cdns3/cdnsp-ring.c
@@ -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++) {