aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/acenic_firmware.h10
-rw-r--r--drivers/net/b44.c5
-rw-r--r--drivers/net/bonding/bond_main.c2
-rw-r--r--drivers/net/forcedeth.c3
-rw-r--r--drivers/net/ioc3-eth.c7
-rw-r--r--drivers/net/irda/nsc-ircc.c4
-rw-r--r--drivers/net/loopback.c2
-rw-r--r--drivers/net/ns83820.c6
-rw-r--r--drivers/net/pcmcia/axnet_cs.c61
-rw-r--r--drivers/net/sis900.c2
-rw-r--r--drivers/net/spider_net.c2
-rw-r--r--drivers/net/tg3.c118
-rw-r--r--drivers/net/tulip/de4x5.c4
-rw-r--r--drivers/net/tulip/pnic2.c2
-rw-r--r--drivers/net/typhoon.c4
-rw-r--r--drivers/net/via-rhine.c21
-rw-r--r--drivers/net/wan/wanxl.c4
-rw-r--r--drivers/net/wireless/orinoco.c2
-rw-r--r--drivers/net/wireless/prism54/isl_ioctl.c2
-rw-r--r--drivers/net/wireless/prism54/islpci_hotplug.c3
20 files changed, 179 insertions, 85 deletions
diff --git a/drivers/net/acenic_firmware.h b/drivers/net/acenic_firmware.h
index 6d625d595622..d7882dd783c8 100644
--- a/drivers/net/acenic_firmware.h
+++ b/drivers/net/acenic_firmware.h
@@ -4397,7 +4397,7 @@ static u32 tigonFwText[(MAX_TEXT_LEN/4) + 1] __devinitdata = {
43970x3c010001, 0x220821, 0xac317e30, 0x8fbf0024, 43970x3c010001, 0x220821, 0xac317e30, 0x8fbf0024,
43980x8fb40020, 0x8fb3001c, 0x8fb20018, 0x8fb10014, 43980x8fb40020, 0x8fb3001c, 0x8fb20018, 0x8fb10014,
43990x8fb00010, 0x3e00008, 0x27bd0028, 0x0 }; 43990x8fb00010, 0x3e00008, 0x27bd0028, 0x0 };
4400static u32 tigonFwRodata[(MAX_RODATA_LEN/4) + 1] __initdata = { 4400static u32 tigonFwRodata[(MAX_RODATA_LEN/4) + 1] __devinitdata = {
44010x24486561, 0x6465723a, 0x202f7072, 44010x24486561, 0x6465723a, 0x202f7072,
44020x6f6a6563, 0x74732f72, 0x63732f73, 0x772f6765, 44020x6f6a6563, 0x74732f72, 0x63732f73, 0x772f6765,
44030x2f2e2f6e, 0x69632f66, 0x772f636f, 0x6d6d6f6e, 44030x2f2e2f6e, 0x69632f66, 0x772f636f, 0x6d6d6f6e,
@@ -4571,7 +4571,7 @@ static u32 tigonFwRodata[(MAX_RODATA_LEN/4) + 1] __initdata = {
45710x0, 0x14c38, 0x14c38, 0x14b80, 45710x0, 0x14c38, 0x14c38, 0x14b80,
45720x14bc4, 0x14c38, 0x14c38, 0x0, 45720x14bc4, 0x14c38, 0x14c38, 0x0,
45730x0, 0x0 }; 45730x0, 0x0 };
4574static u32 tigonFwData[(MAX_DATA_LEN/4) + 1] __initdata = { 4574static u32 tigonFwData[(MAX_DATA_LEN/4) + 1] __devinitdata = {
45750x416c7465, 45750x416c7465,
45760x6f6e2041, 0x63654e49, 0x43205600, 0x416c7465, 45760x6f6e2041, 0x63654e49, 0x43205600, 0x416c7465,
45770x6f6e2041, 0x63654e49, 0x43205600, 0x42424242, 45770x6f6e2041, 0x63654e49, 0x43205600, 0x42424242,
@@ -4612,7 +4612,7 @@ static u32 tigonFwData[(MAX_DATA_LEN/4) + 1] __initdata = {
4612#define tigon2FwSbssLen 0xcc 4612#define tigon2FwSbssLen 0xcc
4613#define tigon2FwBssAddr 0x00016f50 4613#define tigon2FwBssAddr 0x00016f50
4614#define tigon2FwBssLen 0x20c0 4614#define tigon2FwBssLen 0x20c0
4615static u32 tigon2FwText[(MAX_TEXT_LEN/4) + 1] __initdata = { 4615static u32 tigon2FwText[(MAX_TEXT_LEN/4) + 1] __devinitdata = {
46160x0, 46160x0,
46170x10000003, 0x0, 0xd, 0xd, 46170x10000003, 0x0, 0xd, 0xd,
46180x3c1d0001, 0x8fbd6d20, 0x3a0f021, 0x3c100000, 46180x3c1d0001, 0x8fbd6d20, 0x3a0f021, 0x3c100000,
@@ -9154,7 +9154,7 @@ static u32 tigon2FwText[(MAX_TEXT_LEN/4) + 1] __initdata = {
91540x24020001, 0x8f430328, 0x1021, 0x24630001, 91540x24020001, 0x8f430328, 0x1021, 0x24630001,
91550x3e00008, 0xaf430328, 0x3e00008, 0x0, 91550x3e00008, 0xaf430328, 0x3e00008, 0x0,
91560x0, 0x0, 0x0, 0x0 }; 91560x0, 0x0, 0x0, 0x0 };
9157static u32 tigon2FwRodata[(MAX_RODATA_LEN/4) + 1] __initdata = { 9157static u32 tigon2FwRodata[(MAX_RODATA_LEN/4) + 1] __devinitdata = {
91580x24486561, 0x6465723a, 0x202f7072, 91580x24486561, 0x6465723a, 0x202f7072,
91590x6f6a6563, 0x74732f72, 0x63732f73, 0x772f6765, 91590x6f6a6563, 0x74732f72, 0x63732f73, 0x772f6765,
91600x2f2e2f6e, 0x69632f66, 0x77322f63, 0x6f6d6d6f, 91600x2f2e2f6e, 0x69632f66, 0x77322f63, 0x6f6d6d6f,
@@ -9425,7 +9425,7 @@ static u32 tigon2FwRodata[(MAX_RODATA_LEN/4) + 1] __initdata = {
94250x14ed8, 0x14b8c, 0x14bd8, 0x14c24, 94250x14ed8, 0x14b8c, 0x14bd8, 0x14c24,
94260x14ed8, 0x7365746d, 0x61636163, 0x74000000, 94260x14ed8, 0x7365746d, 0x61636163, 0x74000000,
94270x0, 0x0 }; 94270x0, 0x0 };
9428static u32 tigon2FwData[(MAX_DATA_LEN/4) + 1] __initdata = { 9428static u32 tigon2FwData[(MAX_DATA_LEN/4) + 1] __devinitdata = {
94290x1, 94290x1,
94300x1, 0x1, 0xc001fc, 0x3ffc, 94300x1, 0x1, 0xc001fc, 0x3ffc,
94310xc00000, 0x416c7465, 0x6f6e2041, 0x63654e49, 94310xc00000, 0x416c7465, 0x6f6e2041, 0x63654e49,
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index c3267e4e1bb0..2eab2a88c7bf 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -2033,6 +2033,11 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
2033 2033
2034 pci_save_state(bp->pdev); 2034 pci_save_state(bp->pdev);
2035 2035
2036 /* Chip reset provides power to the b44 MAC & PCI cores, which
2037 * is necessary for MAC register access.
2038 */
2039 b44_chip_reset(bp);
2040
2036 printk(KERN_INFO "%s: Broadcom 4400 10/100BaseT Ethernet ", dev->name); 2041 printk(KERN_INFO "%s: Broadcom 4400 10/100BaseT Ethernet ", dev->name);
2037 for (i = 0; i < 6; i++) 2042 for (i = 0; i < 6; i++)
2038 printk("%2.2x%c", dev->dev_addr[i], 2043 printk("%2.2x%c", dev->dev_addr[i],
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 2d0ac169a86c..f13a539dc169 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3159,7 +3159,7 @@ static int bond_slave_netdev_event(unsigned long event, struct net_device *slave
3159 * bond_netdev_event: handle netdev notifier chain events. 3159 * bond_netdev_event: handle netdev notifier chain events.
3160 * 3160 *
3161 * This function receives events for the netdev chain. The caller (an 3161 * This function receives events for the netdev chain. The caller (an
3162 * ioctl handler calling notifier_call_chain) holds the necessary 3162 * ioctl handler calling blocking_notifier_call_chain) holds the necessary
3163 * locks for us to safely manipulate the slave devices (RTNL lock, 3163 * locks for us to safely manipulate the slave devices (RTNL lock,
3164 * dev_probe_lock). 3164 * dev_probe_lock).
3165 */ 3165 */
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index e7fc28b07e5a..7627a75f4f7c 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -134,6 +134,7 @@
134#include <linux/random.h> 134#include <linux/random.h>
135#include <linux/init.h> 135#include <linux/init.h>
136#include <linux/if_vlan.h> 136#include <linux/if_vlan.h>
137#include <linux/dma-mapping.h>
137 138
138#include <asm/irq.h> 139#include <asm/irq.h>
139#include <asm/io.h> 140#include <asm/io.h>
@@ -2932,7 +2933,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
2932 if (id->driver_data & DEV_HAS_HIGH_DMA) { 2933 if (id->driver_data & DEV_HAS_HIGH_DMA) {
2933 /* packet format 3: supports 40-bit addressing */ 2934 /* packet format 3: supports 40-bit addressing */
2934 np->desc_ver = DESC_VER_3; 2935 np->desc_ver = DESC_VER_3;
2935 if (pci_set_dma_mask(pci_dev, 0x0000007fffffffffULL)) { 2936 if (pci_set_dma_mask(pci_dev, DMA_39BIT_MASK)) {
2936 printk(KERN_INFO "forcedeth: 64-bit DMA failed, using 32-bit addressing for device %s.\n", 2937 printk(KERN_INFO "forcedeth: 64-bit DMA failed, using 32-bit addressing for device %s.\n",
2937 pci_name(pci_dev)); 2938 pci_name(pci_dev));
2938 } else { 2939 } else {
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c
index 9b8295ee06ef..ae71ed57c12d 100644
--- a/drivers/net/ioc3-eth.c
+++ b/drivers/net/ioc3-eth.c
@@ -44,6 +44,7 @@
44#include <linux/ip.h> 44#include <linux/ip.h>
45#include <linux/tcp.h> 45#include <linux/tcp.h>
46#include <linux/udp.h> 46#include <linux/udp.h>
47#include <linux/dma-mapping.h>
47 48
48#ifdef CONFIG_SERIAL_8250 49#ifdef CONFIG_SERIAL_8250
49#include <linux/serial_core.h> 50#include <linux/serial_core.h>
@@ -1195,17 +1196,17 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1195 int err, pci_using_dac; 1196 int err, pci_using_dac;
1196 1197
1197 /* Configure DMA attributes. */ 1198 /* Configure DMA attributes. */
1198 err = pci_set_dma_mask(pdev, 0xffffffffffffffffULL); 1199 err = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
1199 if (!err) { 1200 if (!err) {
1200 pci_using_dac = 1; 1201 pci_using_dac = 1;
1201 err = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL); 1202 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
1202 if (err < 0) { 1203 if (err < 0) {
1203 printk(KERN_ERR "%s: Unable to obtain 64 bit DMA " 1204 printk(KERN_ERR "%s: Unable to obtain 64 bit DMA "
1204 "for consistent allocations\n", pci_name(pdev)); 1205 "for consistent allocations\n", pci_name(pdev));
1205 goto out; 1206 goto out;
1206 } 1207 }
1207 } else { 1208 } else {
1208 err = pci_set_dma_mask(pdev, 0xffffffffULL); 1209 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
1209 if (err) { 1210 if (err) {
1210 printk(KERN_ERR "%s: No usable DMA configuration, " 1211 printk(KERN_ERR "%s: No usable DMA configuration, "
1211 "aborting.\n", pci_name(pdev)); 1212 "aborting.\n", pci_name(pdev));
diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
index 83141a3ff546..cc7ff8f00e42 100644
--- a/drivers/net/irda/nsc-ircc.c
+++ b/drivers/net/irda/nsc-ircc.c
@@ -207,7 +207,7 @@ static int __init nsc_ircc_init(void)
207 /* Register with PnP subsystem to detect disable ports */ 207 /* Register with PnP subsystem to detect disable ports */
208 ret = pnp_register_driver(&nsc_ircc_pnp_driver); 208 ret = pnp_register_driver(&nsc_ircc_pnp_driver);
209 209
210 if (ret >= 0) 210 if (!ret)
211 pnp_registered = 1; 211 pnp_registered = 1;
212 212
213 ret = -ENODEV; 213 ret = -ENODEV;
@@ -812,7 +812,7 @@ static int nsc_ircc_init_39x(nsc_chip_t *chip, chipio_t *info)
812 int cfg_base = info->cfg_base; 812 int cfg_base = info->cfg_base;
813 int enabled; 813 int enabled;
814 814
815 /* User is shure about his config... accept it. */ 815 /* User is sure about his config... accept it. */
816 IRDA_DEBUG(2, "%s(): nsc_ircc_init_39x (user settings): " 816 IRDA_DEBUG(2, "%s(): nsc_ircc_init_39x (user settings): "
817 "io=0x%04x, irq=%d, dma=%d\n", 817 "io=0x%04x, irq=%d, dma=%d\n",
818 __FUNCTION__, info->fir_base, info->irq, info->dma); 818 __FUNCTION__, info->fir_base, info->irq, info->dma);
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index 0c13795dca38..b79d6e8d3045 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -172,7 +172,7 @@ static struct net_device_stats *get_stats(struct net_device *dev)
172 172
173 memset(stats, 0, sizeof(struct net_device_stats)); 173 memset(stats, 0, sizeof(struct net_device_stats));
174 174
175 for_each_cpu(i) { 175 for_each_possible_cpu(i) {
176 struct net_device_stats *lb_stats; 176 struct net_device_stats *lb_stats;
177 177
178 lb_stats = &per_cpu(loopback_stats, i); 178 lb_stats = &per_cpu(loopback_stats, i);
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index 0fede50abd3e..8e9b1a537dee 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -1828,10 +1828,10 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
1828 int using_dac = 0; 1828 int using_dac = 0;
1829 1829
1830 /* See if we can set the dma mask early on; failure is fatal. */ 1830 /* See if we can set the dma mask early on; failure is fatal. */
1831 if (sizeof(dma_addr_t) == 8 && 1831 if (sizeof(dma_addr_t) == 8 &&
1832 !pci_set_dma_mask(pci_dev, 0xffffffffffffffffULL)) { 1832 !pci_set_dma_mask(pci_dev, DMA_64BIT_MASK)) {
1833 using_dac = 1; 1833 using_dac = 1;
1834 } else if (!pci_set_dma_mask(pci_dev, 0xffffffff)) { 1834 } else if (!pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) {
1835 using_dac = 0; 1835 using_dac = 0;
1836 } else { 1836 } else {
1837 printk(KERN_WARNING "ns83820.c: pci_set_dma_mask failed!\n"); 1837 printk(KERN_WARNING "ns83820.c: pci_set_dma_mask failed!\n");
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index aa5581369399..1cc94b2d76c1 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -35,6 +35,7 @@
35#include <linux/spinlock.h> 35#include <linux/spinlock.h>
36#include <linux/ethtool.h> 36#include <linux/ethtool.h>
37#include <linux/netdevice.h> 37#include <linux/netdevice.h>
38#include <linux/crc32.h>
38#include "../8390.h" 39#include "../8390.h"
39 40
40#include <pcmcia/cs_types.h> 41#include <pcmcia/cs_types.h>
@@ -1682,17 +1683,67 @@ static struct net_device_stats *get_stats(struct net_device *dev)
1682 return &ei_local->stat; 1683 return &ei_local->stat;
1683} 1684}
1684 1685
1686/*
1687 * Form the 64 bit 8390 multicast table from the linked list of addresses
1688 * associated with this dev structure.
1689 */
1690
1691static inline void make_mc_bits(u8 *bits, struct net_device *dev)
1692{
1693 struct dev_mc_list *dmi;
1694 u32 crc;
1695
1696 for (dmi=dev->mc_list; dmi; dmi=dmi->next) {
1697
1698 crc = ether_crc(ETH_ALEN, dmi->dmi_addr);
1699 /*
1700 * The 8390 uses the 6 most significant bits of the
1701 * CRC to index the multicast table.
1702 */
1703 bits[crc>>29] |= (1<<((crc>>26)&7));
1704 }
1705}
1706
1685/** 1707/**
1686 * do_set_multicast_list - set/clear multicast filter 1708 * do_set_multicast_list - set/clear multicast filter
1687 * @dev: net device for which multicast filter is adjusted 1709 * @dev: net device for which multicast filter is adjusted
1688 * 1710 *
1689 * Set or clear the multicast filter for this adaptor. May be called 1711 * Set or clear the multicast filter for this adaptor.
1690 * from a BH in 2.1.x. Must be called with lock held. 1712 * Must be called with lock held.
1691 */ 1713 */
1692 1714
1693static void do_set_multicast_list(struct net_device *dev) 1715static void do_set_multicast_list(struct net_device *dev)
1694{ 1716{
1695 long e8390_base = dev->base_addr; 1717 long e8390_base = dev->base_addr;
1718 int i;
1719 struct ei_device *ei_local = (struct ei_device*)netdev_priv(dev);
1720
1721 if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI))) {
1722 memset(ei_local->mcfilter, 0, 8);
1723 if (dev->mc_list)
1724 make_mc_bits(ei_local->mcfilter, dev);
1725 } else {
1726 /* set to accept-all */
1727 memset(ei_local->mcfilter, 0xFF, 8);
1728 }
1729
1730 /*
1731 * DP8390 manuals don't specify any magic sequence for altering
1732 * the multicast regs on an already running card. To be safe, we
1733 * ensure multicast mode is off prior to loading up the new hash
1734 * table. If this proves to be not enough, we can always resort
1735 * to stopping the NIC, loading the table and then restarting.
1736 */
1737
1738 if (netif_running(dev))
1739 outb_p(E8390_RXCONFIG, e8390_base + EN0_RXCR);
1740
1741 outb_p(E8390_NODMA + E8390_PAGE1, e8390_base + E8390_CMD);
1742 for(i = 0; i < 8; i++)
1743 {
1744 outb_p(ei_local->mcfilter[i], e8390_base + EN1_MULT_SHIFT(i));
1745 }
1746 outb_p(E8390_NODMA + E8390_PAGE0, e8390_base + E8390_CMD);
1696 1747
1697 if(dev->flags&IFF_PROMISC) 1748 if(dev->flags&IFF_PROMISC)
1698 outb_p(E8390_RXCONFIG | 0x58, e8390_base + EN0_RXCR); 1749 outb_p(E8390_RXCONFIG | 0x58, e8390_base + EN0_RXCR);
@@ -1794,12 +1845,6 @@ static void AX88190_init(struct net_device *dev, int startp)
1794 if(inb_p(e8390_base + EN1_PHYS_SHIFT(i))!=dev->dev_addr[i]) 1845 if(inb_p(e8390_base + EN1_PHYS_SHIFT(i))!=dev->dev_addr[i])
1795 printk(KERN_ERR "Hw. address read/write mismap %d\n",i); 1846 printk(KERN_ERR "Hw. address read/write mismap %d\n",i);
1796 } 1847 }
1797 /*
1798 * Initialize the multicast list to accept-all. If we enable multicast
1799 * the higher levels can do the filtering.
1800 */
1801 for (i = 0; i < 8; i++)
1802 outb_p(0xff, e8390_base + EN1_MULT + i);
1803 1848
1804 outb_p(ei_local->rx_start_page, e8390_base + EN1_CURPAG); 1849 outb_p(ei_local->rx_start_page, e8390_base + EN1_CURPAG);
1805 outb_p(E8390_NODMA+E8390_PAGE0+E8390_STOP, e8390_base+E8390_CMD); 1850 outb_p(E8390_NODMA+E8390_PAGE0+E8390_STOP, e8390_base+E8390_CMD);
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
index 8429ceb01389..b82191d2bee1 100644
--- a/drivers/net/sis900.c
+++ b/drivers/net/sis900.c
@@ -2283,7 +2283,7 @@ static void set_rx_mode(struct net_device *net_dev)
2283 int i, table_entries; 2283 int i, table_entries;
2284 u32 rx_mode; 2284 u32 rx_mode;
2285 2285
2286 /* 635 Hash Table entires = 256(2^16) */ 2286 /* 635 Hash Table entries = 256(2^16) */
2287 if((sis_priv->chipset_rev >= SIS635A_900_REV) || 2287 if((sis_priv->chipset_rev >= SIS635A_900_REV) ||
2288 (sis_priv->chipset_rev == SIS900B_900_REV)) 2288 (sis_priv->chipset_rev == SIS900B_900_REV))
2289 table_entries = 16; 2289 table_entries = 16;
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index 1f5975a61e1f..0000de01ec15 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -1442,7 +1442,7 @@ spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg)
1442 case SPIDER_NET_GRFAFLLINT: /* fallthrough */ 1442 case SPIDER_NET_GRFAFLLINT: /* fallthrough */
1443 case SPIDER_NET_GRMFLLINT: 1443 case SPIDER_NET_GRMFLLINT:
1444 if (netif_msg_intr(card) && net_ratelimit()) 1444 if (netif_msg_intr(card) && net_ratelimit())
1445 pr_err("Spider RX RAM full, incoming packets " 1445 pr_debug("Spider RX RAM full, incoming packets "
1446 "might be discarded!\n"); 1446 "might be discarded!\n");
1447 spider_net_rx_irq_off(card); 1447 spider_net_rx_irq_off(card);
1448 tasklet_schedule(&card->rxram_full_tl); 1448 tasklet_schedule(&card->rxram_full_tl);
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index b5473325bff4..964c09644832 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -69,8 +69,8 @@
69 69
70#define DRV_MODULE_NAME "tg3" 70#define DRV_MODULE_NAME "tg3"
71#define PFX DRV_MODULE_NAME ": " 71#define PFX DRV_MODULE_NAME ": "
72#define DRV_MODULE_VERSION "3.54" 72#define DRV_MODULE_VERSION "3.55"
73#define DRV_MODULE_RELDATE "Mar 23, 2006" 73#define DRV_MODULE_RELDATE "Mar 27, 2006"
74 74
75#define TG3_DEF_MAC_MODE 0 75#define TG3_DEF_MAC_MODE 0
76#define TG3_DEF_RX_MODE 0 76#define TG3_DEF_RX_MODE 0
@@ -497,21 +497,20 @@ static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val)
497 unsigned long flags; 497 unsigned long flags;
498 498
499 spin_lock_irqsave(&tp->indirect_lock, flags); 499 spin_lock_irqsave(&tp->indirect_lock, flags);
500 pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, off); 500 if (tp->write32 != tg3_write_indirect_reg32) {
501 pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val); 501 tw32_f(TG3PCI_MEM_WIN_BASE_ADDR, off);
502 tw32_f(TG3PCI_MEM_WIN_DATA, val);
502 503
503 /* Always leave this as zero. */ 504 /* Always leave this as zero. */
504 pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0); 505 tw32_f(TG3PCI_MEM_WIN_BASE_ADDR, 0);
505 spin_unlock_irqrestore(&tp->indirect_lock, flags); 506 } else {
506} 507 pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, off);
508 pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val);
507 509
508static void tg3_write_mem_fast(struct tg3 *tp, u32 off, u32 val) 510 /* Always leave this as zero. */
509{ 511 pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0);
510 /* If no workaround is needed, write to mem space directly */ 512 }
511 if (tp->write32 != tg3_write_indirect_reg32) 513 spin_unlock_irqrestore(&tp->indirect_lock, flags);
512 tw32(NIC_SRAM_WIN_BASE + off, val);
513 else
514 tg3_write_mem(tp, off, val);
515} 514}
516 515
517static void tg3_read_mem(struct tg3 *tp, u32 off, u32 *val) 516static void tg3_read_mem(struct tg3 *tp, u32 off, u32 *val)
@@ -519,11 +518,19 @@ static void tg3_read_mem(struct tg3 *tp, u32 off, u32 *val)
519 unsigned long flags; 518 unsigned long flags;
520 519
521 spin_lock_irqsave(&tp->indirect_lock, flags); 520 spin_lock_irqsave(&tp->indirect_lock, flags);
522 pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, off); 521 if (tp->write32 != tg3_write_indirect_reg32) {
523 pci_read_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val); 522 tw32_f(TG3PCI_MEM_WIN_BASE_ADDR, off);
523 *val = tr32(TG3PCI_MEM_WIN_DATA);
524 524
525 /* Always leave this as zero. */ 525 /* Always leave this as zero. */
526 pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0); 526 tw32_f(TG3PCI_MEM_WIN_BASE_ADDR, 0);
527 } else {
528 pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, off);
529 pci_read_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val);
530
531 /* Always leave this as zero. */
532 pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0);
533 }
527 spin_unlock_irqrestore(&tp->indirect_lock, flags); 534 spin_unlock_irqrestore(&tp->indirect_lock, flags);
528} 535}
529 536
@@ -1367,12 +1374,12 @@ static int tg3_set_power_state(struct tg3 *tp, pci_power_t state)
1367 } 1374 }
1368 } 1375 }
1369 1376
1377 tg3_write_sig_post_reset(tp, RESET_KIND_SHUTDOWN);
1378
1370 /* Finally, set the new power state. */ 1379 /* Finally, set the new power state. */
1371 pci_write_config_word(tp->pdev, pm + PCI_PM_CTRL, power_control); 1380 pci_write_config_word(tp->pdev, pm + PCI_PM_CTRL, power_control);
1372 udelay(100); /* Delay after power state change */ 1381 udelay(100); /* Delay after power state change */
1373 1382
1374 tg3_write_sig_post_reset(tp, RESET_KIND_SHUTDOWN);
1375
1376 return 0; 1383 return 0;
1377} 1384}
1378 1385
@@ -3600,7 +3607,7 @@ static inline int tg3_40bit_overflow_test(struct tg3 *tp, dma_addr_t mapping,
3600 int len) 3607 int len)
3601{ 3608{
3602#if defined(CONFIG_HIGHMEM) && (BITS_PER_LONG == 64) 3609#if defined(CONFIG_HIGHMEM) && (BITS_PER_LONG == 64)
3603 if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) 3610 if (tp->tg3_flags & TG3_FLAG_40BIT_DMA_BUG)
3604 return (((u64) mapping + len) > DMA_40BIT_MASK); 3611 return (((u64) mapping + len) > DMA_40BIT_MASK);
3605 return 0; 3612 return 0;
3606#else 3613#else
@@ -6461,6 +6468,9 @@ static void tg3_timer(unsigned long __opaque)
6461{ 6468{
6462 struct tg3 *tp = (struct tg3 *) __opaque; 6469 struct tg3 *tp = (struct tg3 *) __opaque;
6463 6470
6471 if (tp->irq_sync)
6472 goto restart_timer;
6473
6464 spin_lock(&tp->lock); 6474 spin_lock(&tp->lock);
6465 6475
6466 if (!(tp->tg3_flags & TG3_FLAG_TAGGED_STATUS)) { 6476 if (!(tp->tg3_flags & TG3_FLAG_TAGGED_STATUS)) {
@@ -6537,11 +6547,11 @@ static void tg3_timer(unsigned long __opaque)
6537 if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) { 6547 if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) {
6538 u32 val; 6548 u32 val;
6539 6549
6540 tg3_write_mem_fast(tp, NIC_SRAM_FW_CMD_MBOX, 6550 tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX,
6541 FWCMD_NICDRV_ALIVE2); 6551 FWCMD_NICDRV_ALIVE2);
6542 tg3_write_mem_fast(tp, NIC_SRAM_FW_CMD_LEN_MBOX, 4); 6552 tg3_write_mem(tp, NIC_SRAM_FW_CMD_LEN_MBOX, 4);
6543 /* 5 seconds timeout */ 6553 /* 5 seconds timeout */
6544 tg3_write_mem_fast(tp, NIC_SRAM_FW_CMD_DATA_MBOX, 5); 6554 tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX, 5);
6545 val = tr32(GRC_RX_CPU_EVENT); 6555 val = tr32(GRC_RX_CPU_EVENT);
6546 val |= (1 << 14); 6556 val |= (1 << 14);
6547 tw32(GRC_RX_CPU_EVENT, val); 6557 tw32(GRC_RX_CPU_EVENT, val);
@@ -6551,6 +6561,7 @@ static void tg3_timer(unsigned long __opaque)
6551 6561
6552 spin_unlock(&tp->lock); 6562 spin_unlock(&tp->lock);
6553 6563
6564restart_timer:
6554 tp->timer.expires = jiffies + tp->timer_offset; 6565 tp->timer.expires = jiffies + tp->timer_offset;
6555 add_timer(&tp->timer); 6566 add_timer(&tp->timer);
6556} 6567}
@@ -8399,8 +8410,11 @@ static int tg3_run_loopback(struct tg3 *tp, int loopback_mode)
8399 } 8410 }
8400 mac_mode = (tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK) | 8411 mac_mode = (tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK) |
8401 MAC_MODE_LINK_POLARITY | MAC_MODE_PORT_MODE_GMII; 8412 MAC_MODE_LINK_POLARITY | MAC_MODE_PORT_MODE_GMII;
8402 if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) 8413 if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) {
8403 mac_mode &= ~MAC_MODE_LINK_POLARITY; 8414 mac_mode &= ~MAC_MODE_LINK_POLARITY;
8415 tg3_writephy(tp, MII_TG3_EXT_CTRL,
8416 MII_TG3_EXT_CTRL_LNK3_LED_MODE);
8417 }
8404 tw32(MAC_MODE, mac_mode); 8418 tw32(MAC_MODE, mac_mode);
8405 } 8419 }
8406 else 8420 else
@@ -10531,6 +10545,7 @@ static int __devinit tg3_get_device_address(struct tg3 *tp)
10531{ 10545{
10532 struct net_device *dev = tp->dev; 10546 struct net_device *dev = tp->dev;
10533 u32 hi, lo, mac_offset; 10547 u32 hi, lo, mac_offset;
10548 int addr_ok = 0;
10534 10549
10535#ifdef CONFIG_SPARC64 10550#ifdef CONFIG_SPARC64
10536 if (!tg3_get_macaddr_sparc(tp)) 10551 if (!tg3_get_macaddr_sparc(tp))
@@ -10560,29 +10575,34 @@ static int __devinit tg3_get_device_address(struct tg3 *tp)
10560 dev->dev_addr[3] = (lo >> 16) & 0xff; 10575 dev->dev_addr[3] = (lo >> 16) & 0xff;
10561 dev->dev_addr[4] = (lo >> 8) & 0xff; 10576 dev->dev_addr[4] = (lo >> 8) & 0xff;
10562 dev->dev_addr[5] = (lo >> 0) & 0xff; 10577 dev->dev_addr[5] = (lo >> 0) & 0xff;
10563 }
10564 /* Next, try NVRAM. */
10565 else if (!(tp->tg3_flags & TG3_FLG2_SUN_570X) &&
10566 !tg3_nvram_read(tp, mac_offset + 0, &hi) &&
10567 !tg3_nvram_read(tp, mac_offset + 4, &lo)) {
10568 dev->dev_addr[0] = ((hi >> 16) & 0xff);
10569 dev->dev_addr[1] = ((hi >> 24) & 0xff);
10570 dev->dev_addr[2] = ((lo >> 0) & 0xff);
10571 dev->dev_addr[3] = ((lo >> 8) & 0xff);
10572 dev->dev_addr[4] = ((lo >> 16) & 0xff);
10573 dev->dev_addr[5] = ((lo >> 24) & 0xff);
10574 }
10575 /* Finally just fetch it out of the MAC control regs. */
10576 else {
10577 hi = tr32(MAC_ADDR_0_HIGH);
10578 lo = tr32(MAC_ADDR_0_LOW);
10579 10578
10580 dev->dev_addr[5] = lo & 0xff; 10579 /* Some old bootcode may report a 0 MAC address in SRAM */
10581 dev->dev_addr[4] = (lo >> 8) & 0xff; 10580 addr_ok = is_valid_ether_addr(&dev->dev_addr[0]);
10582 dev->dev_addr[3] = (lo >> 16) & 0xff; 10581 }
10583 dev->dev_addr[2] = (lo >> 24) & 0xff; 10582 if (!addr_ok) {
10584 dev->dev_addr[1] = hi & 0xff; 10583 /* Next, try NVRAM. */
10585 dev->dev_addr[0] = (hi >> 8) & 0xff; 10584 if (!(tp->tg3_flags & TG3_FLG2_SUN_570X) &&
10585 !tg3_nvram_read(tp, mac_offset + 0, &hi) &&
10586 !tg3_nvram_read(tp, mac_offset + 4, &lo)) {
10587 dev->dev_addr[0] = ((hi >> 16) & 0xff);
10588 dev->dev_addr[1] = ((hi >> 24) & 0xff);
10589 dev->dev_addr[2] = ((lo >> 0) & 0xff);
10590 dev->dev_addr[3] = ((lo >> 8) & 0xff);
10591 dev->dev_addr[4] = ((lo >> 16) & 0xff);
10592 dev->dev_addr[5] = ((lo >> 24) & 0xff);
10593 }
10594 /* Finally just fetch it out of the MAC control regs. */
10595 else {
10596 hi = tr32(MAC_ADDR_0_HIGH);
10597 lo = tr32(MAC_ADDR_0_LOW);
10598
10599 dev->dev_addr[5] = lo & 0xff;
10600 dev->dev_addr[4] = (lo >> 8) & 0xff;
10601 dev->dev_addr[3] = (lo >> 16) & 0xff;
10602 dev->dev_addr[2] = (lo >> 24) & 0xff;
10603 dev->dev_addr[1] = hi & 0xff;
10604 dev->dev_addr[0] = (hi >> 8) & 0xff;
10605 }
10586 } 10606 }
10587 10607
10588 if (!is_valid_ether_addr(&dev->dev_addr[0])) { 10608 if (!is_valid_ether_addr(&dev->dev_addr[0])) {
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
index ee48bfd67349..f56094102042 100644
--- a/drivers/net/tulip/de4x5.c
+++ b/drivers/net/tulip/de4x5.c
@@ -513,7 +513,7 @@ struct mii_phy {
513 u_char *rst; /* Start of reset sequence in SROM */ 513 u_char *rst; /* Start of reset sequence in SROM */
514 u_int mc; /* Media Capabilities */ 514 u_int mc; /* Media Capabilities */
515 u_int ana; /* NWay Advertisement */ 515 u_int ana; /* NWay Advertisement */
516 u_int fdx; /* Full DupleX capabilites for each media */ 516 u_int fdx; /* Full DupleX capabilities for each media */
517 u_int ttm; /* Transmit Threshold Mode for each media */ 517 u_int ttm; /* Transmit Threshold Mode for each media */
518 u_int mci; /* 21142 MII Connector Interrupt info */ 518 u_int mci; /* 21142 MII Connector Interrupt info */
519}; 519};
@@ -4160,7 +4160,7 @@ get_hw_addr(struct net_device *dev)
4160 ** If the address starts with 00 a0, we have to bit-reverse 4160 ** If the address starts with 00 a0, we have to bit-reverse
4161 ** each byte of the address. 4161 ** each byte of the address.
4162 */ 4162 */
4163 if ( (_machine & _MACH_Pmac) && 4163 if ( machine_is(powermac) &&
4164 (dev->dev_addr[0] == 0) && 4164 (dev->dev_addr[0] == 0) &&
4165 (dev->dev_addr[1] == 0xa0) ) 4165 (dev->dev_addr[1] == 0xa0) )
4166 { 4166 {
diff --git a/drivers/net/tulip/pnic2.c b/drivers/net/tulip/pnic2.c
index 55f4a9a631bc..ab985023fcca 100644
--- a/drivers/net/tulip/pnic2.c
+++ b/drivers/net/tulip/pnic2.c
@@ -199,7 +199,7 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)
199 /* negotiation ended successfully */ 199 /* negotiation ended successfully */
200 200
201 /* get the link partners reply and mask out all but 201 /* get the link partners reply and mask out all but
202 * bits 24-21 which show the partners capabilites 202 * bits 24-21 which show the partners capabilities
203 * and match those to what we advertised 203 * and match those to what we advertised
204 * 204 *
205 * then begin to interpret the results of the negotiation. 205 * then begin to interpret the results of the negotiation.
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index cde35dd87906..c1ce87a5f8d3 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -208,7 +208,7 @@ static const struct typhoon_card_info typhoon_card_info[] __devinitdata = {
208}; 208};
209 209
210/* Notes on the new subsystem numbering scheme: 210/* Notes on the new subsystem numbering scheme:
211 * bits 0-1 indicate crypto capabilites: (0) variable, (1) DES, or (2) 3DES 211 * bits 0-1 indicate crypto capabilities: (0) variable, (1) DES, or (2) 3DES
212 * bit 4 indicates if this card has secured firmware (we don't support it) 212 * bit 4 indicates if this card has secured firmware (we don't support it)
213 * bit 8 indicates if this is a (0) copper or (1) fiber card 213 * bit 8 indicates if this is a (0) copper or (1) fiber card
214 * bits 12-16 indicate card type: (0) client and (1) server 214 * bits 12-16 indicate card type: (0) client and (1) server
@@ -788,7 +788,7 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
788 /* we have two rings to choose from, but we only use txLo for now 788 /* we have two rings to choose from, but we only use txLo for now
789 * If we start using the Hi ring as well, we'll need to update 789 * If we start using the Hi ring as well, we'll need to update
790 * typhoon_stop_runtime(), typhoon_interrupt(), typhoon_num_free_tx(), 790 * typhoon_stop_runtime(), typhoon_interrupt(), typhoon_num_free_tx(),
791 * and TXHI_ENTIRES to match, as well as update the TSO code below 791 * and TXHI_ENTRIES to match, as well as update the TSO code below
792 * to get the right DMA address 792 * to get the right DMA address
793 */ 793 */
794 txRing = &tp->txLoRing; 794 txRing = &tp->txLoRing;
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
index 241871589283..a9b2150909d6 100644
--- a/drivers/net/via-rhine.c
+++ b/drivers/net/via-rhine.c
@@ -1085,6 +1085,25 @@ static void rhine_check_media(struct net_device *dev, unsigned int init_media)
1085 else 1085 else
1086 iowrite8(ioread8(ioaddr + ChipCmd1) & ~Cmd1FDuplex, 1086 iowrite8(ioread8(ioaddr + ChipCmd1) & ~Cmd1FDuplex,
1087 ioaddr + ChipCmd1); 1087 ioaddr + ChipCmd1);
1088 if (debug > 1)
1089 printk(KERN_INFO "%s: force_media %d, carrier %d\n", dev->name,
1090 rp->mii_if.force_media, netif_carrier_ok(dev));
1091}
1092
1093/* Called after status of force_media possibly changed */
1094void rhine_set_carrier(struct mii_if_info *mii)
1095{
1096 if (mii->force_media) {
1097 /* autoneg is off: Link is always assumed to be up */
1098 if (!netif_carrier_ok(mii->dev))
1099 netif_carrier_on(mii->dev);
1100 }
1101 else /* Let MMI library update carrier status */
1102 rhine_check_media(mii->dev, 0);
1103 if (debug > 1)
1104 printk(KERN_INFO "%s: force_media %d, carrier %d\n",
1105 mii->dev->name, mii->force_media,
1106 netif_carrier_ok(mii->dev));
1088} 1107}
1089 1108
1090static void rhine_check_media_task(struct net_device *dev) 1109static void rhine_check_media_task(struct net_device *dev)
@@ -1782,6 +1801,7 @@ static int netdev_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
1782 spin_lock_irq(&rp->lock); 1801 spin_lock_irq(&rp->lock);
1783 rc = mii_ethtool_sset(&rp->mii_if, cmd); 1802 rc = mii_ethtool_sset(&rp->mii_if, cmd);
1784 spin_unlock_irq(&rp->lock); 1803 spin_unlock_irq(&rp->lock);
1804 rhine_set_carrier(&rp->mii_if);
1785 1805
1786 return rc; 1806 return rc;
1787} 1807}
@@ -1869,6 +1889,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
1869 spin_lock_irq(&rp->lock); 1889 spin_lock_irq(&rp->lock);
1870 rc = generic_mii_ioctl(&rp->mii_if, if_mii(rq), cmd, NULL); 1890 rc = generic_mii_ioctl(&rp->mii_if, if_mii(rq), cmd, NULL);
1871 spin_unlock_irq(&rp->lock); 1891 spin_unlock_irq(&rp->lock);
1892 rhine_set_carrier(&rp->mii_if);
1872 1893
1873 return rc; 1894 return rc;
1874} 1895}
diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c
index 9d3b51c3ef54..29a756dd979b 100644
--- a/drivers/net/wan/wanxl.c
+++ b/drivers/net/wan/wanxl.c
@@ -577,8 +577,8 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
577 We set both dma_mask and consistent_dma_mask to 28 bits 577 We set both dma_mask and consistent_dma_mask to 28 bits
578 and pray pci_alloc_consistent() will use this info. It should 578 and pray pci_alloc_consistent() will use this info. It should
579 work on most platforms */ 579 work on most platforms */
580 if (pci_set_consistent_dma_mask(pdev, 0x0FFFFFFF) || 580 if (pci_set_consistent_dma_mask(pdev, DMA_28BIT_MASK) ||
581 pci_set_dma_mask(pdev, 0x0FFFFFFF)) { 581 pci_set_dma_mask(pdev, DMA_28BIT_MASK)) {
582 printk(KERN_ERR "wanXL: No usable DMA configuration\n"); 582 printk(KERN_ERR "wanXL: No usable DMA configuration\n");
583 return -EIO; 583 return -EIO;
584 } 584 }
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index 6fd0bf736830..8dfdfbd5966c 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -3858,7 +3858,7 @@ static int orinoco_ioctl_setscan(struct net_device *dev,
3858 unsigned long flags; 3858 unsigned long flags;
3859 3859
3860 /* Note : you may have realised that, as this is a SET operation, 3860 /* Note : you may have realised that, as this is a SET operation,
3861 * this is priviledged and therefore a normal user can't 3861 * this is privileged and therefore a normal user can't
3862 * perform scanning. 3862 * perform scanning.
3863 * This is not an error, while the device perform scanning, 3863 * This is not an error, while the device perform scanning,
3864 * traffic doesn't flow, so it's a perfect DoS... 3864 * traffic doesn't flow, so it's a perfect DoS...
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c
index e5bb9f5ae429..989599ad33ef 100644
--- a/drivers/net/wireless/prism54/isl_ioctl.c
+++ b/drivers/net/wireless/prism54/isl_ioctl.c
@@ -747,7 +747,7 @@ prism54_get_essid(struct net_device *ndev, struct iw_request_info *info,
747 747
748 if (essid->length) { 748 if (essid->length) {
749 dwrq->flags = 1; /* set ESSID to ON for Wireless Extensions */ 749 dwrq->flags = 1; /* set ESSID to ON for Wireless Extensions */
750 /* if it is to big, trunk it */ 750 /* if it is too big, trunk it */
751 dwrq->length = min((u8)IW_ESSID_MAX_SIZE, essid->length); 751 dwrq->length = min((u8)IW_ESSID_MAX_SIZE, essid->length);
752 } else { 752 } else {
753 dwrq->flags = 0; 753 dwrq->flags = 0;
diff --git a/drivers/net/wireless/prism54/islpci_hotplug.c b/drivers/net/wireless/prism54/islpci_hotplug.c
index b41d666fea3c..bfa0cc319a09 100644
--- a/drivers/net/wireless/prism54/islpci_hotplug.c
+++ b/drivers/net/wireless/prism54/islpci_hotplug.c
@@ -22,6 +22,7 @@
22#include <linux/pci.h> 22#include <linux/pci.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/init.h> /* For __init, __exit */ 24#include <linux/init.h> /* For __init, __exit */
25#include <linux/dma-mapping.h>
25 26
26#include "prismcompat.h" 27#include "prismcompat.h"
27#include "islpci_dev.h" 28#include "islpci_dev.h"
@@ -124,7 +125,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
124 } 125 }
125 126
126 /* enable PCI DMA */ 127 /* enable PCI DMA */
127 if (pci_set_dma_mask(pdev, 0xffffffff)) { 128 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
128 printk(KERN_ERR "%s: 32-bit PCI DMA not supported", DRV_NAME); 129 printk(KERN_ERR "%s: 32-bit PCI DMA not supported", DRV_NAME);
129 goto do_pci_disable_device; 130 goto do_pci_disable_device;
130 } 131 }