aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-12-03 15:35:28 -0500
committerDavid S. Miller <davem@davemloft.net>2012-12-03 15:35:28 -0500
commit682d7978aee072f411fc747d32954a8371dd7b1b (patch)
treeeeda0abd33caeb14d0adbc5ffd2a9a8cbb4b2ac8 /drivers/net/ethernet/broadcom
parenta5a81f0b9025867efb999d14a8dfc1907c5a4c3b (diff)
parent9f9a12f8ca79839c948464a37c5b557808278708 (diff)
Merge tag 'dev_removal' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/net-next
Networking: Remove __dev* markings from the networking drivers This is a series of patches that remove the dev* attributes for all networking drivers, with the exception of wireless drivers, those are in a different branch. Use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit are no longer needed since CONFIG_HOTPLUG is being removed as an option. Note, there are some devinit compiler section mismatch warnings due to this series, but they are fixed up when merged with my driver-next branch, which fixes the PCI device id warnings, and removes the modpost detection, as it's no longer needed. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r--drivers/net/ethernet/broadcom/b44.c8
-rw-r--r--drivers/net/ethernet/broadcom/bcm63xx_enet.c12
-rw-r--r--drivers/net/ethernet/broadcom/bnx2.c20
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c2
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h2
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c66
-rw-r--r--drivers/net/ethernet/broadcom/cnic.c2
-rw-r--r--drivers/net/ethernet/broadcom/sb1250-mac.c2
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c95
9 files changed, 105 insertions, 104 deletions
diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
index 9786c0e9890e..c64351f486cd 100644
--- a/drivers/net/ethernet/broadcom/b44.c
+++ b/drivers/net/ethernet/broadcom/b44.c
@@ -2083,7 +2083,7 @@ out:
2083 return err; 2083 return err;
2084} 2084}
2085 2085
2086static int __devinit b44_get_invariants(struct b44 *bp) 2086static int b44_get_invariants(struct b44 *bp)
2087{ 2087{
2088 struct ssb_device *sdev = bp->sdev; 2088 struct ssb_device *sdev = bp->sdev;
2089 int err = 0; 2089 int err = 0;
@@ -2141,7 +2141,7 @@ static const struct net_device_ops b44_netdev_ops = {
2141#endif 2141#endif
2142}; 2142};
2143 2143
2144static int __devinit b44_init_one(struct ssb_device *sdev, 2144static int b44_init_one(struct ssb_device *sdev,
2145 const struct ssb_device_id *ent) 2145 const struct ssb_device_id *ent)
2146{ 2146{
2147 struct net_device *dev; 2147 struct net_device *dev;
@@ -2249,7 +2249,7 @@ out:
2249 return err; 2249 return err;
2250} 2250}
2251 2251
2252static void __devexit b44_remove_one(struct ssb_device *sdev) 2252static void b44_remove_one(struct ssb_device *sdev)
2253{ 2253{
2254 struct net_device *dev = ssb_get_drvdata(sdev); 2254 struct net_device *dev = ssb_get_drvdata(sdev);
2255 2255
@@ -2340,7 +2340,7 @@ static struct ssb_driver b44_ssb_driver = {
2340 .name = DRV_MODULE_NAME, 2340 .name = DRV_MODULE_NAME,
2341 .id_table = b44_ssb_tbl, 2341 .id_table = b44_ssb_tbl,
2342 .probe = b44_init_one, 2342 .probe = b44_init_one,
2343 .remove = __devexit_p(b44_remove_one), 2343 .remove = b44_remove_one,
2344 .suspend = b44_suspend, 2344 .suspend = b44_suspend,
2345 .resume = b44_resume, 2345 .resume = b44_resume,
2346}; 2346};
diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index c7ca7ec065ee..39387d67b722 100644
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1612,7 +1612,7 @@ static const struct net_device_ops bcm_enet_ops = {
1612/* 1612/*
1613 * allocate netdevice, request register memory and register device. 1613 * allocate netdevice, request register memory and register device.
1614 */ 1614 */
1615static int __devinit bcm_enet_probe(struct platform_device *pdev) 1615static int bcm_enet_probe(struct platform_device *pdev)
1616{ 1616{
1617 struct bcm_enet_priv *priv; 1617 struct bcm_enet_priv *priv;
1618 struct net_device *dev; 1618 struct net_device *dev;
@@ -1830,7 +1830,7 @@ out:
1830/* 1830/*
1831 * exit func, stops hardware and unregisters netdevice 1831 * exit func, stops hardware and unregisters netdevice
1832 */ 1832 */
1833static int __devexit bcm_enet_remove(struct platform_device *pdev) 1833static int bcm_enet_remove(struct platform_device *pdev)
1834{ 1834{
1835 struct bcm_enet_priv *priv; 1835 struct bcm_enet_priv *priv;
1836 struct net_device *dev; 1836 struct net_device *dev;
@@ -1877,7 +1877,7 @@ static int __devexit bcm_enet_remove(struct platform_device *pdev)
1877 1877
1878struct platform_driver bcm63xx_enet_driver = { 1878struct platform_driver bcm63xx_enet_driver = {
1879 .probe = bcm_enet_probe, 1879 .probe = bcm_enet_probe,
1880 .remove = __devexit_p(bcm_enet_remove), 1880 .remove = bcm_enet_remove,
1881 .driver = { 1881 .driver = {
1882 .name = "bcm63xx_enet", 1882 .name = "bcm63xx_enet",
1883 .owner = THIS_MODULE, 1883 .owner = THIS_MODULE,
@@ -1887,7 +1887,7 @@ struct platform_driver bcm63xx_enet_driver = {
1887/* 1887/*
1888 * reserve & remap memory space shared between all macs 1888 * reserve & remap memory space shared between all macs
1889 */ 1889 */
1890static int __devinit bcm_enet_shared_probe(struct platform_device *pdev) 1890static int bcm_enet_shared_probe(struct platform_device *pdev)
1891{ 1891{
1892 struct resource *res; 1892 struct resource *res;
1893 unsigned int iomem_size; 1893 unsigned int iomem_size;
@@ -1908,7 +1908,7 @@ static int __devinit bcm_enet_shared_probe(struct platform_device *pdev)
1908 return 0; 1908 return 0;
1909} 1909}
1910 1910
1911static int __devexit bcm_enet_shared_remove(struct platform_device *pdev) 1911static int bcm_enet_shared_remove(struct platform_device *pdev)
1912{ 1912{
1913 struct resource *res; 1913 struct resource *res;
1914 1914
@@ -1924,7 +1924,7 @@ static int __devexit bcm_enet_shared_remove(struct platform_device *pdev)
1924 */ 1924 */
1925struct platform_driver bcm63xx_enet_shared_driver = { 1925struct platform_driver bcm63xx_enet_shared_driver = {
1926 .probe = bcm_enet_shared_probe, 1926 .probe = bcm_enet_shared_probe,
1927 .remove = __devexit_p(bcm_enet_shared_remove), 1927 .remove = bcm_enet_shared_remove,
1928 .driver = { 1928 .driver = {
1929 .name = "bcm63xx_enet_shared", 1929 .name = "bcm63xx_enet_shared",
1930 .owner = THIS_MODULE, 1930 .owner = THIS_MODULE,
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index d4310700c7a7..e264e960a762 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -71,7 +71,7 @@
71/* Time in jiffies before concluding the transmitter is hung. */ 71/* Time in jiffies before concluding the transmitter is hung. */
72#define TX_TIMEOUT (5*HZ) 72#define TX_TIMEOUT (5*HZ)
73 73
74static char version[] __devinitdata = 74static char version[] =
75 "Broadcom NetXtreme II Gigabit Ethernet Driver " DRV_MODULE_NAME " v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 75 "Broadcom NetXtreme II Gigabit Ethernet Driver " DRV_MODULE_NAME " v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
76 76
77MODULE_AUTHOR("Michael Chan <mchan@broadcom.com>"); 77MODULE_AUTHOR("Michael Chan <mchan@broadcom.com>");
@@ -106,7 +106,7 @@ typedef enum {
106/* indexed by board_t, above */ 106/* indexed by board_t, above */
107static struct { 107static struct {
108 char *name; 108 char *name;
109} board_info[] __devinitdata = { 109} board_info[] = {
110 { "Broadcom NetXtreme II BCM5706 1000Base-T" }, 110 { "Broadcom NetXtreme II BCM5706 1000Base-T" },
111 { "HP NC370T Multifunction Gigabit Server Adapter" }, 111 { "HP NC370T Multifunction Gigabit Server Adapter" },
112 { "HP NC370i Multifunction Gigabit Server Adapter" }, 112 { "HP NC370i Multifunction Gigabit Server Adapter" },
@@ -7896,7 +7896,7 @@ poll_bnx2(struct net_device *dev)
7896} 7896}
7897#endif 7897#endif
7898 7898
7899static void __devinit 7899static void
7900bnx2_get_5709_media(struct bnx2 *bp) 7900bnx2_get_5709_media(struct bnx2 *bp)
7901{ 7901{
7902 u32 val = REG_RD(bp, BNX2_MISC_DUAL_MEDIA_CTRL); 7902 u32 val = REG_RD(bp, BNX2_MISC_DUAL_MEDIA_CTRL);
@@ -7934,7 +7934,7 @@ bnx2_get_5709_media(struct bnx2 *bp)
7934 } 7934 }
7935} 7935}
7936 7936
7937static void __devinit 7937static void
7938bnx2_get_pci_speed(struct bnx2 *bp) 7938bnx2_get_pci_speed(struct bnx2 *bp)
7939{ 7939{
7940 u32 reg; 7940 u32 reg;
@@ -7986,7 +7986,7 @@ bnx2_get_pci_speed(struct bnx2 *bp)
7986 7986
7987} 7987}
7988 7988
7989static void __devinit 7989static void
7990bnx2_read_vpd_fw_ver(struct bnx2 *bp) 7990bnx2_read_vpd_fw_ver(struct bnx2 *bp)
7991{ 7991{
7992 int rc, i, j; 7992 int rc, i, j;
@@ -8054,7 +8054,7 @@ vpd_done:
8054 kfree(data); 8054 kfree(data);
8055} 8055}
8056 8056
8057static int __devinit 8057static int
8058bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) 8058bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
8059{ 8059{
8060 struct bnx2 *bp; 8060 struct bnx2 *bp;
@@ -8439,7 +8439,7 @@ err_out:
8439 return rc; 8439 return rc;
8440} 8440}
8441 8441
8442static char * __devinit 8442static char *
8443bnx2_bus_string(struct bnx2 *bp, char *str) 8443bnx2_bus_string(struct bnx2 *bp, char *str)
8444{ 8444{
8445 char *s = str; 8445 char *s = str;
@@ -8505,7 +8505,7 @@ static const struct net_device_ops bnx2_netdev_ops = {
8505#endif 8505#endif
8506}; 8506};
8507 8507
8508static int __devinit 8508static int
8509bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) 8509bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
8510{ 8510{
8511 static int version_printed = 0; 8511 static int version_printed = 0;
@@ -8573,7 +8573,7 @@ err_free:
8573 return rc; 8573 return rc;
8574} 8574}
8575 8575
8576static void __devexit 8576static void
8577bnx2_remove_one(struct pci_dev *pdev) 8577bnx2_remove_one(struct pci_dev *pdev)
8578{ 8578{
8579 struct net_device *dev = pci_get_drvdata(pdev); 8579 struct net_device *dev = pci_get_drvdata(pdev);
@@ -8752,7 +8752,7 @@ static struct pci_driver bnx2_pci_driver = {
8752 .name = DRV_MODULE_NAME, 8752 .name = DRV_MODULE_NAME,
8753 .id_table = bnx2_pci_tbl, 8753 .id_table = bnx2_pci_tbl,
8754 .probe = bnx2_init_one, 8754 .probe = bnx2_init_one,
8755 .remove = __devexit_p(bnx2_remove_one), 8755 .remove = bnx2_remove_one,
8756 .suspend = bnx2_suspend, 8756 .suspend = bnx2_suspend,
8757 .resume = bnx2_resume, 8757 .resume = bnx2_resume,
8758 .err_handler = &bnx2_err_handler, 8758 .err_handler = &bnx2_err_handler,
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 5e07aa5e1aea..8ab1492cedd1 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -3875,7 +3875,7 @@ void bnx2x_free_mem_bp(struct bnx2x *bp)
3875 kfree(bp->ilt); 3875 kfree(bp->ilt);
3876} 3876}
3877 3877
3878int __devinit bnx2x_alloc_mem_bp(struct bnx2x *bp) 3878int bnx2x_alloc_mem_bp(struct bnx2x *bp)
3879{ 3879{
3880 struct bnx2x_fastpath *fp; 3880 struct bnx2x_fastpath *fp;
3881 struct msix_entry *tbl; 3881 struct msix_entry *tbl;
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index 32c3ab72718c..0991534f61da 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -563,7 +563,7 @@ int bnx2x_poll(struct napi_struct *napi, int budget);
563 * 563 *
564 * @bp: driver handle 564 * @bp: driver handle
565 */ 565 */
566int __devinit bnx2x_alloc_mem_bp(struct bnx2x *bp); 566int bnx2x_alloc_mem_bp(struct bnx2x *bp);
567 567
568/** 568/**
569 * bnx2x_free_mem_bp - release memories outsize main driver structure 569 * bnx2x_free_mem_bp - release memories outsize main driver structure
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 6064294802af..75aea83ee68d 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -79,7 +79,7 @@
79/* Time in jiffies before concluding the transmitter is hung */ 79/* Time in jiffies before concluding the transmitter is hung */
80#define TX_TIMEOUT (5*HZ) 80#define TX_TIMEOUT (5*HZ)
81 81
82static char version[] __devinitdata = 82static char version[] =
83 "Broadcom NetXtreme II 5771x/578xx 10/20-Gigabit Ethernet Driver " 83 "Broadcom NetXtreme II 5771x/578xx 10/20-Gigabit Ethernet Driver "
84 DRV_MODULE_NAME " " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 84 DRV_MODULE_NAME " " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
85 85
@@ -149,7 +149,7 @@ enum bnx2x_board_type {
149/* indexed by board_type, above */ 149/* indexed by board_type, above */
150static struct { 150static struct {
151 char *name; 151 char *name;
152} board_info[] __devinitdata = { 152} board_info[] = {
153 { "Broadcom NetXtreme II BCM57710 10 Gigabit PCIe [Everest]" }, 153 { "Broadcom NetXtreme II BCM57710 10 Gigabit PCIe [Everest]" },
154 { "Broadcom NetXtreme II BCM57711 10 Gigabit PCIe" }, 154 { "Broadcom NetXtreme II BCM57711 10 Gigabit PCIe" },
155 { "Broadcom NetXtreme II BCM57711E 10 Gigabit PCIe" }, 155 { "Broadcom NetXtreme II BCM57711E 10 Gigabit PCIe" },
@@ -9420,7 +9420,7 @@ static inline void bnx2x_undi_int_disable(struct bnx2x *bp)
9420 bnx2x_undi_int_disable_e1h(bp); 9420 bnx2x_undi_int_disable_e1h(bp);
9421} 9421}
9422 9422
9423static void __devinit bnx2x_prev_unload_close_mac(struct bnx2x *bp) 9423static void bnx2x_prev_unload_close_mac(struct bnx2x *bp)
9424{ 9424{
9425 u32 val, base_addr, offset, mask, reset_reg; 9425 u32 val, base_addr, offset, mask, reset_reg;
9426 bool mac_stopped = false; 9426 bool mac_stopped = false;
@@ -9487,7 +9487,7 @@ static void __devinit bnx2x_prev_unload_close_mac(struct bnx2x *bp)
9487#define BNX2X_PREV_UNDI_BD(val) ((val) >> 16 & 0xffff) 9487#define BNX2X_PREV_UNDI_BD(val) ((val) >> 16 & 0xffff)
9488#define BNX2X_PREV_UNDI_PROD(rcq, bd) ((bd) << 16 | (rcq)) 9488#define BNX2X_PREV_UNDI_PROD(rcq, bd) ((bd) << 16 | (rcq))
9489 9489
9490static void __devinit bnx2x_prev_unload_undi_inc(struct bnx2x *bp, u8 port, 9490static void bnx2x_prev_unload_undi_inc(struct bnx2x *bp, u8 port,
9491 u8 inc) 9491 u8 inc)
9492{ 9492{
9493 u16 rcq, bd; 9493 u16 rcq, bd;
@@ -9503,7 +9503,7 @@ static void __devinit bnx2x_prev_unload_undi_inc(struct bnx2x *bp, u8 port,
9503 port, bd, rcq); 9503 port, bd, rcq);
9504} 9504}
9505 9505
9506static int __devinit bnx2x_prev_mcp_done(struct bnx2x *bp) 9506static int bnx2x_prev_mcp_done(struct bnx2x *bp)
9507{ 9507{
9508 u32 rc = bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE, 9508 u32 rc = bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE,
9509 DRV_MSG_CODE_UNLOAD_SKIP_LINK_RESET); 9509 DRV_MSG_CODE_UNLOAD_SKIP_LINK_RESET);
@@ -9515,7 +9515,7 @@ static int __devinit bnx2x_prev_mcp_done(struct bnx2x *bp)
9515 return 0; 9515 return 0;
9516} 9516}
9517 9517
9518static bool __devinit bnx2x_prev_is_path_marked(struct bnx2x *bp) 9518static bool bnx2x_prev_is_path_marked(struct bnx2x *bp)
9519{ 9519{
9520 struct bnx2x_prev_path_list *tmp_list; 9520 struct bnx2x_prev_path_list *tmp_list;
9521 int rc = false; 9521 int rc = false;
@@ -9539,7 +9539,7 @@ static bool __devinit bnx2x_prev_is_path_marked(struct bnx2x *bp)
9539 return rc; 9539 return rc;
9540} 9540}
9541 9541
9542static int __devinit bnx2x_prev_mark_path(struct bnx2x *bp) 9542static int bnx2x_prev_mark_path(struct bnx2x *bp)
9543{ 9543{
9544 struct bnx2x_prev_path_list *tmp_list; 9544 struct bnx2x_prev_path_list *tmp_list;
9545 int rc; 9545 int rc;
@@ -9568,7 +9568,7 @@ static int __devinit bnx2x_prev_mark_path(struct bnx2x *bp)
9568 return rc; 9568 return rc;
9569} 9569}
9570 9570
9571static int __devinit bnx2x_do_flr(struct bnx2x *bp) 9571static int bnx2x_do_flr(struct bnx2x *bp)
9572{ 9572{
9573 int i; 9573 int i;
9574 u16 status; 9574 u16 status;
@@ -9608,7 +9608,7 @@ clear:
9608 return 0; 9608 return 0;
9609} 9609}
9610 9610
9611static int __devinit bnx2x_prev_unload_uncommon(struct bnx2x *bp) 9611static int bnx2x_prev_unload_uncommon(struct bnx2x *bp)
9612{ 9612{
9613 int rc; 9613 int rc;
9614 9614
@@ -9646,7 +9646,7 @@ static int __devinit bnx2x_prev_unload_uncommon(struct bnx2x *bp)
9646 return rc; 9646 return rc;
9647} 9647}
9648 9648
9649static int __devinit bnx2x_prev_unload_common(struct bnx2x *bp) 9649static int bnx2x_prev_unload_common(struct bnx2x *bp)
9650{ 9650{
9651 u32 reset_reg, tmp_reg = 0, rc; 9651 u32 reset_reg, tmp_reg = 0, rc;
9652 /* It is possible a previous function received 'common' answer, 9652 /* It is possible a previous function received 'common' answer,
@@ -9729,7 +9729,7 @@ static int __devinit bnx2x_prev_unload_common(struct bnx2x *bp)
9729 * to clear the interrupt which detected this from the pglueb and the was done 9729 * to clear the interrupt which detected this from the pglueb and the was done
9730 * bit 9730 * bit
9731 */ 9731 */
9732static void __devinit bnx2x_prev_interrupted_dmae(struct bnx2x *bp) 9732static void bnx2x_prev_interrupted_dmae(struct bnx2x *bp)
9733{ 9733{
9734 if (!CHIP_IS_E1x(bp)) { 9734 if (!CHIP_IS_E1x(bp)) {
9735 u32 val = REG_RD(bp, PGLUE_B_REG_PGLUE_B_INT_STS); 9735 u32 val = REG_RD(bp, PGLUE_B_REG_PGLUE_B_INT_STS);
@@ -9741,7 +9741,7 @@ static void __devinit bnx2x_prev_interrupted_dmae(struct bnx2x *bp)
9741 } 9741 }
9742} 9742}
9743 9743
9744static int __devinit bnx2x_prev_unload(struct bnx2x *bp) 9744static int bnx2x_prev_unload(struct bnx2x *bp)
9745{ 9745{
9746 int time_counter = 10; 9746 int time_counter = 10;
9747 u32 rc, fw, hw_lock_reg, hw_lock_val; 9747 u32 rc, fw, hw_lock_reg, hw_lock_val;
@@ -9808,7 +9808,7 @@ static int __devinit bnx2x_prev_unload(struct bnx2x *bp)
9808 return rc; 9808 return rc;
9809} 9809}
9810 9810
9811static void __devinit bnx2x_get_common_hwinfo(struct bnx2x *bp) 9811static void bnx2x_get_common_hwinfo(struct bnx2x *bp)
9812{ 9812{
9813 u32 val, val2, val3, val4, id, boot_mode; 9813 u32 val, val2, val3, val4, id, boot_mode;
9814 u16 pmc; 9814 u16 pmc;
@@ -9991,7 +9991,7 @@ static void __devinit bnx2x_get_common_hwinfo(struct bnx2x *bp)
9991#define IGU_FID(val) GET_FIELD((val), IGU_REG_MAPPING_MEMORY_FID) 9991#define IGU_FID(val) GET_FIELD((val), IGU_REG_MAPPING_MEMORY_FID)
9992#define IGU_VEC(val) GET_FIELD((val), IGU_REG_MAPPING_MEMORY_VECTOR) 9992#define IGU_VEC(val) GET_FIELD((val), IGU_REG_MAPPING_MEMORY_VECTOR)
9993 9993
9994static int __devinit bnx2x_get_igu_cam_info(struct bnx2x *bp) 9994static int bnx2x_get_igu_cam_info(struct bnx2x *bp)
9995{ 9995{
9996 int pfid = BP_FUNC(bp); 9996 int pfid = BP_FUNC(bp);
9997 int igu_sb_id; 9997 int igu_sb_id;
@@ -10050,7 +10050,7 @@ static int __devinit bnx2x_get_igu_cam_info(struct bnx2x *bp)
10050 return 0; 10050 return 0;
10051} 10051}
10052 10052
10053static void __devinit bnx2x_link_settings_supported(struct bnx2x *bp, 10053static void bnx2x_link_settings_supported(struct bnx2x *bp,
10054 u32 switch_cfg) 10054 u32 switch_cfg)
10055{ 10055{
10056 int cfg_size = 0, idx, port = BP_PORT(bp); 10056 int cfg_size = 0, idx, port = BP_PORT(bp);
@@ -10149,7 +10149,7 @@ static void __devinit bnx2x_link_settings_supported(struct bnx2x *bp,
10149 bp->port.supported[1]); 10149 bp->port.supported[1]);
10150} 10150}
10151 10151
10152static void __devinit bnx2x_link_settings_requested(struct bnx2x *bp) 10152static void bnx2x_link_settings_requested(struct bnx2x *bp)
10153{ 10153{
10154 u32 link_config, idx, cfg_size = 0; 10154 u32 link_config, idx, cfg_size = 0;
10155 bp->port.advertising[0] = 0; 10155 bp->port.advertising[0] = 0;
@@ -10335,7 +10335,7 @@ static void __devinit bnx2x_link_settings_requested(struct bnx2x *bp)
10335 } 10335 }
10336} 10336}
10337 10337
10338static void __devinit bnx2x_set_mac_buf(u8 *mac_buf, u32 mac_lo, u16 mac_hi) 10338static void bnx2x_set_mac_buf(u8 *mac_buf, u32 mac_lo, u16 mac_hi)
10339{ 10339{
10340 mac_hi = cpu_to_be16(mac_hi); 10340 mac_hi = cpu_to_be16(mac_hi);
10341 mac_lo = cpu_to_be32(mac_lo); 10341 mac_lo = cpu_to_be32(mac_lo);
@@ -10343,7 +10343,7 @@ static void __devinit bnx2x_set_mac_buf(u8 *mac_buf, u32 mac_lo, u16 mac_hi)
10343 memcpy(mac_buf + sizeof(mac_hi), &mac_lo, sizeof(mac_lo)); 10343 memcpy(mac_buf + sizeof(mac_hi), &mac_lo, sizeof(mac_lo));
10344} 10344}
10345 10345
10346static void __devinit bnx2x_get_port_hwinfo(struct bnx2x *bp) 10346static void bnx2x_get_port_hwinfo(struct bnx2x *bp)
10347{ 10347{
10348 int port = BP_PORT(bp); 10348 int port = BP_PORT(bp);
10349 u32 config; 10349 u32 config;
@@ -10447,7 +10447,7 @@ void bnx2x_get_iscsi_info(struct bnx2x *bp)
10447 10447
10448} 10448}
10449 10449
10450static void __devinit bnx2x_get_ext_wwn_info(struct bnx2x *bp, int func) 10450static void bnx2x_get_ext_wwn_info(struct bnx2x *bp, int func)
10451{ 10451{
10452 /* Port info */ 10452 /* Port info */
10453 bp->cnic_eth_dev.fcoe_wwn_port_name_hi = 10453 bp->cnic_eth_dev.fcoe_wwn_port_name_hi =
@@ -10461,7 +10461,7 @@ static void __devinit bnx2x_get_ext_wwn_info(struct bnx2x *bp, int func)
10461 bp->cnic_eth_dev.fcoe_wwn_node_name_lo = 10461 bp->cnic_eth_dev.fcoe_wwn_node_name_lo =
10462 MF_CFG_RD(bp, func_ext_config[func].fcoe_wwn_node_name_lower); 10462 MF_CFG_RD(bp, func_ext_config[func].fcoe_wwn_node_name_lower);
10463} 10463}
10464static void __devinit bnx2x_get_fcoe_info(struct bnx2x *bp) 10464static void bnx2x_get_fcoe_info(struct bnx2x *bp)
10465{ 10465{
10466 int port = BP_PORT(bp); 10466 int port = BP_PORT(bp);
10467 int func = BP_ABS_FUNC(bp); 10467 int func = BP_ABS_FUNC(bp);
@@ -10521,7 +10521,7 @@ static void __devinit bnx2x_get_fcoe_info(struct bnx2x *bp)
10521 bp->flags |= NO_FCOE_FLAG; 10521 bp->flags |= NO_FCOE_FLAG;
10522} 10522}
10523 10523
10524static void __devinit bnx2x_get_cnic_info(struct bnx2x *bp) 10524static void bnx2x_get_cnic_info(struct bnx2x *bp)
10525{ 10525{
10526 /* 10526 /*
10527 * iSCSI may be dynamically disabled but reading 10527 * iSCSI may be dynamically disabled but reading
@@ -10532,7 +10532,7 @@ static void __devinit bnx2x_get_cnic_info(struct bnx2x *bp)
10532 bnx2x_get_fcoe_info(bp); 10532 bnx2x_get_fcoe_info(bp);
10533} 10533}
10534 10534
10535static void __devinit bnx2x_get_cnic_mac_hwinfo(struct bnx2x *bp) 10535static void bnx2x_get_cnic_mac_hwinfo(struct bnx2x *bp)
10536{ 10536{
10537 u32 val, val2; 10537 u32 val, val2;
10538 int func = BP_ABS_FUNC(bp); 10538 int func = BP_ABS_FUNC(bp);
@@ -10626,7 +10626,7 @@ static void __devinit bnx2x_get_cnic_mac_hwinfo(struct bnx2x *bp)
10626 } 10626 }
10627} 10627}
10628 10628
10629static void __devinit bnx2x_get_mac_hwinfo(struct bnx2x *bp) 10629static void bnx2x_get_mac_hwinfo(struct bnx2x *bp)
10630{ 10630{
10631 u32 val, val2; 10631 u32 val, val2;
10632 int func = BP_ABS_FUNC(bp); 10632 int func = BP_ABS_FUNC(bp);
@@ -10667,7 +10667,7 @@ static void __devinit bnx2x_get_mac_hwinfo(struct bnx2x *bp)
10667 bp->dev->dev_addr); 10667 bp->dev->dev_addr);
10668} 10668}
10669 10669
10670static bool __devinit bnx2x_get_dropless_info(struct bnx2x *bp) 10670static bool bnx2x_get_dropless_info(struct bnx2x *bp)
10671{ 10671{
10672 int tmp; 10672 int tmp;
10673 u32 cfg; 10673 u32 cfg;
@@ -10687,7 +10687,7 @@ static bool __devinit bnx2x_get_dropless_info(struct bnx2x *bp)
10687 return cfg; 10687 return cfg;
10688} 10688}
10689 10689
10690static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp) 10690static int bnx2x_get_hwinfo(struct bnx2x *bp)
10691{ 10691{
10692 int /*abs*/func = BP_ABS_FUNC(bp); 10692 int /*abs*/func = BP_ABS_FUNC(bp);
10693 int vn; 10693 int vn;
@@ -10913,7 +10913,7 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
10913 return rc; 10913 return rc;
10914} 10914}
10915 10915
10916static void __devinit bnx2x_read_fwinfo(struct bnx2x *bp) 10916static void bnx2x_read_fwinfo(struct bnx2x *bp)
10917{ 10917{
10918 int cnt, i, block_end, rodi; 10918 int cnt, i, block_end, rodi;
10919 char vpd_start[BNX2X_VPD_LEN+1]; 10919 char vpd_start[BNX2X_VPD_LEN+1];
@@ -10998,7 +10998,7 @@ out_not_found:
10998 return; 10998 return;
10999} 10999}
11000 11000
11001static void __devinit bnx2x_set_modes_bitmap(struct bnx2x *bp) 11001static void bnx2x_set_modes_bitmap(struct bnx2x *bp)
11002{ 11002{
11003 u32 flags = 0; 11003 u32 flags = 0;
11004 11004
@@ -11048,7 +11048,7 @@ static void __devinit bnx2x_set_modes_bitmap(struct bnx2x *bp)
11048 INIT_MODE_FLAGS(bp) = flags; 11048 INIT_MODE_FLAGS(bp) = flags;
11049} 11049}
11050 11050
11051static int __devinit bnx2x_init_bp(struct bnx2x *bp) 11051static int bnx2x_init_bp(struct bnx2x *bp)
11052{ 11052{
11053 int func; 11053 int func;
11054 int rc; 11054 int rc;
@@ -11531,7 +11531,7 @@ static int bnx2x_set_coherency_mask(struct bnx2x *bp)
11531 return 0; 11531 return 0;
11532} 11532}
11533 11533
11534static int __devinit bnx2x_init_dev(struct pci_dev *pdev, 11534static int bnx2x_init_dev(struct pci_dev *pdev,
11535 struct net_device *dev, 11535 struct net_device *dev,
11536 unsigned long board_type) 11536 unsigned long board_type)
11537{ 11537{
@@ -11713,7 +11713,7 @@ err_out:
11713 return rc; 11713 return rc;
11714} 11714}
11715 11715
11716static void __devinit bnx2x_get_pcie_width_speed(struct bnx2x *bp, 11716static void bnx2x_get_pcie_width_speed(struct bnx2x *bp,
11717 int *width, int *speed) 11717 int *width, int *speed)
11718{ 11718{
11719 u32 val = REG_RD(bp, PCICFG_OFFSET + PCICFG_LINK_CONTROL); 11719 u32 val = REG_RD(bp, PCICFG_OFFSET + PCICFG_LINK_CONTROL);
@@ -12018,7 +12018,7 @@ static int bnx2x_get_num_non_def_sbs(struct pci_dev *pdev,
12018 return control & PCI_MSIX_FLAGS_QSIZE; 12018 return control & PCI_MSIX_FLAGS_QSIZE;
12019} 12019}
12020 12020
12021static int __devinit bnx2x_init_one(struct pci_dev *pdev, 12021static int bnx2x_init_one(struct pci_dev *pdev,
12022 const struct pci_device_id *ent) 12022 const struct pci_device_id *ent)
12023{ 12023{
12024 struct net_device *dev = NULL; 12024 struct net_device *dev = NULL;
@@ -12207,7 +12207,7 @@ init_one_exit:
12207 return rc; 12207 return rc;
12208} 12208}
12209 12209
12210static void __devexit bnx2x_remove_one(struct pci_dev *pdev) 12210static void bnx2x_remove_one(struct pci_dev *pdev)
12211{ 12211{
12212 struct net_device *dev = pci_get_drvdata(pdev); 12212 struct net_device *dev = pci_get_drvdata(pdev);
12213 struct bnx2x *bp; 12213 struct bnx2x *bp;
@@ -12422,7 +12422,7 @@ static struct pci_driver bnx2x_pci_driver = {
12422 .name = DRV_MODULE_NAME, 12422 .name = DRV_MODULE_NAME,
12423 .id_table = bnx2x_pci_tbl, 12423 .id_table = bnx2x_pci_tbl,
12424 .probe = bnx2x_init_one, 12424 .probe = bnx2x_init_one,
12425 .remove = __devexit_p(bnx2x_remove_one), 12425 .remove = bnx2x_remove_one,
12426 .suspend = bnx2x_suspend, 12426 .suspend = bnx2x_suspend,
12427 .resume = bnx2x_resume, 12427 .resume = bnx2x_resume,
12428 .err_handler = &bnx2x_err_handler, 12428 .err_handler = &bnx2x_err_handler,
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
index cc8434fd606e..3b825f422090 100644
--- a/drivers/net/ethernet/broadcom/cnic.c
+++ b/drivers/net/ethernet/broadcom/cnic.c
@@ -53,7 +53,7 @@
53 53
54#define DRV_MODULE_NAME "cnic" 54#define DRV_MODULE_NAME "cnic"
55 55
56static char version[] __devinitdata = 56static char version[] =
57 "Broadcom NetXtreme II CNIC Driver " DRV_MODULE_NAME " v" CNIC_MODULE_VERSION " (" CNIC_MODULE_RELDATE ")\n"; 57 "Broadcom NetXtreme II CNIC Driver " DRV_MODULE_NAME " v" CNIC_MODULE_VERSION " (" CNIC_MODULE_RELDATE ")\n";
58 58
59MODULE_AUTHOR("Michael Chan <mchan@broadcom.com> and John(Zongxi) " 59MODULE_AUTHOR("Michael Chan <mchan@broadcom.com> and John(Zongxi) "
diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ethernet/broadcom/sb1250-mac.c
index 49e7a258da8a..3a1c8a3cf7c9 100644
--- a/drivers/net/ethernet/broadcom/sb1250-mac.c
+++ b/drivers/net/ethernet/broadcom/sb1250-mac.c
@@ -2586,7 +2586,7 @@ static int sbmac_poll(struct napi_struct *napi, int budget)
2586} 2586}
2587 2587
2588 2588
2589static int __devinit sbmac_probe(struct platform_device *pldev) 2589static int sbmac_probe(struct platform_device *pldev)
2590{ 2590{
2591 struct net_device *dev; 2591 struct net_device *dev;
2592 struct sbmac_softc *sc; 2592 struct sbmac_softc *sc;
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 5cc976d01189..ac94939c03e6 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -211,7 +211,7 @@ static inline void _tg3_flag_clear(enum TG3_FLAGS flag, unsigned long *bits)
211#define FIRMWARE_TG3TSO "tigon/tg3_tso.bin" 211#define FIRMWARE_TG3TSO "tigon/tg3_tso.bin"
212#define FIRMWARE_TG3TSO5 "tigon/tg3_tso5.bin" 212#define FIRMWARE_TG3TSO5 "tigon/tg3_tso5.bin"
213 213
214static char version[] __devinitdata = 214static char version[] =
215 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")"; 215 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")";
216 216
217MODULE_AUTHOR("David S. Miller (davem@redhat.com) and Jeff Garzik (jgarzik@pobox.com)"); 217MODULE_AUTHOR("David S. Miller (davem@redhat.com) and Jeff Garzik (jgarzik@pobox.com)");
@@ -9938,7 +9938,7 @@ restart_timer:
9938 add_timer(&tp->timer); 9938 add_timer(&tp->timer);
9939} 9939}
9940 9940
9941static void __devinit tg3_timer_init(struct tg3 *tp) 9941static void tg3_timer_init(struct tg3 *tp)
9942{ 9942{
9943 if (tg3_flag(tp, TAGGED_STATUS) && 9943 if (tg3_flag(tp, TAGGED_STATUS) &&
9944 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5717 && 9944 GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5717 &&
@@ -12829,7 +12829,7 @@ static const struct net_device_ops tg3_netdev_ops = {
12829#endif 12829#endif
12830}; 12830};
12831 12831
12832static void __devinit tg3_get_eeprom_size(struct tg3 *tp) 12832static void tg3_get_eeprom_size(struct tg3 *tp)
12833{ 12833{
12834 u32 cursize, val, magic; 12834 u32 cursize, val, magic;
12835 12835
@@ -12863,7 +12863,7 @@ static void __devinit tg3_get_eeprom_size(struct tg3 *tp)
12863 tp->nvram_size = cursize; 12863 tp->nvram_size = cursize;
12864} 12864}
12865 12865
12866static void __devinit tg3_get_nvram_size(struct tg3 *tp) 12866static void tg3_get_nvram_size(struct tg3 *tp)
12867{ 12867{
12868 u32 val; 12868 u32 val;
12869 12869
@@ -12896,7 +12896,7 @@ static void __devinit tg3_get_nvram_size(struct tg3 *tp)
12896 tp->nvram_size = TG3_NVRAM_SIZE_512KB; 12896 tp->nvram_size = TG3_NVRAM_SIZE_512KB;
12897} 12897}
12898 12898
12899static void __devinit tg3_get_nvram_info(struct tg3 *tp) 12899static void tg3_get_nvram_info(struct tg3 *tp)
12900{ 12900{
12901 u32 nvcfg1; 12901 u32 nvcfg1;
12902 12902
@@ -12947,7 +12947,7 @@ static void __devinit tg3_get_nvram_info(struct tg3 *tp)
12947 } 12947 }
12948} 12948}
12949 12949
12950static void __devinit tg3_nvram_get_pagesize(struct tg3 *tp, u32 nvmcfg1) 12950static void tg3_nvram_get_pagesize(struct tg3 *tp, u32 nvmcfg1)
12951{ 12951{
12952 switch (nvmcfg1 & NVRAM_CFG1_5752PAGE_SIZE_MASK) { 12952 switch (nvmcfg1 & NVRAM_CFG1_5752PAGE_SIZE_MASK) {
12953 case FLASH_5752PAGE_SIZE_256: 12953 case FLASH_5752PAGE_SIZE_256:
@@ -12974,7 +12974,7 @@ static void __devinit tg3_nvram_get_pagesize(struct tg3 *tp, u32 nvmcfg1)
12974 } 12974 }
12975} 12975}
12976 12976
12977static void __devinit tg3_get_5752_nvram_info(struct tg3 *tp) 12977static void tg3_get_5752_nvram_info(struct tg3 *tp)
12978{ 12978{
12979 u32 nvcfg1; 12979 u32 nvcfg1;
12980 12980
@@ -13015,7 +13015,7 @@ static void __devinit tg3_get_5752_nvram_info(struct tg3 *tp)
13015 } 13015 }
13016} 13016}
13017 13017
13018static void __devinit tg3_get_5755_nvram_info(struct tg3 *tp) 13018static void tg3_get_5755_nvram_info(struct tg3 *tp)
13019{ 13019{
13020 u32 nvcfg1, protect = 0; 13020 u32 nvcfg1, protect = 0;
13021 13021
@@ -13071,7 +13071,7 @@ static void __devinit tg3_get_5755_nvram_info(struct tg3 *tp)
13071 } 13071 }
13072} 13072}
13073 13073
13074static void __devinit tg3_get_5787_nvram_info(struct tg3 *tp) 13074static void tg3_get_5787_nvram_info(struct tg3 *tp)
13075{ 13075{
13076 u32 nvcfg1; 13076 u32 nvcfg1;
13077 13077
@@ -13109,7 +13109,7 @@ static void __devinit tg3_get_5787_nvram_info(struct tg3 *tp)
13109 } 13109 }
13110} 13110}
13111 13111
13112static void __devinit tg3_get_5761_nvram_info(struct tg3 *tp) 13112static void tg3_get_5761_nvram_info(struct tg3 *tp)
13113{ 13113{
13114 u32 nvcfg1, protect = 0; 13114 u32 nvcfg1, protect = 0;
13115 13115
@@ -13184,14 +13184,14 @@ static void __devinit tg3_get_5761_nvram_info(struct tg3 *tp)
13184 } 13184 }
13185} 13185}
13186 13186
13187static void __devinit tg3_get_5906_nvram_info(struct tg3 *tp) 13187static void tg3_get_5906_nvram_info(struct tg3 *tp)
13188{ 13188{
13189 tp->nvram_jedecnum = JEDEC_ATMEL; 13189 tp->nvram_jedecnum = JEDEC_ATMEL;
13190 tg3_flag_set(tp, NVRAM_BUFFERED); 13190 tg3_flag_set(tp, NVRAM_BUFFERED);
13191 tp->nvram_pagesize = ATMEL_AT24C512_CHIP_SIZE; 13191 tp->nvram_pagesize = ATMEL_AT24C512_CHIP_SIZE;
13192} 13192}
13193 13193
13194static void __devinit tg3_get_57780_nvram_info(struct tg3 *tp) 13194static void tg3_get_57780_nvram_info(struct tg3 *tp)
13195{ 13195{
13196 u32 nvcfg1; 13196 u32 nvcfg1;
13197 13197
@@ -13264,7 +13264,7 @@ static void __devinit tg3_get_57780_nvram_info(struct tg3 *tp)
13264} 13264}
13265 13265
13266 13266
13267static void __devinit tg3_get_5717_nvram_info(struct tg3 *tp) 13267static void tg3_get_5717_nvram_info(struct tg3 *tp)
13268{ 13268{
13269 u32 nvcfg1; 13269 u32 nvcfg1;
13270 13270
@@ -13342,7 +13342,7 @@ static void __devinit tg3_get_5717_nvram_info(struct tg3 *tp)
13342 tg3_flag_set(tp, NO_NVRAM_ADDR_TRANS); 13342 tg3_flag_set(tp, NO_NVRAM_ADDR_TRANS);
13343} 13343}
13344 13344
13345static void __devinit tg3_get_5720_nvram_info(struct tg3 *tp) 13345static void tg3_get_5720_nvram_info(struct tg3 *tp)
13346{ 13346{
13347 u32 nvcfg1, nvmpinstrp; 13347 u32 nvcfg1, nvmpinstrp;
13348 13348
@@ -13455,7 +13455,7 @@ static void __devinit tg3_get_5720_nvram_info(struct tg3 *tp)
13455} 13455}
13456 13456
13457/* Chips other than 5700/5701 use the NVRAM for fetching info. */ 13457/* Chips other than 5700/5701 use the NVRAM for fetching info. */
13458static void __devinit tg3_nvram_init(struct tg3 *tp) 13458static void tg3_nvram_init(struct tg3 *tp)
13459{ 13459{
13460 tw32_f(GRC_EEPROM_ADDR, 13460 tw32_f(GRC_EEPROM_ADDR,
13461 (EEPROM_ADDR_FSM_RESET | 13461 (EEPROM_ADDR_FSM_RESET |
@@ -13525,7 +13525,7 @@ struct subsys_tbl_ent {
13525 u32 phy_id; 13525 u32 phy_id;
13526}; 13526};
13527 13527
13528static struct subsys_tbl_ent subsys_id_to_phy_id[] __devinitdata = { 13528static struct subsys_tbl_ent subsys_id_to_phy_id[] = {
13529 /* Broadcom boards. */ 13529 /* Broadcom boards. */
13530 { TG3PCI_SUBVENDOR_ID_BROADCOM, 13530 { TG3PCI_SUBVENDOR_ID_BROADCOM,
13531 TG3PCI_SUBDEVICE_ID_BROADCOM_95700A6, TG3_PHY_ID_BCM5401 }, 13531 TG3PCI_SUBDEVICE_ID_BROADCOM_95700A6, TG3_PHY_ID_BCM5401 },
@@ -13589,7 +13589,7 @@ static struct subsys_tbl_ent subsys_id_to_phy_id[] __devinitdata = {
13589 TG3PCI_SUBDEVICE_ID_IBM_5703SAX2, 0 } 13589 TG3PCI_SUBDEVICE_ID_IBM_5703SAX2, 0 }
13590}; 13590};
13591 13591
13592static struct subsys_tbl_ent * __devinit tg3_lookup_by_subsys(struct tg3 *tp) 13592static struct subsys_tbl_ent *tg3_lookup_by_subsys(struct tg3 *tp)
13593{ 13593{
13594 int i; 13594 int i;
13595 13595
@@ -13603,7 +13603,7 @@ static struct subsys_tbl_ent * __devinit tg3_lookup_by_subsys(struct tg3 *tp)
13603 return NULL; 13603 return NULL;
13604} 13604}
13605 13605
13606static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp) 13606static void tg3_get_eeprom_hw_cfg(struct tg3 *tp)
13607{ 13607{
13608 u32 val; 13608 u32 val;
13609 13609
@@ -13803,7 +13803,7 @@ done:
13803 device_set_wakeup_capable(&tp->pdev->dev, false); 13803 device_set_wakeup_capable(&tp->pdev->dev, false);
13804} 13804}
13805 13805
13806static int __devinit tg3_issue_otp_command(struct tg3 *tp, u32 cmd) 13806static int tg3_issue_otp_command(struct tg3 *tp, u32 cmd)
13807{ 13807{
13808 int i; 13808 int i;
13809 u32 val; 13809 u32 val;
@@ -13826,7 +13826,7 @@ static int __devinit tg3_issue_otp_command(struct tg3 *tp, u32 cmd)
13826 * configuration is a 32-bit value that straddles the alignment boundary. 13826 * configuration is a 32-bit value that straddles the alignment boundary.
13827 * We do two 32-bit reads and then shift and merge the results. 13827 * We do two 32-bit reads and then shift and merge the results.
13828 */ 13828 */
13829static u32 __devinit tg3_read_otp_phycfg(struct tg3 *tp) 13829static u32 tg3_read_otp_phycfg(struct tg3 *tp)
13830{ 13830{
13831 u32 bhalf_otp, thalf_otp; 13831 u32 bhalf_otp, thalf_otp;
13832 13832
@@ -13852,7 +13852,7 @@ static u32 __devinit tg3_read_otp_phycfg(struct tg3 *tp)
13852 return ((thalf_otp & 0x0000ffff) << 16) | (bhalf_otp >> 16); 13852 return ((thalf_otp & 0x0000ffff) << 16) | (bhalf_otp >> 16);
13853} 13853}
13854 13854
13855static void __devinit tg3_phy_init_link_config(struct tg3 *tp) 13855static void tg3_phy_init_link_config(struct tg3 *tp)
13856{ 13856{
13857 u32 adv = ADVERTISED_Autoneg; 13857 u32 adv = ADVERTISED_Autoneg;
13858 13858
@@ -13879,7 +13879,7 @@ static void __devinit tg3_phy_init_link_config(struct tg3 *tp)
13879 tp->old_link = -1; 13879 tp->old_link = -1;
13880} 13880}
13881 13881
13882static int __devinit tg3_phy_probe(struct tg3 *tp) 13882static int tg3_phy_probe(struct tg3 *tp)
13883{ 13883{
13884 u32 hw_phy_id_1, hw_phy_id_2; 13884 u32 hw_phy_id_1, hw_phy_id_2;
13885 u32 hw_phy_id, hw_phy_id_masked; 13885 u32 hw_phy_id, hw_phy_id_masked;
@@ -14007,7 +14007,7 @@ skip_phy_reset:
14007 return err; 14007 return err;
14008} 14008}
14009 14009
14010static void __devinit tg3_read_vpd(struct tg3 *tp) 14010static void tg3_read_vpd(struct tg3 *tp)
14011{ 14011{
14012 u8 *vpd_data; 14012 u8 *vpd_data;
14013 unsigned int block_end, rosize, len; 14013 unsigned int block_end, rosize, len;
@@ -14128,7 +14128,7 @@ nomatch:
14128 } 14128 }
14129} 14129}
14130 14130
14131static int __devinit tg3_fw_img_is_valid(struct tg3 *tp, u32 offset) 14131static int tg3_fw_img_is_valid(struct tg3 *tp, u32 offset)
14132{ 14132{
14133 u32 val; 14133 u32 val;
14134 14134
@@ -14141,7 +14141,7 @@ static int __devinit tg3_fw_img_is_valid(struct tg3 *tp, u32 offset)
14141 return 1; 14141 return 1;
14142} 14142}
14143 14143
14144static void __devinit tg3_read_bc_ver(struct tg3 *tp) 14144static void tg3_read_bc_ver(struct tg3 *tp)
14145{ 14145{
14146 u32 val, offset, start, ver_offset; 14146 u32 val, offset, start, ver_offset;
14147 int i, dst_off; 14147 int i, dst_off;
@@ -14193,7 +14193,7 @@ static void __devinit tg3_read_bc_ver(struct tg3 *tp)
14193 } 14193 }
14194} 14194}
14195 14195
14196static void __devinit tg3_read_hwsb_ver(struct tg3 *tp) 14196static void tg3_read_hwsb_ver(struct tg3 *tp)
14197{ 14197{
14198 u32 val, major, minor; 14198 u32 val, major, minor;
14199 14199
@@ -14209,7 +14209,7 @@ static void __devinit tg3_read_hwsb_ver(struct tg3 *tp)
14209 snprintf(&tp->fw_ver[0], 32, "sb v%d.%02d", major, minor); 14209 snprintf(&tp->fw_ver[0], 32, "sb v%d.%02d", major, minor);
14210} 14210}
14211 14211
14212static void __devinit tg3_read_sb_ver(struct tg3 *tp, u32 val) 14212static void tg3_read_sb_ver(struct tg3 *tp, u32 val)
14213{ 14213{
14214 u32 offset, major, minor, build; 14214 u32 offset, major, minor, build;
14215 14215
@@ -14264,7 +14264,7 @@ static void __devinit tg3_read_sb_ver(struct tg3 *tp, u32 val)
14264 } 14264 }
14265} 14265}
14266 14266
14267static void __devinit tg3_read_mgmtfw_ver(struct tg3 *tp) 14267static void tg3_read_mgmtfw_ver(struct tg3 *tp)
14268{ 14268{
14269 u32 val, offset, start; 14269 u32 val, offset, start;
14270 int i, vlen; 14270 int i, vlen;
@@ -14316,7 +14316,7 @@ static void __devinit tg3_read_mgmtfw_ver(struct tg3 *tp)
14316 } 14316 }
14317} 14317}
14318 14318
14319static void __devinit tg3_probe_ncsi(struct tg3 *tp) 14319static void tg3_probe_ncsi(struct tg3 *tp)
14320{ 14320{
14321 u32 apedata; 14321 u32 apedata;
14322 14322
@@ -14332,7 +14332,7 @@ static void __devinit tg3_probe_ncsi(struct tg3 *tp)
14332 tg3_flag_set(tp, APE_HAS_NCSI); 14332 tg3_flag_set(tp, APE_HAS_NCSI);
14333} 14333}
14334 14334
14335static void __devinit tg3_read_dash_ver(struct tg3 *tp) 14335static void tg3_read_dash_ver(struct tg3 *tp)
14336{ 14336{
14337 int vlen; 14337 int vlen;
14338 u32 apedata; 14338 u32 apedata;
@@ -14355,7 +14355,7 @@ static void __devinit tg3_read_dash_ver(struct tg3 *tp)
14355 (apedata & APE_FW_VERSION_BLDMSK)); 14355 (apedata & APE_FW_VERSION_BLDMSK));
14356} 14356}
14357 14357
14358static void __devinit tg3_read_fw_ver(struct tg3 *tp) 14358static void tg3_read_fw_ver(struct tg3 *tp)
14359{ 14359{
14360 u32 val; 14360 u32 val;
14361 bool vpd_vers = false; 14361 bool vpd_vers = false;
@@ -14408,7 +14408,7 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_write_reorder_chipsets) = {
14408 { }, 14408 { },
14409}; 14409};
14410 14410
14411static struct pci_dev * __devinit tg3_find_peer(struct tg3 *tp) 14411static struct pci_dev *tg3_find_peer(struct tg3 *tp)
14412{ 14412{
14413 struct pci_dev *peer; 14413 struct pci_dev *peer;
14414 unsigned int func, devnr = tp->pdev->devfn & ~7; 14414 unsigned int func, devnr = tp->pdev->devfn & ~7;
@@ -14436,7 +14436,7 @@ static struct pci_dev * __devinit tg3_find_peer(struct tg3 *tp)
14436 return peer; 14436 return peer;
14437} 14437}
14438 14438
14439static void __devinit tg3_detect_asic_rev(struct tg3 *tp, u32 misc_ctrl_reg) 14439static void tg3_detect_asic_rev(struct tg3 *tp, u32 misc_ctrl_reg)
14440{ 14440{
14441 tp->pci_chip_rev_id = misc_ctrl_reg >> MISC_HOST_CTRL_CHIPREV_SHIFT; 14441 tp->pci_chip_rev_id = misc_ctrl_reg >> MISC_HOST_CTRL_CHIPREV_SHIFT;
14442 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_USE_PROD_ID_REG) { 14442 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_USE_PROD_ID_REG) {
@@ -14539,7 +14539,7 @@ static bool tg3_10_100_only_device(struct tg3 *tp,
14539 return false; 14539 return false;
14540} 14540}
14541 14541
14542static int __devinit tg3_get_invariants(struct tg3 *tp, 14542static int tg3_get_invariants(struct tg3 *tp,
14543 const struct pci_device_id *ent) 14543 const struct pci_device_id *ent)
14544{ 14544{
14545 u32 misc_ctrl_reg; 14545 u32 misc_ctrl_reg;
@@ -15299,7 +15299,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp,
15299} 15299}
15300 15300
15301#ifdef CONFIG_SPARC 15301#ifdef CONFIG_SPARC
15302static int __devinit tg3_get_macaddr_sparc(struct tg3 *tp) 15302static int tg3_get_macaddr_sparc(struct tg3 *tp)
15303{ 15303{
15304 struct net_device *dev = tp->dev; 15304 struct net_device *dev = tp->dev;
15305 struct pci_dev *pdev = tp->pdev; 15305 struct pci_dev *pdev = tp->pdev;
@@ -15316,7 +15316,7 @@ static int __devinit tg3_get_macaddr_sparc(struct tg3 *tp)
15316 return -ENODEV; 15316 return -ENODEV;
15317} 15317}
15318 15318
15319static int __devinit tg3_get_default_macaddr_sparc(struct tg3 *tp) 15319static int tg3_get_default_macaddr_sparc(struct tg3 *tp)
15320{ 15320{
15321 struct net_device *dev = tp->dev; 15321 struct net_device *dev = tp->dev;
15322 15322
@@ -15326,7 +15326,7 @@ static int __devinit tg3_get_default_macaddr_sparc(struct tg3 *tp)
15326} 15326}
15327#endif 15327#endif
15328 15328
15329static int __devinit tg3_get_device_address(struct tg3 *tp) 15329static int tg3_get_device_address(struct tg3 *tp)
15330{ 15330{
15331 struct net_device *dev = tp->dev; 15331 struct net_device *dev = tp->dev;
15332 u32 hi, lo, mac_offset; 15332 u32 hi, lo, mac_offset;
@@ -15405,7 +15405,7 @@ static int __devinit tg3_get_device_address(struct tg3 *tp)
15405#define BOUNDARY_SINGLE_CACHELINE 1 15405#define BOUNDARY_SINGLE_CACHELINE 1
15406#define BOUNDARY_MULTI_CACHELINE 2 15406#define BOUNDARY_MULTI_CACHELINE 2
15407 15407
15408static u32 __devinit tg3_calc_dma_bndry(struct tg3 *tp, u32 val) 15408static u32 tg3_calc_dma_bndry(struct tg3 *tp, u32 val)
15409{ 15409{
15410 int cacheline_size; 15410 int cacheline_size;
15411 u8 byte; 15411 u8 byte;
@@ -15546,7 +15546,8 @@ out:
15546 return val; 15546 return val;
15547} 15547}
15548 15548
15549static int __devinit tg3_do_test_dma(struct tg3 *tp, u32 *buf, dma_addr_t buf_dma, int size, int to_device) 15549static int tg3_do_test_dma(struct tg3 *tp, u32 *buf, dma_addr_t buf_dma,
15550 int size, int to_device)
15550{ 15551{
15551 struct tg3_internal_buffer_desc test_desc; 15552 struct tg3_internal_buffer_desc test_desc;
15552 u32 sram_dma_descs; 15553 u32 sram_dma_descs;
@@ -15633,7 +15634,7 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_dma_wait_state_chipsets) = {
15633 { }, 15634 { },
15634}; 15635};
15635 15636
15636static int __devinit tg3_test_dma(struct tg3 *tp) 15637static int tg3_test_dma(struct tg3 *tp)
15637{ 15638{
15638 dma_addr_t buf_dma; 15639 dma_addr_t buf_dma;
15639 u32 *buf, saved_dma_rwctrl; 15640 u32 *buf, saved_dma_rwctrl;
@@ -15823,7 +15824,7 @@ out_nofree:
15823 return ret; 15824 return ret;
15824} 15825}
15825 15826
15826static void __devinit tg3_init_bufmgr_config(struct tg3 *tp) 15827static void tg3_init_bufmgr_config(struct tg3 *tp)
15827{ 15828{
15828 if (tg3_flag(tp, 57765_PLUS)) { 15829 if (tg3_flag(tp, 57765_PLUS)) {
15829 tp->bufmgr_config.mbuf_read_dma_low_water = 15830 tp->bufmgr_config.mbuf_read_dma_low_water =
@@ -15879,7 +15880,7 @@ static void __devinit tg3_init_bufmgr_config(struct tg3 *tp)
15879 tp->bufmgr_config.dma_high_water = DEFAULT_DMA_HIGH_WATER; 15880 tp->bufmgr_config.dma_high_water = DEFAULT_DMA_HIGH_WATER;
15880} 15881}
15881 15882
15882static char * __devinit tg3_phy_string(struct tg3 *tp) 15883static char *tg3_phy_string(struct tg3 *tp)
15883{ 15884{
15884 switch (tp->phy_id & TG3_PHY_ID_MASK) { 15885 switch (tp->phy_id & TG3_PHY_ID_MASK) {
15885 case TG3_PHY_ID_BCM5400: return "5400"; 15886 case TG3_PHY_ID_BCM5400: return "5400";
@@ -15910,7 +15911,7 @@ static char * __devinit tg3_phy_string(struct tg3 *tp)
15910 } 15911 }
15911} 15912}
15912 15913
15913static char * __devinit tg3_bus_string(struct tg3 *tp, char *str) 15914static char *tg3_bus_string(struct tg3 *tp, char *str)
15914{ 15915{
15915 if (tg3_flag(tp, PCI_EXPRESS)) { 15916 if (tg3_flag(tp, PCI_EXPRESS)) {
15916 strcpy(str, "PCI Express"); 15917 strcpy(str, "PCI Express");
@@ -15946,7 +15947,7 @@ static char * __devinit tg3_bus_string(struct tg3 *tp, char *str)
15946 return str; 15947 return str;
15947} 15948}
15948 15949
15949static void __devinit tg3_init_coal(struct tg3 *tp) 15950static void tg3_init_coal(struct tg3 *tp)
15950{ 15951{
15951 struct ethtool_coalesce *ec = &tp->coal; 15952 struct ethtool_coalesce *ec = &tp->coal;
15952 15953
@@ -15977,7 +15978,7 @@ static void __devinit tg3_init_coal(struct tg3 *tp)
15977 } 15978 }
15978} 15979}
15979 15980
15980static int __devinit tg3_init_one(struct pci_dev *pdev, 15981static int tg3_init_one(struct pci_dev *pdev,
15981 const struct pci_device_id *ent) 15982 const struct pci_device_id *ent)
15982{ 15983{
15983 struct net_device *dev; 15984 struct net_device *dev;
@@ -16357,7 +16358,7 @@ err_out_disable_pdev:
16357 return err; 16358 return err;
16358} 16359}
16359 16360
16360static void __devexit tg3_remove_one(struct pci_dev *pdev) 16361static void tg3_remove_one(struct pci_dev *pdev)
16361{ 16362{
16362 struct net_device *dev = pci_get_drvdata(pdev); 16363 struct net_device *dev = pci_get_drvdata(pdev);
16363 16364
@@ -16626,7 +16627,7 @@ static struct pci_driver tg3_driver = {
16626 .name = DRV_MODULE_NAME, 16627 .name = DRV_MODULE_NAME,
16627 .id_table = tg3_pci_tbl, 16628 .id_table = tg3_pci_tbl,
16628 .probe = tg3_init_one, 16629 .probe = tg3_init_one,
16629 .remove = __devexit_p(tg3_remove_one), 16630 .remove = tg3_remove_one,
16630 .err_handler = &tg3_err_handler, 16631 .err_handler = &tg3_err_handler,
16631 .driver.pm = TG3_PM_OPS, 16632 .driver.pm = TG3_PM_OPS,
16632}; 16633};