diff options
-rw-r--r-- | drivers/scsi/fnic/fnic.h | 2 | ||||
-rw-r--r-- | drivers/scsi/fnic/fnic_scsi.c | 15 | ||||
-rw-r--r-- | drivers/scsi/scsi_error.c | 4 | ||||
-rw-r--r-- | drivers/scsi/sd.c | 5 |
4 files changed, 21 insertions, 5 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 | /* |
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index e42fff6e8c10..8afb01604d51 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -1041,7 +1041,7 @@ retry: | |||
1041 | } | 1041 | } |
1042 | /* signal not to enter either branch of the if () below */ | 1042 | /* signal not to enter either branch of the if () below */ |
1043 | timeleft = 0; | 1043 | timeleft = 0; |
1044 | rtn = NEEDS_RETRY; | 1044 | rtn = FAILED; |
1045 | } else { | 1045 | } else { |
1046 | timeleft = wait_for_completion_timeout(&done, timeout); | 1046 | timeleft = wait_for_completion_timeout(&done, timeout); |
1047 | rtn = SUCCESS; | 1047 | rtn = SUCCESS; |
@@ -1081,7 +1081,7 @@ retry: | |||
1081 | rtn = FAILED; | 1081 | rtn = FAILED; |
1082 | break; | 1082 | break; |
1083 | } | 1083 | } |
1084 | } else if (!rtn) { | 1084 | } else if (rtn != FAILED) { |
1085 | scsi_abort_eh_cmnd(scmd); | 1085 | scsi_abort_eh_cmnd(scmd); |
1086 | rtn = FAILED; | 1086 | rtn = FAILED; |
1087 | } | 1087 | } |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index fedab3c21ddf..399516925d80 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -2623,8 +2623,9 @@ static void sd_read_block_limits(struct scsi_disk *sdkp) | |||
2623 | sd_config_discard(sdkp, SD_LBP_WS16); | 2623 | sd_config_discard(sdkp, SD_LBP_WS16); |
2624 | 2624 | ||
2625 | } else { /* LBP VPD page tells us what to use */ | 2625 | } else { /* LBP VPD page tells us what to use */ |
2626 | 2626 | if (sdkp->lbpu && sdkp->max_unmap_blocks && !sdkp->lbprz) | |
2627 | if (sdkp->lbpws) | 2627 | sd_config_discard(sdkp, SD_LBP_UNMAP); |
2628 | else if (sdkp->lbpws) | ||
2628 | sd_config_discard(sdkp, SD_LBP_WS16); | 2629 | sd_config_discard(sdkp, SD_LBP_WS16); |
2629 | else if (sdkp->lbpws10) | 2630 | else if (sdkp->lbpws10) |
2630 | sd_config_discard(sdkp, SD_LBP_WS10); | 2631 | sd_config_discard(sdkp, SD_LBP_WS10); |