aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2fc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 21:49:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 21:49:04 -0400
commit1a0b6abaea78f73d9bc0a2f6df2d9e4c917cade1 (patch)
treefaae6f0b72b00a0a4d44cadc607e576e1954a5bc /drivers/scsi/bnx2fc
parent3e75c6de1ac33fe3500f44573d9212dc82c99f59 (diff)
parentb2bff6ceb61a9a21294f04057d30c9bb4910a88f (diff)
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull first round of SCSI updates from James Bottomley: "This patch consists of the usual driver updates (megaraid_sas, scsi_debug, qla2xxx, qla4xxx, lpfc, bnx2fc, be2iscsi, hpsa, ipr) plus an assortment of minor fixes and the first precursors of SCSI-MQ (the code path simplifications) and the bug fix for the USB oops on remove (which involves an infrastructure change, so is sent via the main tree with a delayed backport after a cycle in which it is shown to introduce no new bugs)" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (196 commits) [SCSI] sd: Quiesce mode sense error messages [SCSI] add support for per-host cmd pools [SCSI] simplify command allocation and freeing a bit [SCSI] megaraid: simplify internal command handling [SCSI] ses: Use vpd information from scsi_device [SCSI] Add EVPD page 0x83 and 0x80 to sysfs [SCSI] Return VPD page length in scsi_vpd_inquiry() [SCSI] scsi_sysfs: Implement 'is_visible' callback [SCSI] hpsa: update driver version to 3.4.4-1 [SCSI] hpsa: fix bad endif placement in RAID 5 mapper code [SCSI] qla2xxx: Fix build errors related to invalid print fields on some architectures. [SCSI] bfa: Replace large udelay() with mdelay() [SCSI] vmw_pvscsi: Some improvements in pvscsi driver. [SCSI] vmw_pvscsi: Add support for I/O requests coalescing. [SCSI] vmw_pvscsi: Fix pvscsi_abort() function. [SCSI] remove deprecated IRQF_DISABLED from SCSI [SCSI] bfa: Updating Maintainers email ids [SCSI] ipr: Add new CCIN definition for Grand Canyon support [SCSI] ipr: Format HCAM overlay ID 0x21 [SCSI] ipr: Use pci_enable_msi_range() and pci_enable_msix_range() ...
Diffstat (limited to 'drivers/scsi/bnx2fc')
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc.h3
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c8
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_io.c19
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_tgt.c1
4 files changed, 28 insertions, 3 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc.h b/drivers/scsi/bnx2fc/bnx2fc.h
index 1ebf3fb683e6..6a976657b475 100644
--- a/drivers/scsi/bnx2fc/bnx2fc.h
+++ b/drivers/scsi/bnx2fc/bnx2fc.h
@@ -64,7 +64,7 @@
64#include "bnx2fc_constants.h" 64#include "bnx2fc_constants.h"
65 65
66#define BNX2FC_NAME "bnx2fc" 66#define BNX2FC_NAME "bnx2fc"
67#define BNX2FC_VERSION "2.4.1" 67#define BNX2FC_VERSION "2.4.2"
68 68
69#define PFX "bnx2fc: " 69#define PFX "bnx2fc: "
70 70
@@ -367,6 +367,7 @@ struct bnx2fc_rport {
367 atomic_t num_active_ios; 367 atomic_t num_active_ios;
368 u32 flush_in_prog; 368 u32 flush_in_prog;
369 unsigned long timestamp; 369 unsigned long timestamp;
370 unsigned long retry_delay_timestamp;
370 struct list_head free_task_list; 371 struct list_head free_task_list;
371 struct bnx2fc_cmd *pending_queue[BNX2FC_SQ_WQES_MAX+1]; 372 struct bnx2fc_cmd *pending_queue[BNX2FC_SQ_WQES_MAX+1];
372 struct list_head active_cmd_queue; 373 struct list_head active_cmd_queue;
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 9b948505d118..6287f6a8b79d 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);
22 22
23#define DRV_MODULE_NAME "bnx2fc" 23#define DRV_MODULE_NAME "bnx2fc"
24#define DRV_MODULE_VERSION BNX2FC_VERSION 24#define DRV_MODULE_VERSION BNX2FC_VERSION
25#define DRV_MODULE_RELDATE "Sep 17, 2013" 25#define DRV_MODULE_RELDATE "Dec 11, 2013"
26 26
27 27
28static char version[] = 28static char version[] =
@@ -850,6 +850,9 @@ static void bnx2fc_indicate_netevent(void *context, unsigned long event,
850 __bnx2fc_destroy(interface); 850 __bnx2fc_destroy(interface);
851 } 851 }
852 mutex_unlock(&bnx2fc_dev_lock); 852 mutex_unlock(&bnx2fc_dev_lock);
853
854 /* Ensure ALL destroy work has been completed before return */
855 flush_workqueue(bnx2fc_wq);
853 return; 856 return;
854 857
855 default: 858 default:
@@ -2389,6 +2392,9 @@ static void bnx2fc_ulp_exit(struct cnic_dev *dev)
2389 __bnx2fc_destroy(interface); 2392 __bnx2fc_destroy(interface);
2390 mutex_unlock(&bnx2fc_dev_lock); 2393 mutex_unlock(&bnx2fc_dev_lock);
2391 2394
2395 /* Ensure ALL destroy work has been completed before return */
2396 flush_workqueue(bnx2fc_wq);
2397
2392 bnx2fc_ulp_stop(hba); 2398 bnx2fc_ulp_stop(hba);
2393 /* unregister cnic device */ 2399 /* unregister cnic device */
2394 if (test_and_clear_bit(BNX2FC_CNIC_REGISTERED, &hba->reg_with_cnic)) 2400 if (test_and_clear_bit(BNX2FC_CNIC_REGISTERED, &hba->reg_with_cnic))
diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index e9279a8c1e1c..32a5e0a2a669 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -1871,7 +1871,15 @@ int bnx2fc_queuecommand(struct Scsi_Host *host,
1871 rc = SCSI_MLQUEUE_TARGET_BUSY; 1871 rc = SCSI_MLQUEUE_TARGET_BUSY;
1872 goto exit_qcmd; 1872 goto exit_qcmd;
1873 } 1873 }
1874 1874 if (tgt->retry_delay_timestamp) {
1875 if (time_after(jiffies, tgt->retry_delay_timestamp)) {
1876 tgt->retry_delay_timestamp = 0;
1877 } else {
1878 /* If retry_delay timer is active, flow off the ML */
1879 rc = SCSI_MLQUEUE_TARGET_BUSY;
1880 goto exit_qcmd;
1881 }
1882 }
1875 io_req = bnx2fc_cmd_alloc(tgt); 1883 io_req = bnx2fc_cmd_alloc(tgt);
1876 if (!io_req) { 1884 if (!io_req) {
1877 rc = SCSI_MLQUEUE_HOST_BUSY; 1885 rc = SCSI_MLQUEUE_HOST_BUSY;
@@ -1961,6 +1969,15 @@ void bnx2fc_process_scsi_cmd_compl(struct bnx2fc_cmd *io_req,
1961 " fcp_resid = 0x%x\n", 1969 " fcp_resid = 0x%x\n",
1962 io_req->cdb_status, io_req->fcp_resid); 1970 io_req->cdb_status, io_req->fcp_resid);
1963 sc_cmd->result = (DID_OK << 16) | io_req->cdb_status; 1971 sc_cmd->result = (DID_OK << 16) | io_req->cdb_status;
1972
1973 if (io_req->cdb_status == SAM_STAT_TASK_SET_FULL ||
1974 io_req->cdb_status == SAM_STAT_BUSY) {
1975 /* Set the jiffies + retry_delay_timer * 100ms
1976 for the rport/tgt */
1977 tgt->retry_delay_timestamp = jiffies +
1978 fcp_rsp->retry_delay_timer * HZ / 10;
1979 }
1980
1964 } 1981 }
1965 if (io_req->fcp_resid) 1982 if (io_req->fcp_resid)
1966 scsi_set_resid(sc_cmd, io_req->fcp_resid); 1983 scsi_set_resid(sc_cmd, io_req->fcp_resid);
diff --git a/drivers/scsi/bnx2fc/bnx2fc_tgt.c b/drivers/scsi/bnx2fc/bnx2fc_tgt.c
index d9bae5672273..6870cf6781d9 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_tgt.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_tgt.c
@@ -386,6 +386,7 @@ static int bnx2fc_init_tgt(struct bnx2fc_rport *tgt,
386 tgt->rq_prod_idx = 0x8000; 386 tgt->rq_prod_idx = 0x8000;
387 tgt->rq_cons_idx = 0; 387 tgt->rq_cons_idx = 0;
388 atomic_set(&tgt->num_active_ios, 0); 388 atomic_set(&tgt->num_active_ios, 0);
389 tgt->retry_delay_timestamp = 0;
389 390
390 if (rdata->flags & FC_RP_FLAGS_RETRY && 391 if (rdata->flags & FC_RP_FLAGS_RETRY &&
391 rdata->ids.roles & FC_RPORT_ROLE_FCP_TARGET && 392 rdata->ids.roles & FC_RPORT_ROLE_FCP_TARGET &&