提交 66ce2299 编写于 作者: C chenxiang 提交者: Xie XiuQi

scsi: hisi_sas: change the codes related to sg_tablesize

Sht->sg_tablesize is set in hisi_sas driver, and it will be assigned to
shost->sg_tablesize in SCSI layer. So it is not necessary to assign
shost->sg_table one more time in hisi_sas driver.
In addition to the change, change each scsi_host_template.sg_tablesize
to HISI_SAS_SGE_PAGE_CNT instead of SG_ALL.
Signed-off-by: NXiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: NJohn Garry <john.garry@huawei.com>
上级 2ad019fc
...@@ -2448,7 +2448,6 @@ int hisi_sas_probe(struct platform_device *pdev, ...@@ -2448,7 +2448,6 @@ int hisi_sas_probe(struct platform_device *pdev,
shost->max_lun = ~0; shost->max_lun = ~0;
shost->max_channel = 1; shost->max_channel = 1;
shost->max_cmd_len = 16; shost->max_cmd_len = 16;
shost->sg_tablesize = min_t(u16, SG_ALL, HISI_SAS_SGE_PAGE_CNT);
if (hisi_hba->hw->slot_index_alloc) { if (hisi_hba->hw->slot_index_alloc) {
shost->can_queue = hisi_hba->hw->max_command_entries; shost->can_queue = hisi_hba->hw->max_command_entries;
shost->cmd_per_lun = hisi_hba->hw->max_command_entries; shost->cmd_per_lun = hisi_hba->hw->max_command_entries;
......
...@@ -1813,7 +1813,7 @@ static struct scsi_host_template sht_v1_hw = { ...@@ -1813,7 +1813,7 @@ static struct scsi_host_template sht_v1_hw = {
.change_queue_depth = sas_change_queue_depth, .change_queue_depth = sas_change_queue_depth,
.bios_param = sas_bios_param, .bios_param = sas_bios_param,
.this_id = -1, .this_id = -1,
.sg_tablesize = SG_ALL, .sg_tablesize = HISI_SAS_SGE_PAGE_CNT,
.max_sectors = SCSI_DEFAULT_MAX_SECTORS, .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
.use_clustering = ENABLE_CLUSTERING, .use_clustering = ENABLE_CLUSTERING,
.eh_device_reset_handler = sas_eh_device_reset_handler, .eh_device_reset_handler = sas_eh_device_reset_handler,
......
...@@ -3566,7 +3566,7 @@ static struct scsi_host_template sht_v2_hw = { ...@@ -3566,7 +3566,7 @@ static struct scsi_host_template sht_v2_hw = {
.change_queue_depth = sas_change_queue_depth, .change_queue_depth = sas_change_queue_depth,
.bios_param = sas_bios_param, .bios_param = sas_bios_param,
.this_id = -1, .this_id = -1,
.sg_tablesize = SG_ALL, .sg_tablesize = HISI_SAS_SGE_PAGE_CNT,
.max_sectors = SCSI_DEFAULT_MAX_SECTORS, .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
.use_clustering = ENABLE_CLUSTERING, .use_clustering = ENABLE_CLUSTERING,
.eh_device_reset_handler = sas_eh_device_reset_handler, .eh_device_reset_handler = sas_eh_device_reset_handler,
......
...@@ -2258,7 +2258,7 @@ static struct scsi_host_template sht_v3_hw = { ...@@ -2258,7 +2258,7 @@ static struct scsi_host_template sht_v3_hw = {
.change_queue_depth = sas_change_queue_depth, .change_queue_depth = sas_change_queue_depth,
.bios_param = sas_bios_param, .bios_param = sas_bios_param,
.this_id = -1, .this_id = -1,
.sg_tablesize = SG_ALL, .sg_tablesize = HISI_SAS_SGE_PAGE_CNT,
.max_sectors = SCSI_DEFAULT_MAX_SECTORS, .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
.use_clustering = ENABLE_CLUSTERING, .use_clustering = ENABLE_CLUSTERING,
.eh_device_reset_handler = sas_eh_device_reset_handler, .eh_device_reset_handler = sas_eh_device_reset_handler,
...@@ -2404,7 +2404,6 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -2404,7 +2404,6 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id)
shost->max_lun = ~0; shost->max_lun = ~0;
shost->max_channel = 1; shost->max_channel = 1;
shost->max_cmd_len = 16; shost->max_cmd_len = 16;
shost->sg_tablesize = min_t(u16, SG_ALL, HISI_SAS_SGE_PAGE_CNT);
shost->can_queue = hisi_hba->hw->max_command_entries - shost->can_queue = hisi_hba->hw->max_command_entries -
HISI_SAS_RESERVED_IPTT_CNT; HISI_SAS_RESERVED_IPTT_CNT;
shost->cmd_per_lun = hisi_hba->hw->max_command_entries - shost->cmd_per_lun = hisi_hba->hw->max_command_entries -
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册