Skip to content

Commit 2e52974

Browse files
committed
Merge pull request #913 from Clouded/rpi-3.18.y-nonfiqusbfix
Guard fiq_fsm_spin_lock with fiq_enable check
2 parents 7defc7b + 690158b commit 2e52974

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

drivers/usb/host/dwc_otg/dwc_otg_hcd.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,17 +1414,25 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh)
14141414
dwc_otg_hc_init(hcd->core_if, hc);
14151415

14161416
local_irq_save(flags);
1417-
local_fiq_disable();
1418-
fiq_fsm_spin_lock(&hcd->fiq_state->lock);
1417+
1418+
if (fiq_enable) {
1419+
local_fiq_disable();
1420+
fiq_fsm_spin_lock(&hcd->fiq_state->lock);
1421+
}
1422+
14191423
/* Enable the top level host channel interrupt. */
14201424
intr_enable = (1 << hc->hc_num);
14211425
DWC_MODIFY_REG32(&hcd->core_if->host_if->host_global_regs->haintmsk, 0, intr_enable);
14221426

14231427
/* Make sure host channel interrupts are enabled. */
14241428
gintmsk.b.hcintr = 1;
14251429
DWC_MODIFY_REG32(&hcd->core_if->core_global_regs->gintmsk, 0, gintmsk.d32);
1426-
fiq_fsm_spin_unlock(&hcd->fiq_state->lock);
1427-
local_fiq_enable();
1430+
1431+
if (fiq_enable) {
1432+
fiq_fsm_spin_unlock(&hcd->fiq_state->lock);
1433+
local_fiq_enable();
1434+
}
1435+
14281436
local_irq_restore(flags);
14291437
hc->qh = qh;
14301438
}

0 commit comments

Comments
 (0)