diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-28 11:00:57 (GMT) |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-28 11:00:57 (GMT) |
commit | 3e79a8a67d6f28b2b1d4344253ca612e77cca8e6 (patch) | |
tree | e33eb07f35c50458e2262b784f330bc4a32a7cb9 /drivers | |
parent | 207bc1181b1c03ab6ecb55bca5b307606dd1d6bc (diff) | |
parent | bdf0eb3a026922dbf57f6839f3184c8d2ecc5f2e (diff) | |
download | linux-fsl-qoriq-3e79a8a67d6f28b2b1d4344253ca612e77cca8e6.tar.xz |
Merge branch 'pnp'
* pnp:
pnp: restore automatic resolution of DMA conflicts
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pnp/manager.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c index 95cebf0..9357aa7 100644 --- a/drivers/pnp/manager.c +++ b/drivers/pnp/manager.c @@ -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); |