aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-06-26 18:49:11 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-09-21 16:02:04 -0400
commit9931a26ea7fa25b02547c2a15f4aa80f538197e2 (patch)
treebc5e66a6b9f9ae4a5940d30a73d040832e133edb
parent4c15c243189d01509943e70896d575a2a69c3269 (diff)
DMA-API: net: intel/e1000: replace dma_set_mask()+dma_set_coherent_mask() with new helper
Replace the following sequence: dma_set_mask(dev, mask); dma_set_coherent_mask(dev, mask); with a call to the new helper dma_set_mask_and_coherent(). Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--drivers/net/ethernet/intel/e1000/e1000_main.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 59ad007dd5aa..34672f87726c 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -1018,19 +1018,14 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1018 */ 1018 */
1019 pci_using_dac = 0; 1019 pci_using_dac = 0;
1020 if ((hw->bus_type == e1000_bus_type_pcix) && 1020 if ((hw->bus_type == e1000_bus_type_pcix) &&
1021 !dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) { 1021 !dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) {
1022 /* according to DMA-API-HOWTO, coherent calls will always
1023 * succeed if the set call did
1024 */
1025 dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
1026 pci_using_dac = 1; 1022 pci_using_dac = 1;
1027 } else { 1023 } else {
1028 err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); 1024 err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
1029 if (err) { 1025 if (err) {
1030 pr_err("No usable DMA config, aborting\n"); 1026 pr_err("No usable DMA config, aborting\n");
1031 goto err_dma; 1027 goto err_dma;
1032 } 1028 }
1033 dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
1034 } 1029 }
1035 1030
1036 netdev->netdev_ops = &e1000_netdev_ops; 1031 netdev->netdev_ops = &e1000_netdev_ops;