|
@@ -79,7 +79,7 @@
|
|
|
/* Time in jiffies before concluding the transmitter is hung */
|
|
|
#define TX_TIMEOUT (5*HZ)
|
|
|
|
|
|
-static char version[] __devinitdata =
|
|
|
+static char version[] =
|
|
|
"Broadcom NetXtreme II 5771x/578xx 10/20-Gigabit Ethernet Driver "
|
|
|
DRV_MODULE_NAME " " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
|
|
|
|
|
@@ -149,7 +149,7 @@ enum bnx2x_board_type {
|
|
|
/* indexed by board_type, above */
|
|
|
static struct {
|
|
|
char *name;
|
|
|
-} board_info[] __devinitdata = {
|
|
|
+} board_info[] = {
|
|
|
{ "Broadcom NetXtreme II BCM57710 10 Gigabit PCIe [Everest]" },
|
|
|
{ "Broadcom NetXtreme II BCM57711 10 Gigabit PCIe" },
|
|
|
{ "Broadcom NetXtreme II BCM57711E 10 Gigabit PCIe" },
|
|
@@ -9420,7 +9420,7 @@ static inline void bnx2x_undi_int_disable(struct bnx2x *bp)
|
|
|
bnx2x_undi_int_disable_e1h(bp);
|
|
|
}
|
|
|
|
|
|
-static void __devinit bnx2x_prev_unload_close_mac(struct bnx2x *bp)
|
|
|
+static void bnx2x_prev_unload_close_mac(struct bnx2x *bp)
|
|
|
{
|
|
|
u32 val, base_addr, offset, mask, reset_reg;
|
|
|
bool mac_stopped = false;
|
|
@@ -9487,7 +9487,7 @@ static void __devinit bnx2x_prev_unload_close_mac(struct bnx2x *bp)
|
|
|
#define BNX2X_PREV_UNDI_BD(val) ((val) >> 16 & 0xffff)
|
|
|
#define BNX2X_PREV_UNDI_PROD(rcq, bd) ((bd) << 16 | (rcq))
|
|
|
|
|
|
-static void __devinit bnx2x_prev_unload_undi_inc(struct bnx2x *bp, u8 port,
|
|
|
+static void bnx2x_prev_unload_undi_inc(struct bnx2x *bp, u8 port,
|
|
|
u8 inc)
|
|
|
{
|
|
|
u16 rcq, bd;
|
|
@@ -9503,7 +9503,7 @@ static void __devinit bnx2x_prev_unload_undi_inc(struct bnx2x *bp, u8 port,
|
|
|
port, bd, rcq);
|
|
|
}
|
|
|
|
|
|
-static int __devinit bnx2x_prev_mcp_done(struct bnx2x *bp)
|
|
|
+static int bnx2x_prev_mcp_done(struct bnx2x *bp)
|
|
|
{
|
|
|
u32 rc = bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE,
|
|
|
DRV_MSG_CODE_UNLOAD_SKIP_LINK_RESET);
|
|
@@ -9515,7 +9515,7 @@ static int __devinit bnx2x_prev_mcp_done(struct bnx2x *bp)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static bool __devinit bnx2x_prev_is_path_marked(struct bnx2x *bp)
|
|
|
+static bool bnx2x_prev_is_path_marked(struct bnx2x *bp)
|
|
|
{
|
|
|
struct bnx2x_prev_path_list *tmp_list;
|
|
|
int rc = false;
|
|
@@ -9539,7 +9539,7 @@ static bool __devinit bnx2x_prev_is_path_marked(struct bnx2x *bp)
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
-static int __devinit bnx2x_prev_mark_path(struct bnx2x *bp)
|
|
|
+static int bnx2x_prev_mark_path(struct bnx2x *bp)
|
|
|
{
|
|
|
struct bnx2x_prev_path_list *tmp_list;
|
|
|
int rc;
|
|
@@ -9568,7 +9568,7 @@ static int __devinit bnx2x_prev_mark_path(struct bnx2x *bp)
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
-static int __devinit bnx2x_do_flr(struct bnx2x *bp)
|
|
|
+static int bnx2x_do_flr(struct bnx2x *bp)
|
|
|
{
|
|
|
int i;
|
|
|
u16 status;
|
|
@@ -9608,7 +9608,7 @@ clear:
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static int __devinit bnx2x_prev_unload_uncommon(struct bnx2x *bp)
|
|
|
+static int bnx2x_prev_unload_uncommon(struct bnx2x *bp)
|
|
|
{
|
|
|
int rc;
|
|
|
|
|
@@ -9646,7 +9646,7 @@ static int __devinit bnx2x_prev_unload_uncommon(struct bnx2x *bp)
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
-static int __devinit bnx2x_prev_unload_common(struct bnx2x *bp)
|
|
|
+static int bnx2x_prev_unload_common(struct bnx2x *bp)
|
|
|
{
|
|
|
u32 reset_reg, tmp_reg = 0, rc;
|
|
|
/* It is possible a previous function received 'common' answer,
|
|
@@ -9729,7 +9729,7 @@ static int __devinit bnx2x_prev_unload_common(struct bnx2x *bp)
|
|
|
* to clear the interrupt which detected this from the pglueb and the was done
|
|
|
* bit
|
|
|
*/
|
|
|
-static void __devinit bnx2x_prev_interrupted_dmae(struct bnx2x *bp)
|
|
|
+static void bnx2x_prev_interrupted_dmae(struct bnx2x *bp)
|
|
|
{
|
|
|
if (!CHIP_IS_E1x(bp)) {
|
|
|
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)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-static int __devinit bnx2x_prev_unload(struct bnx2x *bp)
|
|
|
+static int bnx2x_prev_unload(struct bnx2x *bp)
|
|
|
{
|
|
|
int time_counter = 10;
|
|
|
u32 rc, fw, hw_lock_reg, hw_lock_val;
|
|
@@ -9808,7 +9808,7 @@ static int __devinit bnx2x_prev_unload(struct bnx2x *bp)
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
-static void __devinit bnx2x_get_common_hwinfo(struct bnx2x *bp)
|
|
|
+static void bnx2x_get_common_hwinfo(struct bnx2x *bp)
|
|
|
{
|
|
|
u32 val, val2, val3, val4, id, boot_mode;
|
|
|
u16 pmc;
|
|
@@ -9991,7 +9991,7 @@ static void __devinit bnx2x_get_common_hwinfo(struct bnx2x *bp)
|
|
|
#define IGU_FID(val) GET_FIELD((val), IGU_REG_MAPPING_MEMORY_FID)
|
|
|
#define IGU_VEC(val) GET_FIELD((val), IGU_REG_MAPPING_MEMORY_VECTOR)
|
|
|
|
|
|
-static int __devinit bnx2x_get_igu_cam_info(struct bnx2x *bp)
|
|
|
+static int bnx2x_get_igu_cam_info(struct bnx2x *bp)
|
|
|
{
|
|
|
int pfid = BP_FUNC(bp);
|
|
|
int igu_sb_id;
|
|
@@ -10050,7 +10050,7 @@ static int __devinit bnx2x_get_igu_cam_info(struct bnx2x *bp)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static void __devinit bnx2x_link_settings_supported(struct bnx2x *bp,
|
|
|
+static void bnx2x_link_settings_supported(struct bnx2x *bp,
|
|
|
u32 switch_cfg)
|
|
|
{
|
|
|
int cfg_size = 0, idx, port = BP_PORT(bp);
|
|
@@ -10149,7 +10149,7 @@ static void __devinit bnx2x_link_settings_supported(struct bnx2x *bp,
|
|
|
bp->port.supported[1]);
|
|
|
}
|
|
|
|
|
|
-static void __devinit bnx2x_link_settings_requested(struct bnx2x *bp)
|
|
|
+static void bnx2x_link_settings_requested(struct bnx2x *bp)
|
|
|
{
|
|
|
u32 link_config, idx, cfg_size = 0;
|
|
|
bp->port.advertising[0] = 0;
|
|
@@ -10335,7 +10335,7 @@ static void __devinit bnx2x_link_settings_requested(struct bnx2x *bp)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-static void __devinit bnx2x_set_mac_buf(u8 *mac_buf, u32 mac_lo, u16 mac_hi)
|
|
|
+static void bnx2x_set_mac_buf(u8 *mac_buf, u32 mac_lo, u16 mac_hi)
|
|
|
{
|
|
|
mac_hi = cpu_to_be16(mac_hi);
|
|
|
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)
|
|
|
memcpy(mac_buf + sizeof(mac_hi), &mac_lo, sizeof(mac_lo));
|
|
|
}
|
|
|
|
|
|
-static void __devinit bnx2x_get_port_hwinfo(struct bnx2x *bp)
|
|
|
+static void bnx2x_get_port_hwinfo(struct bnx2x *bp)
|
|
|
{
|
|
|
int port = BP_PORT(bp);
|
|
|
u32 config;
|
|
@@ -10447,7 +10447,7 @@ void bnx2x_get_iscsi_info(struct bnx2x *bp)
|
|
|
|
|
|
}
|
|
|
|
|
|
-static void __devinit bnx2x_get_ext_wwn_info(struct bnx2x *bp, int func)
|
|
|
+static void bnx2x_get_ext_wwn_info(struct bnx2x *bp, int func)
|
|
|
{
|
|
|
/* Port info */
|
|
|
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)
|
|
|
bp->cnic_eth_dev.fcoe_wwn_node_name_lo =
|
|
|
MF_CFG_RD(bp, func_ext_config[func].fcoe_wwn_node_name_lower);
|
|
|
}
|
|
|
-static void __devinit bnx2x_get_fcoe_info(struct bnx2x *bp)
|
|
|
+static void bnx2x_get_fcoe_info(struct bnx2x *bp)
|
|
|
{
|
|
|
int port = BP_PORT(bp);
|
|
|
int func = BP_ABS_FUNC(bp);
|
|
@@ -10521,7 +10521,7 @@ static void __devinit bnx2x_get_fcoe_info(struct bnx2x *bp)
|
|
|
bp->flags |= NO_FCOE_FLAG;
|
|
|
}
|
|
|
|
|
|
-static void __devinit bnx2x_get_cnic_info(struct bnx2x *bp)
|
|
|
+static void bnx2x_get_cnic_info(struct bnx2x *bp)
|
|
|
{
|
|
|
/*
|
|
|
* iSCSI may be dynamically disabled but reading
|
|
@@ -10532,7 +10532,7 @@ static void __devinit bnx2x_get_cnic_info(struct bnx2x *bp)
|
|
|
bnx2x_get_fcoe_info(bp);
|
|
|
}
|
|
|
|
|
|
-static void __devinit bnx2x_get_cnic_mac_hwinfo(struct bnx2x *bp)
|
|
|
+static void bnx2x_get_cnic_mac_hwinfo(struct bnx2x *bp)
|
|
|
{
|
|
|
u32 val, val2;
|
|
|
int func = BP_ABS_FUNC(bp);
|
|
@@ -10626,7 +10626,7 @@ static void __devinit bnx2x_get_cnic_mac_hwinfo(struct bnx2x *bp)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-static void __devinit bnx2x_get_mac_hwinfo(struct bnx2x *bp)
|
|
|
+static void bnx2x_get_mac_hwinfo(struct bnx2x *bp)
|
|
|
{
|
|
|
u32 val, val2;
|
|
|
int func = BP_ABS_FUNC(bp);
|
|
@@ -10667,7 +10667,7 @@ static void __devinit bnx2x_get_mac_hwinfo(struct bnx2x *bp)
|
|
|
bp->dev->dev_addr);
|
|
|
}
|
|
|
|
|
|
-static bool __devinit bnx2x_get_dropless_info(struct bnx2x *bp)
|
|
|
+static bool bnx2x_get_dropless_info(struct bnx2x *bp)
|
|
|
{
|
|
|
int tmp;
|
|
|
u32 cfg;
|
|
@@ -10687,7 +10687,7 @@ static bool __devinit bnx2x_get_dropless_info(struct bnx2x *bp)
|
|
|
return cfg;
|
|
|
}
|
|
|
|
|
|
-static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
|
|
|
+static int bnx2x_get_hwinfo(struct bnx2x *bp)
|
|
|
{
|
|
|
int /*abs*/func = BP_ABS_FUNC(bp);
|
|
|
int vn;
|
|
@@ -10913,7 +10913,7 @@ static int __devinit bnx2x_get_hwinfo(struct bnx2x *bp)
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
-static void __devinit bnx2x_read_fwinfo(struct bnx2x *bp)
|
|
|
+static void bnx2x_read_fwinfo(struct bnx2x *bp)
|
|
|
{
|
|
|
int cnt, i, block_end, rodi;
|
|
|
char vpd_start[BNX2X_VPD_LEN+1];
|
|
@@ -10998,7 +10998,7 @@ out_not_found:
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
-static void __devinit bnx2x_set_modes_bitmap(struct bnx2x *bp)
|
|
|
+static void bnx2x_set_modes_bitmap(struct bnx2x *bp)
|
|
|
{
|
|
|
u32 flags = 0;
|
|
|
|
|
@@ -11048,7 +11048,7 @@ static void __devinit bnx2x_set_modes_bitmap(struct bnx2x *bp)
|
|
|
INIT_MODE_FLAGS(bp) = flags;
|
|
|
}
|
|
|
|
|
|
-static int __devinit bnx2x_init_bp(struct bnx2x *bp)
|
|
|
+static int bnx2x_init_bp(struct bnx2x *bp)
|
|
|
{
|
|
|
int func;
|
|
|
int rc;
|
|
@@ -11531,7 +11531,7 @@ static int bnx2x_set_coherency_mask(struct bnx2x *bp)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static int __devinit bnx2x_init_dev(struct pci_dev *pdev,
|
|
|
+static int bnx2x_init_dev(struct pci_dev *pdev,
|
|
|
struct net_device *dev,
|
|
|
unsigned long board_type)
|
|
|
{
|
|
@@ -11705,7 +11705,7 @@ err_out:
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
-static void __devinit bnx2x_get_pcie_width_speed(struct bnx2x *bp,
|
|
|
+static void bnx2x_get_pcie_width_speed(struct bnx2x *bp,
|
|
|
int *width, int *speed)
|
|
|
{
|
|
|
u32 val = REG_RD(bp, PCICFG_OFFSET + PCICFG_LINK_CONTROL);
|
|
@@ -12010,7 +12010,7 @@ static int bnx2x_get_num_non_def_sbs(struct pci_dev *pdev,
|
|
|
return control & PCI_MSIX_FLAGS_QSIZE;
|
|
|
}
|
|
|
|
|
|
-static int __devinit bnx2x_init_one(struct pci_dev *pdev,
|
|
|
+static int bnx2x_init_one(struct pci_dev *pdev,
|
|
|
const struct pci_device_id *ent)
|
|
|
{
|
|
|
struct net_device *dev = NULL;
|
|
@@ -12199,7 +12199,7 @@ init_one_exit:
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
-static void __devexit bnx2x_remove_one(struct pci_dev *pdev)
|
|
|
+static void bnx2x_remove_one(struct pci_dev *pdev)
|
|
|
{
|
|
|
struct net_device *dev = pci_get_drvdata(pdev);
|
|
|
struct bnx2x *bp;
|
|
@@ -12414,7 +12414,7 @@ static struct pci_driver bnx2x_pci_driver = {
|
|
|
.name = DRV_MODULE_NAME,
|
|
|
.id_table = bnx2x_pci_tbl,
|
|
|
.probe = bnx2x_init_one,
|
|
|
- .remove = __devexit_p(bnx2x_remove_one),
|
|
|
+ .remove = bnx2x_remove_one,
|
|
|
.suspend = bnx2x_suspend,
|
|
|
.resume = bnx2x_resume,
|
|
|
.err_handler = &bnx2x_err_handler,
|