mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 10:08:59 +00:00
27dddb67c0
Refreshed all patches. Fixes: - CVE-2019-19332 Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
26 lines
881 B
Diff
26 lines
881 B
Diff
--- a/drivers/dma/dw/core.c
|
|
+++ b/drivers/dma/dw/core.c
|
|
@@ -169,6 +169,8 @@ static void dwc_initialize_chan_dw(struc
|
|
cfghi |= DWC_CFGH_SRC_PER(dwc->dws.src_id);
|
|
cfghi |= DWC_CFGH_PROTCTL(dw->pdata->protctl);
|
|
|
|
+ cfghi |= DWC_CFGH_PROTCTL(3); /* bufferable + privileged access */
|
|
+
|
|
/* Set polarity of handshake interface */
|
|
cfglo |= hs_polarity ? DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL : 0;
|
|
|
|
@@ -1295,11 +1297,8 @@ int dw_dma_probe(struct dw_dma_chip *chi
|
|
else
|
|
list_add(&dwc->chan.device_node, &dw->dma.channels);
|
|
|
|
- /* 7 is highest priority & 0 is lowest. */
|
|
- if (pdata->chan_priority == CHAN_PRIORITY_ASCENDING)
|
|
- dwc->priority = pdata->nr_channels - i - 1;
|
|
- else
|
|
- dwc->priority = i;
|
|
+ /* set all channels to the same priority */
|
|
+ dwc->priority = pdata->nr_channels - 1;
|
|
|
|
dwc->ch_regs = &__dw_regs(dw)->CHAN[i];
|
|
spin_lock_init(&dwc->lock);
|