diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-25 20:10:10 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-25 20:10:10 -0700 |
commit | fd2b2c57ec2020ae1b5e24717a876c71e31e5ab8 (patch) | |
tree | f58dba97a4588a9268ca0e674eb8dd03bf095fb9 | |
parent | 5d4eeb8a6124da65a2119601c4016ecc37e867b6 (diff) | |
parent | 14074aba4bcda3764c9a702b276308b89901d5b6 (diff) | |
download | linux-stable-fd2b2c57ec2020ae1b5e24717a876c71e31e5ab8.tar.gz linux-stable-fd2b2c57ec2020ae1b5e24717a876c71e31e5ab8.tar.bz2 linux-stable-fd2b2c57ec2020ae1b5e24717a876c71e31e5ab8.zip |
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley:
"Three small fixes.
The transfer size fixes are actually correcting some performance drops
on the hpsa and smartpqi cards. The cards actually have an internal
cache for request speed up but bypass it for transfers > 1MB. Since
4.3 the efficiency of our merges has rendered the cache mostly unused,
so limit transfers to under 1MB to recover the cache boost"
* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: sg: fix static checker warning in sg_is_valid_dxfer
scsi: smartpqi: limit transfer length to 1MB
scsi: hpsa: limit transfer length to 1MB
-rw-r--r-- | drivers/scsi/hpsa.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sg.c | 7 | ||||
-rw-r--r-- | drivers/scsi/smartpqi/smartpqi.h | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 8914eab84337..4f7cdb28bd38 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -938,7 +938,7 @@ static struct scsi_host_template hpsa_driver_template = { #endif .sdev_attrs = hpsa_sdev_attrs, .shost_attrs = hpsa_shost_attrs, - .max_sectors = 8192, + .max_sectors = 1024, .no_write_same = 1, }; diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 1e82d4128a84..4fe606b000b4 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -759,8 +759,11 @@ static bool sg_is_valid_dxfer(sg_io_hdr_t *hp) return false; return true; case SG_DXFER_FROM_DEV: - if (hp->dxfer_len < 0) - return false; + /* + * for SG_DXFER_FROM_DEV we always set dxfer_len to > 0. dxferp + * can either be NULL or != NULL so there's no point in checking + * it either. So just return true. + */ return true; case SG_DXFER_TO_DEV: case SG_DXFER_TO_FROM_DEV: diff --git a/drivers/scsi/smartpqi/smartpqi.h b/drivers/scsi/smartpqi/smartpqi.h index 07ec8a8877de..e164ffade38a 100644 --- a/drivers/scsi/smartpqi/smartpqi.h +++ b/drivers/scsi/smartpqi/smartpqi.h @@ -690,7 +690,7 @@ struct pqi_config_table_heartbeat { #define PQI_MAX_OUTSTANDING_REQUESTS ((u32)~0) #define PQI_MAX_OUTSTANDING_REQUESTS_KDUMP 32 -#define PQI_MAX_TRANSFER_SIZE (4 * 1024U * 1024U) +#define PQI_MAX_TRANSFER_SIZE (1024U * 1024U) #define PQI_MAX_TRANSFER_SIZE_KDUMP (512 * 1024U) #define RAID_MAP_MAX_ENTRIES 1024 |