forked from Minki/linux
SCSI fixes on 20150102
This is a set of three fixes: one to correct an abort path thinko causing failures (and a panic) in USB on device misbehaviour, One to fix an out of order issue in the fnic driver and one to match discard expectations to qemu which otherwise cause Linux to behave badly as a guest. Signed-off-by: James Bottomley <JBottomley@Parallels.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABAgAGBQJUpsmHAAoJEDeqqVYsXL0MdToH/1UsmOdtxNh6AfBDWWYi45o8 kBno1gTnRrDgIlOiRu+BtmL25A1rNcCdCQKjG6JBEBruqUVAwZztktGjfuSvso6s EYbrnE+5DmDs6cW8pp6GK3QGV+R+AmbT8oBbe/Kpg5LdTsdnQOozSycUp7X3XgTi pLOm6rW/AgEV1QFcQz1bjI6cnbcOZMcGZnC5qwphiKgBnVYd+PZY24RSHDKCu/va z2lsa5yqXFHKZZZRhYG343YqCTf3Dkph78124JoNvVm3EjO+GQAAiojiUa7l59UF RqNRqeMxfz2cPmBnJxbNmWiP1YQGBgOaNDRgc7D7SPxaMwUe9444Gm4MkoZWzmQ= =706l -----END PGP SIGNATURE----- Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "This is a set of three fixes: one to correct an abort path thinko causing failures (and a panic) in USB on device misbehaviour, One to fix an out of order issue in the fnic driver and one to match discard expectations to qemu which otherwise cause Linux to behave badly as a guest" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: SCSI: fix regression in scsi_send_eh_cmnd() fnic: IOMMU Fault occurs when IO and abort IO is out of order sd: tweak discard heuristics to work around QEMU SCSI issue
This commit is contained in:
commit
d753856c9f
@ -39,7 +39,7 @@
|
||||
|
||||
#define DRV_NAME "fnic"
|
||||
#define DRV_DESCRIPTION "Cisco FCoE HBA Driver"
|
||||
#define DRV_VERSION "1.6.0.16"
|
||||
#define DRV_VERSION "1.6.0.17"
|
||||
#define PFX DRV_NAME ": "
|
||||
#define DFX DRV_NAME "%d: "
|
||||
|
||||
|
@ -1892,6 +1892,21 @@ int fnic_abort_cmd(struct scsi_cmnd *sc)
|
||||
goto fnic_abort_cmd_end;
|
||||
}
|
||||
|
||||
/* IO out of order */
|
||||
|
||||
if (!(CMD_FLAGS(sc) & (FNIC_IO_ABORTED | FNIC_IO_DONE))) {
|
||||
spin_unlock_irqrestore(io_lock, flags);
|
||||
FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
|
||||
"Issuing Host reset due to out of order IO\n");
|
||||
|
||||
if (fnic_host_reset(sc) == FAILED) {
|
||||
FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
|
||||
"fnic_host_reset failed.\n");
|
||||
}
|
||||
ret = FAILED;
|
||||
goto fnic_abort_cmd_end;
|
||||
}
|
||||
|
||||
CMD_STATE(sc) = FNIC_IOREQ_ABTS_COMPLETE;
|
||||
|
||||
/*
|
||||
|
@ -1041,7 +1041,7 @@ retry:
|
||||
}
|
||||
/* signal not to enter either branch of the if () below */
|
||||
timeleft = 0;
|
||||
rtn = NEEDS_RETRY;
|
||||
rtn = FAILED;
|
||||
} else {
|
||||
timeleft = wait_for_completion_timeout(&done, timeout);
|
||||
rtn = SUCCESS;
|
||||
@ -1081,7 +1081,7 @@ retry:
|
||||
rtn = FAILED;
|
||||
break;
|
||||
}
|
||||
} else if (!rtn) {
|
||||
} else if (rtn != FAILED) {
|
||||
scsi_abort_eh_cmnd(scmd);
|
||||
rtn = FAILED;
|
||||
}
|
||||
|
@ -2623,8 +2623,9 @@ static void sd_read_block_limits(struct scsi_disk *sdkp)
|
||||
sd_config_discard(sdkp, SD_LBP_WS16);
|
||||
|
||||
} else { /* LBP VPD page tells us what to use */
|
||||
|
||||
if (sdkp->lbpws)
|
||||
if (sdkp->lbpu && sdkp->max_unmap_blocks && !sdkp->lbprz)
|
||||
sd_config_discard(sdkp, SD_LBP_UNMAP);
|
||||
else if (sdkp->lbpws)
|
||||
sd_config_discard(sdkp, SD_LBP_WS16);
|
||||
else if (sdkp->lbpws10)
|
||||
sd_config_discard(sdkp, SD_LBP_WS10);
|
||||
|
Loading…
Reference in New Issue
Block a user