Received: by 2002:a9a:4c47:0:b029:116:c383:538 with SMTP id u7csp967418lko; Tue, 13 Jul 2021 14:06:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqy86M33GgR3hWEecL3guII097fjwH/gWsEaT/OGrepfiftOj6qJhlo1MV9k9ns9CEHykU X-Received: by 2002:a05:6e02:c7:: with SMTP id r7mr4309529ilq.52.1626210371235; Tue, 13 Jul 2021 14:06:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626210371; cv=none; d=google.com; s=arc-20160816; b=TPPMST04iNh/kzI1Fy2alBVI/ov3MWIU5luDm7F8Um1IGiwSlQ3pwKcqs7ZGAiAmit 55WR4IT6BtDP0Tb4KiQBp/y4BW26S77HemR1EHaXrmJwHHwxa1+1CcD1H6u/D2g+3Ei3 xAe13p9Pyj1URk89fOmpUC/YUyy7Ccsou+AQ/tduv7CZMwwDQMcNdo0RFE/aWKusJBMn N50tt3TddQlPkywqxXaj8e7czgsh8cnZDAnP+ir5JcIhTnPidx+05kBGKj4KYLW6XtpJ SXTyXhv2uwuT96ObbL47+hjsKr1Hu+wsCHBC1hlayMivIcWwNaFlH9jvRcWgyNQMFQY7 mdew== 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 :ironport-sdr:dkim-signature; bh=rckxYH1ZsnkEkyDIOQO+Vz3OpjT5kRr6RtujCpBxeCw=; b=EZ0WlizlU20USCwYm0oct02ruLRiEt9ZfLGmbffGgSh9MttCxrtjSKJmcjC+qbUSyc rbU7oO09u/GBfQt/Y6FN7JQ1SONjOeDJFf31RU+vINIWC6sOPJCjlogrfYpcQuZmR+lb VMXmXRET2pPWASK7w0Qs73ouNadXS/E5mPCT6Md8fHbObllyHiH/uPICs3YCcbtJ83wc FoLa73DFQGU4+0n0eFbJslRuj5GLj1yd/PjVET4+ilkNesTD9MAZefX4WqGRIUyk1/sP oKWryYXtbvmf+uLJQegH05fG7s4tCPI/J3ozj03wtUEnLNEaKNfeXhRnREQesB4JQbmj tBXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=LADUZM0w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t13si832596ilg.9.2021.07.13.14.05.58; Tue, 13 Jul 2021 14:06:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=LADUZM0w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236197AbhGMVFx (ORCPT + 99 others); Tue, 13 Jul 2021 17:05:53 -0400 Received: from esa.microchip.iphmx.com ([68.232.154.123]:24255 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235536AbhGMVFf (ORCPT ); Tue, 13 Jul 2021 17:05:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1626210165; x=1657746165; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=A12LawP3oulzMcsMcOVjEE4RtDeE3oxjrT+YdNBnJlM=; b=LADUZM0wnjXRMzVwURsfEVbJReyvgmy2leGDl+sLrQfBTa/ltKbP7aJx NeUf9js9WeywV6Zk9R6ZIda9noE1/11MOfHKRyvb34xJjXmemTH4l1GEF ihvYC+lGT9DDx6SFy1cAeLhwRm9GXnbQ3BhACK07QoRfsaUglSqWcG9Nr 9dwxl1Mn26Wwcv9zhMwgyW38D4+2I4XqylPPoIczPwE2z076V5aUB0eTL nDxNsea3m4s+36EUr6w5Bt2boIK/F8t/NZleCPV2tdAnk3jEKQ487Nt3+ 4wWT7Qilo6ywCNH8e73SqyU+h6eoMk4rXgNlqzmAv6nufVwnnu4ELpACz w==; IronPort-SDR: DcXKj7Lq9JsM241q2cq5ZpnN7AUjfhFioe/gs/OfeUnHM121s/OouebGIG1VXf2AZwIpxE7iTH xGYo6COJlupNqTEUUXjzOtKb13cgTHZSK0H/AEw+3ZTjAfrkoPtqsZpg5F1Mb2DVtzculhqXkZ zCspJb1qSObGBnkcLQYlTQexjf6sRLwGMZfaqq69rprDL1VX6SwJwyY8mTTxufCdsp+ZBoF8e0 o2o5vGNpM+ymW0pHTcdXASIipOFUWqfzeZdKUUCIdowylFcYI2Jxsyxqy1cK/gAWc89f6fDR76 61E= X-IronPort-AV: E=Sophos;i="5.84,237,1620716400"; d="scan'208";a="124447486" Received: from f5out.microchip.com (HELO smtp.microsemi.com) ([198.175.253.81]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 13 Jul 2021 14:02:45 -0700 Received: from AUSMBX1.microsemi.net (10.10.76.217) by AVMBX1.microsemi.net (10.10.46.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 13 Jul 2021 14:02:43 -0700 Received: from brunhilda.pdev.net (10.238.32.34) by ausmbx1.microsemi.net (10.10.76.217) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Tue, 13 Jul 2021 14:02:43 -0700 Received: by brunhilda.pdev.net (Postfix, from userid 1467) id 7E37B7034C6; Tue, 13 Jul 2021 16:02:43 -0500 (CDT) From: Don Brace To: , , , CC: , , , , , , , , , , , , , , , Subject: [smartpqi updates V2 PATCH 5/9] smartpqi: add SCSI cmd info for resets Date: Tue, 13 Jul 2021 16:02:39 -0500 Message-ID: <20210713210243.40594-6-don.brace@microchip.com> X-Mailer: git-send-email 2.28.0.rc1.9.ge7ae437ac1 In-Reply-To: <20210713210243.40594-1-don.brace@microchip.com> References: <20210713210243.40594-1-don.brace@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Murthy Bhat Report on SCSI command that has triggered the reset. - Also add check for NULL SCSI commands resulting from issuing sg_reset when there is no outstanding commands. Example: sg_reset -d /dev/sgXY smartpqi 0000:39:00.0: resetting scsi 4:0:1:0 due to cmd 0x12 Reviewed-by: Kevin Barnett Reviewed-by: Mike McGowen Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Murthy Bhat Signed-off-by: Don Brace --- drivers/scsi/smartpqi/smartpqi_init.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 29382b290243..ffc7ca221e27 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -6033,8 +6033,10 @@ static int pqi_eh_device_reset_handler(struct scsi_cmnd *scmd) mutex_lock(&ctrl_info->lun_reset_mutex); dev_err(&ctrl_info->pci_dev->dev, - "resetting scsi %d:%d:%d:%d\n", - shost->host_no, device->bus, device->target, device->lun); + "resetting scsi %d:%d:%d:%d due to cmd 0x%02x\n", + shost->host_no, + device->bus, device->target, device->lun, + scmd->cmd_len > 0 ? scmd->cmnd[0] : 0xff); pqi_check_ctrl_health(ctrl_info); if (pqi_ctrl_offline(ctrl_info)) -- 2.28.0.rc1.9.ge7ae437ac1