aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe/fcoe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/fcoe/fcoe.c')
-rw-r--r--drivers/scsi/fcoe/fcoe.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 01519c722edf..bb59a7a04f23 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -438,7 +438,6 @@ bool fcoe_oem_match(struct fc_frame *fp)
438static inline int fcoe_em_config(struct fc_lport *lp) 438static inline int fcoe_em_config(struct fc_lport *lp)
439{ 439{
440 struct fcoe_port *port = lport_priv(lp); 440 struct fcoe_port *port = lport_priv(lp);
441 struct fcoe_port *oldport = NULL;
442 struct fcoe_interface *fcoe = port->fcoe; 441 struct fcoe_interface *fcoe = port->fcoe;
443 struct fcoe_interface *oldfcoe = NULL; 442 struct fcoe_interface *oldfcoe = NULL;
444 struct net_device *old_real_dev, *cur_real_dev; 443 struct net_device *old_real_dev, *cur_real_dev;
@@ -464,30 +463,29 @@ static inline int fcoe_em_config(struct fc_lport *lp)
464 cur_real_dev = fcoe->netdev; 463 cur_real_dev = fcoe->netdev;
465 464
466 list_for_each_entry(oldfcoe, &fcoe_hostlist, list) { 465 list_for_each_entry(oldfcoe, &fcoe_hostlist, list) {
467 oldport = oldfcoe->priv;
468 if (oldfcoe->netdev->priv_flags & IFF_802_1Q_VLAN) 466 if (oldfcoe->netdev->priv_flags & IFF_802_1Q_VLAN)
469 old_real_dev = vlan_dev_real_dev(oldfcoe->netdev); 467 old_real_dev = vlan_dev_real_dev(oldfcoe->netdev);
470 else 468 else
471 old_real_dev = oldfcoe->netdev; 469 old_real_dev = oldfcoe->netdev;
472 470
473 if (cur_real_dev == old_real_dev) { 471 if (cur_real_dev == old_real_dev) {
474 port->oem = oldport->oem; 472 fcoe->oem = oldfcoe->oem;
475 break; 473 break;
476 } 474 }
477 } 475 }
478 476
479 if (port->oem) { 477 if (fcoe->oem) {
480 if (!fc_exch_mgr_add(lp, port->oem, fcoe_oem_match)) { 478 if (!fc_exch_mgr_add(lp, fcoe->oem, fcoe_oem_match)) {
481 printk(KERN_ERR "fcoe_em_config: failed to add " 479 printk(KERN_ERR "fcoe_em_config: failed to add "
482 "offload em:%p on interface:%s\n", 480 "offload em:%p on interface:%s\n",
483 port->oem, fcoe->netdev->name); 481 fcoe->oem, fcoe->netdev->name);
484 return -ENOMEM; 482 return -ENOMEM;
485 } 483 }
486 } else { 484 } else {
487 port->oem = fc_exch_mgr_alloc(lp, FC_CLASS_3, 485 fcoe->oem = fc_exch_mgr_alloc(lp, FC_CLASS_3,
488 FCOE_MIN_XID, lp->lro_xid, 486 FCOE_MIN_XID, lp->lro_xid,
489 fcoe_oem_match); 487 fcoe_oem_match);
490 if (!port->oem) { 488 if (!fcoe->oem) {
491 printk(KERN_ERR "fcoe_em_config: failed to allocate " 489 printk(KERN_ERR "fcoe_em_config: failed to allocate "
492 "em for offload exches on interface:%s\n", 490 "em for offload exches on interface:%s\n",
493 fcoe->netdev->name); 491 fcoe->netdev->name);