diff options
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 02b5a343b195..211753e01f81 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -7561,8 +7561,14 @@ int bnx2x_set_mac_one(struct bnx2x *bp, u8 *mac, | |||
7561 | } | 7561 | } |
7562 | 7562 | ||
7563 | rc = bnx2x_config_vlan_mac(bp, &ramrod_param); | 7563 | rc = bnx2x_config_vlan_mac(bp, &ramrod_param); |
7564 | if (rc < 0) | 7564 | |
7565 | if (rc == -EEXIST) { | ||
7566 | DP(BNX2X_MSG_SP, "Failed to schedule ADD operations: %d\n", rc); | ||
7567 | /* do not treat adding same MAC as error */ | ||
7568 | rc = 0; | ||
7569 | } else if (rc < 0) | ||
7565 | BNX2X_ERR("%s MAC failed\n", (set ? "Set" : "Del")); | 7570 | BNX2X_ERR("%s MAC failed\n", (set ? "Set" : "Del")); |
7571 | |||
7566 | return rc; | 7572 | return rc; |
7567 | } | 7573 | } |
7568 | 7574 | ||
@@ -8427,6 +8433,8 @@ unload_error: | |||
8427 | 8433 | ||
8428 | /* Disable HW interrupts, NAPI */ | 8434 | /* Disable HW interrupts, NAPI */ |
8429 | bnx2x_netif_stop(bp, 1); | 8435 | bnx2x_netif_stop(bp, 1); |
8436 | /* Delete all NAPI objects */ | ||
8437 | bnx2x_del_all_napi(bp); | ||
8430 | 8438 | ||
8431 | /* Release IRQs */ | 8439 | /* Release IRQs */ |
8432 | bnx2x_free_irq(bp); | 8440 | bnx2x_free_irq(bp); |
@@ -10292,13 +10300,11 @@ static void __devinit bnx2x_get_fcoe_info(struct bnx2x *bp) | |||
10292 | dev_info.port_hw_config[port]. | 10300 | dev_info.port_hw_config[port]. |
10293 | fcoe_wwn_node_name_lower); | 10301 | fcoe_wwn_node_name_lower); |
10294 | } else if (!IS_MF_SD(bp)) { | 10302 | } else if (!IS_MF_SD(bp)) { |
10295 | u32 cfg = MF_CFG_RD(bp, func_ext_config[func].func_cfg); | ||
10296 | |||
10297 | /* | 10303 | /* |
10298 | * Read the WWN info only if the FCoE feature is enabled for | 10304 | * Read the WWN info only if the FCoE feature is enabled for |
10299 | * this function. | 10305 | * this function. |
10300 | */ | 10306 | */ |
10301 | if (cfg & MACP_FUNC_CFG_FLAGS_FCOE_OFFLOAD) | 10307 | if (BNX2X_MF_EXT_PROTOCOL_FCOE(bp) && !CHIP_IS_E1x(bp)) |
10302 | bnx2x_get_ext_wwn_info(bp, func); | 10308 | bnx2x_get_ext_wwn_info(bp, func); |
10303 | 10309 | ||
10304 | } else if (IS_MF_FCOE_SD(bp)) | 10310 | } else if (IS_MF_FCOE_SD(bp)) |
@@ -11071,7 +11077,14 @@ static int bnx2x_set_uc_list(struct bnx2x *bp) | |||
11071 | netdev_for_each_uc_addr(ha, dev) { | 11077 | netdev_for_each_uc_addr(ha, dev) { |
11072 | rc = bnx2x_set_mac_one(bp, bnx2x_uc_addr(ha), mac_obj, true, | 11078 | rc = bnx2x_set_mac_one(bp, bnx2x_uc_addr(ha), mac_obj, true, |
11073 | BNX2X_UC_LIST_MAC, &ramrod_flags); | 11079 | BNX2X_UC_LIST_MAC, &ramrod_flags); |
11074 | if (rc < 0) { | 11080 | if (rc == -EEXIST) { |
11081 | DP(BNX2X_MSG_SP, | ||
11082 | "Failed to schedule ADD operations: %d\n", rc); | ||
11083 | /* do not treat adding same MAC as error */ | ||
11084 | rc = 0; | ||
11085 | |||
11086 | } else if (rc < 0) { | ||
11087 | |||
11075 | BNX2X_ERR("Failed to schedule ADD operations: %d\n", | 11088 | BNX2X_ERR("Failed to schedule ADD operations: %d\n", |
11076 | rc); | 11089 | rc); |
11077 | return rc; | 11090 | return rc; |
@@ -11229,10 +11242,12 @@ static int bnx2x_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
11229 | static void poll_bnx2x(struct net_device *dev) | 11242 | static void poll_bnx2x(struct net_device *dev) |
11230 | { | 11243 | { |
11231 | struct bnx2x *bp = netdev_priv(dev); | 11244 | struct bnx2x *bp = netdev_priv(dev); |
11245 | int i; | ||
11232 | 11246 | ||
11233 | disable_irq(bp->pdev->irq); | 11247 | for_each_eth_queue(bp, i) { |
11234 | bnx2x_interrupt(bp->pdev->irq, dev); | 11248 | struct bnx2x_fastpath *fp = &bp->fp[i]; |
11235 | enable_irq(bp->pdev->irq); | 11249 | napi_schedule(&bnx2x_fp(bp, fp->index, napi)); |
11250 | } | ||
11236 | } | 11251 | } |
11237 | #endif | 11252 | #endif |
11238 | 11253 | ||
@@ -11899,9 +11914,6 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev, | |||
11899 | */ | 11914 | */ |
11900 | bnx2x_set_int_mode(bp); | 11915 | bnx2x_set_int_mode(bp); |
11901 | 11916 | ||
11902 | /* Add all NAPI objects */ | ||
11903 | bnx2x_add_all_napi(bp); | ||
11904 | |||
11905 | rc = register_netdev(dev); | 11917 | rc = register_netdev(dev); |
11906 | if (rc) { | 11918 | if (rc) { |
11907 | dev_err(&pdev->dev, "Cannot register net device\n"); | 11919 | dev_err(&pdev->dev, "Cannot register net device\n"); |
@@ -11976,9 +11988,6 @@ static void __devexit bnx2x_remove_one(struct pci_dev *pdev) | |||
11976 | 11988 | ||
11977 | unregister_netdev(dev); | 11989 | unregister_netdev(dev); |
11978 | 11990 | ||
11979 | /* Delete all NAPI objects */ | ||
11980 | bnx2x_del_all_napi(bp); | ||
11981 | |||
11982 | /* Power on: we can't let PCI layer write to us while we are in D3 */ | 11991 | /* Power on: we can't let PCI layer write to us while we are in D3 */ |
11983 | bnx2x_set_power_state(bp, PCI_D0); | 11992 | bnx2x_set_power_state(bp, PCI_D0); |
11984 | 11993 | ||
@@ -12025,6 +12034,8 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp) | |||
12025 | bnx2x_tx_disable(bp); | 12034 | bnx2x_tx_disable(bp); |
12026 | 12035 | ||
12027 | bnx2x_netif_stop(bp, 0); | 12036 | bnx2x_netif_stop(bp, 0); |
12037 | /* Delete all NAPI objects */ | ||
12038 | bnx2x_del_all_napi(bp); | ||
12028 | 12039 | ||
12029 | del_timer_sync(&bp->timer); | 12040 | del_timer_sync(&bp->timer); |
12030 | 12041 | ||