Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp279080rwb; Fri, 18 Nov 2022 01:03:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf52rEuVPnsnf0XXZQ/iobDu5WBB4YaQo9mec50jk6xUbC17CBWrjPCGbSNLzm+/+QK5J+gs X-Received: by 2002:a05:6402:3205:b0:467:3015:ad42 with SMTP id g5-20020a056402320500b004673015ad42mr5489433eda.259.1668762227319; Fri, 18 Nov 2022 01:03:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668762227; cv=none; d=google.com; s=arc-20160816; b=WMGl19Lc0MTE228TBDdRV17l73JZIMfY8Sm3v0PW1grj0Xzs+wRG7m6es+s9CMbFiI id7YcKbgjBAEyu1y/7pBiWBd0Siovm69n1N0BFr6PHJLTZ3inP/wHwEIkxmAtmQR3Q0G P3/vw62kdwQ8M8UhlR+2QUq5jLELhz/3L7GQWHsSuaopGNg2R2Ed4sYM0GqJFYYNttuF KAH4Ab9xx72GDWUCM6K/Qtv3EsTbhyACF5VYYktD0act2SSivmNv1Zx0jZTKdN7jezQY /Kyj6ODy4vl7f47k4o6n+baYeiqOmXa510T3PzpEB2JFmPzp65BKylliyfJ2+HjK9T5i x1RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=IWDYwk/yXI8+MDKaydo282d8IBIiBQ6Dm018t4MtRcU=; b=rM5AZoao3i0a3RgKhtqcOieRfIVZXwozad6QFx6gttGHzsNXBp3h1VSSdbkn7AiL9M tJuYkn2Ron0stYVW9jCnFsiEpYh6X7v5tosWLSaR70QYQmnzoDfcEp8/Z9a5LLBFIv0R q8pELPwQCHYLki+EwbUZeQ/rmctUCwDSFAgQPigcA0jTd54qzV3aw4VUq3IkNBxANxmo 3fBSN2HuRZToYDg6y7SeQyglaxcoGBl8KMDRjfBc2eP7N+WZkV5QXN9FoJFv6oazvChI QzBqM7lX9PpTn7qCbuJqHufAIhWLk+77ggY2N4mCO1nUWzjh1yqpv8iQF1GYMlQJHlof t+fQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc30-20020a1709071c1e00b0077f3a9c58e2si2618990ejc.6.2022.11.18.01.03.20; Fri, 18 Nov 2022 01:03:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241454AbiKRIii (ORCPT + 90 others); Fri, 18 Nov 2022 03:38:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235200AbiKRIi2 (ORCPT ); Fri, 18 Nov 2022 03:38:28 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0F396323; Fri, 18 Nov 2022 00:38:26 -0800 (PST) Received: from dggpeml500021.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4ND97Z6pq9zqSYf; Fri, 18 Nov 2022 16:34:34 +0800 (CST) Received: from dggpeml500019.china.huawei.com (7.185.36.137) by dggpeml500021.china.huawei.com (7.185.36.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 18 Nov 2022 16:38:18 +0800 Received: from localhost.localdomain (10.67.165.2) by dggpeml500019.china.huawei.com (7.185.36.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 18 Nov 2022 16:38:18 +0800 From: Jie Zhan To: , CC: , , , , , , , , , , , , Subject: [PATCH for-next 2/5] Revert "scsi: hisi_sas: Don't send bcast events from HW during nexus HA reset" Date: Fri, 18 Nov 2022 16:37:11 +0800 Message-ID: <20221118083714.4034612-3-zhanjie9@hisilicon.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20221118083714.4034612-1-zhanjie9@hisilicon.com> References: <20221118083714.4034612-1-zhanjie9@hisilicon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.165.2] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500019.china.huawei.com (7.185.36.137) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit f5f2a2716055ad8c0c4ff83e51d667646c6c5d8a. This is now unnecessary to solve the SATA devices missing issue in hisi_sas_clear_nexus_ha(). Hence, we should not ignore bcast events during sas_eh_handle_sas_errors() in case of missing bcast events, unless a justified need is found and a mechanism to defer (but not ignore) bcast events in sas_eh_handle_sas_errors() is provided. Also, in hisi_sas_clear_nexus_ha(), there is nothing further to handle in "out: " other than return, so that part can be reverted. Signed-off-by: Jie Zhan Reviewed-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 4527ac266bb6..62080d0fad6f 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -1812,14 +1812,12 @@ static int hisi_sas_clear_nexus_ha(struct sas_ha_struct *sas_ha) struct hisi_hba *hisi_hba = sas_ha->lldd_ha; HISI_SAS_DECLARE_RST_WORK_ON_STACK(r); ASYNC_DOMAIN_EXCLUSIVE(async); - int i, ret; + int i; queue_work(hisi_hba->wq, &r.work); wait_for_completion(r.completion); - if (!r.done) { - ret = TMF_RESP_FUNC_FAILED; - goto out; - } + if (!r.done) + return TMF_RESP_FUNC_FAILED; for (i = 0; i < HISI_SAS_MAX_DEVICES; i++) { struct hisi_sas_device *sas_dev = &hisi_hba->devices[i]; @@ -1836,9 +1834,7 @@ static int hisi_sas_clear_nexus_ha(struct sas_ha_struct *sas_ha) async_synchronize_full_domain(&async); hisi_sas_release_tasks(hisi_hba); - ret = TMF_RESP_FUNC_COMPLETE; -out: - return ret; + return TMF_RESP_FUNC_COMPLETE; } static int hisi_sas_query_task(struct sas_task *task) @@ -1986,14 +1982,10 @@ void hisi_sas_phy_bcast(struct hisi_sas_phy *phy) { struct asd_sas_phy *sas_phy = &phy->sas_phy; struct hisi_hba *hisi_hba = phy->hisi_hba; - struct sas_ha_struct *sha = &hisi_hba->sha; if (test_bit(HISI_SAS_RESETTING_BIT, &hisi_hba->flags)) return; - if (test_bit(SAS_HA_FROZEN, &sha->state)) - return; - sas_notify_port_event(sas_phy, PORTE_BROADCAST_RCVD, GFP_ATOMIC); } EXPORT_SYMBOL_GPL(hisi_sas_phy_bcast); -- 2.30.0