From patchwork Mon Jul 13 08:04:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 235364 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2622782ilg; Mon, 13 Jul 2020 01:08:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEfigjxoOUbM2FdG3ENK08EbrGP/j9m0e4wV+RouiWdFNQpdpOuLgZIh9rvJQbnIEV3wVL X-Received: by 2002:a05:6402:1c86:: with SMTP id cy6mr75288437edb.30.1594627728178; Mon, 13 Jul 2020 01:08:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594627728; cv=none; d=google.com; s=arc-20160816; b=bR+xEbCYdeLUBWy+Euc3iA4LXXX2KK8iZ9EdzXvGvY1zbQRwdmmxvulpsQSIzv46Yu zIPIxlvwm6HQHDDKTSg5IQjFhuQw9IIqp/NPxrRRZ3NuEBHZiLhCxrgrRu1aIVmwFpqQ kC3HynPUb5ZXxu1+qLCFsAozx//aFsxmpdUvfXuyEOqae1FcQFVEOwNh05wYekEcNBrU bXO5JUDBJMuThJ7HnXmtC1zX55W+/0lf5ZQUWoikgWhaJzp8Agsgox9Q8Rs3SpE/nf6l u5c2eYO8fGmKqdgRqcWUzc5vn0IORApJ0g4eVDD/hJvHmbi5CZ2oIQm5XlXHV2S92t04 67Og== 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; bh=n29CZO97X4sP4h8+VSRdMDNJH5sTZ5008ArQWzC2z8o=; b=TzJWptSX2F7S+k4rdsJ7H8qP88R8qYFBNNfI+dVcOLV7NKJmKi71dMUEpG2gl6jQkZ RWugswM+97qgIXJsvJBwdsWunGp4xxSmLeMQT2XLKP9w5orn+3DasNNsE15Wfl5EcN8x JbbYkApiTOVKcjh8GoBR7nxZwsSftcDlvLNks/q97Kiv498eFhw3oC7CR3UQ1fEjKyAU M/0KMn8tG8TFaHE2TMa2LhyvdZujzapxoZfNexLysSRT/c1IUU7eK51ozq/yZ99r/CId PpnKJKA1L+mbrawh16SYcMs1sKw/EkwW8LgJR8tu+zbdhWTB2OWxm8YHs4RrC53B7d6j /fNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o10si8899890ejx.722.2020.07.13.01.08.48 for ; Mon, 13 Jul 2020 01:08:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729197AbgGMIIn (ORCPT ); Mon, 13 Jul 2020 04:08:43 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:7841 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728974AbgGMIIi (ORCPT ); Mon, 13 Jul 2020 04:08:38 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id AD91AC4288777DB34407; Mon, 13 Jul 2020 16:08:35 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Mon, 13 Jul 2020 16:08:27 +0800 From: John Garry To: , CC: , , , Luo Jiaxing , "John Garry" Subject: [PATCH 1/2] scsi: hisi_sas: Directly trigger SCSI error handling for completion errors Date: Mon, 13 Jul 2020 16:04:30 +0800 Message-ID: <1594627471-235395-2-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1594627471-235395-1-git-send-email-john.garry@huawei.com> References: <1594627471-235395-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Luo Jiaxing We used timeout mechanism of SCSI mid-layer to trigger some IO's error handle, this type of abnormal IO require driver to enter error handle to clear the residue in the hardware. But timeout mechanism caught error handle time to be longer, some threads need to wait for tens of seconds until block layer detect timeout and wake up SCSI error handle thread. So we try to trigger error handling directly for some specific IOs to save time. Signed-off-by: Luo Jiaxing Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 4 +++- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 4 +++- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) -- 2.26.2 diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c index 2e1718f9ade2..53e1f517efe9 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c @@ -1258,8 +1258,10 @@ static void slot_complete_v1_hw(struct hisi_hba *hisi_hba, !(cmplt_hdr_data & CMPLT_HDR_RSPNS_XFRD_MSK)) { slot_err_v1_hw(hisi_hba, task, slot); - if (unlikely(slot->abort)) + if (unlikely(slot->abort)) { + sas_task_abort(task); return; + } goto out; } diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c index e7e7849a4c14..4151b2c04923 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c @@ -2404,8 +2404,10 @@ static void slot_complete_v2_hw(struct hisi_hba *hisi_hba, error_info[0], error_info[1], error_info[2], error_info[3]); - if (unlikely(slot->abort)) + if (unlikely(slot->abort)) { + sas_task_abort(task); return; + } goto out; } diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 3e6b78a1f993..d2488d27ff8f 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -2235,8 +2235,10 @@ static void slot_complete_v3_hw(struct hisi_hba *hisi_hba, dw0, dw1, complete_hdr->act, dw3, error_info[0], error_info[1], error_info[2], error_info[3]); - if (unlikely(slot->abort)) + if (unlikely(slot->abort)) { + sas_task_abort(task); return; + } goto out; } From patchwork Mon Jul 13 08:04:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 235363 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2622705ilg; Mon, 13 Jul 2020 01:08:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxq+ic1TEiCFx66H8ObP03gqOJ4NDb/AmUfrEOsSUUib2dQSWvpz9Ai9UjTziDtJtBeeOMB X-Received: by 2002:aa7:db08:: with SMTP id t8mr62592907eds.36.1594627718762; Mon, 13 Jul 2020 01:08:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594627718; cv=none; d=google.com; s=arc-20160816; b=iJXG0SUxqOIoEIrzcB7rF0i0MpnZkn7OjkiVTtkC3kPCAY9jEbNDZfq/9LWNEA6pcE aR/LvyeZDoJDEdJYAIX7tsGSDcky/nL2ot3Y1hFhZW2G1Y1BfeT84FW0jzVrF9IgMTRZ d7BN5d6CmkxJ5gBYi3Z8V2uXITMiYF6hyHLsNunGGGAA7Ula5HFcrHF5aJAXSOeeK/2d qI/924nMauRBIqmPUQuLN3aU0nKRS2rFpmMORNqhDkbC8fLYjII+BipwQ2h4CAZUG9pA OnVELArI0pGBtWWcmEV0M8rGEaJ2fmpwgBF4350z4bre9Cyi16SSe3rfD0FZJs2q+dE+ MHQw== 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; bh=cFtBKmt/ZBa0w7Iu2wF0OFvBGZpI2rmc/x3QEL3bJMw=; b=GijwjtxCx6KGvI0sZm78rIV5D5K0Yhmk8o/vgKcki8AGpciXdO9NfEl1lQq0+XUB/J +l5BPtgNj2gTXXvjchQ0/8bCgbHYtEpSwVEkyuSP3W1Qt7Qa06uFTZl7rOLAnj5iTQeo iqSBFSMgYYl+7Pc1X3EbRfLs/4D1/jVKICviUADvBBv0O1ViRRVN/gnnrbsf0PycYVPL l7sl2Yb8KPVC7245xCFr9UzWgq90jQx2yJO70AAwsO5Wh4yO2RhnBeQnYANwczGmp72v X8qwDYdUa/+b6xMft+uQGinlaPP1FvyH/mtij2GLnF7yec0Ui2gGeHsxjeznfG5Pom7a nhoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f25si707941edy.565.2020.07.13.01.08.38 for ; Mon, 13 Jul 2020 01:08:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729064AbgGMIIi (ORCPT ); Mon, 13 Jul 2020 04:08:38 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:7842 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728833AbgGMIIh (ORCPT ); Mon, 13 Jul 2020 04:08:37 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id A88EE6C494C7A4DF989A; Mon, 13 Jul 2020 16:08:35 +0800 (CST) Received: from localhost.localdomain (10.69.192.58) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Mon, 13 Jul 2020 16:08:27 +0800 From: John Garry To: , CC: , , , John Garry Subject: [PATCH 2/2] scsi: hisi_sas: Remove one kerneldoc comment Date: Mon, 13 Jul 2020 16:04:31 +0800 Message-ID: <1594627471-235395-3-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1594627471-235395-1-git-send-email-john.garry@huawei.com> References: <1594627471-235395-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-CFilter-Loop: Reflected Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The comment for interrupt_init_v2_hw() should not be a kerneldoc comment, so remove it. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.26.2 diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c index 4151b2c04923..ce84f2ba7f68 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c @@ -3302,7 +3302,7 @@ static irq_handler_t fatal_interrupts[HISI_SAS_FATAL_INT_NR] = { fatal_axi_int_v2_hw }; -/** +/* * There is a limitation in the hip06 chipset that we need * to map in all mbigen interrupts, even if they are not used. */