Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271043
b: refs/heads/master
c: 013068f
h: refs/heads/master
i:
  271041: bd7d92e
  271039: 9491b77
v: v3
  • Loading branch information
Bhanu Prakash Gollapudi authored and James Bottomley committed Sep 17, 2011
1 parent 706c997 commit 2489ca2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0cbf32e1681d870632a1772601cbaadd996dc978
refs/heads/master: 013068fa6f65f7037adedc141fbd27afc99ab1bb
15 changes: 10 additions & 5 deletions trunk/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1441,6 +1441,14 @@ static struct fc_lport *bnx2fc_if_create(struct bnx2fc_interface *interface,
return NULL;
}

static void bnx2fc_net_cleanup(struct bnx2fc_interface *interface)
{
/* Dont listen for Ethernet packets anymore */
__dev_remove_pack(&interface->fcoe_packet_type);
__dev_remove_pack(&interface->fip_packet_type);
synchronize_net();
}

static void bnx2fc_interface_cleanup(struct bnx2fc_interface *interface)
{
struct fc_lport *lport = interface->ctlr.lp;
Expand All @@ -1453,10 +1461,7 @@ static void bnx2fc_interface_cleanup(struct bnx2fc_interface *interface)
/* Free existing transmit skbs */
fcoe_clean_pending_queue(lport);

/* Dont listen for Ethernet packets anymore */
__dev_remove_pack(&interface->fcoe_packet_type);
__dev_remove_pack(&interface->fip_packet_type);
synchronize_net();
bnx2fc_net_cleanup(interface);

bnx2fc_free_vport(hba, lport);
}
Expand Down Expand Up @@ -1991,7 +1996,6 @@ static int bnx2fc_create(struct net_device *netdev, enum fip_state fip_mode)
if (!lport) {
printk(KERN_ERR PFX "Failed to create interface (%s)\n",
netdev->name);
bnx2fc_interface_cleanup(interface);
rc = -EINVAL;
goto if_create_err;
}
Expand Down Expand Up @@ -2026,6 +2030,7 @@ static int bnx2fc_create(struct net_device *netdev, enum fip_state fip_mode)
if_create_err:
destroy_workqueue(interface->timer_work_queue);
ifput_err:
bnx2fc_net_cleanup(interface);
bnx2fc_interface_put(interface);
netdev_err:
module_put(THIS_MODULE);
Expand Down

0 comments on commit 2489ca2

Please sign in to comment.