aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/8139cp.c4
-rw-r--r--drivers/net/acenic.c2
-rw-r--r--drivers/net/bnx2.c2
-rw-r--r--drivers/net/bnx2x_main.c4
-rw-r--r--drivers/net/cassini.c4
-rw-r--r--drivers/net/chelsio/cxgb2.c4
-rw-r--r--drivers/net/cxgb3/cxgb3_main.c4
-rw-r--r--drivers/net/e1000/e1000_main.c4
-rw-r--r--drivers/net/e1000e/netdev.c4
-rw-r--r--drivers/net/igb/igb_main.c4
-rw-r--r--drivers/net/ioc3-eth.c4
-rw-r--r--drivers/net/ixgb/ixgb_main.c4
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c4
-rw-r--r--drivers/net/mlx4/main.c4
-rw-r--r--drivers/net/myri10ge/myri10ge.c4
-rw-r--r--drivers/net/ns83820.c2
-rw-r--r--drivers/net/qla3xxx.c4
-rw-r--r--drivers/net/qlge/qlge_main.c4
-rw-r--r--drivers/net/r8169.c2
-rw-r--r--drivers/net/s2io.c4
-rw-r--r--drivers/net/skge.c4
-rw-r--r--drivers/net/sky2.c4
-rw-r--r--drivers/net/sungem.c2
-rw-r--r--drivers/net/tehuti.c4
-rw-r--r--drivers/net/tehuti.h5
-rw-r--r--drivers/net/tg3.c4
-rw-r--r--drivers/net/usb/usbnet.c2
-rw-r--r--drivers/net/wireless/b43/dma.c6
-rw-r--r--drivers/net/wireless/b43legacy/dma.c6
29 files changed, 53 insertions, 56 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index a09e3a7cac4f..d08475a7f676 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -1929,8 +1929,8 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1929 1929
1930 /* Configure DMA attributes. */ 1930 /* Configure DMA attributes. */
1931 if ((sizeof(dma_addr_t) > 4) && 1931 if ((sizeof(dma_addr_t) > 4) &&
1932 !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK) && 1932 !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)) &&
1933 !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 1933 !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
1934 pci_using_dac = 1; 1934 pci_using_dac = 1;
1935 } else { 1935 } else {
1936 pci_using_dac = 0; 1936 pci_using_dac = 0;
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c
index 06a9f11669f3..9509c17b3667 100644
--- a/drivers/net/acenic.c
+++ b/drivers/net/acenic.c
@@ -1161,7 +1161,7 @@ static int __devinit ace_init(struct net_device *dev)
1161 /* 1161 /*
1162 * Configure DMA attributes. 1162 * Configure DMA attributes.
1163 */ 1163 */
1164 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 1164 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
1165 ap->pci_using_dac = 1; 1165 ap->pci_using_dac = 1;
1166 } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 1166 } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
1167 ap->pci_using_dac = 0; 1167 ap->pci_using_dac = 0;
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 17cbc8c6be37..aa75a4b96909 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -7527,7 +7527,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
7527 if (CHIP_NUM(bp) == CHIP_NUM_5708) 7527 if (CHIP_NUM(bp) == CHIP_NUM_5708)
7528 persist_dma_mask = dma_mask = DMA_40BIT_MASK; 7528 persist_dma_mask = dma_mask = DMA_40BIT_MASK;
7529 else 7529 else
7530 persist_dma_mask = dma_mask = DMA_64BIT_MASK; 7530 persist_dma_mask = dma_mask = DMA_BIT_MASK(64);
7531 7531
7532 /* Configure DMA attributes. */ 7532 /* Configure DMA attributes. */
7533 if (pci_set_dma_mask(pdev, dma_mask) == 0) { 7533 if (pci_set_dma_mask(pdev, dma_mask) == 0) {
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 00a78e8677b0..03e01243b45e 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -10979,9 +10979,9 @@ static int __devinit bnx2x_init_dev(struct pci_dev *pdev,
10979 goto err_out_release; 10979 goto err_out_release;
10980 } 10980 }
10981 10981
10982 if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) == 0) { 10982 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) == 0) {
10983 bp->flags |= USING_DAC_FLAG; 10983 bp->flags |= USING_DAC_FLAG;
10984 if (pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK) != 0) { 10984 if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)) != 0) {
10985 printk(KERN_ERR PFX "pci_set_consistent_dma_mask" 10985 printk(KERN_ERR PFX "pci_set_consistent_dma_mask"
10986 " failed, aborting\n"); 10986 " failed, aborting\n");
10987 rc = -EIO; 10987 rc = -EIO;
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 0effefa1b882..c2895240e467 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -5074,10 +5074,10 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
5074 5074
5075 5075
5076 /* Configure DMA attributes. */ 5076 /* Configure DMA attributes. */
5077 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 5077 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
5078 pci_using_dac = 1; 5078 pci_using_dac = 1;
5079 err = pci_set_consistent_dma_mask(pdev, 5079 err = pci_set_consistent_dma_mask(pdev,
5080 DMA_64BIT_MASK); 5080 DMA_BIT_MASK(64));
5081 if (err < 0) { 5081 if (err < 0) {
5082 dev_err(&pdev->dev, "Unable to obtain 64-bit DMA " 5082 dev_err(&pdev->dev, "Unable to obtain 64-bit DMA "
5083 "for consistent allocations\n"); 5083 "for consistent allocations\n");
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c
index 9b6011e7678e..57cfbc369f51 100644
--- a/drivers/net/chelsio/cxgb2.c
+++ b/drivers/net/chelsio/cxgb2.c
@@ -1056,10 +1056,10 @@ static int __devinit init_one(struct pci_dev *pdev,
1056 goto out_disable_pdev; 1056 goto out_disable_pdev;
1057 } 1057 }
1058 1058
1059 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 1059 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
1060 pci_using_dac = 1; 1060 pci_using_dac = 1;
1061 1061
1062 if (pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) { 1062 if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
1063 CH_ERR("%s: unable to obtain 64-bit DMA for " 1063 CH_ERR("%s: unable to obtain 64-bit DMA for "
1064 "consistent allocations\n", pci_name(pdev)); 1064 "consistent allocations\n", pci_name(pdev));
1065 err = -ENODEV; 1065 err = -ENODEV;
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index 2c2aaa741450..ec35d3b82409 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -3038,9 +3038,9 @@ static int __devinit init_one(struct pci_dev *pdev,
3038 goto out_release_regions; 3038 goto out_release_regions;
3039 } 3039 }
3040 3040
3041 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 3041 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
3042 pci_using_dac = 1; 3042 pci_using_dac = 1;
3043 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 3043 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
3044 if (err) { 3044 if (err) {
3045 dev_err(&pdev->dev, "unable to obtain 64-bit DMA for " 3045 dev_err(&pdev->dev, "unable to obtain 64-bit DMA for "
3046 "coherent allocations\n"); 3046 "coherent allocations\n");
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index a65023d772cb..caa71dffb3d0 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -962,8 +962,8 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
962 if (err) 962 if (err)
963 return err; 963 return err;
964 964
965 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK) && 965 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
966 !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) { 966 !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
967 pci_using_dac = 1; 967 pci_using_dac = 1;
968 } else { 968 } else {
969 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 969 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index bfb2d6c85c54..4a61160052a3 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -4763,9 +4763,9 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
4763 return err; 4763 return err;
4764 4764
4765 pci_using_dac = 0; 4765 pci_using_dac = 0;
4766 err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 4766 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
4767 if (!err) { 4767 if (!err) {
4768 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 4768 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
4769 if (!err) 4769 if (!err)
4770 pci_using_dac = 1; 4770 pci_using_dac = 1;
4771 } else { 4771 } else {
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 03aa9593dd9e..82278beaac83 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1154,9 +1154,9 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1154 return err; 1154 return err;
1155 1155
1156 pci_using_dac = 0; 1156 pci_using_dac = 0;
1157 err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 1157 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
1158 if (!err) { 1158 if (!err) {
1159 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 1159 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
1160 if (!err) 1160 if (!err)
1161 pci_using_dac = 1; 1161 pci_using_dac = 1;
1162 } else { 1162 } else {
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c
index 170b12d1d70e..43be0b01f12c 100644
--- a/drivers/net/ioc3-eth.c
+++ b/drivers/net/ioc3-eth.c
@@ -1226,10 +1226,10 @@ static int __devinit ioc3_probe(struct pci_dev *pdev,
1226 int err, pci_using_dac; 1226 int err, pci_using_dac;
1227 1227
1228 /* Configure DMA attributes. */ 1228 /* Configure DMA attributes. */
1229 err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 1229 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
1230 if (!err) { 1230 if (!err) {
1231 pci_using_dac = 1; 1231 pci_using_dac = 1;
1232 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 1232 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
1233 if (err < 0) { 1233 if (err < 0) {
1234 printk(KERN_ERR "%s: Unable to obtain 64 bit DMA " 1234 printk(KERN_ERR "%s: Unable to obtain 64 bit DMA "
1235 "for consistent allocations\n", pci_name(pdev)); 1235 "for consistent allocations\n", pci_name(pdev));
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 4b0ea66d7a44..0ac51758bc6c 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -365,8 +365,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
365 if (err) 365 if (err)
366 return err; 366 return err;
367 367
368 if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) && 368 if (!(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) &&
369 !(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) { 369 !(err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)))) {
370 pci_using_dac = 1; 370 pci_using_dac = 1;
371 } else { 371 } else {
372 if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) || 372 if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) ||
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 286ecc0e6ab7..126735ca6d7f 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -4509,8 +4509,8 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
4509 if (err) 4509 if (err)
4510 return err; 4510 return err;
4511 4511
4512 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK) && 4512 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
4513 !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) { 4513 !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
4514 pci_using_dac = 1; 4514 pci_using_dac = 1;
4515 } else { 4515 } else {
4516 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 4516 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
index a66f5b2fd288..fed53fbaf545 100644
--- a/drivers/net/mlx4/main.c
+++ b/drivers/net/mlx4/main.c
@@ -1076,7 +1076,7 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
1076 1076
1077 pci_set_master(pdev); 1077 pci_set_master(pdev);
1078 1078
1079 err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 1079 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
1080 if (err) { 1080 if (err) {
1081 dev_warn(&pdev->dev, "Warning: couldn't set 64-bit PCI DMA mask.\n"); 1081 dev_warn(&pdev->dev, "Warning: couldn't set 64-bit PCI DMA mask.\n");
1082 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 1082 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
@@ -1085,7 +1085,7 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
1085 goto err_release_bar2; 1085 goto err_release_bar2;
1086 } 1086 }
1087 } 1087 }
1088 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 1088 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
1089 if (err) { 1089 if (err) {
1090 dev_warn(&pdev->dev, "Warning: couldn't set 64-bit " 1090 dev_warn(&pdev->dev, "Warning: couldn't set 64-bit "
1091 "consistent PCI DMA mask.\n"); 1091 "consistent PCI DMA mask.\n");
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index aea9fdaa3cd5..27655466dbeb 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -3792,7 +3792,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
3792 3792
3793 pci_set_master(pdev); 3793 pci_set_master(pdev);
3794 dac_enabled = 1; 3794 dac_enabled = 1;
3795 status = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 3795 status = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
3796 if (status != 0) { 3796 if (status != 0) {
3797 dac_enabled = 0; 3797 dac_enabled = 0;
3798 dev_err(&pdev->dev, 3798 dev_err(&pdev->dev,
@@ -3804,7 +3804,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
3804 dev_err(&pdev->dev, "Error %d setting DMA mask\n", status); 3804 dev_err(&pdev->dev, "Error %d setting DMA mask\n", status);
3805 goto abort_with_enabled; 3805 goto abort_with_enabled;
3806 } 3806 }
3807 (void)pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 3807 (void)pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
3808 mgp->cmd = dma_alloc_coherent(&pdev->dev, sizeof(*mgp->cmd), 3808 mgp->cmd = dma_alloc_coherent(&pdev->dev, sizeof(*mgp->cmd),
3809 &mgp->cmd_bus, GFP_KERNEL); 3809 &mgp->cmd_bus, GFP_KERNEL);
3810 if (mgp->cmd == NULL) 3810 if (mgp->cmd == NULL)
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index 221b0c4c824a..e30ab06e7103 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -1973,7 +1973,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev,
1973 1973
1974 /* See if we can set the dma mask early on; failure is fatal. */ 1974 /* See if we can set the dma mask early on; failure is fatal. */
1975 if (sizeof(dma_addr_t) == 8 && 1975 if (sizeof(dma_addr_t) == 8 &&
1976 !pci_set_dma_mask(pci_dev, DMA_64BIT_MASK)) { 1976 !pci_set_dma_mask(pci_dev, DMA_BIT_MASK(64))) {
1977 using_dac = 1; 1977 using_dac = 1;
1978 } else if (!pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) { 1978 } else if (!pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) {
1979 using_dac = 0; 1979 using_dac = 0;
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index 8b2823c8dccf..aef047e4515a 100644
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -3934,9 +3934,9 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev,
3934 3934
3935 pci_set_master(pdev); 3935 pci_set_master(pdev);
3936 3936
3937 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 3937 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
3938 pci_using_dac = 1; 3938 pci_using_dac = 1;
3939 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 3939 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
3940 } else if (!(err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) { 3940 } else if (!(err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) {
3941 pci_using_dac = 0; 3941 pci_using_dac = 0;
3942 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 3942 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 170d3540f9c9..0add30d38d62 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -3726,9 +3726,9 @@ static int __devinit ql_init_device(struct pci_dev *pdev,
3726 } 3726 }
3727 3727
3728 pci_set_master(pdev); 3728 pci_set_master(pdev);
3729 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 3729 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
3730 set_bit(QL_DMA64, &qdev->flags); 3730 set_bit(QL_DMA64, &qdev->flags);
3731 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 3731 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
3732 } else { 3732 } else {
3733 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 3733 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
3734 if (!err) 3734 if (!err)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index e1a638a05f86..fe676d38d342 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2046,7 +2046,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2046 tp->cp_cmd = PCIMulRW | RxChkSum; 2046 tp->cp_cmd = PCIMulRW | RxChkSum;
2047 2047
2048 if ((sizeof(dma_addr_t) > 4) && 2048 if ((sizeof(dma_addr_t) > 4) &&
2049 !pci_set_dma_mask(pdev, DMA_64BIT_MASK) && use_dac) { 2049 !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) && use_dac) {
2050 tp->cp_cmd |= PCIDAC; 2050 tp->cp_cmd |= PCIDAC;
2051 dev->features |= NETIF_F_HIGHDMA; 2051 dev->features |= NETIF_F_HIGHDMA;
2052 } else { 2052 } else {
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 16868b7a5d0a..7c8d5613a1da 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -7775,11 +7775,11 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
7775 return ret; 7775 return ret;
7776 } 7776 }
7777 7777
7778 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 7778 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
7779 DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 64bit DMA\n"); 7779 DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 64bit DMA\n");
7780 dma_flag = TRUE; 7780 dma_flag = TRUE;
7781 if (pci_set_consistent_dma_mask 7781 if (pci_set_consistent_dma_mask
7782 (pdev, DMA_64BIT_MASK)) { 7782 (pdev, DMA_BIT_MASK(64))) {
7783 DBG_PRINT(ERR_DBG, 7783 DBG_PRINT(ERR_DBG,
7784 "Unable to obtain 64bit DMA for \ 7784 "Unable to obtain 64bit DMA for \
7785 consistent allocations\n"); 7785 consistent allocations\n");
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 952d37ffee51..18a7b662aff1 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -3912,9 +3912,9 @@ static int __devinit skge_probe(struct pci_dev *pdev,
3912 3912
3913 pci_set_master(pdev); 3913 pci_set_master(pdev);
3914 3914
3915 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 3915 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
3916 using_dac = 1; 3916 using_dac = 1;
3917 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 3917 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
3918 } else if (!(err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) { 3918 } else if (!(err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) {
3919 using_dac = 0; 3919 using_dac = 0;
3920 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 3920 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index d01c56eb9627..da570f44b12b 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -4374,9 +4374,9 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
4374 pci_set_master(pdev); 4374 pci_set_master(pdev);
4375 4375
4376 if (sizeof(dma_addr_t) > sizeof(u32) && 4376 if (sizeof(dma_addr_t) > sizeof(u32) &&
4377 !(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) { 4377 !(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)))) {
4378 using_dac = 1; 4378 using_dac = 1;
4379 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 4379 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
4380 if (err < 0) { 4380 if (err < 0) {
4381 dev_err(&pdev->dev, "unable to obtain 64 bit DMA " 4381 dev_err(&pdev->dev, "unable to obtain 64 bit DMA "
4382 "for consistent allocations\n"); 4382 "for consistent allocations\n");
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index c024352c92fd..2312d10f3b54 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -3042,7 +3042,7 @@ static int __devinit gem_init_one(struct pci_dev *pdev,
3042 */ 3042 */
3043 if (pdev->vendor == PCI_VENDOR_ID_SUN && 3043 if (pdev->vendor == PCI_VENDOR_ID_SUN &&
3044 pdev->device == PCI_DEVICE_ID_SUN_GEM && 3044 pdev->device == PCI_DEVICE_ID_SUN_GEM &&
3045 !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 3045 !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
3046 pci_using_dac = 1; 3046 pci_using_dac = 1;
3047 } else { 3047 } else {
3048 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 3048 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c
index 7debd1e4e1f7..d77a0918a325 100644
--- a/drivers/net/tehuti.c
+++ b/drivers/net/tehuti.c
@@ -1941,8 +1941,8 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1941 if ((err = pci_enable_device(pdev))) /* it trigers interrupt, dunno why. */ 1941 if ((err = pci_enable_device(pdev))) /* it trigers interrupt, dunno why. */
1942 goto err_pci; /* it's not a problem though */ 1942 goto err_pci; /* it's not a problem though */
1943 1943
1944 if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) && 1944 if (!(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) &&
1945 !(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) { 1945 !(err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)))) {
1946 pci_using_dac = 1; 1946 pci_using_dac = 1;
1947 } else { 1947 } else {
1948 if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) || 1948 if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) ||
diff --git a/drivers/net/tehuti.h b/drivers/net/tehuti.h
index dec67e0a9ca2..121dda917fdc 100644
--- a/drivers/net/tehuti.h
+++ b/drivers/net/tehuti.h
@@ -31,6 +31,7 @@
31#include <linux/vmalloc.h> 31#include <linux/vmalloc.h>
32#include <linux/firmware.h> 32#include <linux/firmware.h>
33#include <asm/byteorder.h> 33#include <asm/byteorder.h>
34#include <linux/dma-mapping.h>
34 35
35/* Compile Time Switches */ 36/* Compile Time Switches */
36/* start */ 37/* start */
@@ -98,10 +99,6 @@
98#define READ_REG(pp, reg) readl(pp->pBdxRegs + reg) 99#define READ_REG(pp, reg) readl(pp->pBdxRegs + reg)
99#define WRITE_REG(pp, reg, val) writel(val, pp->pBdxRegs + reg) 100#define WRITE_REG(pp, reg, val) writel(val, pp->pBdxRegs + reg)
100 101
101#ifndef DMA_64BIT_MASK
102# define DMA_64BIT_MASK 0xffffffffffffffffULL
103#endif
104
105#ifndef DMA_32BIT_MASK 102#ifndef DMA_32BIT_MASK
106# define DMA_32BIT_MASK 0x00000000ffffffffULL 103# define DMA_32BIT_MASK 0x00000000ffffffffULL
107#endif 104#endif
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 437683aab32c..ec32e5f23548 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -13232,10 +13232,10 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
13232 else if (tp->tg3_flags & TG3_FLAG_40BIT_DMA_BUG) { 13232 else if (tp->tg3_flags & TG3_FLAG_40BIT_DMA_BUG) {
13233 persist_dma_mask = dma_mask = DMA_40BIT_MASK; 13233 persist_dma_mask = dma_mask = DMA_40BIT_MASK;
13234#ifdef CONFIG_HIGHMEM 13234#ifdef CONFIG_HIGHMEM
13235 dma_mask = DMA_64BIT_MASK; 13235 dma_mask = DMA_BIT_MASK(64);
13236#endif 13236#endif
13237 } else 13237 } else
13238 persist_dma_mask = dma_mask = DMA_64BIT_MASK; 13238 persist_dma_mask = dma_mask = DMA_BIT_MASK(64);
13239 13239
13240 /* Configure DMA attributes. */ 13240 /* Configure DMA attributes. */
13241 if (dma_mask > DMA_32BIT_MASK) { 13241 if (dma_mask > DMA_32BIT_MASK) {
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 659654f45880..f3a2fce6166c 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1180,7 +1180,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
1180#if 0 1180#if 0
1181// dma_supported() is deeply broken on almost all architectures 1181// dma_supported() is deeply broken on almost all architectures
1182 // possible with some EHCI controllers 1182 // possible with some EHCI controllers
1183 if (dma_supported (&udev->dev, DMA_64BIT_MASK)) 1183 if (dma_supported (&udev->dev, DMA_BIT_MASK(64)))
1184 net->features |= NETIF_F_HIGHDMA; 1184 net->features |= NETIF_F_HIGHDMA;
1185#endif 1185#endif
1186 1186
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c
index 0cc804d0a214..461d680d2cec 100644
--- a/drivers/net/wireless/b43/dma.c
+++ b/drivers/net/wireless/b43/dma.c
@@ -772,7 +772,7 @@ static u64 supported_dma_mask(struct b43_wldev *dev)
772 772
773 tmp = b43_read32(dev, SSB_TMSHIGH); 773 tmp = b43_read32(dev, SSB_TMSHIGH);
774 if (tmp & SSB_TMSHIGH_DMA64) 774 if (tmp & SSB_TMSHIGH_DMA64)
775 return DMA_64BIT_MASK; 775 return DMA_BIT_MASK(64);
776 mmio_base = b43_dmacontroller_base(0, 0); 776 mmio_base = b43_dmacontroller_base(0, 0);
777 b43_write32(dev, mmio_base + B43_DMA32_TXCTL, B43_DMA32_TXADDREXT_MASK); 777 b43_write32(dev, mmio_base + B43_DMA32_TXCTL, B43_DMA32_TXADDREXT_MASK);
778 tmp = b43_read32(dev, mmio_base + B43_DMA32_TXCTL); 778 tmp = b43_read32(dev, mmio_base + B43_DMA32_TXCTL);
@@ -788,7 +788,7 @@ static enum b43_dmatype dma_mask_to_engine_type(u64 dmamask)
788 return B43_DMA_30BIT; 788 return B43_DMA_30BIT;
789 if (dmamask == DMA_32BIT_MASK) 789 if (dmamask == DMA_32BIT_MASK)
790 return B43_DMA_32BIT; 790 return B43_DMA_32BIT;
791 if (dmamask == DMA_64BIT_MASK) 791 if (dmamask == DMA_BIT_MASK(64))
792 return B43_DMA_64BIT; 792 return B43_DMA_64BIT;
793 B43_WARN_ON(1); 793 B43_WARN_ON(1);
794 return B43_DMA_30BIT; 794 return B43_DMA_30BIT;
@@ -999,7 +999,7 @@ static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask)
999 err = ssb_dma_set_mask(dev->dev, mask); 999 err = ssb_dma_set_mask(dev->dev, mask);
1000 if (!err) 1000 if (!err)
1001 break; 1001 break;
1002 if (mask == DMA_64BIT_MASK) { 1002 if (mask == DMA_BIT_MASK(64)) {
1003 mask = DMA_32BIT_MASK; 1003 mask = DMA_32BIT_MASK;
1004 fallback = 1; 1004 fallback = 1;
1005 continue; 1005 continue;
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c
index 3649fc367098..61bb91266aa8 100644
--- a/drivers/net/wireless/b43legacy/dma.c
+++ b/drivers/net/wireless/b43legacy/dma.c
@@ -846,7 +846,7 @@ static u64 supported_dma_mask(struct b43legacy_wldev *dev)
846 846
847 tmp = b43legacy_read32(dev, SSB_TMSHIGH); 847 tmp = b43legacy_read32(dev, SSB_TMSHIGH);
848 if (tmp & SSB_TMSHIGH_DMA64) 848 if (tmp & SSB_TMSHIGH_DMA64)
849 return DMA_64BIT_MASK; 849 return DMA_BIT_MASK(64);
850 mmio_base = b43legacy_dmacontroller_base(0, 0); 850 mmio_base = b43legacy_dmacontroller_base(0, 0);
851 b43legacy_write32(dev, 851 b43legacy_write32(dev,
852 mmio_base + B43legacy_DMA32_TXCTL, 852 mmio_base + B43legacy_DMA32_TXCTL,
@@ -865,7 +865,7 @@ static enum b43legacy_dmatype dma_mask_to_engine_type(u64 dmamask)
865 return B43legacy_DMA_30BIT; 865 return B43legacy_DMA_30BIT;
866 if (dmamask == DMA_32BIT_MASK) 866 if (dmamask == DMA_32BIT_MASK)
867 return B43legacy_DMA_32BIT; 867 return B43legacy_DMA_32BIT;
868 if (dmamask == DMA_64BIT_MASK) 868 if (dmamask == DMA_BIT_MASK(64))
869 return B43legacy_DMA_64BIT; 869 return B43legacy_DMA_64BIT;
870 B43legacy_WARN_ON(1); 870 B43legacy_WARN_ON(1);
871 return B43legacy_DMA_30BIT; 871 return B43legacy_DMA_30BIT;
@@ -1042,7 +1042,7 @@ static int b43legacy_dma_set_mask(struct b43legacy_wldev *dev, u64 mask)
1042 err = ssb_dma_set_mask(dev->dev, mask); 1042 err = ssb_dma_set_mask(dev->dev, mask);
1043 if (!err) 1043 if (!err)
1044 break; 1044 break;
1045 if (mask == DMA_64BIT_MASK) { 1045 if (mask == DMA_BIT_MASK(64)) {
1046 mask = DMA_32BIT_MASK; 1046 mask = DMA_32BIT_MASK;
1047 fallback = 1; 1047 fallback = 1;
1048 continue; 1048 continue;