|
|
@@ -51,6 +51,8 @@
|
|
|
#include "core.h"
|
|
|
#include "hcd.h"
|
|
|
|
|
|
+extern uint8_t interrupt_get_nest(void);
|
|
|
+
|
|
|
int usb_urb_dir_in(struct urb *urb)
|
|
|
{
|
|
|
return (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_IN;
|
|
|
@@ -3416,6 +3418,11 @@ static void dwc2_process_non_periodic_channels(struct dwc2_hsotg *hsotg)
|
|
|
* Process once through the active list or until no more space is
|
|
|
* available in the request queue or the Tx FIFO
|
|
|
*/
|
|
|
+
|
|
|
+ if(interrupt_get_nest() == 0) {
|
|
|
+ portENTER_CRITICAL();
|
|
|
+ }
|
|
|
+
|
|
|
do {
|
|
|
tx_status = dwc2_readl(hsotg->regs + GNPTXSTS);
|
|
|
qspcavail = (tx_status & TXSTS_QSPCAVAIL_MASK) >>
|
|
|
@@ -3463,6 +3470,10 @@ next:
|
|
|
#endif
|
|
|
} while (hsotg->non_periodic_qh_ptr != orig_qh_ptr);
|
|
|
|
|
|
+ if(interrupt_get_nest() == 0) {
|
|
|
+ portEXIT_CRITICAL();
|
|
|
+ }
|
|
|
+
|
|
|
if (!hsotg->params.host_dma) {
|
|
|
tx_status = dwc2_readl(hsotg->regs + GNPTXSTS);
|
|
|
qspcavail = (tx_status & TXSTS_QSPCAVAIL_MASK) >>
|