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

scsi: hisi_sas: add a separate host attribute for every host adapter

Currently all the three host adapter (v1/v2/v3 hw) share the same host
attribute. Actually one host attribute may has own host attribute which
is not supported by other host adapter. So add a separate host attribute
for every host adapter.
Signed-off-by: NXiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: NJohn Garry <john.garry@huawei.com>
上级 9f16505c
......@@ -469,7 +469,6 @@ extern int hisi_sas_remove(struct platform_device *pdev);
extern int hisi_sas_slave_configure(struct scsi_device *sdev);
extern int hisi_sas_scan_finished(struct Scsi_Host *shost, unsigned long time);
extern void hisi_sas_scan_start(struct Scsi_Host *shost);
extern struct device_attribute *host_attrs[];
extern int hisi_sas_host_reset(struct Scsi_Host *shost, int reset_type);
extern void hisi_sas_phy_down(struct hisi_hba *hisi_hba, int phy_no, int rdy);
extern void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba,
......
......@@ -2033,12 +2033,6 @@ EXPORT_SYMBOL_GPL(hisi_sas_host_reset);
struct scsi_transport_template *hisi_sas_stt;
EXPORT_SYMBOL_GPL(hisi_sas_stt);
struct device_attribute *host_attrs[] = {
&dev_attr_phy_event_threshold,
NULL,
};
EXPORT_SYMBOL_GPL(host_attrs);
static struct sas_domain_function_template hisi_sas_transport_ops = {
.lldd_dev_found = hisi_sas_dev_found,
.lldd_dev_gone = hisi_sas_dev_gone,
......
......@@ -1797,6 +1797,11 @@ static int hisi_sas_v1_init(struct hisi_hba *hisi_hba)
return 0;
}
static struct device_attribute *host_attrs_v1_hw[] = {
&dev_attr_phy_event_threshold,
NULL
};
static struct scsi_host_template sht_v1_hw = {
.name = DRV_NAME,
.module = THIS_MODULE,
......@@ -1815,7 +1820,7 @@ static struct scsi_host_template sht_v1_hw = {
.eh_target_reset_handler = sas_eh_target_reset_handler,
.target_destroy = sas_target_destroy,
.ioctl = sas_ioctl,
.shost_attrs = host_attrs,
.shost_attrs = host_attrs_v1_hw,
.host_reset = hisi_sas_host_reset,
};
......
......@@ -3550,6 +3550,11 @@ static void wait_cmds_complete_timeout_v2_hw(struct hisi_hba *hisi_hba,
dev_dbg(dev, "wait commands complete %dms\n", time);
}
struct device_attribute *host_attrs_v2_hw[] = {
&dev_attr_phy_event_threshold,
NULL
};
static struct scsi_host_template sht_v2_hw = {
.name = DRV_NAME,
.module = THIS_MODULE,
......@@ -3568,7 +3573,7 @@ static struct scsi_host_template sht_v2_hw = {
.eh_target_reset_handler = sas_eh_target_reset_handler,
.target_destroy = sas_target_destroy,
.ioctl = sas_ioctl,
.shost_attrs = host_attrs,
.shost_attrs = host_attrs_v2_hw,
.host_reset = hisi_sas_host_reset,
};
......
......@@ -2125,6 +2125,11 @@ static void wait_cmds_complete_timeout_v3_hw(struct hisi_hba *hisi_hba,
dev_dbg(dev, "wait commands complete %dms\n", time);
}
struct device_attribute *host_attrs_v3_hw[] = {
&dev_attr_phy_event_threshold,
NULL
};
static struct scsi_host_template sht_v3_hw = {
.name = DRV_NAME,
.module = THIS_MODULE,
......@@ -2143,7 +2148,7 @@ static struct scsi_host_template sht_v3_hw = {
.eh_target_reset_handler = sas_eh_target_reset_handler,
.target_destroy = sas_target_destroy,
.ioctl = sas_ioctl,
.shost_attrs = host_attrs,
.shost_attrs = host_attrs_v3_hw,
.host_reset = hisi_sas_host_reset,
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册