diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/Kconfig | 3 | ||||
-rw-r--r-- | drivers/net/macvlan.c | 3 | ||||
-rw-r--r-- | drivers/net/mlx4/main.c | 8 | ||||
-rw-r--r-- | drivers/net/mlx4/mlx4.h | 1 | ||||
-rw-r--r-- | drivers/net/mlx4/port.c | 39 | ||||
-rw-r--r-- | drivers/net/pcmcia/ibmtr_cs.c | 2 | ||||
-rw-r--r-- | drivers/net/pppol2tp.c | 1 | ||||
-rw-r--r-- | drivers/net/smc911x.c | 10 | ||||
-rw-r--r-- | drivers/net/smc91x.c | 10 | ||||
-rw-r--r-- | drivers/net/xen-netfront.c | 6 |
10 files changed, 67 insertions, 16 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 75f9f7f2fbed..e93f5d3f2277 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -1827,9 +1827,10 @@ config FEC2 | |||
1827 | 1827 | ||
1828 | config FEC_MPC52xx | 1828 | config FEC_MPC52xx |
1829 | tristate "MPC52xx FEC driver" | 1829 | tristate "MPC52xx FEC driver" |
1830 | depends on PPC_MPC52xx && PPC_BESTCOMM_FEC | 1830 | depends on PPC_MPC52xx && PPC_BESTCOMM |
1831 | select CRC32 | 1831 | select CRC32 |
1832 | select PHYLIB | 1832 | select PHYLIB |
1833 | select PPC_BESTCOMM_FEC | ||
1833 | ---help--- | 1834 | ---help--- |
1834 | This option enables support for the MPC5200's on-chip | 1835 | This option enables support for the MPC5200's on-chip |
1835 | Fast Ethernet Controller | 1836 | Fast Ethernet Controller |
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index e8879217a1d2..7e24b5048686 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c | |||
@@ -70,6 +70,9 @@ static void macvlan_broadcast(struct sk_buff *skb, | |||
70 | struct sk_buff *nskb; | 70 | struct sk_buff *nskb; |
71 | unsigned int i; | 71 | unsigned int i; |
72 | 72 | ||
73 | if (skb->protocol == htons(ETH_P_PAUSE)) | ||
74 | return; | ||
75 | |||
73 | for (i = 0; i < MACVLAN_HASH_SIZE; i++) { | 76 | for (i = 0; i < MACVLAN_HASH_SIZE; i++) { |
74 | hlist_for_each_entry_rcu(vlan, n, &port->vlan_hash[i], hlist) { | 77 | hlist_for_each_entry_rcu(vlan, n, &port->vlan_hash[i], hlist) { |
75 | dev = vlan->dev; | 78 | dev = vlan->dev; |
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index 468921b8f4b6..90a0281d15ea 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c | |||
@@ -753,6 +753,7 @@ static int mlx4_setup_hca(struct mlx4_dev *dev) | |||
753 | struct mlx4_priv *priv = mlx4_priv(dev); | 753 | struct mlx4_priv *priv = mlx4_priv(dev); |
754 | int err; | 754 | int err; |
755 | int port; | 755 | int port; |
756 | __be32 ib_port_default_caps; | ||
756 | 757 | ||
757 | err = mlx4_init_uar_table(dev); | 758 | err = mlx4_init_uar_table(dev); |
758 | if (err) { | 759 | if (err) { |
@@ -852,6 +853,13 @@ static int mlx4_setup_hca(struct mlx4_dev *dev) | |||
852 | } | 853 | } |
853 | 854 | ||
854 | for (port = 1; port <= dev->caps.num_ports; port++) { | 855 | for (port = 1; port <= dev->caps.num_ports; port++) { |
856 | ib_port_default_caps = 0; | ||
857 | err = mlx4_get_port_ib_caps(dev, port, &ib_port_default_caps); | ||
858 | if (err) | ||
859 | mlx4_warn(dev, "failed to get port %d default " | ||
860 | "ib capabilities (%d). Continuing with " | ||
861 | "caps = 0\n", port, err); | ||
862 | dev->caps.ib_port_def_cap[port] = ib_port_default_caps; | ||
855 | err = mlx4_SET_PORT(dev, port); | 863 | err = mlx4_SET_PORT(dev, port); |
856 | if (err) { | 864 | if (err) { |
857 | mlx4_err(dev, "Failed to set port %d, aborting\n", | 865 | mlx4_err(dev, "Failed to set port %d, aborting\n", |
diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h index 56a2e213fe62..34c909deaff3 100644 --- a/drivers/net/mlx4/mlx4.h +++ b/drivers/net/mlx4/mlx4.h | |||
@@ -385,5 +385,6 @@ void mlx4_init_mac_table(struct mlx4_dev *dev, struct mlx4_mac_table *table); | |||
385 | void mlx4_init_vlan_table(struct mlx4_dev *dev, struct mlx4_vlan_table *table); | 385 | void mlx4_init_vlan_table(struct mlx4_dev *dev, struct mlx4_vlan_table *table); |
386 | 386 | ||
387 | int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port); | 387 | int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port); |
388 | int mlx4_get_port_ib_caps(struct mlx4_dev *dev, u8 port, __be32 *caps); | ||
388 | 389 | ||
389 | #endif /* MLX4_H */ | 390 | #endif /* MLX4_H */ |
diff --git a/drivers/net/mlx4/port.c b/drivers/net/mlx4/port.c index e2fdab42c4ce..0a057e5dc63b 100644 --- a/drivers/net/mlx4/port.c +++ b/drivers/net/mlx4/port.c | |||
@@ -258,6 +258,42 @@ out: | |||
258 | } | 258 | } |
259 | EXPORT_SYMBOL_GPL(mlx4_unregister_vlan); | 259 | EXPORT_SYMBOL_GPL(mlx4_unregister_vlan); |
260 | 260 | ||
261 | int mlx4_get_port_ib_caps(struct mlx4_dev *dev, u8 port, __be32 *caps) | ||
262 | { | ||
263 | struct mlx4_cmd_mailbox *inmailbox, *outmailbox; | ||
264 | u8 *inbuf, *outbuf; | ||
265 | int err; | ||
266 | |||
267 | inmailbox = mlx4_alloc_cmd_mailbox(dev); | ||
268 | if (IS_ERR(inmailbox)) | ||
269 | return PTR_ERR(inmailbox); | ||
270 | |||
271 | outmailbox = mlx4_alloc_cmd_mailbox(dev); | ||
272 | if (IS_ERR(outmailbox)) { | ||
273 | mlx4_free_cmd_mailbox(dev, inmailbox); | ||
274 | return PTR_ERR(outmailbox); | ||
275 | } | ||
276 | |||
277 | inbuf = inmailbox->buf; | ||
278 | outbuf = outmailbox->buf; | ||
279 | memset(inbuf, 0, 256); | ||
280 | memset(outbuf, 0, 256); | ||
281 | inbuf[0] = 1; | ||
282 | inbuf[1] = 1; | ||
283 | inbuf[2] = 1; | ||
284 | inbuf[3] = 1; | ||
285 | *(__be16 *) (&inbuf[16]) = cpu_to_be16(0x0015); | ||
286 | *(__be32 *) (&inbuf[20]) = cpu_to_be32(port); | ||
287 | |||
288 | err = mlx4_cmd_box(dev, inmailbox->dma, outmailbox->dma, port, 3, | ||
289 | MLX4_CMD_MAD_IFC, MLX4_CMD_TIME_CLASS_C); | ||
290 | if (!err) | ||
291 | *caps = *(__be32 *) (outbuf + 84); | ||
292 | mlx4_free_cmd_mailbox(dev, inmailbox); | ||
293 | mlx4_free_cmd_mailbox(dev, outmailbox); | ||
294 | return err; | ||
295 | } | ||
296 | |||
261 | int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port) | 297 | int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port) |
262 | { | 298 | { |
263 | struct mlx4_cmd_mailbox *mailbox; | 299 | struct mlx4_cmd_mailbox *mailbox; |
@@ -273,7 +309,8 @@ int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port) | |||
273 | ((u8 *) mailbox->buf)[3] = 6; | 309 | ((u8 *) mailbox->buf)[3] = 6; |
274 | ((__be16 *) mailbox->buf)[4] = cpu_to_be16(1 << 15); | 310 | ((__be16 *) mailbox->buf)[4] = cpu_to_be16(1 << 15); |
275 | ((__be16 *) mailbox->buf)[6] = cpu_to_be16(1 << 15); | 311 | ((__be16 *) mailbox->buf)[6] = cpu_to_be16(1 << 15); |
276 | } | 312 | } else |
313 | ((__be32 *) mailbox->buf)[1] = dev->caps.ib_port_def_cap[port]; | ||
277 | err = mlx4_cmd(dev, mailbox->dma, port, is_eth, MLX4_CMD_SET_PORT, | 314 | err = mlx4_cmd(dev, mailbox->dma, port, is_eth, MLX4_CMD_SET_PORT, |
278 | MLX4_CMD_TIME_CLASS_B); | 315 | MLX4_CMD_TIME_CLASS_B); |
279 | 316 | ||
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c index cf3cca4642f2..f51944b28cfa 100644 --- a/drivers/net/pcmcia/ibmtr_cs.c +++ b/drivers/net/pcmcia/ibmtr_cs.c | |||
@@ -349,7 +349,7 @@ static int ibmtr_suspend(struct pcmcia_device *link) | |||
349 | return 0; | 349 | return 0; |
350 | } | 350 | } |
351 | 351 | ||
352 | static int ibmtr_resume(struct pcmcia_device *link) | 352 | static int __devinit ibmtr_resume(struct pcmcia_device *link) |
353 | { | 353 | { |
354 | ibmtr_dev_t *info = link->priv; | 354 | ibmtr_dev_t *info = link->priv; |
355 | struct net_device *dev = info->dev; | 355 | struct net_device *dev = info->dev; |
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c index 185b1dff10a8..e98d9773158d 100644 --- a/drivers/net/pppol2tp.c +++ b/drivers/net/pppol2tp.c | |||
@@ -1353,6 +1353,7 @@ static int pppol2tp_release(struct socket *sock) | |||
1353 | kfree_skb(skb); | 1353 | kfree_skb(skb); |
1354 | sock_put(sk); | 1354 | sock_put(sk); |
1355 | } | 1355 | } |
1356 | sock_put(sk); | ||
1356 | } | 1357 | } |
1357 | 1358 | ||
1358 | release_sock(sk); | 1359 | release_sock(sk); |
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 84d1feb1c179..21d823c0892c 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -1733,7 +1733,7 @@ static const struct ethtool_ops smc911x_ethtool_ops = { | |||
1733 | * This routine has a simple purpose -- make the SMC chip generate an | 1733 | * This routine has a simple purpose -- make the SMC chip generate an |
1734 | * interrupt, so an auto-detect routine can detect it, and find the IRQ, | 1734 | * interrupt, so an auto-detect routine can detect it, and find the IRQ, |
1735 | */ | 1735 | */ |
1736 | static int __init smc911x_findirq(struct net_device *dev) | 1736 | static int __devinit smc911x_findirq(struct net_device *dev) |
1737 | { | 1737 | { |
1738 | struct smc911x_local *lp = netdev_priv(dev); | 1738 | struct smc911x_local *lp = netdev_priv(dev); |
1739 | int timeout = 20; | 1739 | int timeout = 20; |
@@ -1797,7 +1797,7 @@ static int __init smc911x_findirq(struct net_device *dev) | |||
1797 | * o actually GRAB the irq. | 1797 | * o actually GRAB the irq. |
1798 | * o GRAB the region | 1798 | * o GRAB the region |
1799 | */ | 1799 | */ |
1800 | static int __init smc911x_probe(struct net_device *dev) | 1800 | static int __devinit smc911x_probe(struct net_device *dev) |
1801 | { | 1801 | { |
1802 | struct smc911x_local *lp = netdev_priv(dev); | 1802 | struct smc911x_local *lp = netdev_priv(dev); |
1803 | int i, retval; | 1803 | int i, retval; |
@@ -2046,7 +2046,7 @@ err_out: | |||
2046 | * 0 --> there is a device | 2046 | * 0 --> there is a device |
2047 | * anything else, error | 2047 | * anything else, error |
2048 | */ | 2048 | */ |
2049 | static int smc911x_drv_probe(struct platform_device *pdev) | 2049 | static int __devinit smc911x_drv_probe(struct platform_device *pdev) |
2050 | { | 2050 | { |
2051 | #ifdef SMC_DYNAMIC_BUS_CONFIG | 2051 | #ifdef SMC_DYNAMIC_BUS_CONFIG |
2052 | struct smc911x_platdata *pd = pdev->dev.platform_data; | 2052 | struct smc911x_platdata *pd = pdev->dev.platform_data; |
@@ -2122,7 +2122,7 @@ out: | |||
2122 | return ret; | 2122 | return ret; |
2123 | } | 2123 | } |
2124 | 2124 | ||
2125 | static int smc911x_drv_remove(struct platform_device *pdev) | 2125 | static int __devexit smc911x_drv_remove(struct platform_device *pdev) |
2126 | { | 2126 | { |
2127 | struct net_device *ndev = platform_get_drvdata(pdev); | 2127 | struct net_device *ndev = platform_get_drvdata(pdev); |
2128 | struct smc911x_local *lp = netdev_priv(ndev); | 2128 | struct smc911x_local *lp = netdev_priv(ndev); |
@@ -2193,7 +2193,7 @@ static int smc911x_drv_resume(struct platform_device *dev) | |||
2193 | 2193 | ||
2194 | static struct platform_driver smc911x_driver = { | 2194 | static struct platform_driver smc911x_driver = { |
2195 | .probe = smc911x_drv_probe, | 2195 | .probe = smc911x_drv_probe, |
2196 | .remove = smc911x_drv_remove, | 2196 | .remove = __devexit_p(smc911x_drv_remove), |
2197 | .suspend = smc911x_drv_suspend, | 2197 | .suspend = smc911x_drv_suspend, |
2198 | .resume = smc911x_drv_resume, | 2198 | .resume = smc911x_drv_resume, |
2199 | .driver = { | 2199 | .driver = { |
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index 5879c719b538..54912aadf4b2 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
@@ -1695,7 +1695,7 @@ static const struct ethtool_ops smc_ethtool_ops = { | |||
1695 | * I just deleted auto_irq.c, since it was never built... | 1695 | * I just deleted auto_irq.c, since it was never built... |
1696 | * --jgarzik | 1696 | * --jgarzik |
1697 | */ | 1697 | */ |
1698 | static int __init smc_findirq(struct smc_local *lp) | 1698 | static int __devinit smc_findirq(struct smc_local *lp) |
1699 | { | 1699 | { |
1700 | void __iomem *ioaddr = lp->base; | 1700 | void __iomem *ioaddr = lp->base; |
1701 | int timeout = 20; | 1701 | int timeout = 20; |
@@ -1769,7 +1769,7 @@ static int __init smc_findirq(struct smc_local *lp) | |||
1769 | * o actually GRAB the irq. | 1769 | * o actually GRAB the irq. |
1770 | * o GRAB the region | 1770 | * o GRAB the region |
1771 | */ | 1771 | */ |
1772 | static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr, | 1772 | static int __devinit smc_probe(struct net_device *dev, void __iomem *ioaddr, |
1773 | unsigned long irq_flags) | 1773 | unsigned long irq_flags) |
1774 | { | 1774 | { |
1775 | struct smc_local *lp = netdev_priv(dev); | 1775 | struct smc_local *lp = netdev_priv(dev); |
@@ -2124,7 +2124,7 @@ static void smc_release_datacs(struct platform_device *pdev, struct net_device * | |||
2124 | * 0 --> there is a device | 2124 | * 0 --> there is a device |
2125 | * anything else, error | 2125 | * anything else, error |
2126 | */ | 2126 | */ |
2127 | static int __init smc_drv_probe(struct platform_device *pdev) | 2127 | static int __devinit smc_drv_probe(struct platform_device *pdev) |
2128 | { | 2128 | { |
2129 | struct smc91x_platdata *pd = pdev->dev.platform_data; | 2129 | struct smc91x_platdata *pd = pdev->dev.platform_data; |
2130 | struct smc_local *lp; | 2130 | struct smc_local *lp; |
@@ -2238,7 +2238,7 @@ static int __init smc_drv_probe(struct platform_device *pdev) | |||
2238 | return ret; | 2238 | return ret; |
2239 | } | 2239 | } |
2240 | 2240 | ||
2241 | static int smc_drv_remove(struct platform_device *pdev) | 2241 | static int __devexit smc_drv_remove(struct platform_device *pdev) |
2242 | { | 2242 | { |
2243 | struct net_device *ndev = platform_get_drvdata(pdev); | 2243 | struct net_device *ndev = platform_get_drvdata(pdev); |
2244 | struct smc_local *lp = netdev_priv(ndev); | 2244 | struct smc_local *lp = netdev_priv(ndev); |
@@ -2303,7 +2303,7 @@ static int smc_drv_resume(struct platform_device *dev) | |||
2303 | 2303 | ||
2304 | static struct platform_driver smc_driver = { | 2304 | static struct platform_driver smc_driver = { |
2305 | .probe = smc_drv_probe, | 2305 | .probe = smc_drv_probe, |
2306 | .remove = smc_drv_remove, | 2306 | .remove = __devexit_p(smc_drv_remove), |
2307 | .suspend = smc_drv_suspend, | 2307 | .suspend = smc_drv_suspend, |
2308 | .resume = smc_drv_resume, | 2308 | .resume = smc_drv_resume, |
2309 | .driver = { | 2309 | .driver = { |
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index 4b21bcf4af99..fe376fde4e89 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c | |||
@@ -1784,7 +1784,7 @@ static int __devexit xennet_remove(struct xenbus_device *dev) | |||
1784 | return 0; | 1784 | return 0; |
1785 | } | 1785 | } |
1786 | 1786 | ||
1787 | static struct xenbus_driver netfront = { | 1787 | static struct xenbus_driver netfront_driver = { |
1788 | .name = "vif", | 1788 | .name = "vif", |
1789 | .owner = THIS_MODULE, | 1789 | .owner = THIS_MODULE, |
1790 | .ids = netfront_ids, | 1790 | .ids = netfront_ids, |
@@ -1804,7 +1804,7 @@ static int __init netif_init(void) | |||
1804 | 1804 | ||
1805 | printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n"); | 1805 | printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n"); |
1806 | 1806 | ||
1807 | return xenbus_register_frontend(&netfront); | 1807 | return xenbus_register_frontend(&netfront_driver); |
1808 | } | 1808 | } |
1809 | module_init(netif_init); | 1809 | module_init(netif_init); |
1810 | 1810 | ||
@@ -1814,7 +1814,7 @@ static void __exit netif_exit(void) | |||
1814 | if (xen_initial_domain()) | 1814 | if (xen_initial_domain()) |
1815 | return; | 1815 | return; |
1816 | 1816 | ||
1817 | xenbus_unregister_driver(&netfront); | 1817 | xenbus_unregister_driver(&netfront_driver); |
1818 | } | 1818 | } |
1819 | module_exit(netif_exit); | 1819 | module_exit(netif_exit); |
1820 | 1820 | ||