From patchwork Fri Nov 18 08:37:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jie Zhan X-Patchwork-Id: 22192 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp69854wrr; Fri, 18 Nov 2022 00:45:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf753/ABLAq7jp4evOEqfqyut6QeAdFHAycNimpl7b2jiFKUUrWZRrVuYgJNPorl901YXjsH X-Received: by 2002:a63:ec03:0:b0:46e:e210:a491 with SMTP id j3-20020a63ec03000000b0046ee210a491mr6011006pgh.96.1668761150968; Fri, 18 Nov 2022 00:45:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668761150; cv=none; d=google.com; s=arc-20160816; b=Uc5uK4Do7DiceS4hDm8zrXmkV0/mbvffHAdC1VGAN9E/haBBDzA/Mw2iv4sdnYkeiD AhyPe9h5JCg5p2YPd/R5JLV8gooeVyXf+K7N1x1+i45qt58SKsWE+u6ADgy9F6A1EBui bu6GID5+/3GthL2ea+xRG/5GmncpjAOB/6EHTsHYb9gz6a/q0Q6xJoYIhTpIROZ9S6d6 7q9bn4RTsv9hZAbE1ZQSvemFyaeCy1u73Xtg+azSqF66eJHf5s5jmwPbd+CxC9R0raNi +W7cWpdVFz8JZxC4EAqd5WyE3IZR18VCBea1F2dQ5weMnBzwlE3PyuULBy14xzkkgXR6 +bBg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j11-20020a170902da8b00b0018128753b25si3584965plx.271.2022.11.18.00.45.37; Fri, 18 Nov 2022 00:45:50 -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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749822892363242380?= X-GMAIL-MSGID: =?utf-8?q?1749822892363242380?= 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);