diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2014-06-02 09:56:48 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-07-17 16:07:30 -0400 |
commit | 8ed5a4d2f7d8b296a22fed7ec2b543c0500d13be (patch) | |
tree | dc961ca6a6098eac84e132abb09db687c700e87b /include/scsi | |
parent | e430cbc8bbd779454516467b2947a97b4003c081 (diff) |
scsi: increase upper limit for max_sectors
max_sectors in struct Scsi_Host specifies maximum number of sectors
allowed in a single SCSI command. The data type of max_sectors is
unsigned short, so the maximum transfer length per SCSI command is
limited to less than 256MB in 4096-bytes sector size. (0xffff * 4096)
This commit increases the SCSI mid level's limitation for max_sectors
upto the block layer's limitation for max_hw_sectors by extending the
data type of max_sectors in struct Scsi_Host and scsi_host_template,
so that SCSI lower level drivers can specify more than 0xffff.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_host.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 94844fc77b97..db7d8bd2f86f 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -408,7 +408,7 @@ struct scsi_host_template { | |||
408 | /* | 408 | /* |
409 | * Set this if the host adapter has limitations beside segment count. | 409 | * Set this if the host adapter has limitations beside segment count. |
410 | */ | 410 | */ |
411 | unsigned short max_sectors; | 411 | unsigned int max_sectors; |
412 | 412 | ||
413 | /* | 413 | /* |
414 | * DMA scatter gather segment boundary limit. A segment crossing this | 414 | * DMA scatter gather segment boundary limit. A segment crossing this |
@@ -652,7 +652,7 @@ struct Scsi_Host { | |||
652 | short cmd_per_lun; | 652 | short cmd_per_lun; |
653 | short unsigned int sg_tablesize; | 653 | short unsigned int sg_tablesize; |
654 | short unsigned int sg_prot_tablesize; | 654 | short unsigned int sg_prot_tablesize; |
655 | short unsigned int max_sectors; | 655 | unsigned int max_sectors; |
656 | unsigned long dma_boundary; | 656 | unsigned long dma_boundary; |
657 | /* | 657 | /* |
658 | * Used to assign serial numbers to the cmds. | 658 | * Used to assign serial numbers to the cmds. |