From patchwork Mon Oct 12 15:20:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 54776 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id 8761723001 for ; Mon, 12 Oct 2015 15:05:43 +0000 (UTC) Received: by lbbpc3 with SMTP id pc3sf16755271lbb.2 for ; Mon, 12 Oct 2015 08:05:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=ssE0p68QE32tdOha+IYa2hLhXCdCahHqd7OCZnTOU24=; b=D6Y8NiYjVdMYgzVYbBccmXg+fCVsDbHFibBkP+WuFASe7bJwvIl4A1SszoeaaPx4MA 1F7RHA2kmNxLHiMxtZA8BgXt3shZkF6vzpFV6K0kkxNLq+nyvN+cMD8aWzRCE8hCz03Z hlJaxsmQ+VE5xmFf43plQNtVu2pm1e2X9H/iZ3Z1YiwEU1R0t0KVV/lAsjQPJxhbzj8C qSUQQ+EB7JisI9z8kKpXvWUgCd8lHAO7zxVQ/T/OsEJH0/vBUtVM5tqm9LoX/KFlOvaQ 1BBs5lPSa29hcLT3NpgdX8q3dBvjlbNB7JXwdV5NnBXyx8to8S+iOfciJ5wc8Gl8xGub +epw== X-Gm-Message-State: ALoCoQkL8OeCjPzokjWclSMHog5Bm1JVl5nXV1WpBoJfFVm0u0sQjRRmii3RDVruIEtWhJR7lGD2 X-Received: by 10.112.16.229 with SMTP id j5mr1016287lbd.6.1444662342489; Mon, 12 Oct 2015 08:05:42 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.164.77 with SMTP id n74ls496713lfe.94.gmail; Mon, 12 Oct 2015 08:05:42 -0700 (PDT) X-Received: by 10.25.32.143 with SMTP id g137mr8399216lfg.94.1444662342349; Mon, 12 Oct 2015 08:05:42 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id kf2si11500488lbc.174.2015.10.12.08.05.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Oct 2015 08:05:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbcao8 with SMTP id ao8so146190557lbc.3 for ; Mon, 12 Oct 2015 08:05:42 -0700 (PDT) X-Received: by 10.112.135.9 with SMTP id po9mr12974910lbb.56.1444662342222; Mon, 12 Oct 2015 08:05:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1599287lbq; Mon, 12 Oct 2015 08:05:41 -0700 (PDT) X-Received: by 10.202.50.215 with SMTP id y206mr15619539oiy.48.1444662335316; Mon, 12 Oct 2015 08:05:35 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w140si9016869oif.70.2015.10.12.08.05.35 for ; Mon, 12 Oct 2015 08:05:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752065AbbJLPFd (ORCPT ); Mon, 12 Oct 2015 11:05:33 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:11754 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752036AbbJLPF3 (ORCPT ); Mon, 12 Oct 2015 11:05:29 -0400 Received: from 172.24.1.51 (EHLO szxeml432-hub.china.huawei.com) ([172.24.1.51]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CUB61523; Mon, 12 Oct 2015 23:05:12 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by szxeml432-hub.china.huawei.com (10.82.67.209) with Microsoft SMTP Server id 14.3.235.1; Mon, 12 Oct 2015 23:05:01 +0800 From: John Garry To: CC: , , , , , , , , , John Garry Subject: [PATCH 09/25] scsi: hisi_sas: add phy SAS ADDR initialization Date: Mon, 12 Oct 2015 23:20:21 +0800 Message-ID: <1444663237-238302-10-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1444663237-238302-1-git-send-email-john.garry@huawei.com> References: <1444663237-238302-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-scsi-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.garry@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This SAS ID is chosen as Huawei IEEE id: 001882 Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_init.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_init.c b/drivers/scsi/hisi_sas/hisi_sas_init.c index 44fc524..c295c39 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_init.c +++ b/drivers/scsi/hisi_sas/hisi_sas_init.c @@ -283,6 +283,19 @@ err_out: return NULL; } +static void hisi_sas_init_add(struct hisi_hba *hisi_hba) +{ + u8 i; + + /* Huawei IEEE id (001882) */ + for (i = 0; i < hisi_hba->n_phy; i++) + hisi_hba->phy[i].dev_sas_addr = + cpu_to_be64(0x5001882016072015ULL); + + memcpy(hisi_hba->sas_addr, &hisi_hba->phy[0].dev_sas_addr, + SAS_ADDR_SIZE); +} + static int hisi_sas_probe(struct platform_device *pdev) { struct Scsi_Host *shost; @@ -339,6 +352,8 @@ static int hisi_sas_probe(struct platform_device *pdev) sha->sas_phy[i] = &hisi_hba->phy[i].sas_phy; 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;