aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-12-13 04:12:51 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-12-13 04:12:51 -0500
commit72aaf09fda49f5919d98d65d35e5179f3acb0497 (patch)
tree5fd25748f7f5640f8ee8efb86ddca88d12840791 /drivers/net
parent67fbc2312312095acc2f19a0b601bac10f84cf9d (diff)
parent58c2467355ed3154a12ee49d8f8236547145c9d3 (diff)
Merge git://git.marvell.com/orion into devel
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/Kconfig3
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c9
-rw-r--r--drivers/net/mlx4/main.c8
-rw-r--r--drivers/net/mlx4/mlx4.h1
-rw-r--r--drivers/net/mlx4/port.c39
-rw-r--r--drivers/net/pcmcia/ibmtr_cs.c2
-rw-r--r--drivers/net/smc911x.c10
-rw-r--r--drivers/net/smc91x.c10
-rw-r--r--drivers/net/xen-netfront.c6
9 files changed, 67 insertions, 21 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 11f143f4adf6..231eeaf1d552 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -1825,9 +1825,10 @@ config FEC2
1825 1825
1826config FEC_MPC52xx 1826config FEC_MPC52xx
1827 tristate "MPC52xx FEC driver" 1827 tristate "MPC52xx FEC driver"
1828 depends on PPC_MPC52xx && PPC_BESTCOMM_FEC 1828 depends on PPC_MPC52xx && PPC_BESTCOMM
1829 select CRC32 1829 select CRC32
1830 select PHYLIB 1830 select PHYLIB
1831 select PPC_BESTCOMM_FEC
1831 ---help--- 1832 ---help---
1832 This option enables support for the MPC5200's on-chip 1833 This option enables support for the MPC5200's on-chip
1833 Fast Ethernet Controller 1834 Fast Ethernet Controller
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 36f2bb666bf7..8ed823ae639e 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2330,7 +2330,7 @@ static void ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter,
2330 * Once we know the feature-set enabled for the device, we'll cache 2330 * Once we know the feature-set enabled for the device, we'll cache
2331 * the register offset the descriptor ring is assigned to. 2331 * the register offset the descriptor ring is assigned to.
2332 **/ 2332 **/
2333static void __devinit ixgbe_cache_ring_register(struct ixgbe_adapter *adapter) 2333static void ixgbe_cache_ring_register(struct ixgbe_adapter *adapter)
2334{ 2334{
2335 int feature_mask = 0, rss_i; 2335 int feature_mask = 0, rss_i;
2336 int i, txr_idx, rxr_idx; 2336 int i, txr_idx, rxr_idx;
@@ -2367,7 +2367,7 @@ static void __devinit ixgbe_cache_ring_register(struct ixgbe_adapter *adapter)
2367 * number of queues at compile-time. The polling_netdev array is 2367 * number of queues at compile-time. The polling_netdev array is
2368 * intended for Multiqueue, but should work fine with a single queue. 2368 * intended for Multiqueue, but should work fine with a single queue.
2369 **/ 2369 **/
2370static int __devinit ixgbe_alloc_queues(struct ixgbe_adapter *adapter) 2370static int ixgbe_alloc_queues(struct ixgbe_adapter *adapter)
2371{ 2371{
2372 int i; 2372 int i;
2373 2373
@@ -2408,8 +2408,7 @@ err_tx_ring_allocation:
2408 * Attempt to configure the interrupts using the best available 2408 * Attempt to configure the interrupts using the best available
2409 * capabilities of the hardware and the kernel. 2409 * capabilities of the hardware and the kernel.
2410 **/ 2410 **/
2411static int __devinit ixgbe_set_interrupt_capability(struct ixgbe_adapter 2411static int ixgbe_set_interrupt_capability(struct ixgbe_adapter *adapter)
2412 *adapter)
2413{ 2412{
2414 int err = 0; 2413 int err = 0;
2415 int vector, v_budget; 2414 int vector, v_budget;
@@ -2501,7 +2500,7 @@ static void ixgbe_reset_interrupt_capability(struct ixgbe_adapter *adapter)
2501 * - Hardware queue count (num_*_queues) 2500 * - Hardware queue count (num_*_queues)
2502 * - defined by miscellaneous hardware support/features (RSS, etc.) 2501 * - defined by miscellaneous hardware support/features (RSS, etc.)
2503 **/ 2502 **/
2504static int __devinit ixgbe_init_interrupt_scheme(struct ixgbe_adapter *adapter) 2503static int ixgbe_init_interrupt_scheme(struct ixgbe_adapter *adapter)
2505{ 2504{
2506 int err; 2505 int err;
2507 2506
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);
385void mlx4_init_vlan_table(struct mlx4_dev *dev, struct mlx4_vlan_table *table); 385void mlx4_init_vlan_table(struct mlx4_dev *dev, struct mlx4_vlan_table *table);
386 386
387int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port); 387int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port);
388int 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}
259EXPORT_SYMBOL_GPL(mlx4_unregister_vlan); 259EXPORT_SYMBOL_GPL(mlx4_unregister_vlan);
260 260
261int 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
261int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port) 297int 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
352static int ibmtr_resume(struct pcmcia_device *link) 352static 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/smc911x.c b/drivers/net/smc911x.c
index b185cd12269c..9a16a79b67d0 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -1735,7 +1735,7 @@ static const struct ethtool_ops smc911x_ethtool_ops = {
1735 * This routine has a simple purpose -- make the SMC chip generate an 1735 * This routine has a simple purpose -- make the SMC chip generate an
1736 * interrupt, so an auto-detect routine can detect it, and find the IRQ, 1736 * interrupt, so an auto-detect routine can detect it, and find the IRQ,
1737 */ 1737 */
1738static int __init smc911x_findirq(struct net_device *dev) 1738static int __devinit smc911x_findirq(struct net_device *dev)
1739{ 1739{
1740 struct smc911x_local *lp = netdev_priv(dev); 1740 struct smc911x_local *lp = netdev_priv(dev);
1741 int timeout = 20; 1741 int timeout = 20;
@@ -1799,7 +1799,7 @@ static int __init smc911x_findirq(struct net_device *dev)
1799 * o actually GRAB the irq. 1799 * o actually GRAB the irq.
1800 * o GRAB the region 1800 * o GRAB the region
1801 */ 1801 */
1802static int __init smc911x_probe(struct net_device *dev) 1802static int __devinit smc911x_probe(struct net_device *dev)
1803{ 1803{
1804 struct smc911x_local *lp = netdev_priv(dev); 1804 struct smc911x_local *lp = netdev_priv(dev);
1805 int i, retval; 1805 int i, retval;
@@ -2048,7 +2048,7 @@ err_out:
2048 * 0 --> there is a device 2048 * 0 --> there is a device
2049 * anything else, error 2049 * anything else, error
2050 */ 2050 */
2051static int smc911x_drv_probe(struct platform_device *pdev) 2051static int __devinit smc911x_drv_probe(struct platform_device *pdev)
2052{ 2052{
2053#ifdef SMC_DYNAMIC_BUS_CONFIG 2053#ifdef SMC_DYNAMIC_BUS_CONFIG
2054 struct smc911x_platdata *pd = pdev->dev.platform_data; 2054 struct smc911x_platdata *pd = pdev->dev.platform_data;
@@ -2124,7 +2124,7 @@ out:
2124 return ret; 2124 return ret;
2125} 2125}
2126 2126
2127static int smc911x_drv_remove(struct platform_device *pdev) 2127static int __devexit smc911x_drv_remove(struct platform_device *pdev)
2128{ 2128{
2129 struct net_device *ndev = platform_get_drvdata(pdev); 2129 struct net_device *ndev = platform_get_drvdata(pdev);
2130 struct smc911x_local *lp = netdev_priv(ndev); 2130 struct smc911x_local *lp = netdev_priv(ndev);
@@ -2195,7 +2195,7 @@ static int smc911x_drv_resume(struct platform_device *dev)
2195 2195
2196static struct platform_driver smc911x_driver = { 2196static struct platform_driver smc911x_driver = {
2197 .probe = smc911x_drv_probe, 2197 .probe = smc911x_drv_probe,
2198 .remove = smc911x_drv_remove, 2198 .remove = __devexit_p(smc911x_drv_remove),
2199 .suspend = smc911x_drv_suspend, 2199 .suspend = smc911x_drv_suspend,
2200 .resume = smc911x_drv_resume, 2200 .resume = smc911x_drv_resume,
2201 .driver = { 2201 .driver = {
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index fc80f250da31..35c56abf4113 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -1696,7 +1696,7 @@ static const struct ethtool_ops smc_ethtool_ops = {
1696 * I just deleted auto_irq.c, since it was never built... 1696 * I just deleted auto_irq.c, since it was never built...
1697 * --jgarzik 1697 * --jgarzik
1698 */ 1698 */
1699static int __init smc_findirq(struct smc_local *lp) 1699static int __devinit smc_findirq(struct smc_local *lp)
1700{ 1700{
1701 void __iomem *ioaddr = lp->base; 1701 void __iomem *ioaddr = lp->base;
1702 int timeout = 20; 1702 int timeout = 20;
@@ -1770,7 +1770,7 @@ static int __init smc_findirq(struct smc_local *lp)
1770 * o actually GRAB the irq. 1770 * o actually GRAB the irq.
1771 * o GRAB the region 1771 * o GRAB the region
1772 */ 1772 */
1773static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr, 1773static int __devinit smc_probe(struct net_device *dev, void __iomem *ioaddr,
1774 unsigned long irq_flags) 1774 unsigned long irq_flags)
1775{ 1775{
1776 struct smc_local *lp = netdev_priv(dev); 1776 struct smc_local *lp = netdev_priv(dev);
@@ -2126,7 +2126,7 @@ static void smc_release_datacs(struct platform_device *pdev, struct net_device *
2126 * 0 --> there is a device 2126 * 0 --> there is a device
2127 * anything else, error 2127 * anything else, error
2128 */ 2128 */
2129static int smc_drv_probe(struct platform_device *pdev) 2129static int __devinit smc_drv_probe(struct platform_device *pdev)
2130{ 2130{
2131 struct smc91x_platdata *pd = pdev->dev.platform_data; 2131 struct smc91x_platdata *pd = pdev->dev.platform_data;
2132 struct smc_local *lp; 2132 struct smc_local *lp;
@@ -2240,7 +2240,7 @@ static int smc_drv_probe(struct platform_device *pdev)
2240 return ret; 2240 return ret;
2241} 2241}
2242 2242
2243static int smc_drv_remove(struct platform_device *pdev) 2243static int __devexit smc_drv_remove(struct platform_device *pdev)
2244{ 2244{
2245 struct net_device *ndev = platform_get_drvdata(pdev); 2245 struct net_device *ndev = platform_get_drvdata(pdev);
2246 struct smc_local *lp = netdev_priv(ndev); 2246 struct smc_local *lp = netdev_priv(ndev);
@@ -2305,7 +2305,7 @@ static int smc_drv_resume(struct platform_device *dev)
2305 2305
2306static struct platform_driver smc_driver = { 2306static struct platform_driver smc_driver = {
2307 .probe = smc_drv_probe, 2307 .probe = smc_drv_probe,
2308 .remove = smc_drv_remove, 2308 .remove = __devexit_p(smc_drv_remove),
2309 .suspend = smc_drv_suspend, 2309 .suspend = smc_drv_suspend,
2310 .resume = smc_drv_resume, 2310 .resume = smc_drv_resume,
2311 .driver = { 2311 .driver = {
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index c6948d8f53f6..6d017adc914a 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1785,7 +1785,7 @@ static int __devexit xennet_remove(struct xenbus_device *dev)
1785 return 0; 1785 return 0;
1786} 1786}
1787 1787
1788static struct xenbus_driver netfront = { 1788static struct xenbus_driver netfront_driver = {
1789 .name = "vif", 1789 .name = "vif",
1790 .owner = THIS_MODULE, 1790 .owner = THIS_MODULE,
1791 .ids = netfront_ids, 1791 .ids = netfront_ids,
@@ -1805,7 +1805,7 @@ static int __init netif_init(void)
1805 1805
1806 printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n"); 1806 printk(KERN_INFO "Initialising Xen virtual ethernet driver.\n");
1807 1807
1808 return xenbus_register_frontend(&netfront); 1808 return xenbus_register_frontend(&netfront_driver);
1809} 1809}
1810module_init(netif_init); 1810module_init(netif_init);
1811 1811
@@ -1815,7 +1815,7 @@ static void __exit netif_exit(void)
1815 if (xen_initial_domain()) 1815 if (xen_initial_domain())
1816 return; 1816 return;
1817 1817
1818 xenbus_unregister_driver(&netfront); 1818 xenbus_unregister_driver(&netfront_driver);
1819} 1819}
1820module_exit(netif_exit); 1820module_exit(netif_exit);
1821 1821