Commit fd2b2c57 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 5d4eeb8a 14074aba
...@@ -938,7 +938,7 @@ static struct scsi_host_template hpsa_driver_template = { ...@@ -938,7 +938,7 @@ static struct scsi_host_template hpsa_driver_template = {
#endif #endif
.sdev_attrs = hpsa_sdev_attrs, .sdev_attrs = hpsa_sdev_attrs,
.shost_attrs = hpsa_shost_attrs, .shost_attrs = hpsa_shost_attrs,
.max_sectors = 8192, .max_sectors = 1024,
.no_write_same = 1, .no_write_same = 1,
}; };
......
...@@ -759,8 +759,11 @@ static bool sg_is_valid_dxfer(sg_io_hdr_t *hp) ...@@ -759,8 +759,11 @@ static bool sg_is_valid_dxfer(sg_io_hdr_t *hp)
return false; return false;
return true; return true;
case SG_DXFER_FROM_DEV: 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; return true;
case SG_DXFER_TO_DEV: case SG_DXFER_TO_DEV:
case SG_DXFER_TO_FROM_DEV: case SG_DXFER_TO_FROM_DEV:
......
...@@ -690,7 +690,7 @@ struct pqi_config_table_heartbeat { ...@@ -690,7 +690,7 @@ struct pqi_config_table_heartbeat {
#define PQI_MAX_OUTSTANDING_REQUESTS ((u32)~0) #define PQI_MAX_OUTSTANDING_REQUESTS ((u32)~0)
#define PQI_MAX_OUTSTANDING_REQUESTS_KDUMP 32 #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 PQI_MAX_TRANSFER_SIZE_KDUMP (512 * 1024U)
#define RAID_MAP_MAX_ENTRIES 1024 #define RAID_MAP_MAX_ENTRIES 1024
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment