diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-02 13:24:41 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-02 13:24:41 -0800 |
commit | d753856c9f9ae33a980192aa7b81d8b97d79dec2 (patch) | |
tree | 691e24b7639d377f0c48644168dc68356e421f00 /drivers/scsi/sd.c | |
parent | 6a4bfa7c3fe202dc831003ca9dd7e837bc1288ca (diff) | |
parent | 511833acfc06c013d453e288f483c682c60ffbff (diff) | |
download | linux-d753856c9f9ae33a980192aa7b81d8b97d79dec2.tar.gz linux-d753856c9f9ae33a980192aa7b81d8b97d79dec2.tar.bz2 linux-d753856c9f9ae33a980192aa7b81d8b97d79dec2.zip |
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
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 5 |
1 files changed, 3 insertions, 2 deletions
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) 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); |