diff options
author | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-04-07 23:49:35 (GMT) |
commit | 62b8c978ee6b8d135d9e7953221de58000dba986 (patch) | |
tree | 683b04b2e627f6710c22c151b23c8cc9a165315e /drivers/scsi/bnx2fc | |
parent | 78fd82238d0e5716578c326404184a27ba67fd6e (diff) | |
download | linux-fsl-qoriq-62b8c978ee6b8d135d9e7953221de58000dba986.tar.xz |
Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12
Diffstat (limited to 'drivers/scsi/bnx2fc')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc.h | 2 | ||||
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 65 | ||||
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_io.c | 6 |
3 files changed, 19 insertions, 54 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc.h b/drivers/scsi/bnx2fc/bnx2fc.h index 1ebf3fb..d7ca930 100644 --- a/drivers/scsi/bnx2fc/bnx2fc.h +++ b/drivers/scsi/bnx2fc/bnx2fc.h @@ -64,7 +64,7 @@ #include "bnx2fc_constants.h" #define BNX2FC_NAME "bnx2fc" -#define BNX2FC_VERSION "2.4.1" +#define BNX2FC_VERSION "1.0.14" #define PFX "bnx2fc: " diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 9b94850..69ac554 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -22,7 +22,7 @@ DEFINE_PER_CPU(struct bnx2fc_percpu_s, bnx2fc_percpu); #define DRV_MODULE_NAME "bnx2fc" #define DRV_MODULE_VERSION BNX2FC_VERSION -#define DRV_MODULE_RELDATE "Sep 17, 2013" +#define DRV_MODULE_RELDATE "Mar 08, 2013" static char version[] = @@ -542,7 +542,8 @@ static void bnx2fc_recv_frame(struct sk_buff *skb) vn_port = fc_vport_id_lookup(lport, ntoh24(fh->fh_d_id)); if (vn_port) { port = lport_priv(vn_port); - if (!ether_addr_equal(port->data_src_addr, dest_mac)) { + if (compare_ether_addr(port->data_src_addr, dest_mac) + != 0) { BNX2FC_HBA_DBG(lport, "fpma mismatch\n"); put_cpu(); kfree_skb(skb); @@ -1380,7 +1381,6 @@ struct bnx2fc_interface *bnx2fc_interface_create(struct bnx2fc_hba *hba, return NULL; } ctlr = fcoe_ctlr_device_priv(ctlr_dev); - ctlr->cdev = ctlr_dev; interface = fcoe_ctlr_priv(ctlr); dev_hold(netdev); kref_init(&interface->kref); @@ -2004,24 +2004,6 @@ static void bnx2fc_ulp_init(struct cnic_dev *dev) set_bit(BNX2FC_CNIC_REGISTERED, &hba->reg_with_cnic); } -/* Assumes rtnl_lock and the bnx2fc_dev_lock are already taken */ -static int __bnx2fc_disable(struct fcoe_ctlr *ctlr) -{ - struct bnx2fc_interface *interface = fcoe_ctlr_priv(ctlr); - - if (interface->enabled == true) { - if (!ctlr->lp) { - pr_err(PFX "__bnx2fc_disable: lport not found\n"); - return -ENODEV; - } else { - interface->enabled = false; - fcoe_ctlr_link_down(ctlr); - fcoe_clean_pending_queue(ctlr->lp); - } - } - return 0; -} - /** * Deperecated: Use bnx2fc_enabled() */ @@ -2036,34 +2018,20 @@ static int bnx2fc_disable(struct net_device *netdev) interface = bnx2fc_interface_lookup(netdev); ctlr = bnx2fc_to_ctlr(interface); - - if (!interface) { + if (!interface || !ctlr->lp) { rc = -ENODEV; - pr_err(PFX "bnx2fc_disable: interface not found\n"); + printk(KERN_ERR PFX "bnx2fc_disable: interface or lport not found\n"); } else { - rc = __bnx2fc_disable(ctlr); + interface->enabled = false; + fcoe_ctlr_link_down(ctlr); + fcoe_clean_pending_queue(ctlr->lp); } + mutex_unlock(&bnx2fc_dev_lock); rtnl_unlock(); return rc; } -static int __bnx2fc_enable(struct fcoe_ctlr *ctlr) -{ - struct bnx2fc_interface *interface = fcoe_ctlr_priv(ctlr); - - if (interface->enabled == false) { - if (!ctlr->lp) { - pr_err(PFX "__bnx2fc_enable: lport not found\n"); - return -ENODEV; - } else if (!bnx2fc_link_ok(ctlr->lp)) { - fcoe_ctlr_link_up(ctlr); - interface->enabled = true; - } - } - return 0; -} - /** * Deprecated: Use bnx2fc_enabled() */ @@ -2078,11 +2046,12 @@ static int bnx2fc_enable(struct net_device *netdev) interface = bnx2fc_interface_lookup(netdev); ctlr = bnx2fc_to_ctlr(interface); - if (!interface) { + if (!interface || !ctlr->lp) { rc = -ENODEV; - pr_err(PFX "bnx2fc_enable: interface not found\n"); - } else { - rc = __bnx2fc_enable(ctlr); + printk(KERN_ERR PFX "bnx2fc_enable: interface or lport not found\n"); + } else if (!bnx2fc_link_ok(ctlr->lp)) { + fcoe_ctlr_link_up(ctlr); + interface->enabled = true; } mutex_unlock(&bnx2fc_dev_lock); @@ -2103,12 +2072,14 @@ static int bnx2fc_enable(struct net_device *netdev) static int bnx2fc_ctlr_enabled(struct fcoe_ctlr_device *cdev) { struct fcoe_ctlr *ctlr = fcoe_ctlr_device_priv(cdev); + struct fc_lport *lport = ctlr->lp; + struct net_device *netdev = bnx2fc_netdev(lport); switch (cdev->enabled) { case FCOE_CTLR_ENABLED: - return __bnx2fc_enable(ctlr); + return bnx2fc_enable(netdev); case FCOE_CTLR_DISABLED: - return __bnx2fc_disable(ctlr); + return bnx2fc_disable(netdev); case FCOE_CTLR_UNUSED: default: return -ENOTSUPP; diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index ed88089..575142e 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_io.c +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c @@ -1246,12 +1246,6 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd) kref_put(&io_req->refcount, bnx2fc_cmd_release); /* drop timer hold */ rc = bnx2fc_expl_logo(lport, io_req); - /* This only occurs when an task abort was requested while ABTS - is in progress. Setting the IO_CLEANUP flag will skip the - RRQ process in the case when the fw generated SCSI_CMD cmpl - was a result from the ABTS request rather than the CLEANUP - request */ - set_bit(BNX2FC_FLAG_IO_CLEANUP, &io_req->req_flags); goto out; } |