aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/fnic/fnic.h2
-rw-r--r--drivers/scsi/fnic/fnic_scsi.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/fnic/fnic.h b/drivers/scsi/fnic/fnic.h
index 26270c351624..ce129e595b55 100644
--- a/drivers/scsi/fnic/fnic.h
+++ b/drivers/scsi/fnic/fnic.h
@@ -39,7 +39,7 @@
39 39
40#define DRV_NAME "fnic" 40#define DRV_NAME "fnic"
41#define DRV_DESCRIPTION "Cisco FCoE HBA Driver" 41#define DRV_DESCRIPTION "Cisco FCoE HBA Driver"
42#define DRV_VERSION "1.6.0.17" 42#define DRV_VERSION "1.6.0.17a"
43#define PFX DRV_NAME ": " 43#define PFX DRV_NAME ": "
44#define DFX DRV_NAME "%d: " 44#define DFX DRV_NAME "%d: "
45 45
diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index 155b286f1a9d..25436cd2860c 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -425,6 +425,7 @@ static int fnic_queuecommand_lck(struct scsi_cmnd *sc, void (*done)(struct scsi_
425 unsigned long ptr; 425 unsigned long ptr;
426 struct fc_rport_priv *rdata; 426 struct fc_rport_priv *rdata;
427 spinlock_t *io_lock = NULL; 427 spinlock_t *io_lock = NULL;
428 int io_lock_acquired = 0;
428 429
429 if (unlikely(fnic_chk_state_flags_locked(fnic, FNIC_FLAGS_IO_BLOCKED))) 430 if (unlikely(fnic_chk_state_flags_locked(fnic, FNIC_FLAGS_IO_BLOCKED)))
430 return SCSI_MLQUEUE_HOST_BUSY; 431 return SCSI_MLQUEUE_HOST_BUSY;
@@ -518,6 +519,7 @@ static int fnic_queuecommand_lck(struct scsi_cmnd *sc, void (*done)(struct scsi_
518 spin_lock_irqsave(io_lock, flags); 519 spin_lock_irqsave(io_lock, flags);
519 520
520 /* initialize rest of io_req */ 521 /* initialize rest of io_req */
522 io_lock_acquired = 1;
521 io_req->port_id = rport->port_id; 523 io_req->port_id = rport->port_id;
522 io_req->start_time = jiffies; 524 io_req->start_time = jiffies;
523 CMD_STATE(sc) = FNIC_IOREQ_CMD_PENDING; 525 CMD_STATE(sc) = FNIC_IOREQ_CMD_PENDING;
@@ -571,7 +573,7 @@ out:
571 (((u64)CMD_FLAGS(sc) >> 32) | CMD_STATE(sc))); 573 (((u64)CMD_FLAGS(sc) >> 32) | CMD_STATE(sc)));
572 574
573 /* if only we issued IO, will we have the io lock */ 575 /* if only we issued IO, will we have the io lock */
574 if (CMD_FLAGS(sc) & FNIC_IO_INITIALIZED) 576 if (io_lock_acquired)
575 spin_unlock_irqrestore(io_lock, flags); 577 spin_unlock_irqrestore(io_lock, flags);
576 578
577 atomic_dec(&fnic->in_flight); 579 atomic_dec(&fnic->in_flight);