Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp19718ybm; Mon, 20 May 2019 11:06:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzV3Dwu75uc010vJ9jmp+psc+RTuveXzsDk3MRJsbFEzXm+v9qkD+WG1nL3Xp9hBbdFFNqh X-Received: by 2002:a17:902:e104:: with SMTP id cc4mr76563914plb.254.1558375583450; Mon, 20 May 2019 11:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558375583; cv=none; d=google.com; s=arc-20160816; b=vtxHj7ShUn42Rk0v7ZLYKqlFiTyjeUUg15/3qZy+RmUb6LIUx/P3hlpzF+h0vqEcEm wscDzGHaXJkd6VAKOiet9ZeINpwIs/GQoCLHE4qcuP5NFSjCVDt+js7K/+a6aYDOr/or 0nVblZwCPUSKD6lJ9C9ZykVduocTRQWXKV1zHaUbvz0SSLIUXJrlthOfI6mA6QvwRPAu nb+QrDxHjTcdGCl2VgZcz5GDjTZCn3NKLuu6wSDuriMKTxYxryh9I3hg+mmgXLaBx95x Zgm+DhYVAKxIDGe0zySfoEvrhFz/wLk/ObjEKiD0nIEAH7Vqdd+HJ38bMwPbIWssQxV+ ZuEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=M7Yclk63mixT1OPjSgbvbqnerm00T/QkyplQs846OXA=; b=LPgqdH3B1R3v8fEOrtf/d+EO/vE0aFfE1zidXfdypBlzw5BG4IfVRtuJPg/CzdhevB L7xUTjKotEb8Z6z+I2/gXTUqTo7QGNylRguFFYLfqowBtctZ83OFEoEH1oRyvcluBxyR nxuxcpnMDKqBATufQVVVXMbel1Tdn60uJ+vlXYfCVOjsQ00oZ5glaTL1udmOkP7uYNix xQRcnEPtM56yLM6egnDuMgU/sbyi0GzBdGFZnN2gZKcAtWKV1jDjmT4pgxdkF0l/p3KJ 1D4ZRjYJ0VEIMzqXYCJLiBNXJ+8oQLoV2JZDH6614PCIWgQPKCZUROIwOCB8ZpiVUw3n HEdQ== 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 d10si15141271pla.406.2019.05.20.11.06.08; Mon, 20 May 2019 11:06:23 -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 S2390102AbfETNwT (ORCPT + 99 others); Mon, 20 May 2019 09:52:19 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:7664 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731648AbfETNwS (ORCPT ); Mon, 20 May 2019 09:52:18 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 1F7CA5F45FA0FA683575; Mon, 20 May 2019 21:52:16 +0800 (CST) Received: from [127.0.0.1] (10.202.227.238) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.439.0; Mon, 20 May 2019 21:52:04 +0800 Subject: Re: [PATCH v2] scsi: libsas: no need to join wide port again in sas_ex_discover_dev() To: Jason Yan , , References: <20190520140600.22861-1-yanaijie@huawei.com> CC: , , , , , , , , , From: John Garry Message-ID: <7b7c51db-15f3-d06b-ba58-8b6ef618f7d2@huawei.com> Date: Mon, 20 May 2019 14:51:57 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20190520140600.22861-1-yanaijie@huawei.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.238] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/05/2019 15:06, Jason Yan wrote: > Since we are processing events synchronously now, the second call of > sas_ex_join_wide_port() in sas_ex_discover_dev() is not needed. There > will be no races with other works in disco workqueue. So remove the > second sas_ex_join_wide_port(). > > I did not change the return value of 'res' to error when discover failed > because we need to continue to discover other phys if one phy discover > failed. So let's keep that logic as before and just add a debug log to > detect the failure. And directly return if second fanout expander > attatched to the parent expander because it has nothing to do after the > phy is disabled. > > Signed-off-by: Jason Yan > --- Reviewed-by: John Garry