Commit a14aeccb authored by Bryant G. Ly's avatar Bryant G. Ly Committed by Greg Kroah-Hartman

ibmvscsis: Fix max transfer length

commit 387b978c upstream.

Current code incorrectly calculates the max transfer length, since
it is assuming a 4k page table, but ppc64 all run on 64k page tables.
Reported-by: default avatarSteven Royer <seroyer@linux.vnet.ibm.com>
Tested-by: default avatarSteven Royer <seroyer@linux.vnet.ibm.com>
Signed-off-by: default avatarBryant G. Ly <bryantly@linux.vnet.ibm.com>
Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 51cff2c6
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#define INITIAL_SRP_LIMIT 800 #define INITIAL_SRP_LIMIT 800
#define DEFAULT_MAX_SECTORS 256 #define DEFAULT_MAX_SECTORS 256
#define MAX_TXU 1024 * 1024
static uint max_vdma_size = MAX_H_COPY_RDMA; static uint max_vdma_size = MAX_H_COPY_RDMA;
...@@ -1291,7 +1292,7 @@ static long ibmvscsis_adapter_info(struct scsi_info *vscsi, ...@@ -1291,7 +1292,7 @@ static long ibmvscsis_adapter_info(struct scsi_info *vscsi,
info->mad_version = cpu_to_be32(MAD_VERSION_1); info->mad_version = cpu_to_be32(MAD_VERSION_1);
info->os_type = cpu_to_be32(LINUX); info->os_type = cpu_to_be32(LINUX);
memset(&info->port_max_txu[0], 0, sizeof(info->port_max_txu)); memset(&info->port_max_txu[0], 0, sizeof(info->port_max_txu));
info->port_max_txu[0] = cpu_to_be32(128 * PAGE_SIZE); info->port_max_txu[0] = cpu_to_be32(MAX_TXU);
dma_wmb(); dma_wmb();
rc = h_copy_rdma(sizeof(*info), vscsi->dds.window[LOCAL].liobn, rc = h_copy_rdma(sizeof(*info), vscsi->dds.window[LOCAL].liobn,
......
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