LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: <jejb@linux.vnet.ibm.com>, <martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>, <linuxarm@huawei.com>,
	<linux-kernel@vger.kernel.org>,
	Xiang Chen <chenxiang66@hisilicon.com>,
	"John Garry" <john.garry@huawei.com>
Subject: [PATCH 1/8] scsi: hisi_sas: make SAS address of SATA disks unique
Date: Sat, 24 Mar 2018 00:05:08 +0800	[thread overview]
Message-ID: <1521821115-120040-2-git-send-email-john.garry@huawei.com> (raw)
In-Reply-To: <1521821115-120040-1-git-send-email-john.garry@huawei.com>

From: Xiang Chen <chenxiang66@hisilicon.com>

When directly connected with SATA disks in different SAS cores,
fill SAS address with scsi_host's id to make it's fake SAS address
unique.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
---
 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
index f89fb9a..89b9505 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
@@ -3295,6 +3295,7 @@ static irqreturn_t sata_int_v2_hw(int irq_no, void *p)
 	sas_phy->oob_mode = SATA_OOB_MODE;
 	/* Make up some unique SAS address */
 	attached_sas_addr[0] = 0x50;
+	attached_sas_addr[6] = hisi_hba->shost->host_no;
 	attached_sas_addr[7] = phy_no;
 	memcpy(sas_phy->attached_sas_addr, attached_sas_addr, SAS_ADDR_SIZE);
 	memcpy(sas_phy->frame_rcvd, fis, sizeof(struct dev_to_host_fis));
-- 
1.9.1

  reply	other threads:[~2018-03-23 16:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23 16:05 [PATCH 0/8] hisi_sas: some misc changes John Garry
2018-03-23 16:05 ` John Garry [this message]
2018-03-23 16:05 ` [PATCH 2/8] scsi: hisi_sas: update RAS feature for later revision of v3 HW John Garry
2018-03-23 16:05 ` [PATCH 3/8] scsi: hisi_sas: delete timer when removing hisi_sas driver John Garry
2018-03-23 16:05 ` [PATCH 4/8] scsi: hisi_sas: use dma_zalloc_coherent() John Garry
2018-03-23 16:05 ` [PATCH 5/8] scsi: hisi_sas: consolidate command check in hisi_sas_get_ata_protocol() John Garry
2018-03-23 16:05 ` [PATCH 6/8] scsi: hisi_sas: check IPTT is valid before using it for v3 hw John Garry
2018-03-23 16:05 ` [PATCH 7/8] scsi: hisi_sas: print device id for errors John Garry
2018-03-23 16:05 ` [PATCH 8/8] scsi: hisi_sas: remove some unneeded structure members John Garry
2018-04-10  2:57 ` [PATCH 0/8] hisi_sas: some misc changes Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1521821115-120040-2-git-send-email-john.garry@huawei.com \
    --to=john.garry@huawei.com \
    --cc=chenxiang66@hisilicon.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=martin.petersen@oracle.com \
    --subject='Re: [PATCH 1/8] scsi: hisi_sas: make SAS address of SATA disks unique' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).