diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/ioat_dma.c | 2 | ||||
-rw-r--r-- | drivers/dma/ioatdma.h | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/drivers/dma/ioat_dma.c b/drivers/dma/ioat_dma.c index da572968a7db..ece5a0e3a335 100644 --- a/drivers/dma/ioat_dma.c +++ b/drivers/dma/ioat_dma.c | |||
@@ -1581,6 +1581,8 @@ struct ioatdma_device *ioat_dma_probe(struct pci_dev *pdev, | |||
1581 | if (err) | 1581 | if (err) |
1582 | goto err_self_test; | 1582 | goto err_self_test; |
1583 | 1583 | ||
1584 | ioat_set_tcp_copy_break(device); | ||
1585 | |||
1584 | dma_async_device_register(&device->common); | 1586 | dma_async_device_register(&device->common); |
1585 | 1587 | ||
1586 | INIT_DELAYED_WORK(&device->work, ioat_dma_chan_watchdog); | 1588 | INIT_DELAYED_WORK(&device->work, ioat_dma_chan_watchdog); |
diff --git a/drivers/dma/ioatdma.h b/drivers/dma/ioatdma.h index c6ec933f9895..685adb62aa5a 100644 --- a/drivers/dma/ioatdma.h +++ b/drivers/dma/ioatdma.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/dmapool.h> | 27 | #include <linux/dmapool.h> |
28 | #include <linux/cache.h> | 28 | #include <linux/cache.h> |
29 | #include <linux/pci_ids.h> | 29 | #include <linux/pci_ids.h> |
30 | #include <net/tcp.h> | ||
30 | 31 | ||
31 | #define IOAT_DMA_VERSION "2.18" | 32 | #define IOAT_DMA_VERSION "2.18" |
32 | 33 | ||
@@ -129,6 +130,20 @@ struct ioat_desc_sw { | |||
129 | struct dma_async_tx_descriptor async_tx; | 130 | struct dma_async_tx_descriptor async_tx; |
130 | }; | 131 | }; |
131 | 132 | ||
133 | static inline void ioat_set_tcp_copy_break(struct ioatdma_device *dev) | ||
134 | { | ||
135 | #ifdef CONFIG_NET_DMA | ||
136 | switch (dev->version) { | ||
137 | case IOAT_VER_1_2: | ||
138 | sysctl_tcp_dma_copybreak = 4096; | ||
139 | break; | ||
140 | case IOAT_VER_2_0: | ||
141 | sysctl_tcp_dma_copybreak = 2048; | ||
142 | break; | ||
143 | } | ||
144 | #endif | ||
145 | } | ||
146 | |||
132 | #if defined(CONFIG_INTEL_IOATDMA) || defined(CONFIG_INTEL_IOATDMA_MODULE) | 147 | #if defined(CONFIG_INTEL_IOATDMA) || defined(CONFIG_INTEL_IOATDMA_MODULE) |
133 | struct ioatdma_device *ioat_dma_probe(struct pci_dev *pdev, | 148 | struct ioatdma_device *ioat_dma_probe(struct pci_dev *pdev, |
134 | void __iomem *iobase); | 149 | void __iomem *iobase); |