aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/arm/ep93xx_eth.c2
-rw-r--r--drivers/net/arm/ixp4xx_eth.c2
-rw-r--r--drivers/net/arm/ks8695net.c1
-rw-r--r--drivers/net/cs89x0.c6
-rw-r--r--drivers/net/eexpress.h56
-rw-r--r--drivers/net/irda/pxaficp_ir.c46
-rw-r--r--drivers/net/irda/sa1100_ir.c2
-rw-r--r--drivers/net/mlx4/en_main.c11
-rw-r--r--drivers/net/mlx4/en_netdev.c8
-rw-r--r--drivers/net/mlx4/en_params.c87
-rw-r--r--drivers/net/mlx4/mlx4_en.h6
-rw-r--r--drivers/net/pasemi_mac.c2
-rw-r--r--drivers/net/smc911x.h3
-rw-r--r--drivers/net/smc91x.h3
-rw-r--r--drivers/net/smsc911x.c4
-rw-r--r--drivers/net/spider_net.c1
-rw-r--r--drivers/net/tun.c2
-rw-r--r--drivers/net/usb/hso.c2
-rw-r--r--drivers/net/wan/ixp4xx_hss.c2
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c3
20 files changed, 154 insertions, 95 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/cs89x0.c b/drivers/net/cs89x0.c
index d548a45d59d5..ff6497658a45 100644
--- a/drivers/net/cs89x0.c
+++ b/drivers/net/cs89x0.c
@@ -170,11 +170,7 @@ static char version[] __initdata =
170/* The cs8900 has 4 IRQ pins, software selectable. cs8900_irq_map maps 170/* The cs8900 has 4 IRQ pins, software selectable. cs8900_irq_map maps
171 them to system IRQ numbers. This mapping is card specific and is set to 171 them to system IRQ numbers. This mapping is card specific and is set to
172 the configuration of the Cirrus Eval board for this chip. */ 172 the configuration of the Cirrus Eval board for this chip. */
173#ifdef CONFIG_ARCH_CLPS7500 173#if defined(CONFIG_SH_HICOSH4)
174static unsigned int netcard_portlist[] __used __initdata =
175 { 0x80090303, 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0};
176static unsigned int cs8900_irq_map[] = {12,0,0,0};
177#elif defined(CONFIG_SH_HICOSH4)
178static unsigned int netcard_portlist[] __used __initdata = 174static unsigned int netcard_portlist[] __used __initdata =
179 { 0x0300, 0}; 175 { 0x0300, 0};
180static unsigned int cs8900_irq_map[] = {1,0,0,0}; 176static unsigned int cs8900_irq_map[] = {1,0,0,0};
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
150struct rfd_header { 150struct rfd_header {
151 volatile unsigned long flags; 151 volatile unsigned long flags;
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
index a0ee05318155..004a9aab3a50 100644
--- a/drivers/net/irda/pxaficp_ir.c
+++ b/drivers/net/irda/pxaficp_ir.c
@@ -22,9 +22,53 @@
22#include <net/irda/wrapper.h> 22#include <net/irda/wrapper.h>
23#include <net/irda/irda_device.h> 23#include <net/irda/irda_device.h>
24 24
25#include <asm/dma.h> 25#include <mach/dma.h>
26#include <mach/irda.h> 26#include <mach/irda.h>
27#include <mach/hardware.h>
27#include <mach/pxa-regs.h> 28#include <mach/pxa-regs.h>
29#include <mach/regs-uart.h>
30
31#define FICP __REG(0x40800000) /* Start of FICP area */
32#define ICCR0 __REG(0x40800000) /* ICP Control Register 0 */
33#define ICCR1 __REG(0x40800004) /* ICP Control Register 1 */
34#define ICCR2 __REG(0x40800008) /* ICP Control Register 2 */
35#define ICDR __REG(0x4080000c) /* ICP Data Register */
36#define ICSR0 __REG(0x40800014) /* ICP Status Register 0 */
37#define ICSR1 __REG(0x40800018) /* ICP Status Register 1 */
38
39#define ICCR0_AME (1 << 7) /* Address match enable */
40#define ICCR0_TIE (1 << 6) /* Transmit FIFO interrupt enable */
41#define ICCR0_RIE (1 << 5) /* Recieve FIFO interrupt enable */
42#define ICCR0_RXE (1 << 4) /* Receive enable */
43#define ICCR0_TXE (1 << 3) /* Transmit enable */
44#define ICCR0_TUS (1 << 2) /* Transmit FIFO underrun select */
45#define ICCR0_LBM (1 << 1) /* Loopback mode */
46#define ICCR0_ITR (1 << 0) /* IrDA transmission */
47
48#define ICCR2_RXP (1 << 3) /* Receive Pin Polarity select */
49#define ICCR2_TXP (1 << 2) /* Transmit Pin Polarity select */
50#define ICCR2_TRIG (3 << 0) /* Receive FIFO Trigger threshold */
51#define ICCR2_TRIG_8 (0 << 0) /* >= 8 bytes */
52#define ICCR2_TRIG_16 (1 << 0) /* >= 16 bytes */
53#define ICCR2_TRIG_32 (2 << 0) /* >= 32 bytes */
54
55#ifdef CONFIG_PXA27x
56#define ICSR0_EOC (1 << 6) /* DMA End of Descriptor Chain */
57#endif
58#define ICSR0_FRE (1 << 5) /* Framing error */
59#define ICSR0_RFS (1 << 4) /* Receive FIFO service request */
60#define ICSR0_TFS (1 << 3) /* Transnit FIFO service request */
61#define ICSR0_RAB (1 << 2) /* Receiver abort */
62#define ICSR0_TUR (1 << 1) /* Trunsmit FIFO underun */
63#define ICSR0_EIF (1 << 0) /* End/Error in FIFO */
64
65#define ICSR1_ROR (1 << 6) /* Receiver FIFO underrun */
66#define ICSR1_CRE (1 << 5) /* CRC error */
67#define ICSR1_EOF (1 << 4) /* End of frame */
68#define ICSR1_TNF (1 << 3) /* Transmit FIFO not full */
69#define ICSR1_RNE (1 << 2) /* Receive FIFO not empty */
70#define ICSR1_TBY (1 << 1) /* Tramsmiter busy flag */
71#define ICSR1_RSY (1 << 0) /* Recevier synchronized flag */
28 72
29#define IrSR_RXPL_NEG_IS_ZERO (1<<4) 73#define IrSR_RXPL_NEG_IS_ZERO (1<<4)
30#define IrSR_RXPL_POS_IS_ZERO 0x0 74#define IrSR_RXPL_POS_IS_ZERO 0x0
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c
index ccde5829ba21..d302bcf4c148 100644
--- a/drivers/net/irda/sa1100_ir.c
+++ b/drivers/net/irda/sa1100_ir.c
@@ -36,7 +36,7 @@
36#include <net/irda/irda_device.h> 36#include <net/irda/irda_device.h>
37 37
38#include <asm/irq.h> 38#include <asm/irq.h>
39#include <asm/dma.h> 39#include <mach/dma.h>
40#include <mach/hardware.h> 40#include <mach/hardware.h>
41#include <asm/mach/irda.h> 41#include <asm/mach/irda.h>
42 42
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
555static int mlx4_en_start_port(struct net_device *dev) 555int 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
710static void mlx4_en_stop_port(struct net_device *dev) 710void 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
829static void mlx4_en_free_resources(struct mlx4_en_priv *priv) 829void 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
848static int mlx4_en_alloc_resources(struct mlx4_en_priv *priv) 848int 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]."
65MLX4_EN_PARM_INT(pfcrx, 0, "Priority based Flow Control policy on RX[7:0]." 65MLX4_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
68MLX4_EN_PARM_INT(rx_ring_num1, 0, "Number or Rx rings for port 1 (0 = #cores)");
69MLX4_EN_PARM_INT(rx_ring_num2, 0, "Number or Rx rings for port 2 (0 = #cores)");
70
71MLX4_EN_PARM_INT(tx_ring_size1, MLX4_EN_AUTO_CONF, "Tx ring size for port 1");
72MLX4_EN_PARM_INT(tx_ring_size2, MLX4_EN_AUTO_CONF, "Tx ring size for port 2");
73MLX4_EN_PARM_INT(rx_ring_size1, MLX4_EN_AUTO_CONF, "Rx ring size for port 1");
74MLX4_EN_PARM_INT(rx_ring_size2, MLX4_EN_AUTO_CONF, "Rx ring size for port 2");
75
76
77int mlx4_en_get_profile(struct mlx4_en_dev *mdev) 68int 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
388static 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
431out:
432 mutex_unlock(&mdev->state_lock);
433 return err;
434}
435
420static void mlx4_en_get_ringparam(struct net_device *dev, 436static 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);
489int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, 489int 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
492int mlx4_en_start_port(struct net_device *dev);
493void mlx4_en_stop_port(struct net_device *dev);
494
495void mlx4_en_free_resources(struct mlx4_en_priv *priv);
496int mlx4_en_alloc_resources(struct mlx4_en_priv *priv);
497
492int mlx4_en_get_profile(struct mlx4_en_dev *mdev); 498int mlx4_en_get_profile(struct mlx4_en_dev *mdev);
493 499
494int mlx4_en_create_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq, 500int 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)
1634static int pasemi_mac_poll(struct napi_struct *napi, int budget) 1633static 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/smc911x.h b/drivers/net/smc911x.h
index cc7d85bdfb3e..870b4c33f108 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -200,6 +200,9 @@ static inline void SMC_outsl(struct smc911x_local *lp, int reg,
200 200
201 201
202#ifdef SMC_USE_PXA_DMA 202#ifdef SMC_USE_PXA_DMA
203
204#include <mach/dma.h>
205
203/* 206/*
204 * Define the request and free functions 207 * Define the request and free functions
205 * These are unfortunately architecture specific as no generic allocation 208 * These are unfortunately architecture specific as no generic allocation
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index 3e7c6a3cbc65..c4ccd121bc9c 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -493,7 +493,8 @@ struct smc_local {
493 * as RX which can overrun memory and lose packets. 493 * as RX which can overrun memory and lose packets.
494 */ 494 */
495#include <linux/dma-mapping.h> 495#include <linux/dma-mapping.h>
496#include <asm/dma.h> 496#include <mach/dma.h>
497#include <mach/hardware.h>
497#include <mach/pxa-regs.h> 498#include <mach/pxa-regs.h>
498 499
499#ifdef SMC_insl 500#ifdef SMC_insl
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:
1277static int spider_net_poll(struct napi_struct *napi, int budget) 1277static 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,