Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161127
b: refs/heads/master
c: 991cbb6
h: refs/heads/master
i:
  161125: 211a141
  161123: 2ea9da6
  161119: 4260071
v: v3
  • Loading branch information
Chris Leech authored and James Bottomley committed Sep 10, 2009
1 parent c15e5be commit f1c1975
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 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: 3fe9a0badae7fa2eb35eff4f07e851fbd25e3d4f
refs/heads/master: 991cbb6082db3025bd82908eb9ee2d2920be2114
14 changes: 6 additions & 8 deletions trunk/drivers/scsi/fcoe/fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ bool fcoe_oem_match(struct fc_frame *fp)
static inline int fcoe_em_config(struct fc_lport *lp)
{
struct fcoe_port *port = lport_priv(lp);
struct fcoe_port *oldport = NULL;
struct fcoe_interface *fcoe = port->fcoe;
struct fcoe_interface *oldfcoe = NULL;
struct net_device *old_real_dev, *cur_real_dev;
Expand All @@ -464,30 +463,29 @@ static inline int fcoe_em_config(struct fc_lport *lp)
cur_real_dev = fcoe->netdev;

list_for_each_entry(oldfcoe, &fcoe_hostlist, list) {
oldport = oldfcoe->priv;
if (oldfcoe->netdev->priv_flags & IFF_802_1Q_VLAN)
old_real_dev = vlan_dev_real_dev(oldfcoe->netdev);
else
old_real_dev = oldfcoe->netdev;

if (cur_real_dev == old_real_dev) {
port->oem = oldport->oem;
fcoe->oem = oldfcoe->oem;
break;
}
}

if (port->oem) {
if (!fc_exch_mgr_add(lp, port->oem, fcoe_oem_match)) {
if (fcoe->oem) {
if (!fc_exch_mgr_add(lp, fcoe->oem, fcoe_oem_match)) {
printk(KERN_ERR "fcoe_em_config: failed to add "
"offload em:%p on interface:%s\n",
port->oem, fcoe->netdev->name);
fcoe->oem, fcoe->netdev->name);
return -ENOMEM;
}
} else {
port->oem = fc_exch_mgr_alloc(lp, FC_CLASS_3,
fcoe->oem = fc_exch_mgr_alloc(lp, FC_CLASS_3,
FCOE_MIN_XID, lp->lro_xid,
fcoe_oem_match);
if (!port->oem) {
if (!fcoe->oem) {
printk(KERN_ERR "fcoe_em_config: failed to allocate "
"em for offload exches on interface:%s\n",
fcoe->netdev->name);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/fcoe/fcoe.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ struct fcoe_interface {
struct packet_type fcoe_packet_type;
struct packet_type fip_packet_type;
struct fcoe_ctlr ctlr;
struct fc_exch_mgr *oem; /* offload exchange manager */
};

/*
Expand All @@ -94,7 +95,6 @@ struct fcoe_interface {
*/
struct fcoe_port {
struct fcoe_interface *fcoe;
struct fc_exch_mgr *oem; /* offload exchange manger */
struct sk_buff_head fcoe_pending_queue;
u8 fcoe_pending_queue_active;
struct timer_list timer; /* queue timer */
Expand Down

0 comments on commit f1c1975

Please sign in to comment.