mirror of
https://github.com/torvalds/linux.git
synced 2024-12-05 18:41:23 +00:00
Merge branch 'pnp'
* pnp: pnp: restore automatic resolution of DMA conflicts
This commit is contained in:
commit
3e79a8a67d
@ -211,6 +211,12 @@ static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx)
|
||||
res->start = -1;
|
||||
res->end = -1;
|
||||
|
||||
if (!rule->map) {
|
||||
res->flags |= IORESOURCE_DISABLED;
|
||||
pnp_dbg(&dev->dev, " dma %d disabled\n", idx);
|
||||
goto __add;
|
||||
}
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (rule->map & (1 << xtab[i])) {
|
||||
res->start = res->end = xtab[i];
|
||||
@ -218,11 +224,9 @@ static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx)
|
||||
goto __add;
|
||||
}
|
||||
}
|
||||
#ifdef MAX_DMA_CHANNELS
|
||||
res->start = res->end = MAX_DMA_CHANNELS;
|
||||
#endif
|
||||
res->flags |= IORESOURCE_DISABLED;
|
||||
pnp_dbg(&dev->dev, " disable dma %d\n", idx);
|
||||
|
||||
pnp_dbg(&dev->dev, " couldn't assign dma %d\n", idx);
|
||||
return -EBUSY;
|
||||
|
||||
__add:
|
||||
pnp_add_dma_resource(dev, res->start, res->flags);
|
||||
|
Loading…
Reference in New Issue
Block a user