aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorAnil Chintalapati (achintal) <achintal@cisco.com>2014-12-23 14:40:00 -0500
committerChristoph Hellwig <hch@lst.de>2014-12-30 07:31:45 -0500
commitefc7a288382cffc76d6cdb9678f643db37991906 (patch)
tree36dba1c44922fb3f9f418b8d9928db6ba539aa1b /drivers/scsi
parente461338b6cd4074e39a0d5fdd1dc5582fbca1520 (diff)
fnic: IOMMU Fault occurs when IO and abort IO is out of order
When I/O is aborted by mid-layer, fnic FW will complete the I/O before completing the abort task. In some cases abort request is completed before the I/O, which could lead to inconsistent driver and firmware states. In this case firmware reset would clear the inconsistent state. Signed-off-by: Anil Chintalapati <achintal@cisco.com> Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com> Signed-off-by: Hiral Shah <hishah@cisco.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/fnic/fnic.h2
-rw-r--r--drivers/scsi/fnic/fnic_scsi.c15
2 files changed, 16 insertions, 1 deletions
diff --git a/drivers/scsi/fnic/fnic.h b/drivers/scsi/fnic/fnic.h
index 3b73b96619e2..26270c351624 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.16" 42#define DRV_VERSION "1.6.0.17"
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 2097de42a147..155b286f1a9d 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -1892,6 +1892,21 @@ int fnic_abort_cmd(struct scsi_cmnd *sc)
1892 goto fnic_abort_cmd_end; 1892 goto fnic_abort_cmd_end;
1893 } 1893 }
1894 1894
1895 /* IO out of order */
1896
1897 if (!(CMD_FLAGS(sc) & (FNIC_IO_ABORTED | FNIC_IO_DONE))) {
1898 spin_unlock_irqrestore(io_lock, flags);
1899 FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
1900 "Issuing Host reset due to out of order IO\n");
1901
1902 if (fnic_host_reset(sc) == FAILED) {
1903 FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
1904 "fnic_host_reset failed.\n");
1905 }
1906 ret = FAILED;
1907 goto fnic_abort_cmd_end;
1908 }
1909
1895 CMD_STATE(sc) = FNIC_IOREQ_ABTS_COMPLETE; 1910 CMD_STATE(sc) = FNIC_IOREQ_ABTS_COMPLETE;
1896 1911
1897 /* 1912 /*