From patchwork Thu Apr 11 12:46:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 162065 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp7377869jan; Thu, 11 Apr 2019 05:48:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYrYJAwei7s80eA5yHHtEFv3Kqb0rbrGrYbDS5vAlLHznqGu1ksJVKSgpk5r81RlH19Dy7 X-Received: by 2002:a62:5ec2:: with SMTP id s185mr49130293pfb.16.1554986882345; Thu, 11 Apr 2019 05:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554986882; cv=none; d=google.com; s=arc-20160816; b=mD0WXTcXuOSVn+/Gqqu6spzLPOHkbGtpqmy7HVlzFTmkHZvx+ZHDZdZqtuI+S/KUKM PHfIot9FiAbD64iU+HmPHAhIddZb8baNCOagDWO6D4FuX27HALd5p06NBghpMVLNcaj0 q47eB8kzEgdALal/htWcHNzi17jyeMLT5lxNqLd5S1sQik9T0LSIKPE1b1zZwmbYg9vF 584B0FMFPBVG0BqEGNBkvx/45QwKGE07bNqmBBeUNliQvu5JB9oKIe8IyJHzothWRENR tTDOeqoTFTlQgZjEJBwhRiZ4tcvreQwGpUqswD9kjKHpBvA5Shkq5BqkXbBQEJy28nia YZpw== 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=PhbbTDDBSAqmOzU5V880Ih3J7BbqsZO6H3QD2U6qO9I=; b=IcJjBLpHfnQDdW+VU/kQ9dmby2MYb5LbW+iwrPsuOrfJGqJ7mCnrLAnI9do16gQiCB JhCJbhdFQ9SVCMn3RGWIBAl4Dv6X+5cXISprTk6d8N4oMOKB4cS2X8h8SFAZsKnO7t8K l96C6D6QfY+Z2fRugWsA4/Jdnuz25j/k34au/mNck81Of8fzrHv5YOuOE54IKt3/LvsS PtaV5Gnej/tGCXOjVayPL3SNOM1rRN9wzTPkfkXdbYsH+vmpjHkmOE06VoHFaXLdDOvR QqnkfN04cYBDQniZDhrv3wV21yUmF92YughLWbhC2M/uzPVrczPYk5CC9EoXzN0zbxpF J5Ug== 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 m7si10673696pls.114.2019.04.11.05.48.02; Thu, 11 Apr 2019 05:48:02 -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 S1727081AbfDKMsA (ORCPT + 31 others); Thu, 11 Apr 2019 08:48:00 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:41564 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726832AbfDKMrc (ORCPT ); Thu, 11 Apr 2019 08:47:32 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id B8F72D4F651B2AC100F5; Thu, 11 Apr 2019 20:47:29 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.408.0; Thu, 11 Apr 2019 20:47:21 +0800 From: John Garry To: , CC: , , , Luo Jiaxing , John Garry Subject: [PATCH 8/9] scsi: hisi_sas: Don't fail IT nexus reset for Open Reject timeout Date: Thu, 11 Apr 2019 20:46:43 +0800 Message-ID: <1554986804-233706-9-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1554986804-233706-1-git-send-email-john.garry@huawei.com> References: <1554986804-233706-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Luo Jiaxing Currently we call hisi_sas_softreset_ata_disk() in hisi_sas_I_T_nexus_reset(). If this fails for open reject reason, there is no reason to fail the IT nexus reset, so only fail for TMF_RESP_FUNC_FAILED. Some other strings spilled over multiple lines are reunited. Signed-off-by: Luo Jiaxing Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) -- 2.17.1 diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index c02cf78a20c7..ebeec7a52ddc 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -1287,8 +1287,7 @@ static int hisi_sas_exec_internal_tmf_task(struct domain_device *device, /* no error, but return the number of bytes of * underrun */ - dev_warn(dev, "abort tmf: task to dev %016llx " - "resp: 0x%x sts 0x%x underrun\n", + dev_warn(dev, "abort tmf: task to dev %016llx resp: 0x%x sts 0x%x underrun\n", SAS_ADDR(device->sas_addr), task->task_status.resp, task->task_status.stat); @@ -1303,10 +1302,16 @@ static int hisi_sas_exec_internal_tmf_task(struct domain_device *device, break; } - dev_warn(dev, "abort tmf: task to dev " - "%016llx resp: 0x%x status 0x%x\n", - SAS_ADDR(device->sas_addr), task->task_status.resp, - task->task_status.stat); + if (task->task_status.resp == SAS_TASK_COMPLETE && + task->task_status.stat == SAS_OPEN_REJECT) { + dev_warn(dev, "abort tmf: open reject failed\n"); + res = -EIO; + } else { + dev_warn(dev, "abort tmf: task to dev %016llx resp: 0x%x status 0x%x\n", + SAS_ADDR(device->sas_addr), + task->task_status.resp, + task->task_status.stat); + } sas_free_task(task); task = NULL; } @@ -1826,7 +1831,7 @@ static int hisi_sas_I_T_nexus_reset(struct domain_device *device) if (dev_is_sata(device)) { rc = hisi_sas_softreset_ata_disk(device); - if (rc) + if (rc == TMF_RESP_FUNC_FAILED) return TMF_RESP_FUNC_FAILED; } @@ -2123,10 +2128,8 @@ _hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba, } exit: - dev_dbg(dev, "internal task abort: task to dev %016llx task=%p " - "resp: 0x%x sts 0x%x\n", - SAS_ADDR(device->sas_addr), - task, + dev_dbg(dev, "internal task abort: task to dev %016llx task=%p resp: 0x%x sts 0x%x\n", + SAS_ADDR(device->sas_addr), task, task->task_status.resp, /* 0 is complete, -1 is undelivered */ task->task_status.stat); sas_free_task(task);