diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-30 20:39:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-30 20:39:37 -0500 |
commit | 5ed1836814d908f45cafde0e79cb85314ab9d41d (patch) | |
tree | 53db7ccf23c78d105b63adf4ee40a07068f0f856 /drivers/net | |
parent | ab70537c32a3245325b48774664da588904e47f2 (diff) | |
parent | eb4dea5853046727bfbb579f0c9a8cae7369f7c6 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
net: Fix percpu counters deadlock
cpumask: prepare for iterators to only go to nr_cpu_ids/nr_cpumask_bits: net
drivers/net/usb: use USB API functions rather than constants
cls_cgroup: clean up Kconfig
cls_cgroup: clean up for cgroup part
cls_cgroup: fix an oops when removing a cgroup
EtherExpress16: fix printing timed out status
mlx4_en: Added "set_ringparam" Ethtool interface implementation
mlx4_en: Always allocate RX ring for each interrupt vector
mlx4_en: Verify number of RX rings doesn't exceed MAX_RX_RINGS
IPVS: Make "no destination available" message more consistent between schedulers
net: KS8695: removed duplicated #include
tun: Fix SIOCSIFHWADDR error.
smsc911x: compile fix re netif_rx signature changes
netns: foreach_netdev_safe is insufficient in default_device_exit
net: make xfrm_statistics_seq_show use generic snmp_fold_field
net: Fix more NAPI interface netdev argument drop fallout.
net: Fix unused variable warnings in pasemi_mac.c and spider_net.c
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/arm/ep93xx_eth.c | 2 | ||||
-rw-r--r-- | drivers/net/arm/ixp4xx_eth.c | 2 | ||||
-rw-r--r-- | drivers/net/arm/ks8695net.c | 1 | ||||
-rw-r--r-- | drivers/net/eexpress.h | 56 | ||||
-rw-r--r-- | drivers/net/mlx4/en_main.c | 11 | ||||
-rw-r--r-- | drivers/net/mlx4/en_netdev.c | 8 | ||||
-rw-r--r-- | drivers/net/mlx4/en_params.c | 87 | ||||
-rw-r--r-- | drivers/net/mlx4/mlx4_en.h | 6 | ||||
-rw-r--r-- | drivers/net/pasemi_mac.c | 2 | ||||
-rw-r--r-- | drivers/net/smsc911x.c | 4 | ||||
-rw-r--r-- | drivers/net/spider_net.c | 1 | ||||
-rw-r--r-- | drivers/net/tun.c | 2 | ||||
-rw-r--r-- | drivers/net/usb/hso.c | 2 | ||||
-rw-r--r-- | drivers/net/wan/ixp4xx_hss.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_usb.c | 3 |
15 files changed, 102 insertions, 87 deletions
diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c index 6ecc600c1bcc..3ec20cc18b0c 100644 --- a/drivers/net/arm/ep93xx_eth.c +++ b/drivers/net/arm/ep93xx_eth.c | |||
@@ -307,7 +307,7 @@ poll_some_more: | |||
307 | } | 307 | } |
308 | spin_unlock_irq(&ep->rx_lock); | 308 | spin_unlock_irq(&ep->rx_lock); |
309 | 309 | ||
310 | if (more && netif_rx_reschedule(dev, napi)) | 310 | if (more && netif_rx_reschedule(napi)) |
311 | goto poll_some_more; | 311 | goto poll_some_more; |
312 | } | 312 | } |
313 | 313 | ||
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c index 26af411fc428..5fce1d5c1a1a 100644 --- a/drivers/net/arm/ixp4xx_eth.c +++ b/drivers/net/arm/ixp4xx_eth.c | |||
@@ -504,7 +504,7 @@ static int eth_poll(struct napi_struct *napi, int budget) | |||
504 | netif_rx_complete(napi); | 504 | netif_rx_complete(napi); |
505 | qmgr_enable_irq(rxq); | 505 | qmgr_enable_irq(rxq); |
506 | if (!qmgr_stat_empty(rxq) && | 506 | if (!qmgr_stat_empty(rxq) && |
507 | netif_rx_reschedule(dev, napi)) { | 507 | netif_rx_reschedule(napi)) { |
508 | #if DEBUG_RX | 508 | #if DEBUG_RX |
509 | printk(KERN_DEBUG "%s: eth_poll" | 509 | printk(KERN_DEBUG "%s: eth_poll" |
510 | " netif_rx_reschedule successed\n", | 510 | " netif_rx_reschedule successed\n", |
diff --git a/drivers/net/arm/ks8695net.c b/drivers/net/arm/ks8695net.c index 592daee9dc28..9ad22d1b00fd 100644 --- a/drivers/net/arm/ks8695net.c +++ b/drivers/net/arm/ks8695net.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | #include <linux/irq.h> | 31 | #include <linux/irq.h> |
32 | #include <linux/delay.h> | ||
33 | #include <linux/io.h> | 32 | #include <linux/io.h> |
34 | 33 | ||
35 | #include <asm/irq.h> | 34 | #include <asm/irq.h> |
diff --git a/drivers/net/eexpress.h b/drivers/net/eexpress.h index 707df3fcfe40..dc9c6ea289e9 100644 --- a/drivers/net/eexpress.h +++ b/drivers/net/eexpress.h | |||
@@ -68,17 +68,17 @@ | |||
68 | */ | 68 | */ |
69 | 69 | ||
70 | /* these functions take the SCB status word and test the relevant status bit */ | 70 | /* these functions take the SCB status word and test the relevant status bit */ |
71 | #define SCB_complete(s) ((s&0x8000)!=0) | 71 | #define SCB_complete(s) (((s) & 0x8000) != 0) |
72 | #define SCB_rxdframe(s) ((s&0x4000)!=0) | 72 | #define SCB_rxdframe(s) (((s) & 0x4000) != 0) |
73 | #define SCB_CUdead(s) ((s&0x2000)!=0) | 73 | #define SCB_CUdead(s) (((s) & 0x2000) != 0) |
74 | #define SCB_RUdead(s) ((s&0x1000)!=0) | 74 | #define SCB_RUdead(s) (((s) & 0x1000) != 0) |
75 | #define SCB_ack(s) (s & 0xf000) | 75 | #define SCB_ack(s) ((s) & 0xf000) |
76 | 76 | ||
77 | /* Command unit status: 0=idle, 1=suspended, 2=active */ | 77 | /* Command unit status: 0=idle, 1=suspended, 2=active */ |
78 | #define SCB_CUstat(s) ((s&0x0300)>>8) | 78 | #define SCB_CUstat(s) (((s)&0x0300)>>8) |
79 | 79 | ||
80 | /* Receive unit status: 0=idle, 1=suspended, 2=out of resources, 4=ready */ | 80 | /* Receive unit status: 0=idle, 1=suspended, 2=out of resources, 4=ready */ |
81 | #define SCB_RUstat(s) ((s&0x0070)>>4) | 81 | #define SCB_RUstat(s) (((s)&0x0070)>>4) |
82 | 82 | ||
83 | /* SCB commands */ | 83 | /* SCB commands */ |
84 | #define SCB_CUnop 0x0000 | 84 | #define SCB_CUnop 0x0000 |
@@ -98,18 +98,18 @@ | |||
98 | * Command block defines | 98 | * Command block defines |
99 | */ | 99 | */ |
100 | 100 | ||
101 | #define Stat_Done(s) ((s&0x8000)!=0) | 101 | #define Stat_Done(s) (((s) & 0x8000) != 0) |
102 | #define Stat_Busy(s) ((s&0x4000)!=0) | 102 | #define Stat_Busy(s) (((s) & 0x4000) != 0) |
103 | #define Stat_OK(s) ((s&0x2000)!=0) | 103 | #define Stat_OK(s) (((s) & 0x2000) != 0) |
104 | #define Stat_Abort(s) ((s&0x1000)!=0) | 104 | #define Stat_Abort(s) (((s) & 0x1000) != 0) |
105 | #define Stat_STFail ((s&0x0800)!=0) | 105 | #define Stat_STFail (((s) & 0x0800) != 0) |
106 | #define Stat_TNoCar(s) ((s&0x0400)!=0) | 106 | #define Stat_TNoCar(s) (((s) & 0x0400) != 0) |
107 | #define Stat_TNoCTS(s) ((s&0x0200)!=0) | 107 | #define Stat_TNoCTS(s) (((s) & 0x0200) != 0) |
108 | #define Stat_TNoDMA(s) ((s&0x0100)!=0) | 108 | #define Stat_TNoDMA(s) (((s) & 0x0100) != 0) |
109 | #define Stat_TDefer(s) ((s&0x0080)!=0) | 109 | #define Stat_TDefer(s) (((s) & 0x0080) != 0) |
110 | #define Stat_TColl(s) ((s&0x0040)!=0) | 110 | #define Stat_TColl(s) (((s) & 0x0040) != 0) |
111 | #define Stat_TXColl(s) ((s&0x0020)!=0) | 111 | #define Stat_TXColl(s) (((s) & 0x0020) != 0) |
112 | #define Stat_NoColl(s) (s&0x000f) | 112 | #define Stat_NoColl(s) ((s) & 0x000f) |
113 | 113 | ||
114 | /* Cmd_END will end AFTER the command if this is the first | 114 | /* Cmd_END will end AFTER the command if this is the first |
115 | * command block after an SCB_CUstart, but BEFORE the command | 115 | * command block after an SCB_CUstart, but BEFORE the command |
@@ -136,16 +136,16 @@ | |||
136 | * Frame Descriptor (Receive block) defines | 136 | * Frame Descriptor (Receive block) defines |
137 | */ | 137 | */ |
138 | 138 | ||
139 | #define FD_Done(s) ((s&0x8000)!=0) | 139 | #define FD_Done(s) (((s) & 0x8000) != 0) |
140 | #define FD_Busy(s) ((s&0x4000)!=0) | 140 | #define FD_Busy(s) (((s) & 0x4000) != 0) |
141 | #define FD_OK(s) ((s&0x2000)!=0) | 141 | #define FD_OK(s) (((s) & 0x2000) != 0) |
142 | 142 | ||
143 | #define FD_CRC(s) ((s&0x0800)!=0) | 143 | #define FD_CRC(s) (((s) & 0x0800) != 0) |
144 | #define FD_Align(s) ((s&0x0400)!=0) | 144 | #define FD_Align(s) (((s) & 0x0400) != 0) |
145 | #define FD_Resrc(s) ((s&0x0200)!=0) | 145 | #define FD_Resrc(s) (((s) & 0x0200) != 0) |
146 | #define FD_DMA(s) ((s&0x0100)!=0) | 146 | #define FD_DMA(s) (((s) & 0x0100) != 0) |
147 | #define FD_Short(s) ((s&0x0080)!=0) | 147 | #define FD_Short(s) (((s) & 0x0080) != 0) |
148 | #define FD_NoEOF(s) ((s&0x0040)!=0) | 148 | #define FD_NoEOF(s) (((s) & 0x0040) != 0) |
149 | 149 | ||
150 | struct rfd_header { | 150 | struct rfd_header { |
151 | volatile unsigned long flags; | 151 | volatile unsigned long flags; |
diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c index c1c05852a95e..eda72dd2120f 100644 --- a/drivers/net/mlx4/en_main.c +++ b/drivers/net/mlx4/en_main.c | |||
@@ -169,13 +169,10 @@ static void *mlx4_en_add(struct mlx4_dev *dev) | |||
169 | mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH) { | 169 | mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH) { |
170 | mlx4_info(mdev, "Using %d tx rings for port:%d\n", | 170 | mlx4_info(mdev, "Using %d tx rings for port:%d\n", |
171 | mdev->profile.prof[i].tx_ring_num, i); | 171 | mdev->profile.prof[i].tx_ring_num, i); |
172 | if (!mdev->profile.prof[i].rx_ring_num) { | 172 | mdev->profile.prof[i].rx_ring_num = |
173 | mdev->profile.prof[i].rx_ring_num = dev->caps.num_comp_vectors; | 173 | min_t(int, dev->caps.num_comp_vectors, MAX_RX_RINGS); |
174 | mlx4_info(mdev, "Defaulting to %d rx rings for port:%d\n", | 174 | mlx4_info(mdev, "Defaulting to %d rx rings for port:%d\n", |
175 | mdev->profile.prof[i].rx_ring_num, i); | 175 | mdev->profile.prof[i].rx_ring_num, i); |
176 | } else | ||
177 | mlx4_info(mdev, "Using %d rx rings for port:%d\n", | ||
178 | mdev->profile.prof[i].rx_ring_num, i); | ||
179 | } | 176 | } |
180 | 177 | ||
181 | /* Create our own workqueue for reset/multicast tasks | 178 | /* Create our own workqueue for reset/multicast tasks |
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c index ebada3c7aff2..15bb38d99304 100644 --- a/drivers/net/mlx4/en_netdev.c +++ b/drivers/net/mlx4/en_netdev.c | |||
@@ -552,7 +552,7 @@ static void mlx4_en_linkstate(struct work_struct *work) | |||
552 | } | 552 | } |
553 | 553 | ||
554 | 554 | ||
555 | static int mlx4_en_start_port(struct net_device *dev) | 555 | int mlx4_en_start_port(struct net_device *dev) |
556 | { | 556 | { |
557 | struct mlx4_en_priv *priv = netdev_priv(dev); | 557 | struct mlx4_en_priv *priv = netdev_priv(dev); |
558 | struct mlx4_en_dev *mdev = priv->mdev; | 558 | struct mlx4_en_dev *mdev = priv->mdev; |
@@ -707,7 +707,7 @@ cq_err: | |||
707 | } | 707 | } |
708 | 708 | ||
709 | 709 | ||
710 | static void mlx4_en_stop_port(struct net_device *dev) | 710 | void mlx4_en_stop_port(struct net_device *dev) |
711 | { | 711 | { |
712 | struct mlx4_en_priv *priv = netdev_priv(dev); | 712 | struct mlx4_en_priv *priv = netdev_priv(dev); |
713 | struct mlx4_en_dev *mdev = priv->mdev; | 713 | struct mlx4_en_dev *mdev = priv->mdev; |
@@ -826,7 +826,7 @@ static int mlx4_en_close(struct net_device *dev) | |||
826 | return 0; | 826 | return 0; |
827 | } | 827 | } |
828 | 828 | ||
829 | static void mlx4_en_free_resources(struct mlx4_en_priv *priv) | 829 | void mlx4_en_free_resources(struct mlx4_en_priv *priv) |
830 | { | 830 | { |
831 | int i; | 831 | int i; |
832 | 832 | ||
@@ -845,7 +845,7 @@ static void mlx4_en_free_resources(struct mlx4_en_priv *priv) | |||
845 | } | 845 | } |
846 | } | 846 | } |
847 | 847 | ||
848 | static int mlx4_en_alloc_resources(struct mlx4_en_priv *priv) | 848 | int mlx4_en_alloc_resources(struct mlx4_en_priv *priv) |
849 | { | 849 | { |
850 | struct mlx4_en_dev *mdev = priv->mdev; | 850 | struct mlx4_en_dev *mdev = priv->mdev; |
851 | struct mlx4_en_port_profile *prof = priv->prof; | 851 | struct mlx4_en_port_profile *prof = priv->prof; |
diff --git a/drivers/net/mlx4/en_params.c b/drivers/net/mlx4/en_params.c index 047b37f5a747..cfeef0f1bacc 100644 --- a/drivers/net/mlx4/en_params.c +++ b/drivers/net/mlx4/en_params.c | |||
@@ -65,15 +65,6 @@ MLX4_EN_PARM_INT(pfctx, 0, "Priority based Flow Control policy on TX[7:0]." | |||
65 | MLX4_EN_PARM_INT(pfcrx, 0, "Priority based Flow Control policy on RX[7:0]." | 65 | MLX4_EN_PARM_INT(pfcrx, 0, "Priority based Flow Control policy on RX[7:0]." |
66 | " Per priority bit mask"); | 66 | " Per priority bit mask"); |
67 | 67 | ||
68 | MLX4_EN_PARM_INT(rx_ring_num1, 0, "Number or Rx rings for port 1 (0 = #cores)"); | ||
69 | MLX4_EN_PARM_INT(rx_ring_num2, 0, "Number or Rx rings for port 2 (0 = #cores)"); | ||
70 | |||
71 | MLX4_EN_PARM_INT(tx_ring_size1, MLX4_EN_AUTO_CONF, "Tx ring size for port 1"); | ||
72 | MLX4_EN_PARM_INT(tx_ring_size2, MLX4_EN_AUTO_CONF, "Tx ring size for port 2"); | ||
73 | MLX4_EN_PARM_INT(rx_ring_size1, MLX4_EN_AUTO_CONF, "Rx ring size for port 1"); | ||
74 | MLX4_EN_PARM_INT(rx_ring_size2, MLX4_EN_AUTO_CONF, "Rx ring size for port 2"); | ||
75 | |||
76 | |||
77 | int mlx4_en_get_profile(struct mlx4_en_dev *mdev) | 68 | int mlx4_en_get_profile(struct mlx4_en_dev *mdev) |
78 | { | 69 | { |
79 | struct mlx4_en_profile *params = &mdev->profile; | 70 | struct mlx4_en_profile *params = &mdev->profile; |
@@ -87,6 +78,8 @@ int mlx4_en_get_profile(struct mlx4_en_dev *mdev) | |||
87 | params->prof[i].rx_ppp = pfcrx; | 78 | params->prof[i].rx_ppp = pfcrx; |
88 | params->prof[i].tx_pause = 1; | 79 | params->prof[i].tx_pause = 1; |
89 | params->prof[i].tx_ppp = pfctx; | 80 | params->prof[i].tx_ppp = pfctx; |
81 | params->prof[i].tx_ring_size = MLX4_EN_DEF_TX_RING_SIZE; | ||
82 | params->prof[i].rx_ring_size = MLX4_EN_DEF_RX_RING_SIZE; | ||
90 | } | 83 | } |
91 | if (pfcrx || pfctx) { | 84 | if (pfcrx || pfctx) { |
92 | params->prof[1].tx_ring_num = MLX4_EN_TX_RING_NUM; | 85 | params->prof[1].tx_ring_num = MLX4_EN_TX_RING_NUM; |
@@ -95,32 +88,7 @@ int mlx4_en_get_profile(struct mlx4_en_dev *mdev) | |||
95 | params->prof[1].tx_ring_num = 1; | 88 | params->prof[1].tx_ring_num = 1; |
96 | params->prof[2].tx_ring_num = 1; | 89 | params->prof[2].tx_ring_num = 1; |
97 | } | 90 | } |
98 | params->prof[1].rx_ring_num = min_t(int, rx_ring_num1, MAX_RX_RINGS); | 91 | |
99 | params->prof[2].rx_ring_num = min_t(int, rx_ring_num2, MAX_RX_RINGS); | ||
100 | |||
101 | if (tx_ring_size1 == MLX4_EN_AUTO_CONF) | ||
102 | tx_ring_size1 = MLX4_EN_DEF_TX_RING_SIZE; | ||
103 | params->prof[1].tx_ring_size = | ||
104 | (tx_ring_size1 < MLX4_EN_MIN_TX_SIZE) ? | ||
105 | MLX4_EN_MIN_TX_SIZE : roundup_pow_of_two(tx_ring_size1); | ||
106 | |||
107 | if (tx_ring_size2 == MLX4_EN_AUTO_CONF) | ||
108 | tx_ring_size2 = MLX4_EN_DEF_TX_RING_SIZE; | ||
109 | params->prof[2].tx_ring_size = | ||
110 | (tx_ring_size2 < MLX4_EN_MIN_TX_SIZE) ? | ||
111 | MLX4_EN_MIN_TX_SIZE : roundup_pow_of_two(tx_ring_size2); | ||
112 | |||
113 | if (rx_ring_size1 == MLX4_EN_AUTO_CONF) | ||
114 | rx_ring_size1 = MLX4_EN_DEF_RX_RING_SIZE; | ||
115 | params->prof[1].rx_ring_size = | ||
116 | (rx_ring_size1 < MLX4_EN_MIN_RX_SIZE) ? | ||
117 | MLX4_EN_MIN_RX_SIZE : roundup_pow_of_two(rx_ring_size1); | ||
118 | |||
119 | if (rx_ring_size2 == MLX4_EN_AUTO_CONF) | ||
120 | rx_ring_size2 = MLX4_EN_DEF_RX_RING_SIZE; | ||
121 | params->prof[2].rx_ring_size = | ||
122 | (rx_ring_size2 < MLX4_EN_MIN_RX_SIZE) ? | ||
123 | MLX4_EN_MIN_RX_SIZE : roundup_pow_of_two(rx_ring_size2); | ||
124 | return 0; | 92 | return 0; |
125 | } | 93 | } |
126 | 94 | ||
@@ -417,6 +385,54 @@ static void mlx4_en_get_pauseparam(struct net_device *dev, | |||
417 | pause->rx_pause = priv->prof->rx_pause; | 385 | pause->rx_pause = priv->prof->rx_pause; |
418 | } | 386 | } |
419 | 387 | ||
388 | static int mlx4_en_set_ringparam(struct net_device *dev, | ||
389 | struct ethtool_ringparam *param) | ||
390 | { | ||
391 | struct mlx4_en_priv *priv = netdev_priv(dev); | ||
392 | struct mlx4_en_dev *mdev = priv->mdev; | ||
393 | u32 rx_size, tx_size; | ||
394 | int port_up = 0; | ||
395 | int err = 0; | ||
396 | |||
397 | if (param->rx_jumbo_pending || param->rx_mini_pending) | ||
398 | return -EINVAL; | ||
399 | |||
400 | rx_size = roundup_pow_of_two(param->rx_pending); | ||
401 | rx_size = max_t(u32, rx_size, MLX4_EN_MIN_RX_SIZE); | ||
402 | tx_size = roundup_pow_of_two(param->tx_pending); | ||
403 | tx_size = max_t(u32, tx_size, MLX4_EN_MIN_TX_SIZE); | ||
404 | |||
405 | if (rx_size == priv->prof->rx_ring_size && | ||
406 | tx_size == priv->prof->tx_ring_size) | ||
407 | return 0; | ||
408 | |||
409 | mutex_lock(&mdev->state_lock); | ||
410 | if (priv->port_up) { | ||
411 | port_up = 1; | ||
412 | mlx4_en_stop_port(dev); | ||
413 | } | ||
414 | |||
415 | mlx4_en_free_resources(priv); | ||
416 | |||
417 | priv->prof->tx_ring_size = tx_size; | ||
418 | priv->prof->rx_ring_size = rx_size; | ||
419 | |||
420 | err = mlx4_en_alloc_resources(priv); | ||
421 | if (err) { | ||
422 | mlx4_err(mdev, "Failed reallocating port resources\n"); | ||
423 | goto out; | ||
424 | } | ||
425 | if (port_up) { | ||
426 | err = mlx4_en_start_port(dev); | ||
427 | if (err) | ||
428 | mlx4_err(mdev, "Failed starting port\n"); | ||
429 | } | ||
430 | |||
431 | out: | ||
432 | mutex_unlock(&mdev->state_lock); | ||
433 | return err; | ||
434 | } | ||
435 | |||
420 | static void mlx4_en_get_ringparam(struct net_device *dev, | 436 | static void mlx4_en_get_ringparam(struct net_device *dev, |
421 | struct ethtool_ringparam *param) | 437 | struct ethtool_ringparam *param) |
422 | { | 438 | { |
@@ -456,6 +472,7 @@ const struct ethtool_ops mlx4_en_ethtool_ops = { | |||
456 | .get_pauseparam = mlx4_en_get_pauseparam, | 472 | .get_pauseparam = mlx4_en_get_pauseparam, |
457 | .set_pauseparam = mlx4_en_set_pauseparam, | 473 | .set_pauseparam = mlx4_en_set_pauseparam, |
458 | .get_ringparam = mlx4_en_get_ringparam, | 474 | .get_ringparam = mlx4_en_get_ringparam, |
475 | .set_ringparam = mlx4_en_set_ringparam, | ||
459 | .get_flags = ethtool_op_get_flags, | 476 | .get_flags = ethtool_op_get_flags, |
460 | .set_flags = ethtool_op_set_flags, | 477 | .set_flags = ethtool_op_set_flags, |
461 | }; | 478 | }; |
diff --git a/drivers/net/mlx4/mlx4_en.h b/drivers/net/mlx4/mlx4_en.h index e78209768def..2e96c7b2180a 100644 --- a/drivers/net/mlx4/mlx4_en.h +++ b/drivers/net/mlx4/mlx4_en.h | |||
@@ -489,6 +489,12 @@ void mlx4_en_destroy_netdev(struct net_device *dev); | |||
489 | int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, | 489 | int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, |
490 | struct mlx4_en_port_profile *prof); | 490 | struct mlx4_en_port_profile *prof); |
491 | 491 | ||
492 | int mlx4_en_start_port(struct net_device *dev); | ||
493 | void mlx4_en_stop_port(struct net_device *dev); | ||
494 | |||
495 | void mlx4_en_free_resources(struct mlx4_en_priv *priv); | ||
496 | int mlx4_en_alloc_resources(struct mlx4_en_priv *priv); | ||
497 | |||
492 | int mlx4_en_get_profile(struct mlx4_en_dev *mdev); | 498 | int mlx4_en_get_profile(struct mlx4_en_dev *mdev); |
493 | 499 | ||
494 | int mlx4_en_create_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq, | 500 | int mlx4_en_create_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq, |
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c index dcd199045613..5b7a574ce571 100644 --- a/drivers/net/pasemi_mac.c +++ b/drivers/net/pasemi_mac.c | |||
@@ -954,7 +954,6 @@ static irqreturn_t pasemi_mac_rx_intr(int irq, void *data) | |||
954 | { | 954 | { |
955 | const struct pasemi_mac_rxring *rxring = data; | 955 | const struct pasemi_mac_rxring *rxring = data; |
956 | struct pasemi_mac *mac = rxring->mac; | 956 | struct pasemi_mac *mac = rxring->mac; |
957 | struct net_device *dev = mac->netdev; | ||
958 | const struct pasemi_dmachan *chan = &rxring->chan; | 957 | const struct pasemi_dmachan *chan = &rxring->chan; |
959 | unsigned int reg; | 958 | unsigned int reg; |
960 | 959 | ||
@@ -1634,7 +1633,6 @@ static void pasemi_mac_set_rx_mode(struct net_device *dev) | |||
1634 | static int pasemi_mac_poll(struct napi_struct *napi, int budget) | 1633 | static int pasemi_mac_poll(struct napi_struct *napi, int budget) |
1635 | { | 1634 | { |
1636 | struct pasemi_mac *mac = container_of(napi, struct pasemi_mac, napi); | 1635 | struct pasemi_mac *mac = container_of(napi, struct pasemi_mac, napi); |
1637 | struct net_device *dev = mac->netdev; | ||
1638 | int pkts; | 1636 | int pkts; |
1639 | 1637 | ||
1640 | pasemi_mac_clean_tx(tx_ring(mac)); | 1638 | pasemi_mac_clean_tx(tx_ring(mac)); |
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index 5e989d884ddd..dc3f1108884d 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c | |||
@@ -1484,13 +1484,13 @@ static irqreturn_t smsc911x_irqhandler(int irq, void *dev_id) | |||
1484 | } | 1484 | } |
1485 | 1485 | ||
1486 | if (likely(intsts & inten & INT_STS_RSFL_)) { | 1486 | if (likely(intsts & inten & INT_STS_RSFL_)) { |
1487 | if (likely(netif_rx_schedule_prep(dev, &pdata->napi))) { | 1487 | if (likely(netif_rx_schedule_prep(&pdata->napi))) { |
1488 | /* Disable Rx interrupts */ | 1488 | /* Disable Rx interrupts */ |
1489 | temp = smsc911x_reg_read(pdata, INT_EN); | 1489 | temp = smsc911x_reg_read(pdata, INT_EN); |
1490 | temp &= (~INT_EN_RSFL_EN_); | 1490 | temp &= (~INT_EN_RSFL_EN_); |
1491 | smsc911x_reg_write(pdata, INT_EN, temp); | 1491 | smsc911x_reg_write(pdata, INT_EN, temp); |
1492 | /* Schedule a NAPI poll */ | 1492 | /* Schedule a NAPI poll */ |
1493 | __netif_rx_schedule(dev, &pdata->napi); | 1493 | __netif_rx_schedule(&pdata->napi); |
1494 | } else { | 1494 | } else { |
1495 | SMSC_WARNING(RX_ERR, | 1495 | SMSC_WARNING(RX_ERR, |
1496 | "netif_rx_schedule_prep failed"); | 1496 | "netif_rx_schedule_prep failed"); |
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index c5c123d3af57..88d2c67788df 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -1277,7 +1277,6 @@ bad_desc: | |||
1277 | static int spider_net_poll(struct napi_struct *napi, int budget) | 1277 | static int spider_net_poll(struct napi_struct *napi, int budget) |
1278 | { | 1278 | { |
1279 | struct spider_net_card *card = container_of(napi, struct spider_net_card, napi); | 1279 | struct spider_net_card *card = container_of(napi, struct spider_net_card, napi); |
1280 | struct net_device *netdev = card->netdev; | ||
1281 | int packets_done = 0; | 1280 | int packets_done = 0; |
1282 | 1281 | ||
1283 | while (packets_done < budget) { | 1282 | while (packets_done < budget) { |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 666c1d98cdaf..69f9a0ec764d 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -343,7 +343,7 @@ static void tun_net_init(struct net_device *dev) | |||
343 | break; | 343 | break; |
344 | 344 | ||
345 | case TUN_TAP_DEV: | 345 | case TUN_TAP_DEV: |
346 | dev->netdev_ops = &tun_netdev_ops; | 346 | dev->netdev_ops = &tap_netdev_ops; |
347 | /* Ethernet TAP Device */ | 347 | /* Ethernet TAP Device */ |
348 | ether_setup(dev); | 348 | ether_setup(dev); |
349 | 349 | ||
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 198ce3cf378a..9f7896a25f1b 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -2831,7 +2831,7 @@ static struct usb_endpoint_descriptor *hso_get_ep(struct usb_interface *intf, | |||
2831 | for (i = 0; i < iface->desc.bNumEndpoints; i++) { | 2831 | for (i = 0; i < iface->desc.bNumEndpoints; i++) { |
2832 | endp = &iface->endpoint[i].desc; | 2832 | endp = &iface->endpoint[i].desc; |
2833 | if (((endp->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == dir) && | 2833 | if (((endp->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == dir) && |
2834 | ((endp->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == type)) | 2834 | (usb_endpoint_type(endp) == type)) |
2835 | return endp; | 2835 | return endp; |
2836 | } | 2836 | } |
2837 | 2837 | ||
diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c index 0c6802507a79..2dc241689d37 100644 --- a/drivers/net/wan/ixp4xx_hss.c +++ b/drivers/net/wan/ixp4xx_hss.c | |||
@@ -654,7 +654,7 @@ static int hss_hdlc_poll(struct napi_struct *napi, int budget) | |||
654 | netif_rx_complete(dev, napi); | 654 | netif_rx_complete(dev, napi); |
655 | qmgr_enable_irq(rxq); | 655 | qmgr_enable_irq(rxq); |
656 | if (!qmgr_stat_empty(rxq) && | 656 | if (!qmgr_stat_empty(rxq) && |
657 | netif_rx_reschedule(dev, napi)) { | 657 | netif_rx_reschedule(napi)) { |
658 | #if DEBUG_RX | 658 | #if DEBUG_RX |
659 | printk(KERN_DEBUG "%s: hss_hdlc_poll" | 659 | printk(KERN_DEBUG "%s: hss_hdlc_poll" |
660 | " netif_rx_reschedule succeeded\n", | 660 | " netif_rx_reschedule succeeded\n", |
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index 04c139666965..b5db57d2fcf5 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
@@ -1065,8 +1065,7 @@ static int eject_installer(struct usb_interface *intf) | |||
1065 | /* Find bulk out endpoint */ | 1065 | /* Find bulk out endpoint */ |
1066 | endpoint = &iface_desc->endpoint[1].desc; | 1066 | endpoint = &iface_desc->endpoint[1].desc; |
1067 | if ((endpoint->bEndpointAddress & USB_TYPE_MASK) == USB_DIR_OUT && | 1067 | if ((endpoint->bEndpointAddress & USB_TYPE_MASK) == USB_DIR_OUT && |
1068 | (endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | 1068 | usb_endpoint_xfer_bulk(endpoint)) { |
1069 | USB_ENDPOINT_XFER_BULK) { | ||
1070 | bulk_out_ep = endpoint->bEndpointAddress; | 1069 | bulk_out_ep = endpoint->bEndpointAddress; |
1071 | } else { | 1070 | } else { |
1072 | dev_err(&udev->dev, | 1071 | dev_err(&udev->dev, |