Commit b4982c68 authored by Brian King's avatar Brian King Committed by James Bottomley

[PATCH] ipr: Setup max_sectors based on device type

The ipr family of adapters is capable of handling data transfer sizes of
16777215 bytes. Logical disk array devices under ipr are capable of only
256k transfer lengths. Patch sets max_sectors of the adapter to 32767 and
overrides max_sectors for the logical disk array devices in the
slave_configure routine.
Signed-off-by: default avatarBrian King <brking@us.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 2ef2a2d5
...@@ -2832,8 +2832,10 @@ static int ipr_slave_configure(struct scsi_device *sdev) ...@@ -2832,8 +2832,10 @@ static int ipr_slave_configure(struct scsi_device *sdev)
sdev->type = TYPE_RAID; sdev->type = TYPE_RAID;
if (ipr_is_af_dasd_device(res) || ipr_is_ioa_resource(res)) if (ipr_is_af_dasd_device(res) || ipr_is_ioa_resource(res))
sdev->scsi_level = 4; sdev->scsi_level = 4;
if (ipr_is_vset_device(res)) if (ipr_is_vset_device(res)) {
sdev->timeout = IPR_VSET_RW_TIMEOUT; sdev->timeout = IPR_VSET_RW_TIMEOUT;
blk_queue_max_sectors(sdev->request_queue, IPR_VSET_MAX_SECTORS);
}
if (IPR_IS_DASD_DEVICE(res->cfgte.std_inq_data)) if (IPR_IS_DASD_DEVICE(res->cfgte.std_inq_data))
sdev->allow_restart = 1; sdev->allow_restart = 1;
scsi_adjust_queue_depth(sdev, 0, res->qdepth); scsi_adjust_queue_depth(sdev, 0, res->qdepth);
...@@ -3951,7 +3953,7 @@ static struct scsi_host_template driver_template = { ...@@ -3951,7 +3953,7 @@ static struct scsi_host_template driver_template = {
.can_queue = IPR_MAX_COMMANDS, .can_queue = IPR_MAX_COMMANDS,
.this_id = -1, .this_id = -1,
.sg_tablesize = IPR_MAX_SGLIST, .sg_tablesize = IPR_MAX_SGLIST,
.max_sectors = IPR_MAX_SECTORS, .max_sectors = IPR_IOA_MAX_SECTORS,
.cmd_per_lun = IPR_MAX_CMD_PER_LUN, .cmd_per_lun = IPR_MAX_CMD_PER_LUN,
.use_clustering = ENABLE_CLUSTERING, .use_clustering = ENABLE_CLUSTERING,
.shost_attrs = ipr_ioa_attrs, .shost_attrs = ipr_ioa_attrs,
......
...@@ -130,7 +130,8 @@ ...@@ -130,7 +130,8 @@
#define IPR_MAX_PHYSICAL_DEVS 192 #define IPR_MAX_PHYSICAL_DEVS 192
#define IPR_MAX_SGLIST 64 #define IPR_MAX_SGLIST 64
#define IPR_MAX_SECTORS 512 #define IPR_IOA_MAX_SECTORS 32767
#define IPR_VSET_MAX_SECTORS 512
#define IPR_MAX_CDB_LEN 16 #define IPR_MAX_CDB_LEN 16
#define IPR_DEFAULT_BUS_WIDTH 16 #define IPR_DEFAULT_BUS_WIDTH 16
......
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