usb: dwc_otg: in some low-memory cases BURST_INCR16 mode will cause kernel crash
authorlyz <lyz@rock-chips.com>
Mon, 27 Oct 2014 06:49:38 +0000 (14:49 +0800)
committerlyz <lyz@rock-chips.com>
Mon, 27 Oct 2014 06:49:38 +0000 (14:49 +0800)
drivers/usb/dwc_otg_310/dwc_otg_cil.c

index 0e9676a79e2f4aae833ba95a59fada145cb087ce..653b2b600f91fe44936fa728cbd8381809dd09e4 100755 (executable)
@@ -1394,7 +1394,7 @@ void dwc_otg_core_init(dwc_otg_core_if_t *core_if)
                DWC_DEBUGPL(DBG_CIL, "Internal DMA Mode\n");
                /* Old value was DWC_GAHBCFG_INT_DMA_BURST_INCR - done for
                   Host mode ISOC in issue fix - vahrama */
-               ahbcfg.b.hburstlen = DWC_GAHBCFG_INT_DMA_BURST_INCR16;
+               ahbcfg.b.hburstlen = DWC_GAHBCFG_INT_DMA_BURST_INCR8;
                core_if->dma_enable = (core_if->core_params->dma_enable != 0);
                core_if->dma_desc_enable =
                    (core_if->core_params->dma_desc_enable != 0);
@@ -1714,7 +1714,7 @@ void dwc_otg_core_init_no_reset(dwc_otg_core_if_t *core_if)
                DWC_DEBUGPL(DBG_CIL, "Internal DMA Mode\n");
                /* Old value was DWC_GAHBCFG_INT_DMA_BURST_INCR - done for
                   Host mode ISOC in issue fix - vahrama */
-               ahbcfg.b.hburstlen = DWC_GAHBCFG_INT_DMA_BURST_INCR16;
+               ahbcfg.b.hburstlen = DWC_GAHBCFG_INT_DMA_BURST_INCR8;
                core_if->dma_enable = (core_if->core_params->dma_enable != 0);
                core_if->dma_desc_enable =
                    (core_if->core_params->dma_desc_enable != 0);
@@ -1973,7 +1973,7 @@ void dwc_otg_core_dev_init(dwc_otg_core_if_t *core_if)
        DWC_MODIFY_REG32(core_if->pcgcctl, pcgcctl.d32, 0);
        dwc_udelay(10);
 
-       gahbcfg.b.hburstlen = DWC_GAHBCFG_INT_DMA_BURST_INCR16;
+       gahbcfg.b.hburstlen = DWC_GAHBCFG_INT_DMA_BURST_INCR8;
        DWC_MODIFY_REG32(&global_regs->gahbcfg, 0, gahbcfg.b.hburstlen);
 
        /* Device configuration register */