diff options
-rw-r--r-- | drivers/dma/Kconfig | 7 | ||||
-rw-r--r-- | drivers/dma/dmaengine.c | 4 | ||||
-rw-r--r-- | include/linux/dmaengine.h | 8 |
3 files changed, 11 insertions, 8 deletions
diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index ab28f6093414..79d1542f31c0 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig | |||
@@ -46,7 +46,7 @@ config INTEL_MID_DMAC | |||
46 | 46 | ||
47 | If unsure, say N. | 47 | If unsure, say N. |
48 | 48 | ||
49 | config ASYNC_TX_DISABLE_CHANNEL_SWITCH | 49 | config ASYNC_TX_ENABLE_CHANNEL_SWITCH |
50 | bool | 50 | bool |
51 | 51 | ||
52 | config AMBA_PL08X | 52 | config AMBA_PL08X |
@@ -62,7 +62,6 @@ config INTEL_IOATDMA | |||
62 | depends on PCI && X86 | 62 | depends on PCI && X86 |
63 | select DMA_ENGINE | 63 | select DMA_ENGINE |
64 | select DCA | 64 | select DCA |
65 | select ASYNC_TX_DISABLE_CHANNEL_SWITCH | ||
66 | select ASYNC_TX_DISABLE_PQ_VAL_DMA | 65 | select ASYNC_TX_DISABLE_PQ_VAL_DMA |
67 | select ASYNC_TX_DISABLE_XOR_VAL_DMA | 66 | select ASYNC_TX_DISABLE_XOR_VAL_DMA |
68 | help | 67 | help |
@@ -77,6 +76,7 @@ config INTEL_IOP_ADMA | |||
77 | tristate "Intel IOP ADMA support" | 76 | tristate "Intel IOP ADMA support" |
78 | depends on ARCH_IOP32X || ARCH_IOP33X || ARCH_IOP13XX | 77 | depends on ARCH_IOP32X || ARCH_IOP33X || ARCH_IOP13XX |
79 | select DMA_ENGINE | 78 | select DMA_ENGINE |
79 | select ASYNC_TX_ENABLE_CHANNEL_SWITCH | ||
80 | help | 80 | help |
81 | Enable support for the Intel(R) IOP Series RAID engines. | 81 | Enable support for the Intel(R) IOP Series RAID engines. |
82 | 82 | ||
@@ -101,6 +101,7 @@ config FSL_DMA | |||
101 | tristate "Freescale Elo and Elo Plus DMA support" | 101 | tristate "Freescale Elo and Elo Plus DMA support" |
102 | depends on FSL_SOC | 102 | depends on FSL_SOC |
103 | select DMA_ENGINE | 103 | select DMA_ENGINE |
104 | select ASYNC_TX_ENABLE_CHANNEL_SWITCH | ||
104 | ---help--- | 105 | ---help--- |
105 | Enable support for the Freescale Elo and Elo Plus DMA controllers. | 106 | Enable support for the Freescale Elo and Elo Plus DMA controllers. |
106 | The Elo is the DMA controller on some 82xx and 83xx parts, and the | 107 | The Elo is the DMA controller on some 82xx and 83xx parts, and the |
@@ -117,6 +118,7 @@ config MV_XOR | |||
117 | bool "Marvell XOR engine support" | 118 | bool "Marvell XOR engine support" |
118 | depends on PLAT_ORION | 119 | depends on PLAT_ORION |
119 | select DMA_ENGINE | 120 | select DMA_ENGINE |
121 | select ASYNC_TX_ENABLE_CHANNEL_SWITCH | ||
120 | ---help--- | 122 | ---help--- |
121 | Enable support for the Marvell XOR engine. | 123 | Enable support for the Marvell XOR engine. |
122 | 124 | ||
@@ -174,6 +176,7 @@ config AMCC_PPC440SPE_ADMA | |||
174 | depends on 440SPe || 440SP | 176 | depends on 440SPe || 440SP |
175 | select DMA_ENGINE | 177 | select DMA_ENGINE |
176 | select ARCH_HAS_ASYNC_TX_FIND_CHANNEL | 178 | select ARCH_HAS_ASYNC_TX_FIND_CHANNEL |
179 | select ASYNC_TX_ENABLE_CHANNEL_SWITCH | ||
177 | help | 180 | help |
178 | Enable support for the AMCC PPC440SPe RAID engines. | 181 | Enable support for the AMCC PPC440SPe RAID engines. |
179 | 182 | ||
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 235153cd7ac5..8bcb15fb959d 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c | |||
@@ -706,7 +706,7 @@ int dma_async_device_register(struct dma_device *device) | |||
706 | BUG_ON(!device->dev); | 706 | BUG_ON(!device->dev); |
707 | 707 | ||
708 | /* note: this only matters in the | 708 | /* note: this only matters in the |
709 | * CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH=y case | 709 | * CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=n case |
710 | */ | 710 | */ |
711 | if (device_has_all_tx_types(device)) | 711 | if (device_has_all_tx_types(device)) |
712 | dma_cap_set(DMA_ASYNC_TX, device->cap_mask); | 712 | dma_cap_set(DMA_ASYNC_TX, device->cap_mask); |
@@ -980,7 +980,7 @@ void dma_async_tx_descriptor_init(struct dma_async_tx_descriptor *tx, | |||
980 | struct dma_chan *chan) | 980 | struct dma_chan *chan) |
981 | { | 981 | { |
982 | tx->chan = chan; | 982 | tx->chan = chan; |
983 | #ifndef CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH | 983 | #ifdef CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH |
984 | spin_lock_init(&tx->lock); | 984 | spin_lock_init(&tx->lock); |
985 | #endif | 985 | #endif |
986 | } | 986 | } |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 3934ebdd85c2..9d8688b92d8b 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -321,14 +321,14 @@ struct dma_async_tx_descriptor { | |||
321 | dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx); | 321 | dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx); |
322 | dma_async_tx_callback callback; | 322 | dma_async_tx_callback callback; |
323 | void *callback_param; | 323 | void *callback_param; |
324 | #ifndef CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH | 324 | #ifdef CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH |
325 | struct dma_async_tx_descriptor *next; | 325 | struct dma_async_tx_descriptor *next; |
326 | struct dma_async_tx_descriptor *parent; | 326 | struct dma_async_tx_descriptor *parent; |
327 | spinlock_t lock; | 327 | spinlock_t lock; |
328 | #endif | 328 | #endif |
329 | }; | 329 | }; |
330 | 330 | ||
331 | #ifdef CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH | 331 | #ifndef CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH |
332 | static inline void txd_lock(struct dma_async_tx_descriptor *txd) | 332 | static inline void txd_lock(struct dma_async_tx_descriptor *txd) |
333 | { | 333 | { |
334 | } | 334 | } |
@@ -656,11 +656,11 @@ static inline void net_dmaengine_put(void) | |||
656 | #ifdef CONFIG_ASYNC_TX_DMA | 656 | #ifdef CONFIG_ASYNC_TX_DMA |
657 | #define async_dmaengine_get() dmaengine_get() | 657 | #define async_dmaengine_get() dmaengine_get() |
658 | #define async_dmaengine_put() dmaengine_put() | 658 | #define async_dmaengine_put() dmaengine_put() |
659 | #ifdef CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH | 659 | #ifndef CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH |
660 | #define async_dma_find_channel(type) dma_find_channel(DMA_ASYNC_TX) | 660 | #define async_dma_find_channel(type) dma_find_channel(DMA_ASYNC_TX) |
661 | #else | 661 | #else |
662 | #define async_dma_find_channel(type) dma_find_channel(type) | 662 | #define async_dma_find_channel(type) dma_find_channel(type) |
663 | #endif /* CONFIG_ASYNC_TX_DISABLE_CHANNEL_SWITCH */ | 663 | #endif /* CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH */ |
664 | #else | 664 | #else |
665 | static inline void async_dmaengine_get(void) | 665 | static inline void async_dmaengine_get(void) |
666 | { | 666 | { |