aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/3c59x.c2
-rw-r--r--drivers/net/chelsio/sge.c5
-rw-r--r--drivers/net/dm9000.c2
-rw-r--r--drivers/net/loopback.c2
-rw-r--r--drivers/net/pcmcia/axnet_cs.c2
-rw-r--r--drivers/net/pcmcia/fmvj18x_cs.c2
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c2
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c2
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c2
-rw-r--r--drivers/net/r8169.c2
-rw-r--r--drivers/net/smsc911x.c2
-rw-r--r--drivers/net/veth.c7
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c2
13 files changed, 16 insertions, 18 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index 78b7167a8ce3..39db0e96815d 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -837,7 +837,7 @@ static int vortex_resume(struct device *dev)
837 return 0; 837 return 0;
838} 838}
839 839
840static struct dev_pm_ops vortex_pm_ops = { 840static const struct dev_pm_ops vortex_pm_ops = {
841 .suspend = vortex_suspend, 841 .suspend = vortex_suspend,
842 .resume = vortex_resume, 842 .resume = vortex_resume,
843 .freeze = vortex_suspend, 843 .freeze = vortex_suspend,
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c
index 8c658cf6f62f..109d2783e4d8 100644
--- a/drivers/net/chelsio/sge.c
+++ b/drivers/net/chelsio/sge.c
@@ -1378,7 +1378,7 @@ static void sge_rx(struct sge *sge, struct freelQ *fl, unsigned int len)
1378 } 1378 }
1379 __skb_pull(skb, sizeof(*p)); 1379 __skb_pull(skb, sizeof(*p));
1380 1380
1381 st = per_cpu_ptr(sge->port_stats[p->iff], smp_processor_id()); 1381 st = this_cpu_ptr(sge->port_stats[p->iff]);
1382 1382
1383 skb->protocol = eth_type_trans(skb, adapter->port[p->iff].dev); 1383 skb->protocol = eth_type_trans(skb, adapter->port[p->iff].dev);
1384 if ((adapter->flags & RX_CSUM_ENABLED) && p->csum == 0xffff && 1384 if ((adapter->flags & RX_CSUM_ENABLED) && p->csum == 0xffff &&
@@ -1780,8 +1780,7 @@ netdev_tx_t t1_start_xmit(struct sk_buff *skb, struct net_device *dev)
1780{ 1780{
1781 struct adapter *adapter = dev->ml_priv; 1781 struct adapter *adapter = dev->ml_priv;
1782 struct sge *sge = adapter->sge; 1782 struct sge *sge = adapter->sge;
1783 struct sge_port_stats *st = per_cpu_ptr(sge->port_stats[dev->if_port], 1783 struct sge_port_stats *st = this_cpu_ptr(sge->port_stats[dev->if_port]);
1784 smp_processor_id());
1785 struct cpl_tx_pkt *cpl; 1784 struct cpl_tx_pkt *cpl;
1786 struct sk_buff *orig_skb = skb; 1785 struct sk_buff *orig_skb = skb;
1787 int ret; 1786 int ret;
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 0cbe3c0e7c06..b37730065688 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -1646,7 +1646,7 @@ dm9000_drv_resume(struct device *dev)
1646 return 0; 1646 return 0;
1647} 1647}
1648 1648
1649static struct dev_pm_ops dm9000_drv_pm_ops = { 1649static const struct dev_pm_ops dm9000_drv_pm_ops = {
1650 .suspend = dm9000_drv_suspend, 1650 .suspend = dm9000_drv_suspend,
1651 .resume = dm9000_drv_resume, 1651 .resume = dm9000_drv_resume,
1652}; 1652};
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index eae4ad749e9d..b9fcc9819837 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -81,7 +81,7 @@ static netdev_tx_t loopback_xmit(struct sk_buff *skb,
81 81
82 /* it's OK to use per_cpu_ptr() because BHs are off */ 82 /* it's OK to use per_cpu_ptr() because BHs are off */
83 pcpu_lstats = dev->ml_priv; 83 pcpu_lstats = dev->ml_priv;
84 lb_stats = per_cpu_ptr(pcpu_lstats, smp_processor_id()); 84 lb_stats = this_cpu_ptr(pcpu_lstats);
85 85
86 len = skb->len; 86 len = skb->len;
87 if (likely(netif_rx(skb) == NET_RX_SUCCESS)) { 87 if (likely(netif_rx(skb) == NET_RX_SUCCESS)) {
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 81bafd578478..d431b59e7d11 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -270,7 +270,7 @@ static int try_io_port(struct pcmcia_device *link)
270 /* for master/slave multifunction cards */ 270 /* for master/slave multifunction cards */
271 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; 271 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
272 link->irq.Attributes = 272 link->irq.Attributes =
273 IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; 273 IRQ_TYPE_DYNAMIC_SHARING;
274 } 274 }
275 } else { 275 } else {
276 /* This should be two 16-port windows */ 276 /* This should be two 16-port windows */
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index 8ad8384fc1c0..813aca3fc433 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -426,7 +426,7 @@ static int fmvj18x_config(struct pcmcia_device *link)
426 426
427 if (link->io.NumPorts2 != 0) { 427 if (link->io.NumPorts2 != 0) {
428 link->irq.Attributes = 428 link->irq.Attributes =
429 IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; 429 IRQ_TYPE_DYNAMIC_SHARING;
430 ret = mfc_try_io_port(link); 430 ret = mfc_try_io_port(link);
431 if (ret != 0) goto failed; 431 if (ret != 0) goto failed;
432 } else if (cardtype == UNGERMANN) { 432 } else if (cardtype == UNGERMANN) {
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index 2d26b6ca28b9..92ed3fbf89a5 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -490,7 +490,7 @@ static int try_io_port(struct pcmcia_device *link)
490 /* for master/slave multifunction cards */ 490 /* for master/slave multifunction cards */
491 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; 491 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
492 link->irq.Attributes = 492 link->irq.Attributes =
493 IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; 493 IRQ_TYPE_DYNAMIC_SHARING;
494 } 494 }
495 } else { 495 } else {
496 /* This should be two 16-port windows */ 496 /* This should be two 16-port windows */
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index cc4853bc0253..6dd486d2977b 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -454,7 +454,7 @@ static int mhz_mfc_config(struct pcmcia_device *link)
454 link->conf.Attributes |= CONF_ENABLE_SPKR; 454 link->conf.Attributes |= CONF_ENABLE_SPKR;
455 link->conf.Status = CCSR_AUDIO_ENA; 455 link->conf.Status = CCSR_AUDIO_ENA;
456 link->irq.Attributes = 456 link->irq.Attributes =
457 IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; 457 IRQ_TYPE_DYNAMIC_SHARING;
458 link->io.IOAddrLines = 16; 458 link->io.IOAddrLines = 16;
459 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; 459 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
460 link->io.NumPorts2 = 8; 460 link->io.NumPorts2 = 8;
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index a2eda28f903e..466fc72698c0 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -841,7 +841,7 @@ xirc2ps_config(struct pcmcia_device * link)
841 link->conf.Attributes |= CONF_ENABLE_SPKR; 841 link->conf.Attributes |= CONF_ENABLE_SPKR;
842 link->conf.Status |= CCSR_AUDIO_ENA; 842 link->conf.Status |= CCSR_AUDIO_ENA;
843 } 843 }
844 link->irq.Attributes |= IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED ; 844 link->irq.Attributes |= IRQ_TYPE_DYNAMIC_SHARING;
845 link->io.NumPorts2 = 8; 845 link->io.NumPorts2 = 8;
846 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; 846 link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
847 if (local->dingo) { 847 if (local->dingo) {
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index acfc5a3aa490..60f96c468a24 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -4859,7 +4859,7 @@ out:
4859 return 0; 4859 return 0;
4860} 4860}
4861 4861
4862static struct dev_pm_ops rtl8169_pm_ops = { 4862static const struct dev_pm_ops rtl8169_pm_ops = {
4863 .suspend = rtl8169_suspend, 4863 .suspend = rtl8169_suspend,
4864 .resume = rtl8169_resume, 4864 .resume = rtl8169_resume,
4865 .freeze = rtl8169_suspend, 4865 .freeze = rtl8169_suspend,
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index 20d6095cf411..494cd91ea39c 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -2154,7 +2154,7 @@ static int smsc911x_resume(struct device *dev)
2154 return (to == 0) ? -EIO : 0; 2154 return (to == 0) ? -EIO : 0;
2155} 2155}
2156 2156
2157static struct dev_pm_ops smsc911x_pm_ops = { 2157static const struct dev_pm_ops smsc911x_pm_ops = {
2158 .suspend = smsc911x_suspend, 2158 .suspend = smsc911x_suspend,
2159 .resume = smsc911x_resume, 2159 .resume = smsc911x_resume,
2160}; 2160};
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 63099c58a6dd..3a15de56df9c 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -153,15 +153,14 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev)
153 struct net_device *rcv = NULL; 153 struct net_device *rcv = NULL;
154 struct veth_priv *priv, *rcv_priv; 154 struct veth_priv *priv, *rcv_priv;
155 struct veth_net_stats *stats, *rcv_stats; 155 struct veth_net_stats *stats, *rcv_stats;
156 int length, cpu; 156 int length;
157 157
158 priv = netdev_priv(dev); 158 priv = netdev_priv(dev);
159 rcv = priv->peer; 159 rcv = priv->peer;
160 rcv_priv = netdev_priv(rcv); 160 rcv_priv = netdev_priv(rcv);
161 161
162 cpu = smp_processor_id(); 162 stats = this_cpu_ptr(priv->stats);
163 stats = per_cpu_ptr(priv->stats, cpu); 163 rcv_stats = this_cpu_ptr(rcv_priv->stats);
164 rcv_stats = per_cpu_ptr(rcv_priv->stats, cpu);
165 164
166 if (!(rcv->flags & IFF_UP)) 165 if (!(rcv->flags & IFF_UP))
167 goto tx_drop; 166 goto tx_drop;
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 1ceb9d0f8b97..9cc438282d77 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -2689,7 +2689,7 @@ vmxnet3_resume(struct device *device)
2689 return 0; 2689 return 0;
2690} 2690}
2691 2691
2692static struct dev_pm_ops vmxnet3_pm_ops = { 2692static const struct dev_pm_ops vmxnet3_pm_ops = {
2693 .suspend = vmxnet3_suspend, 2693 .suspend = vmxnet3_suspend,
2694 .resume = vmxnet3_resume, 2694 .resume = vmxnet3_resume,
2695}; 2695};