aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc2/hcd_intr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/dwc2/hcd_intr.c')
-rw-r--r--drivers/usb/dwc2/hcd_intr.c98
1 files changed, 51 insertions, 47 deletions
diff --git a/drivers/usb/dwc2/hcd_intr.c b/drivers/usb/dwc2/hcd_intr.c
index b8f4b6aaf1d0..28a8210710b1 100644
--- a/drivers/usb/dwc2/hcd_intr.c
+++ b/drivers/usb/dwc2/hcd_intr.c
@@ -60,7 +60,7 @@ static void dwc2_track_missed_sofs(struct dwc2_hsotg *hsotg)
60 60
61 if (expected != curr_frame_number) 61 if (expected != curr_frame_number)
62 dwc2_sch_vdbg(hsotg, "MISSED SOF %04x != %04x\n", 62 dwc2_sch_vdbg(hsotg, "MISSED SOF %04x != %04x\n",
63 expected, curr_frame_number); 63 expected, curr_frame_number);
64 64
65#ifdef CONFIG_USB_DWC2_TRACK_MISSED_SOFS 65#ifdef CONFIG_USB_DWC2_TRACK_MISSED_SOFS
66 if (hsotg->frame_num_idx < FRAME_NUM_ARRAY_SIZE) { 66 if (hsotg->frame_num_idx < FRAME_NUM_ARRAY_SIZE) {
@@ -163,7 +163,7 @@ static void dwc2_sof_intr(struct dwc2_hsotg *hsotg)
163 * (micro)frame 163 * (micro)frame
164 */ 164 */
165 list_move_tail(&qh->qh_list_entry, 165 list_move_tail(&qh->qh_list_entry,
166 &hsotg->periodic_sched_ready); 166 &hsotg->periodic_sched_ready);
167 } 167 }
168 } 168 }
169 tr_type = dwc2_hcd_select_transactions(hsotg); 169 tr_type = dwc2_hcd_select_transactions(hsotg);
@@ -297,8 +297,7 @@ static void dwc2_hprt0_enable(struct dwc2_hsotg *hsotg, u32 hprt0,
297 HCFG_FSLSPCLKSEL_SHIFT; 297 HCFG_FSLSPCLKSEL_SHIFT;
298 298
299 if (prtspd == HPRT0_SPD_LOW_SPEED && 299 if (prtspd == HPRT0_SPD_LOW_SPEED &&
300 params->host_ls_low_power_phy_clk == 300 params->host_ls_low_power_phy_clk) {
301 DWC2_HOST_LS_LOW_POWER_PHY_CLK_PARAM_6MHZ) {
302 /* 6 MHZ */ 301 /* 6 MHZ */
303 dev_vdbg(hsotg->dev, 302 dev_vdbg(hsotg->dev,
304 "FS_PHY programming HCFG to 6 MHz\n"); 303 "FS_PHY programming HCFG to 6 MHz\n");
@@ -398,7 +397,7 @@ static void dwc2_port_intr(struct dwc2_hsotg *hsotg)
398 if (hsotg->params.dma_desc_fs_enable) { 397 if (hsotg->params.dma_desc_fs_enable) {
399 u32 hcfg; 398 u32 hcfg;
400 399
401 hsotg->params.dma_desc_enable = 0; 400 hsotg->params.dma_desc_enable = false;
402 hsotg->new_connection = false; 401 hsotg->new_connection = false;
403 hcfg = dwc2_readl(hsotg->regs + HCFG); 402 hcfg = dwc2_readl(hsotg->regs + HCFG);
404 hcfg &= ~HCFG_DESCDMA; 403 hcfg &= ~HCFG_DESCDMA;
@@ -442,7 +441,7 @@ static u32 dwc2_get_actual_xfer_length(struct dwc2_hsotg *hsotg,
442 count = (hctsiz & TSIZ_XFERSIZE_MASK) >> 441 count = (hctsiz & TSIZ_XFERSIZE_MASK) >>
443 TSIZ_XFERSIZE_SHIFT; 442 TSIZ_XFERSIZE_SHIFT;
444 length = chan->xfer_len - count; 443 length = chan->xfer_len - count;
445 if (short_read != NULL) 444 if (short_read)
446 *short_read = (count != 0); 445 *short_read = (count != 0);
447 } else if (chan->qh->do_split) { 446 } else if (chan->qh->do_split) {
448 length = qtd->ssplit_out_xfer_count; 447 length = qtd->ssplit_out_xfer_count;
@@ -604,7 +603,7 @@ static enum dwc2_halt_status dwc2_update_isoc_urb_state(
604 /* Skip whole frame */ 603 /* Skip whole frame */
605 if (chan->qh->do_split && 604 if (chan->qh->do_split &&
606 chan->ep_type == USB_ENDPOINT_XFER_ISOC && chan->ep_is_in && 605 chan->ep_type == USB_ENDPOINT_XFER_ISOC && chan->ep_is_in &&
607 hsotg->params.host_dma > 0) { 606 hsotg->params.host_dma) {
608 qtd->complete_split = 0; 607 qtd->complete_split = 0;
609 qtd->isoc_split_offset = 0; 608 qtd->isoc_split_offset = 0;
610 } 609 }
@@ -743,7 +742,7 @@ cleanup:
743 dwc2_hc_cleanup(hsotg, chan); 742 dwc2_hc_cleanup(hsotg, chan);
744 list_add_tail(&chan->hc_list_entry, &hsotg->free_hc_list); 743 list_add_tail(&chan->hc_list_entry, &hsotg->free_hc_list);
745 744
746 if (hsotg->params.uframe_sched > 0) { 745 if (hsotg->params.uframe_sched) {
747 hsotg->available_host_channels++; 746 hsotg->available_host_channels++;
748 } else { 747 } else {
749 switch (chan->ep_type) { 748 switch (chan->ep_type) {
@@ -789,7 +788,7 @@ static void dwc2_halt_channel(struct dwc2_hsotg *hsotg,
789 if (dbg_hc(chan)) 788 if (dbg_hc(chan))
790 dev_vdbg(hsotg->dev, "%s()\n", __func__); 789 dev_vdbg(hsotg->dev, "%s()\n", __func__);
791 790
792 if (hsotg->params.host_dma > 0) { 791 if (hsotg->params.host_dma) {
793 if (dbg_hc(chan)) 792 if (dbg_hc(chan))
794 dev_vdbg(hsotg->dev, "DMA enabled\n"); 793 dev_vdbg(hsotg->dev, "DMA enabled\n");
795 dwc2_release_channel(hsotg, chan, qtd, halt_status); 794 dwc2_release_channel(hsotg, chan, qtd, halt_status);
@@ -823,7 +822,7 @@ static void dwc2_halt_channel(struct dwc2_hsotg *hsotg,
823 * processed. 822 * processed.
824 */ 823 */
825 list_move_tail(&chan->qh->qh_list_entry, 824 list_move_tail(&chan->qh->qh_list_entry,
826 &hsotg->periodic_sched_assigned); 825 &hsotg->periodic_sched_assigned);
827 826
828 /* 827 /*
829 * Make sure the Periodic Tx FIFO Empty interrupt is 828 * Make sure the Periodic Tx FIFO Empty interrupt is
@@ -979,7 +978,7 @@ static void dwc2_hc_xfercomp_intr(struct dwc2_hsotg *hsotg,
979 978
980 pipe_type = dwc2_hcd_get_pipe_type(&urb->pipe_info); 979 pipe_type = dwc2_hcd_get_pipe_type(&urb->pipe_info);
981 980
982 if (hsotg->params.dma_desc_enable > 0) { 981 if (hsotg->params.dma_desc_enable) {
983 dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum, halt_status); 982 dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum, halt_status);
984 if (pipe_type == USB_ENDPOINT_XFER_ISOC) 983 if (pipe_type == USB_ENDPOINT_XFER_ISOC)
985 /* Do not disable the interrupt, just clear it */ 984 /* Do not disable the interrupt, just clear it */
@@ -990,7 +989,7 @@ static void dwc2_hc_xfercomp_intr(struct dwc2_hsotg *hsotg,
990 /* Handle xfer complete on CSPLIT */ 989 /* Handle xfer complete on CSPLIT */
991 if (chan->qh->do_split) { 990 if (chan->qh->do_split) {
992 if (chan->ep_type == USB_ENDPOINT_XFER_ISOC && chan->ep_is_in && 991 if (chan->ep_type == USB_ENDPOINT_XFER_ISOC && chan->ep_is_in &&
993 hsotg->params.host_dma > 0) { 992 hsotg->params.host_dma) {
994 if (qtd->complete_split && 993 if (qtd->complete_split &&
995 dwc2_xfercomp_isoc_split_in(hsotg, chan, chnum, 994 dwc2_xfercomp_isoc_split_in(hsotg, chan, chnum,
996 qtd)) 995 qtd))
@@ -1078,7 +1077,8 @@ static void dwc2_hc_xfercomp_intr(struct dwc2_hsotg *hsotg,
1078 dev_vdbg(hsotg->dev, " Isochronous transfer complete\n"); 1077 dev_vdbg(hsotg->dev, " Isochronous transfer complete\n");
1079 if (qtd->isoc_split_pos == DWC2_HCSPLT_XACTPOS_ALL) 1078 if (qtd->isoc_split_pos == DWC2_HCSPLT_XACTPOS_ALL)
1080 halt_status = dwc2_update_isoc_urb_state(hsotg, chan, 1079 halt_status = dwc2_update_isoc_urb_state(hsotg, chan,
1081 chnum, qtd, DWC2_HC_XFER_COMPLETE); 1080 chnum, qtd,
1081 DWC2_HC_XFER_COMPLETE);
1082 dwc2_complete_periodic_xfer(hsotg, chan, chnum, qtd, 1082 dwc2_complete_periodic_xfer(hsotg, chan, chnum, qtd,
1083 halt_status); 1083 halt_status);
1084 break; 1084 break;
@@ -1102,7 +1102,7 @@ static void dwc2_hc_stall_intr(struct dwc2_hsotg *hsotg,
1102 dev_dbg(hsotg->dev, "--Host Channel %d Interrupt: STALL Received--\n", 1102 dev_dbg(hsotg->dev, "--Host Channel %d Interrupt: STALL Received--\n",
1103 chnum); 1103 chnum);
1104 1104
1105 if (hsotg->params.dma_desc_enable > 0) { 1105 if (hsotg->params.dma_desc_enable) {
1106 dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum, 1106 dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum,
1107 DWC2_HC_XFER_STALL); 1107 DWC2_HC_XFER_STALL);
1108 goto handle_stall_done; 1108 goto handle_stall_done;
@@ -1212,7 +1212,7 @@ static void dwc2_hc_nak_intr(struct dwc2_hsotg *hsotg,
1212 switch (dwc2_hcd_get_pipe_type(&qtd->urb->pipe_info)) { 1212 switch (dwc2_hcd_get_pipe_type(&qtd->urb->pipe_info)) {
1213 case USB_ENDPOINT_XFER_CONTROL: 1213 case USB_ENDPOINT_XFER_CONTROL:
1214 case USB_ENDPOINT_XFER_BULK: 1214 case USB_ENDPOINT_XFER_BULK:
1215 if (hsotg->params.host_dma > 0 && chan->ep_is_in) { 1215 if (hsotg->params.host_dma && chan->ep_is_in) {
1216 /* 1216 /*
1217 * NAK interrupts are enabled on bulk/control IN 1217 * NAK interrupts are enabled on bulk/control IN
1218 * transfers in DMA mode for the sole purpose of 1218 * transfers in DMA mode for the sole purpose of
@@ -1358,7 +1358,7 @@ static void dwc2_hc_nyet_intr(struct dwc2_hsotg *hsotg,
1358 */ 1358 */
1359 if (chan->do_split && chan->complete_split) { 1359 if (chan->do_split && chan->complete_split) {
1360 if (chan->ep_is_in && chan->ep_type == USB_ENDPOINT_XFER_ISOC && 1360 if (chan->ep_is_in && chan->ep_type == USB_ENDPOINT_XFER_ISOC &&
1361 hsotg->params.host_dma > 0) { 1361 hsotg->params.host_dma) {
1362 qtd->complete_split = 0; 1362 qtd->complete_split = 0;
1363 qtd->isoc_split_offset = 0; 1363 qtd->isoc_split_offset = 0;
1364 qtd->isoc_frame_index++; 1364 qtd->isoc_frame_index++;
@@ -1379,7 +1379,7 @@ static void dwc2_hc_nyet_intr(struct dwc2_hsotg *hsotg,
1379 struct dwc2_qh *qh = chan->qh; 1379 struct dwc2_qh *qh = chan->qh;
1380 bool past_end; 1380 bool past_end;
1381 1381
1382 if (hsotg->params.uframe_sched <= 0) { 1382 if (!hsotg->params.uframe_sched) {
1383 int frnum = dwc2_hcd_get_frame_number(hsotg); 1383 int frnum = dwc2_hcd_get_frame_number(hsotg);
1384 1384
1385 /* Don't have num_hs_transfers; simple logic */ 1385 /* Don't have num_hs_transfers; simple logic */
@@ -1389,22 +1389,27 @@ static void dwc2_hc_nyet_intr(struct dwc2_hsotg *hsotg,
1389 int end_frnum; 1389 int end_frnum;
1390 1390
1391 /* 1391 /*
1392 * Figure out the end frame based on schedule. 1392 * Figure out the end frame based on
1393 * 1393 * schedule.
1394 * We don't want to go on trying again and again 1394 *
1395 * forever. Let's stop when we've done all the 1395 * We don't want to go on trying again
1396 * transfers that were scheduled. 1396 * and again forever. Let's stop when
1397 * 1397 * we've done all the transfers that
1398 * We're going to be comparing start_active_frame 1398 * were scheduled.
1399 * and next_active_frame, both of which are 1 1399 *
1400 * before the time the packet goes on the wire, 1400 * We're going to be comparing
1401 * so that cancels out. Basically if had 1 1401 * start_active_frame and
1402 * transfer and we saw 1 NYET then we're done. 1402 * next_active_frame, both of which
1403 * We're getting a NYET here so if next >= 1403 * are 1 before the time the packet
1404 * (start + num_transfers) we're done. The 1404 * goes on the wire, so that cancels
1405 * complexity is that for all but ISOC_OUT we 1405 * out. Basically if had 1 transfer
1406 * skip one slot. 1406 * and we saw 1 NYET then we're done.
1407 */ 1407 * We're getting a NYET here so if
1408 * next >= (start + num_transfers)
1409 * we're done. The complexity is that
1410 * for all but ISOC_OUT we skip one
1411 * slot.
1412 */
1408 end_frnum = dwc2_frame_num_inc( 1413 end_frnum = dwc2_frame_num_inc(
1409 qh->start_active_frame, 1414 qh->start_active_frame,
1410 qh->num_hs_transfers); 1415 qh->num_hs_transfers);
@@ -1472,7 +1477,7 @@ static void dwc2_hc_babble_intr(struct dwc2_hsotg *hsotg,
1472 1477
1473 dwc2_hc_handle_tt_clear(hsotg, chan, qtd); 1478 dwc2_hc_handle_tt_clear(hsotg, chan, qtd);
1474 1479
1475 if (hsotg->params.dma_desc_enable > 0) { 1480 if (hsotg->params.dma_desc_enable) {
1476 dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum, 1481 dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum,
1477 DWC2_HC_XFER_BABBLE_ERR); 1482 DWC2_HC_XFER_BABBLE_ERR);
1478 goto disable_int; 1483 goto disable_int;
@@ -1577,7 +1582,7 @@ static void dwc2_hc_ahberr_intr(struct dwc2_hsotg *hsotg,
1577 dev_err(hsotg->dev, " Interval: %d\n", urb->interval); 1582 dev_err(hsotg->dev, " Interval: %d\n", urb->interval);
1578 1583
1579 /* Core halts the channel for Descriptor DMA mode */ 1584 /* Core halts the channel for Descriptor DMA mode */
1580 if (hsotg->params.dma_desc_enable > 0) { 1585 if (hsotg->params.dma_desc_enable) {
1581 dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum, 1586 dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum,
1582 DWC2_HC_XFER_AHB_ERR); 1587 DWC2_HC_XFER_AHB_ERR);
1583 goto handle_ahberr_done; 1588 goto handle_ahberr_done;
@@ -1609,7 +1614,7 @@ static void dwc2_hc_xacterr_intr(struct dwc2_hsotg *hsotg,
1609 1614
1610 dwc2_hc_handle_tt_clear(hsotg, chan, qtd); 1615 dwc2_hc_handle_tt_clear(hsotg, chan, qtd);
1611 1616
1612 if (hsotg->params.dma_desc_enable > 0) { 1617 if (hsotg->params.dma_desc_enable) {
1613 dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum, 1618 dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum,
1614 DWC2_HC_XFER_XACT_ERR); 1619 DWC2_HC_XFER_XACT_ERR);
1615 goto handle_xacterr_done; 1620 goto handle_xacterr_done;
@@ -1620,7 +1625,6 @@ static void dwc2_hc_xacterr_intr(struct dwc2_hsotg *hsotg,
1620 case USB_ENDPOINT_XFER_BULK: 1625 case USB_ENDPOINT_XFER_BULK:
1621 qtd->error_count++; 1626 qtd->error_count++;
1622 if (!chan->qh->ping_state) { 1627 if (!chan->qh->ping_state) {
1623
1624 dwc2_update_urb_state_abn(hsotg, chan, chnum, qtd->urb, 1628 dwc2_update_urb_state_abn(hsotg, chan, chnum, qtd->urb,
1625 qtd, DWC2_HC_XFER_XACT_ERR); 1629 qtd, DWC2_HC_XFER_XACT_ERR);
1626 dwc2_hcd_save_data_toggle(hsotg, chan, chnum, qtd); 1630 dwc2_hcd_save_data_toggle(hsotg, chan, chnum, qtd);
@@ -1645,7 +1649,7 @@ static void dwc2_hc_xacterr_intr(struct dwc2_hsotg *hsotg,
1645 enum dwc2_halt_status halt_status; 1649 enum dwc2_halt_status halt_status;
1646 1650
1647 halt_status = dwc2_update_isoc_urb_state(hsotg, chan, 1651 halt_status = dwc2_update_isoc_urb_state(hsotg, chan,
1648 chnum, qtd, DWC2_HC_XFER_XACT_ERR); 1652 chnum, qtd, DWC2_HC_XFER_XACT_ERR);
1649 dwc2_halt_channel(hsotg, chan, qtd, halt_status); 1653 dwc2_halt_channel(hsotg, chan, qtd, halt_status);
1650 } 1654 }
1651 break; 1655 break;
@@ -1803,8 +1807,8 @@ static void dwc2_hc_chhltd_intr_dma(struct dwc2_hsotg *hsotg,
1803 1807
1804 if (chan->halt_status == DWC2_HC_XFER_URB_DEQUEUE || 1808 if (chan->halt_status == DWC2_HC_XFER_URB_DEQUEUE ||
1805 (chan->halt_status == DWC2_HC_XFER_AHB_ERR && 1809 (chan->halt_status == DWC2_HC_XFER_AHB_ERR &&
1806 hsotg->params.dma_desc_enable <= 0)) { 1810 !hsotg->params.dma_desc_enable)) {
1807 if (hsotg->params.dma_desc_enable > 0) 1811 if (hsotg->params.dma_desc_enable)
1808 dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum, 1812 dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum,
1809 chan->halt_status); 1813 chan->halt_status);
1810 else 1814 else
@@ -1835,7 +1839,7 @@ static void dwc2_hc_chhltd_intr_dma(struct dwc2_hsotg *hsotg,
1835 } else if (chan->hcint & HCINTMSK_STALL) { 1839 } else if (chan->hcint & HCINTMSK_STALL) {
1836 dwc2_hc_stall_intr(hsotg, chan, chnum, qtd); 1840 dwc2_hc_stall_intr(hsotg, chan, chnum, qtd);
1837 } else if ((chan->hcint & HCINTMSK_XACTERR) && 1841 } else if ((chan->hcint & HCINTMSK_XACTERR) &&
1838 hsotg->params.dma_desc_enable <= 0) { 1842 !hsotg->params.dma_desc_enable) {
1839 if (out_nak_enh) { 1843 if (out_nak_enh) {
1840 if (chan->hcint & 1844 if (chan->hcint &
1841 (HCINTMSK_NYET | HCINTMSK_NAK | HCINTMSK_ACK)) { 1845 (HCINTMSK_NYET | HCINTMSK_NAK | HCINTMSK_ACK)) {
@@ -1855,10 +1859,10 @@ static void dwc2_hc_chhltd_intr_dma(struct dwc2_hsotg *hsotg,
1855 */ 1859 */
1856 dwc2_hc_xacterr_intr(hsotg, chan, chnum, qtd); 1860 dwc2_hc_xacterr_intr(hsotg, chan, chnum, qtd);
1857 } else if ((chan->hcint & HCINTMSK_XCS_XACT) && 1861 } else if ((chan->hcint & HCINTMSK_XCS_XACT) &&
1858 hsotg->params.dma_desc_enable > 0) { 1862 hsotg->params.dma_desc_enable) {
1859 dwc2_hc_xacterr_intr(hsotg, chan, chnum, qtd); 1863 dwc2_hc_xacterr_intr(hsotg, chan, chnum, qtd);
1860 } else if ((chan->hcint & HCINTMSK_AHBERR) && 1864 } else if ((chan->hcint & HCINTMSK_AHBERR) &&
1861 hsotg->params.dma_desc_enable > 0) { 1865 hsotg->params.dma_desc_enable) {
1862 dwc2_hc_ahberr_intr(hsotg, chan, chnum, qtd); 1866 dwc2_hc_ahberr_intr(hsotg, chan, chnum, qtd);
1863 } else if (chan->hcint & HCINTMSK_BBLERR) { 1867 } else if (chan->hcint & HCINTMSK_BBLERR) {
1864 dwc2_hc_babble_intr(hsotg, chan, chnum, qtd); 1868 dwc2_hc_babble_intr(hsotg, chan, chnum, qtd);
@@ -1951,7 +1955,7 @@ static void dwc2_hc_chhltd_intr(struct dwc2_hsotg *hsotg,
1951 dev_vdbg(hsotg->dev, "--Host Channel %d Interrupt: Channel Halted--\n", 1955 dev_vdbg(hsotg->dev, "--Host Channel %d Interrupt: Channel Halted--\n",
1952 chnum); 1956 chnum);
1953 1957
1954 if (hsotg->params.host_dma > 0) { 1958 if (hsotg->params.host_dma) {
1955 dwc2_hc_chhltd_intr_dma(hsotg, chan, chnum, qtd); 1959 dwc2_hc_chhltd_intr_dma(hsotg, chan, chnum, qtd);
1956 } else { 1960 } else {
1957 if (!dwc2_halt_status_ok(hsotg, chan, chnum, qtd)) 1961 if (!dwc2_halt_status_ok(hsotg, chan, chnum, qtd))
@@ -1970,7 +1974,7 @@ static bool dwc2_check_qtd_still_ok(struct dwc2_qtd *qtd, struct dwc2_qh *qh)
1970{ 1974{
1971 struct dwc2_qtd *cur_head; 1975 struct dwc2_qtd *cur_head;
1972 1976
1973 if (qh == NULL) 1977 if (!qh)
1974 return false; 1978 return false;
1975 1979
1976 cur_head = list_first_entry(&qh->qtd_list, struct dwc2_qtd, 1980 cur_head = list_first_entry(&qh->qtd_list, struct dwc2_qtd,
@@ -2028,7 +2032,7 @@ static void dwc2_hc_n_intr(struct dwc2_hsotg *hsotg, int chnum)
2028 * interrupt unmasked 2032 * interrupt unmasked
2029 */ 2033 */
2030 WARN_ON(hcint != HCINTMSK_CHHLTD); 2034 WARN_ON(hcint != HCINTMSK_CHHLTD);
2031 if (hsotg->params.dma_desc_enable > 0) 2035 if (hsotg->params.dma_desc_enable)
2032 dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum, 2036 dwc2_hcd_complete_xfer_ddma(hsotg, chan, chnum,
2033 chan->halt_status); 2037 chan->halt_status);
2034 else 2038 else
@@ -2056,7 +2060,7 @@ static void dwc2_hc_n_intr(struct dwc2_hsotg *hsotg, int chnum)
2056 qtd = list_first_entry(&chan->qh->qtd_list, struct dwc2_qtd, 2060 qtd = list_first_entry(&chan->qh->qtd_list, struct dwc2_qtd,
2057 qtd_list_entry); 2061 qtd_list_entry);
2058 2062
2059 if (hsotg->params.host_dma <= 0) { 2063 if (!hsotg->params.host_dma) {
2060 if ((hcint & HCINTMSK_CHHLTD) && hcint != HCINTMSK_CHHLTD) 2064 if ((hcint & HCINTMSK_CHHLTD) && hcint != HCINTMSK_CHHLTD)
2061 hcint &= ~HCINTMSK_CHHLTD; 2065 hcint &= ~HCINTMSK_CHHLTD;
2062 } 2066 }