From patchwork Wed Jun 7 21:43:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 9772915 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 637BB60350 for ; Wed, 7 Jun 2017 21:44:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F6032847A for ; Wed, 7 Jun 2017 21:44:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62DA8284F6; Wed, 7 Jun 2017 21:44:11 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 74EC62847A for ; Wed, 7 Jun 2017 21:44:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751764AbdFGVoJ (ORCPT ); Wed, 7 Jun 2017 17:44:09 -0400 Received: from mail-sn1nam01on0070.outbound.protection.outlook.com ([104.47.32.70]:39788 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751515AbdFGVoD (ORCPT ); Wed, 7 Jun 2017 17:44:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=I+Pbnmk6ZAm2eVNeweNAm18Oo2yZAoD21FYJco2dX40=; b=NZ1+7XlyBK1pdOObmhCaGVnpwOwAbn97DG63zBIsAp8b3x9/NwuB6euqWD6H3V0KSMZmEFisjUESbyfkgpaGDFq6Ajef6wzJptOuKgreXXGZwaySVYSZr1jMLOBayc/dBHz8Qx8HZJhxO1B6sHQGcL5G4nenJ+Poa6GrzB2jqjs= Received: from BY2PR07CA0090.namprd07.prod.outlook.com (10.166.107.43) by BLUPR0701MB1571.namprd07.prod.outlook.com (10.163.84.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Wed, 7 Jun 2017 21:44:01 +0000 Received: from BN1AFFO11FD028.protection.gbl (2a01:111:f400:7c10::137) by BY2PR07CA0090.outlook.office365.com (2a01:111:e400:7bff::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12 via Frontend Transport; Wed, 7 Jun 2017 21:44:01 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BN1AFFO11FD028.mail.protection.outlook.com (10.58.52.88) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1101.12 via Frontend Transport; Wed, 7 Jun 2017 21:44:00 +0000 Received: from dut1171.mv.qlogic.com (172.29.51.171) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Wed, 7 Jun 2017 14:43:41 -0700 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id v57Lhf3Y023185; Wed, 7 Jun 2017 14:43:41 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v57LhfX4023184; Wed, 7 Jun 2017 14:43:41 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 10/15] qla2xxx: Add debug logging routine for qpair Date: Wed, 7 Jun 2017 14:43:28 -0700 Message-ID: <20170607214333.23110-11-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170607214333.23110-1-himanshu.madhani@cavium.com> References: <20170607214333.23110-1-himanshu.madhani@cavium.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39410400002)(39450400003)(39400400002)(39850400002)(39840400002)(2980300002)(428002)(189002)(199003)(9170700003)(42186005)(8676002)(5660300001)(33646002)(105586002)(106466001)(356003)(1076002)(6666003)(2906002)(8936002)(2950100002)(81166006)(80596001)(50226002)(189998001)(38730400002)(87636003)(107886003)(4326008)(47776003)(5003940100001)(54906002)(50986999)(50466002)(76176999)(101416001)(86362001)(48376002)(575784001)(36756003)(72206003)(305945005)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1571; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD028; 1:iM8zJ+BN0av00OTMH5LfL3Ckjm7iVe48ET/Ghco8hHCBu2xtvgfhfKVf1FqYlW/KAIQIVdzlb/4CP2eoZNBFgZ4C5bR10k4ovN5GxUVzAOz8e7ue4BDlIhlrweoXgOVTsV7haTWjEZh/odxNaT5Wk0rvpEpZ9cavKWpTnKXvLgCqToUF1gceGGHO1ZL1hlZoI/ggWmy+9s3+L1ukDyPati86SFB3svGJgrpGNgSLCm0oLVee36DPElNH4wNUn1ROe566TrE0+jfRHfqvwKO0dElh3NooSuOV9PL5L6G3vcd+uNAJssfFgFnMtFKh26ayPo+Ishjgv8620R+4vkl21pBWvTcp4SonnZRrVKCKMCC639Im7DmprCfmJGummmZJv2Dl0vbl2VX1NP7vI+uNTEQfxZLoVMlfN7dAAObxVeN+EuJVZc1mW3HfPOV3o/ePcj9svH9Jk1JC8oJpPmBSpv9Nyicy22k+uAFXd5WdL8lZj8a+aiA+fxQsw4dSKjdU X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLUPR0701MB1571: X-MS-Office365-Filtering-Correlation-Id: 94bb10a8-94f7-4e66-b4e3-08d4adee4f3b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:BLUPR0701MB1571; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1571; 3:gr5cyU0OxybTYrVNNq94GLt6Z6FVN54UGzbNCY9cFmyKFe/BnppmuiuTXZ3TWPUAP1OJQ9VO9NEwsJqsDF2FUL0sc5TxoM7OgS14jTz/UzWhn06+ZI5Luk04NNJt6+iXrcErY9KlHI/jXFQlKyezCQwRs3SGSOQaIcRkqw7gOzNY1A1gZNbs/VtevZWLP5Jj5Q0M7qSpqwMofblNPl8uO9+p0VCQl4JT+STxNrF5nkyt5kFIMRmHZx7hhDF+VfKAw9La/o7A9upq/n0XmIuakbQzZZIoff0T9fOv/lBAInFa1fYACOesQGgkdcDXpPzusuyqPrHkXQSEl6+OGzRXzsLXDmKJTaR7nBe9p86KM1IPfK2buouQppn4u9wMmubhS1lQ7tX5YxxWELfuYENHM1aoPjJvUrdhMUh7UGL+Bqnz7DoCLML1ynPP0wSm5yU+qEicKgjsaF+2c1cjQkNGwg== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1571; 25:ux5L5EDBWqBx1Rh7H3zxIia3KOLdOxIkJqIx/CYr+H8/C3qRVSoTsHhLM3GOrOwac943lowy5zLBqV1AaMm6NuWKznpH44QJSCzVnGmA8dRRJu1BQYBF/9Hu5yf7fKO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T7q/gWW3eLMyJzdZxY/SclV4OxnL3ShjeStZ2ARbktI4Q8uX1NLHuWUi7Th6s40BO64xTp5fSJLeec9vJDY8CLGesW1I7d4+uwqDITrq2fHAaz9 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(209352067349851); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR0701MB1571; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR0701MB1571; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1571; 4:TOb4QmlfiS28pAWqhF6h8PZz2aMXDYCYXUqY2JWw?= =?us-ascii?Q?XS/MjwLoAD1h1SswhTrlvpgdXfh2WSEXqTey86d7L7Xgv7niKqZlMku0wK/i?= =?us-ascii?Q?/eOwvOxN/cbAefZ1iVJjrKtCs0TvdHC4ZWefcxZtD5W1x+YY/TpdH4KBsZjh?= =?us-ascii?Q?LypiVqgtCXJBwEadgKUPlj6bb1PXXN38dlKWkN2QMl009ZOJjMOspSxxDCOV?= =?us-ascii?Q?Oh3qTwz4o75ubAD6c4pNbd/gqB6y75tNqQ2QDztelsSoTCORWUNHhhh+61Yk?= =?us-ascii?Q?C6RTp9mPaVpRvuecd5EkLuAD738YnnT05OutQCZT0sv3m/VKS7ZjTxlP265g?= =?us-ascii?Q?Fr2EBUj8L+Cznb7xLf1smRWcmGZsShBmDIoBr+sUGMh3OFCYLxqBpKuSLDDf?= =?us-ascii?Q?2WH1YaM32KtSd9br5J2vp0KmvV7PZPy8ZysFGYn7CbOigKsjMcw9X4LyOQnm?= =?us-ascii?Q?zA0aAZwcToi+c/52ioEL+gFGXFNG3yd8ruxl2HggZX2zWdP744rlqO6XPzVY?= =?us-ascii?Q?1zwiIhn/bBaANTTWMf8fI4W6nbPZ92hJolYP/H7bqFJjK72DcvCNnSGqDjrq?= =?us-ascii?Q?iFqPRyzMM4udCZneD27pnayfd3xhAdSgpM2mwO91JfgRo7xkSNYYm/BqXjkl?= =?us-ascii?Q?EA7hAWuHkcZjMz85NDbSmJRJ+gn/wz9KdKQ4QEoTDjphhFgNp11qNgfP7Q2a?= =?us-ascii?Q?8H382Z9HUPnMm50KZzfxGgu89cuxulYFTErlN66iUbFueOAqL3jKvor/QgSw?= =?us-ascii?Q?DmmNN26TMUJUzIFHJnBYFpqp9DnVMlmzdVX/QAnxIjwu5fFz3tnzd9/EFnmX?= =?us-ascii?Q?w3dm5sUcqvpK9UYDymbLLGEuLKRg6XHG040jq8Voj8IAIAL9A62KJ0Shc3qa?= =?us-ascii?Q?0QZaTFuKzr7c2n2GUtAoSSJE5TvFJaSAW08sFZ9Db5BXyBBOVN9UHzsUeg+S?= =?us-ascii?Q?ryUtVU8HJbkVRvrk95wWMuoX1OBrFb/Cl71tAn/jh2fiBp69Jg4KRaQGL8Q3?= =?us-ascii?Q?628Vk9Q+kUgNCrBouh1Fx9eLtPXlrzfrIi1hvcMgugmvOhKo1alIpLiQ/69H?= =?us-ascii?Q?573go41adM7qUjd2JK3jsBcC+l/urv0RADKuJ3JvdXint0I8uD2edzlLmIPd?= =?us-ascii?Q?mStGdnakswhfcSJ1nUkSAbcOM1uS8uQ6hUg5kCFJn0rBxkO2vOaEYX3r97hh?= =?us-ascii?Q?ZoPEkQjRetxjtlPEkgtLokFwfwA0dOCM/oRstPqBTcz9NCV098BwX8QXeg?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 03319F6FEF X-Microsoft-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8GePHfDkdEw19PXdfhRgUXXiPcN8KpEe+ahEEuGdXiN/GTfjIeQki9IsS3iq1VpE1Ak5q6Bl7ETsJZMyAumJ3BujC1nSffcqEMz3aWoHVWfruwAI0JkOhmAP4tCH6771BncnShhx+freV3XbD08Vlaj16IW9avIGhR0NnLEqZHmf6Xj/b1kQw+I4TGWLiBCKVEitaPOwJJyU47WX8NiC8UkPee0Fv1LGdNRuD3UoUymjel+lJ2OCzXN1a+E75IAMmg4kJYwvYrO7ZAP/gXQHciUFXNBwPg3jt/O4/lk0zpNHABCGwq8CD+mbNw1XT/YXd/RIDzpDMbyEIqRS0mVO5VHH2vSI2YLTprHJKwDF5oNC2gSLuZKAJGR6MYtb3cGXUtzs4C945oTVpVNpfCao1uOonXhrKrL3vUcouIAofX47mLgY/82hhyzvLJXOVzEGA3K6; 24:EKb1NoU8AQu68sIiL4sGdIjOWIfXspB/ayZhhYRNFgMb9lFalE97UmVYKB50Mdni1IHG04Vz9iG/SjAj7afZLG315keJ+Mx1qSLGUa9EJAo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1571; 7:M/UdG0s4JUlxh/XW7zl5j4hIghicyXgNR8i754/9/iHCM1NPFaWfSq/lH+oe+Sk/hrkTnL6T+PKzlE/bwi19LifXQ0ZUVjXbA+stVaIwt1anmLO2B00HfpXK+uvD0XjcYJZCdTHQwQf2hiOWEzdQYTDy/B12jnCQCXP2U+CH3PpbZaEReTGcCnOv6KxwpBa9aQ9U855pIAPtCkIp8I6N/fNfHzfKgwaAnzFy97oJgrB9/NJwlGzN+1VL71ngUlrJl9ArBdCXJbnCxL0I1DMlUD4iFEcvsM0x0FQH5j8auOb1n8rfqT4dhAWh/YcKzRSspxeihDFEnpqcFJhP/MCF1w== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2017 21:44:00.5629 (UTC) X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1571 Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Quinn Tran For target main path io routines that uses qpair, create new logging and debugging routines to use qpair instead of reaching for scsi_qla_host. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_dbg.c | 101 ++++++++++++++++++++++++++++++++++++++ drivers/scsi/qla2xxx/qla_dbg.h | 6 +++ drivers/scsi/qla2xxx/qla_target.c | 28 +++++------ drivers/scsi/qla2xxx/qla_target.h | 1 + 4 files changed, 122 insertions(+), 14 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index 11e097e123bd..c0c90dcc7c7b 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c @@ -2713,3 +2713,104 @@ ql_dump_buffer(uint32_t level, scsi_qla_host_t *vha, int32_t id, buf + cnt, min(16U, size - cnt), false); } } + +/* + * This function is for formatting and logging log messages. + * It is to be used when vha is available. It formats the message + * and logs it to the messages file. All the messages will be logged + * irrespective of value of ql2xextended_error_logging. + * parameters: + * level: The level of the log messages to be printed in the + * messages file. + * vha: Pointer to the scsi_qla_host_t + * id: This is a unique id for the level. It identifies the + * part of the code from where the message originated. + * msg: The message to be displayed. + */ +void +ql_log_qp(uint32_t level, struct qla_qpair *qpair, int32_t id, + const char *fmt, ...) +{ + va_list va; + struct va_format vaf; + char pbuf[128]; + + if (level > ql_errlev) + return; + + if (qpair != NULL) { + const struct pci_dev *pdev = qpair->pdev; + /* : Message */ + snprintf(pbuf, sizeof(pbuf), "%s [%s]-%04x: ", + QL_MSGHDR, dev_name(&(pdev->dev)), id); + } else { + snprintf(pbuf, sizeof(pbuf), "%s [%s]-%04x: : ", + QL_MSGHDR, "0000:00:00.0", id); + } + pbuf[sizeof(pbuf) - 1] = 0; + + va_start(va, fmt); + + vaf.fmt = fmt; + vaf.va = &va; + + switch (level) { + case ql_log_fatal: /* FATAL LOG */ + pr_crit("%s%pV", pbuf, &vaf); + break; + case ql_log_warn: + pr_err("%s%pV", pbuf, &vaf); + break; + case ql_log_info: + pr_warn("%s%pV", pbuf, &vaf); + break; + default: + pr_info("%s%pV", pbuf, &vaf); + break; + } + + va_end(va); +} + +/* + * This function is for formatting and logging debug information. + * It is to be used when vha is available. It formats the message + * and logs it to the messages file. + * parameters: + * level: The level of the debug messages to be printed. + * If ql2xextended_error_logging value is correctly set, + * this message will appear in the messages file. + * vha: Pointer to the scsi_qla_host_t. + * id: This is a unique identifier for the level. It identifies the + * part of the code from where the message originated. + * msg: The message to be displayed. + */ +void +ql_dbg_qp(uint32_t level, struct qla_qpair *qpair, int32_t id, + const char *fmt, ...) +{ + va_list va; + struct va_format vaf; + + if (!ql_mask_match(level)) + return; + + va_start(va, fmt); + + vaf.fmt = fmt; + vaf.va = &va; + + if (qpair != NULL) { + const struct pci_dev *pdev = qpair->pdev; + /* : Message */ + pr_warn("%s [%s]-%04x: %pV", + QL_MSGHDR, dev_name(&(pdev->dev)), id + ql_dbg_offset, + &vaf); + } else { + pr_warn("%s [%s]-%04x: : %pV", + QL_MSGHDR, "0000:00:00.0", id + ql_dbg_offset, &vaf); + } + + va_end(va); + +} diff --git a/drivers/scsi/qla2xxx/qla_dbg.h b/drivers/scsi/qla2xxx/qla_dbg.h index c6bffe929fe7..f60138f66dce 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.h +++ b/drivers/scsi/qla2xxx/qla_dbg.h @@ -313,12 +313,18 @@ void __attribute__((format (printf, 4, 5))) ql_dbg(uint32_t, scsi_qla_host_t *vha, int32_t, const char *fmt, ...); void __attribute__((format (printf, 4, 5))) ql_dbg_pci(uint32_t, struct pci_dev *pdev, int32_t, const char *fmt, ...); +void __attribute__((format (printf, 4, 5))) +ql_dbg_qp(uint32_t, struct qla_qpair *, int32_t, const char *fmt, ...); + void __attribute__((format (printf, 4, 5))) ql_log(uint32_t, scsi_qla_host_t *vha, int32_t, const char *fmt, ...); void __attribute__((format (printf, 4, 5))) ql_log_pci(uint32_t, struct pci_dev *pdev, int32_t, const char *fmt, ...); +void __attribute__((format (printf, 4, 5))) +ql_log_qp(uint32_t, struct qla_qpair *, int32_t, const char *fmt, ...); + /* Debug Levels */ /* The 0x40000000 is the max value any debug level can have * as ql2xextended_error_logging is of type signed int diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index f18a50867119..84be2b48246f 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -2263,7 +2263,7 @@ static int qlt_pci_map_calc_cnt(struct qla_tgt_prm *prm) return 0; out_err: - ql_dbg(ql_dbg_tgt, prm->cmd->vha, 0xe04d, + ql_dbg_qp(ql_dbg_tgt, prm->cmd->qpair, 0xe04d, "qla_target(%d): PCI mapping failed: sg_cnt=%d", 0, prm->cmd->sg_cnt); return -1; @@ -2379,7 +2379,6 @@ static int qlt_24xx_build_ctio_pkt(struct qla_qpair *qpair, struct ctio7_to_24xx *pkt; struct atio_from_isp *atio = &prm->cmd->atio; uint16_t temp; - struct scsi_qla_host *vha = prm->cmd->vha; pkt = (struct ctio7_to_24xx *)qpair->req->ring_ptr; prm->pkt = pkt; @@ -2387,7 +2386,7 @@ static int qlt_24xx_build_ctio_pkt(struct qla_qpair *qpair, pkt->entry_type = CTIO_TYPE7; pkt->entry_count = (uint8_t)prm->req_cnt; - pkt->vp_index = vha->vp_idx; + pkt->vp_index = prm->cmd->vp_idx; h = qlt_make_handle(qpair); if (unlikely(h == QLA_TGT_NULL_HANDLE)) { @@ -2583,6 +2582,7 @@ static int qlt_pre_xmit_response(struct qla_tgt_cmd *cmd, uint32_t *full_req_cnt) { struct se_cmd *se_cmd = &cmd->se_cmd; + struct qla_qpair *qpair = cmd->qpair; prm->cmd = cmd; prm->tgt = cmd->tgt; @@ -2608,7 +2608,7 @@ static int qlt_pre_xmit_response(struct qla_tgt_cmd *cmd, if (se_cmd->se_cmd_flags & SCF_UNDERFLOW_BIT) { prm->residual = se_cmd->residual_count; - ql_dbg(ql_dbg_io + ql_dbg_verbose, cmd->vha, 0x305c, + ql_dbg_qp(ql_dbg_io + ql_dbg_verbose, qpair, 0x305c, "Residual underflow: %d (tag %lld, op %x, bufflen %d, rq_result %x)\n", prm->residual, se_cmd->tag, se_cmd->t_task_cdb ? se_cmd->t_task_cdb[0] : 0, @@ -2616,7 +2616,7 @@ static int qlt_pre_xmit_response(struct qla_tgt_cmd *cmd, prm->rq_result |= SS_RESIDUAL_UNDER; } else if (se_cmd->se_cmd_flags & SCF_OVERFLOW_BIT) { prm->residual = se_cmd->residual_count; - ql_dbg(ql_dbg_io, cmd->vha, 0x305d, + ql_dbg_qp(ql_dbg_io, qpair, 0x305d, "Residual overflow: %d (tag %lld, op %x, bufflen %d, rq_result %x)\n", prm->residual, se_cmd->tag, se_cmd->t_task_cdb ? se_cmd->t_task_cdb[0] : 0, cmd->bufflen, prm->rq_result); @@ -2672,7 +2672,7 @@ static void qlt_24xx_init_ctio_to_isp(struct ctio7_to_24xx *ctio, if (qlt_need_explicit_conf(prm->cmd, 1)) { if ((prm->rq_result & SS_SCSI_STATUS_BYTE) != 0) { - ql_dbg(ql_dbg_tgt, prm->cmd->vha, 0xe017, + ql_dbg_qp(ql_dbg_tgt, prm->cmd->qpair, 0xe017, "Skipping EXPLICIT_CONFORM and " "CTIO7_FLAGS_CONFORM_REQ for FCP READ w/ " "non GOOD status\n"); @@ -2867,9 +2867,9 @@ qlt_build_ctio_crc2_pkt(struct qla_qpair *qpair, struct qla_tgt_prm *prm) prm->pkt = pkt; memset(pkt, 0, sizeof(*pkt)); - ql_dbg(ql_dbg_tgt, vha, 0xe071, + ql_dbg_qp(ql_dbg_tgt, cmd->qpair, 0xe071, "qla_target(%d):%s: se_cmd[%p] CRC2 prot_op[0x%x] cmd prot sg:cnt[%p:%x] lba[%llu]\n", - vha->vp_idx, __func__, se_cmd, se_cmd->prot_op, + cmd->vp_idx, __func__, se_cmd, se_cmd->prot_op, prm->prot_sg, prm->prot_seg_cnt, se_cmd->t_task_lba); if ((se_cmd->prot_op == TARGET_PROT_DIN_INSERT) || @@ -2932,7 +2932,7 @@ qlt_build_ctio_crc2_pkt(struct qla_qpair *qpair, struct qla_tgt_prm *prm) /* Update entry type to indicate Command Type CRC_2 IOCB */ pkt->entry_type = CTIO_CRC2; pkt->entry_count = 1; - pkt->vp_index = vha->vp_idx; + pkt->vp_index = cmd->vp_idx; h = qlt_make_handle(qpair); if (unlikely(h == QLA_TGT_NULL_HANDLE)) { @@ -3080,7 +3080,7 @@ int qlt_xmit_response(struct qla_tgt_cmd *cmd, int xmit_type, return 0; } - ql_dbg(ql_dbg_tgt, cmd->vha, 0xe018, + ql_dbg_qp(ql_dbg_tgt, qpair, 0xe018, "is_send_status=%d, cmd->bufflen=%d, cmd->sg_cnt=%d, cmd->dma_data_direction=%d se_cmd[%p] qp %d\n", (xmit_type & QLA_TGT_XMIT_STATUS) ? 1 : 0, cmd->bufflen, cmd->sg_cnt, cmd->dma_data_direction, @@ -3106,7 +3106,7 @@ int qlt_xmit_response(struct qla_tgt_cmd *cmd, int xmit_type, */ cmd->state = QLA_TGT_STATE_PROCESSED; qlt_abort_cmd_on_host_reset(cmd->vha, cmd); - ql_dbg(ql_dbg_async, vha, 0xe101, + ql_dbg_qp(ql_dbg_async, qpair, 0xe101, "RESET-RSP online/active/old-count/new-count = %d/%d/%d/%d.\n", vha->flags.online, qla2x00_reset_active(vha), cmd->reset_count, qpair->chip_reset); @@ -3164,7 +3164,7 @@ int qlt_xmit_response(struct qla_tgt_cmd *cmd, int xmit_type, (struct ctio7_to_24xx *)qlt_get_req_pkt( qpair->req); - ql_dbg(ql_dbg_tgt, vha, 0x305e, + ql_dbg_qp(ql_dbg_tgt, qpair, 0x305e, "Building additional status packet 0x%p.\n", ctio); @@ -3191,7 +3191,6 @@ int qlt_xmit_response(struct qla_tgt_cmd *cmd, int xmit_type, */ qlt_24xx_init_ctio_to_isp((struct ctio7_to_24xx *)ctio, &prm); - pr_debug("Status CTIO7: %p\n", ctio); } } else qlt_24xx_init_ctio_to_isp(pkt, &prm); @@ -3246,7 +3245,7 @@ int qlt_rdy_to_xfer(struct qla_tgt_cmd *cmd) */ cmd->state = QLA_TGT_STATE_NEED_DATA; qlt_abort_cmd_on_host_reset(cmd->vha, cmd); - ql_dbg(ql_dbg_async, vha, 0xe102, + ql_dbg_qp(ql_dbg_async, qpair, 0xe102, "RESET-XFR online/active/old-count/new-count = %d/%d/%d/%d.\n", vha->flags.online, qla2x00_reset_active(vha), cmd->reset_count, qpair->chip_reset); @@ -4222,6 +4221,7 @@ static struct qla_tgt_cmd *qlt_get_tag(scsi_qla_host_t *vha, (struct scsi_lun *)&atio->u.isp24.fcp_cmnd.lun); qlt_assign_qpair(vha, cmd); cmd->reset_count = vha->hw->base_qpair->chip_reset; + cmd->vp_idx = vha->vp_idx; return cmd; } diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h index 30a389445de4..bb8f73a86b2b 100644 --- a/drivers/scsi/qla2xxx/qla_target.h +++ b/drivers/scsi/qla2xxx/qla_target.h @@ -908,6 +908,7 @@ struct qla_tgt_cmd { u64 unpacked_lun; enum dma_data_direction dma_data_direction; + uint16_t vp_idx; uint16_t loop_id; /* to save extra sess dereferences */ struct qla_tgt *tgt; /* to save extra sess dereferences */ struct scsi_qla_host *vha;