From patchwork Fri Apr 26 09:37:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shivasharan Srikanteshwara X-Patchwork-Id: 10918943 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7BEE51390 for ; Fri, 26 Apr 2019 09:38:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B6E528D55 for ; Fri, 26 Apr 2019 09:38:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FC6328D69; Fri, 26 Apr 2019 09:38:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BFBE28D55 for ; Fri, 26 Apr 2019 09:38:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726268AbfDZJip (ORCPT ); Fri, 26 Apr 2019 05:38:45 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:41681 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726267AbfDZJip (ORCPT ); Fri, 26 Apr 2019 05:38:45 -0400 Received: by mail-pg1-f195.google.com with SMTP id f6so1349965pgs.8 for ; Fri, 26 Apr 2019 02:38:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kOA1Bx5cGF6fzOBzG0i3z220U4AD6UldXBrPPdCIklo=; b=NQigmVFAJxtY1FKdEeGGse+aQYag+llsNxrD7IsG38tKSYuvk/nHT296UPmFtM9Ap8 KEc9iu/dI2/yR5VX59+zWq9YGjEbZSkEQyBalOVzaylfLeCVd3nmJlYqkBGa9/BAjGXG L32Qkg4ObHfxkzDjqKQLDP1t88MsHDhHoaku8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kOA1Bx5cGF6fzOBzG0i3z220U4AD6UldXBrPPdCIklo=; b=VJiwvc+ZFnZTwGmKOE1gAgvrCRWDEa7NrnNC95pTady95R7o6suieytDmDkHIEhR+L mQTEezegQ7RgUu9yV6D4oNfQr3bw2PCuRoWpAFIXmdrPOPAlZ26XmbU83txzdkRed2Uy w9RNB3H3QJlP5t28Pn2SgVygrZgjnpxh1S3/hvf32zBmiwUN+8sNEV+ifeGs0ovUiUNm /hyzh7JuVOiWjfq3HgE9NTDRVt/An5HO7hdtgbadlVEgaGQNDU8IIBFiD50VEw8Iq+H4 n9Demq4fv7T38eoczewOYp8yUqD/T8LeYmLWmYMOdvn7ETGDTWvu0Ka3jGEY1wVujE31 9crw== X-Gm-Message-State: APjAAAWtj7++ew3zixb+diDMOLlAfXsoBxxO8nTTWSVyQXCgFGXapIB7 OxEsLzar298i4rGWw1q++uPq07PPZqCJ4dWUBQvjwNaNT7jjjoYeg9fgWJBw5LTa+Zfh2qgjUbX 4sz2yghbNmVuEwZyMNBsCs0bKReMaWI1iuAcyBGcA20nDOp2o0IKhkjewuNAAdEFrHhJDKa12nr S/HhKgFmelnpxgjqI5ps/H X-Google-Smtp-Source: APXvYqzPlU8dDhWy/4N1K2GqOw40RW0Lg4fTyo/1srsERlIzdFn9KoFNfM2G6dMW3KhPy+nF343+RA== X-Received: by 2002:a65:6201:: with SMTP id d1mr7180972pgv.28.1556271524450; Fri, 26 Apr 2019 02:38:44 -0700 (PDT) Received: from dhcp-135-24-192-142.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id r4sm37994649pgl.69.2019.04.26.02.38.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Apr 2019 02:38:43 -0700 (PDT) From: Shivasharan S To: linux-scsi@vger.kernel.org Cc: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, kiran-kumar.kasturi@broadcom.com, sankar.patra@broadcom.com, sasikumar.pc@broadcom.com, chandrakanth.patil@broadcom.com, Shivasharan S Subject: [PATCH 09/21] megaraid_sas: Enhance internal DCMD timeout prints Date: Fri, 26 Apr 2019 02:37:03 -0700 Message-Id: <1556271435-27252-10-git-send-email-shivasharan.srikanteshwara@broadcom.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1556271435-27252-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> References: <1556271435-27252-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add prints to identify the internal DCMD opcode that has timed out, for debugging. Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 032d91b1f3ba..7449df36a092 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -1113,8 +1113,9 @@ megasas_issue_blocked_cmd(struct megasas_instance *instance, ret = wait_event_timeout(instance->int_cmd_wait_q, cmd->cmd_status_drv != MFI_STAT_INVALID_STATUS, timeout * HZ); if (!ret) { - dev_err(&instance->pdev->dev, "Failed from %s %d DCMD Timed out\n", - __func__, __LINE__); + dev_err(&instance->pdev->dev, + "DCMD(opcode: 0x%x) is timed out, func:%s\n", + cmd->frame->dcmd.opcode, __func__); return DCMD_TIMEOUT; } } else @@ -1143,6 +1144,7 @@ megasas_issue_blocked_abort_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd; struct megasas_abort_frame *abort_fr; int ret = 0; + u32 opcode; cmd = megasas_get_cmd(instance); @@ -1178,8 +1180,10 @@ megasas_issue_blocked_abort_cmd(struct megasas_instance *instance, ret = wait_event_timeout(instance->abort_cmd_wait_q, cmd->cmd_status_drv != MFI_STAT_INVALID_STATUS, timeout * HZ); if (!ret) { - dev_err(&instance->pdev->dev, "Failed from %s %d Abort Timed out\n", - __func__, __LINE__); + opcode = cmd_to_abort->frame->dcmd.opcode; + dev_err(&instance->pdev->dev, + "Abort(to be aborted DCMD opcode: 0x%x) is timed out func:%s\n", + opcode, __func__); return DCMD_TIMEOUT; } } else