From patchwork Fri Mar 23 16:05:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 132347 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp776829ljb; Fri, 23 Mar 2018 09:06:14 -0700 (PDT) X-Google-Smtp-Source: AG47ELv0tUSe3qS0LyX0SD6Yx3Zxst8IRUTzZ6kPRTvbAVANyotx7l8KePGOQPALnV8UXSEXD3sD X-Received: by 2002:a17:902:274a:: with SMTP id j10-v6mr7907480plg.28.1521821173870; Fri, 23 Mar 2018 09:06:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521821173; cv=none; d=google.com; s=arc-20160816; b=RYSxiRjuwUYz/4tMIl/4RYkr+86RYyARQbhlV5x5hcWfTHmcELEtWrcD4n9G699Igy mGpZy1lHcnmHBAcwaT3uhjVNtiFmmzEgMJlNJz0hq/onlacgFKwuda+RUZyfDAgTQGVc +vFktJVWKnviu5F+LyQNOoljUuGvSZ1tPry3b1egYq0MH6qXZEm9fKGjgjIsZSvr64pl ro/FWorqXTIXm59J/FIgDjBsbDUtE80PvmceyFIZsrup5QvHeDvnLJxb7HkZT9YIjWXL V+6v9fGn8Y/swpTdsaMThEtFh7AMG6Q0sKvZK+8cRwkPQ4BBo8IcOfkC9ZPCkEetKl7I ZyhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=IjVyu5lDdg3iKCmJx6nw2OdTE+4Vq65snDdnOEY4/jw=; b=o7bR0N/d0HyRQptx+vAquyT6rWd0gUBM5aNVL3An9VyW3Rx2ee845Be1k1fD1O2AG1 FrE3WrqGL2FRdJgMmA8aD6dSRjJVC8c77ItIBHpQDxu5O6QVkPjxwjqJELiHrodnX9Ue Dadmzl8slczErpJCP2VHrxjPFpdtQfkX8h2jNsTk7cbyx2h1YH8yO3Ys8qmIR6dOgACu JfhBhYklsBP6At2lvjEhqsEgcgX7C6CDnrQI4Kg1FrKWrgdqIAhgfMNrAMlsqqVl5OEu XjhSpDSGhntIFzyac9szZ02FNV5K+QawDZdywo0I2b0MmtMMlugHBo6d3hBSpYmxSFUP G7fA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h12-v6si6477466pls.68.2018.03.23.09.06.13; Fri, 23 Mar 2018 09:06:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752219AbeCWQGJ (ORCPT + 28 others); Fri, 23 Mar 2018 12:06:09 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6684 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751923AbeCWQGF (ORCPT ); Fri, 23 Mar 2018 12:06:05 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 9EFD346E9E727; Sat, 24 Mar 2018 00:05:50 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.361.1; Sat, 24 Mar 2018 00:05:44 +0800 From: John Garry To: , CC: , , , Xiang Chen , "John Garry" Subject: [PATCH 1/8] scsi: hisi_sas: make SAS address of SATA disks unique Date: Sat, 24 Mar 2018 00:05:08 +0800 Message-ID: <1521821115-120040-2-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1521821115-120040-1-git-send-email-john.garry@huawei.com> References: <1521821115-120040-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiang Chen 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 Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 1 + 1 file changed, 1 insertion(+) -- 1.9.1 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));