Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1265819 > unrolled thread
| Started by | John Garry <john.garry@huawei.com> |
|---|---|
| First post | 2015-11-09 17:30 +0100 |
| Last post | 2015-11-09 18:00 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v3 11/32] scsi: hisi_sas: add phy SAS ADDR initialization John Garry <john.garry@huawei.com> - 2015-11-09 17:30 +0100
Re: [PATCH v3 11/32] scsi: hisi_sas: add phy SAS ADDR initialization Arnd Bergmann <arnd@arndb.de> - 2015-11-09 17:30 +0100
Re: [PATCH v3 11/32] scsi: hisi_sas: add phy SAS ADDR initialization John Garry <john.garry@huawei.com> - 2015-11-09 18:00 +0100
| From | John Garry <john.garry@huawei.com> |
|---|---|
| Date | 2015-11-09 17:30 +0100 |
| Subject | [PATCH v3 11/32] scsi: hisi_sas: add phy SAS ADDR initialization |
| Message-ID | <qsXus-mg-49@gated-at.bofh.it> |
The SAS address for the HBA comes from the device tree.
Signed-off-by: John Garry <john.garry@huawei.com>
---
drivers/scsi/hisi_sas/hisi_sas.h | 1 +
drivers/scsi/hisi_sas/hisi_sas_main.c | 12 ++++++++++++
2 files changed, 13 insertions(+)
diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
index 315fe46..c50384f 100644
--- a/drivers/scsi/hisi_sas/hisi_sas.h
+++ b/drivers/scsi/hisi_sas/hisi_sas.h
@@ -39,6 +39,7 @@
struct hisi_sas_phy {
struct asd_sas_phy sas_phy;
+ u64 dev_sas_addr;
};
struct hisi_sas_port {
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 79d6530..9e6eebe 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -281,6 +281,16 @@ err_out:
return NULL;
}
+static void hisi_sas_init_add(struct hisi_hba *hisi_hba)
+{
+ int i;
+
+ for (i = 0; i < hisi_hba->n_phy; i++)
+ memcpy(&hisi_hba->phy[i].dev_sas_addr,
+ hisi_hba->sas_addr,
+ SAS_ADDR_SIZE);
+}
+
int hisi_sas_probe(struct platform_device *pdev,
const struct hisi_sas_hw *hw)
{
@@ -334,6 +344,8 @@ int hisi_sas_probe(struct platform_device *pdev,
sha->sas_port[i] = &hisi_hba->port[i].sas_port;
}
+ hisi_sas_init_add(hisi_hba);
+
rc = scsi_add_host(shost, &pdev->dev);
if (rc)
goto err_out_ha;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-11-09 17:30 +0100 |
| Message-ID | <qsXus-mg-55@gated-at.bofh.it> |
| In reply to | #1265819 |
On Tuesday 10 November 2015 00:32:16 John Garry wrote:
> }
>
> +static void hisi_sas_init_add(struct hisi_hba *hisi_hba)
> +{
> + int i;
> +
> + for (i = 0; i < hisi_hba->n_phy; i++)
> + memcpy(&hisi_hba->phy[i].dev_sas_addr,
> + hisi_hba->sas_addr,
> + SAS_ADDR_SIZE);
> +}
I don't know the background here, but I thought it would have to
be a different address on each phy. Are you sure this is not the
case?
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | John Garry <john.garry@huawei.com> |
|---|---|
| Date | 2015-11-09 18:00 +0100 |
| Message-ID | <qsXXs-xH-3@gated-at.bofh.it> |
| In reply to | #1265822 |
On 09/11/2015 16:28, Arnd Bergmann wrote:
> On Tuesday 10 November 2015 00:32:16 John Garry wrote:
>> }
>>
>> +static void hisi_sas_init_add(struct hisi_hba *hisi_hba)
>> +{
>> + int i;
>> +
>> + for (i = 0; i < hisi_hba->n_phy; i++)
>> + memcpy(&hisi_hba->phy[i].dev_sas_addr,
>> + hisi_hba->sas_addr,
>> + SAS_ADDR_SIZE);
>> +}
>
> I don't know the background here, but I thought it would have to
> be a different address on each phy. Are you sure this is not the
> case?
>
> Arnd
>
> .
>
Hi,
Each controller should have a unique SAS addr but not each phy.
Regards,
john
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web