From patchwork Thu Apr 23 14:33:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Don Brace X-Patchwork-Id: 6263441 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 19B1BBF4A6 for ; Thu, 23 Apr 2015 14:35:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 39B7F20394 for ; Thu, 23 Apr 2015 14:35:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 32FC82038D for ; Thu, 23 Apr 2015 14:35:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966130AbbDWOfE (ORCPT ); Thu, 23 Apr 2015 10:35:04 -0400 Received: from g9t1613g.houston.hp.com ([15.240.0.71]:46905 "EHLO g9t1613g.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966081AbbDWOfD (ORCPT ); Thu, 23 Apr 2015 10:35:03 -0400 Received: from g1t5425.austin.hp.com (g1t5425.austin.hp.com [15.216.225.55]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by g9t1613g.houston.hp.com (Postfix) with ESMTPS id 341B9631F0 for ; Thu, 23 Apr 2015 14:35:03 +0000 (UTC) Received: from g5t1633.atlanta.hp.com (g5t1633.atlanta.hp.com [16.201.144.132]) by g1t5425.austin.hp.com (Postfix) with ESMTP id 4E930104; Thu, 23 Apr 2015 14:35:01 +0000 (UTC) Received: from [127.0.1.1] (brunhilda.americas.hpqcorp.net [16.100.201.25]) by g5t1633.atlanta.hp.com (Postfix) with ESMTP id 7593566; Thu, 23 Apr 2015 14:35:01 +0000 (UTC) Subject: [PATCH v5 24/42] hpsa: clean up some error reporting output in abort handler From: Don Brace To: scott.teel@pmcs.com, Kevin.Barnett@pmcs.com, james.bottomley@parallels.com, hch@infradead.org, Justin.Lindley@pmcs.com, brace@pmcs.com Cc: linux-scsi@vger.kernel.org Date: Thu, 23 Apr 2015 09:33:54 -0500 Message-ID: <20150423143354.18832.78447.stgit@brunhilda> In-Reply-To: <20150423141637.18832.35621.stgit@brunhilda> References: <20150423141637.18832.35621.stgit@brunhilda> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Robert Elliott report more useful information on aborts Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Reviewed-by: Tomas Henzl Reviewed-by: Hannes Reinecke Signed-off-by: Robert Elliott Signed-off-by: Don Brace --- drivers/scsi/hpsa.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index df2c825..224fc48 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -5102,10 +5102,10 @@ static int hpsa_eh_abort_handler(struct scsi_cmnd *sc) return FAILED; memset(msg, 0, sizeof(msg)); - ml += sprintf(msg+ml, "scsi %d:%d:%d:%llu %s", + ml += sprintf(msg+ml, "scsi %d:%d:%d:%llu %s %p", h->scsi_host->host_no, sc->device->channel, sc->device->id, sc->device->lun, - "Aborting command"); + "Aborting command", sc); /* Get SCSI command to be aborted */ abort = (struct CommandList *) sc->host_scribble; @@ -5131,10 +5131,13 @@ static int hpsa_eh_abort_handler(struct scsi_cmnd *sc) ml += sprintf(msg+ml, "Tag:0x%08x:%08x ", tagupper, taglower); as = abort->scsi_cmd; if (as != NULL) - ml += sprintf(msg+ml, "Command:0x%x SN:0x%lx ", - as->cmnd[0], as->serial_number); - dev_dbg(&h->pdev->dev, "%s\n", msg); + ml += sprintf(msg+ml, + "CDBLen: %d CDB: 0x%02x%02x... SN: 0x%lx ", + as->cmd_len, as->cmnd[0], as->cmnd[1], + as->serial_number); + dev_warn(&h->pdev->dev, "%s BEING SENT\n", msg); hpsa_show_dev_msg(KERN_WARNING, h, dev, "Aborting command"); + /* * Command is in flight, or possibly already completed * by the firmware (but not to the scsi mid layer) but we can't @@ -5142,7 +5145,8 @@ static int hpsa_eh_abort_handler(struct scsi_cmnd *sc) */ if (wait_for_available_abort_cmd(h)) { dev_warn(&h->pdev->dev, - "Timed out waiting for an abort command to become available.\n"); + "%s FAILED, timeout waiting for an abort command to become available.\n", + msg); cmd_free(h, abort); return FAILED; } @@ -5150,14 +5154,16 @@ static int hpsa_eh_abort_handler(struct scsi_cmnd *sc) atomic_inc(&h->abort_cmds_available); wake_up_all(&h->abort_cmd_wait_queue); if (rc != 0) { + dev_warn(&h->pdev->dev, "%s SENT, FAILED\n", msg); hpsa_show_dev_msg(KERN_WARNING, h, dev, - "FAILED to abort command"); + "FAILED to abort command"); cmd_free(h, abort); return FAILED; } - dev_info(&h->pdev->dev, "%s REQUEST SUCCEEDED.\n", msg); + dev_info(&h->pdev->dev, "%s SENT, SUCCESS\n", msg); - /* If the abort(s) above completed and actually aborted the + /* + * If the abort(s) above completed and actually aborted the * command, then the command to be aborted should already be * completed. If not, wait around a bit more to see if they * manage to complete normally.