From patchwork Thu Aug 4 13:12:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 595442 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79D44C19F2A for ; Thu, 4 Aug 2022 13:00:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232611AbiHDNAY (ORCPT ); Thu, 4 Aug 2022 09:00:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230092AbiHDNAX (ORCPT ); Thu, 4 Aug 2022 09:00:23 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30E6360EF for ; Thu, 4 Aug 2022 06:00:22 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id w10so19282905plq.0 for ; Thu, 04 Aug 2022 06:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc; bh=vcxUkdyWlyZwNFk5sab4zShn9rXehvCFtuQJGZ9wRp4=; b=C3Vl7ZXTb1eITHr9kNZPwFJiKcKxZ9JEDsalBwJ2fIIg1KiiJseRkg+i/sl/PodSJL 0Jk39myPFuF89Gp1K1urndKyu7hISx//LEI9ov/0GXlKZiGC0IA1bOop85a9Aq34gQlI u/NfttzZVDEGkOjmWqSK1BDKMvdv2sKbZewBY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=vcxUkdyWlyZwNFk5sab4zShn9rXehvCFtuQJGZ9wRp4=; b=2tZMRN+eyRIN2hELZmRtDVsPfEzUgULEUEO1tt8HPvkxw1/bjrhFfxpKi5De55VMzK 14ojMZifariTw2mkbkQEsIiWjBAhQ/5X9D2BjL8RktUS7dWi//qTqd7PUyJr9wPyrijB Rrsh2Jlvvs9mxRJWTFUwxoahoX4JWvWcQBDPF0d+8sdRwQVfu4hOYJcW7xvH0FCYuU8i KcQRIeyfgjww/jmzue7eouO8AfFABxW1xwj4fRFC5oQ+LkZQWHKFzIZm9FCv+Zw0URmg /3wp4QW/QhfW+f2qNuPBd7NCJPxMmzt4OjWS8hkw7iEbw9HGZIKsfYLNN6T72YIldLgY Tt2Q== X-Gm-Message-State: ACgBeo0uz8MDfi6WFzRXS8YbXBkcAlki2mWCOYl26lkcQduB/klr9hf8 8p8DP+MVLhOm8//7zt2bNakAXAasIi8l8E5eq6H2QkdjqKVCA3Je5wNOoalIjoTiAY+jsQ7+N0U cW6eP1JbEC8f6PpPk5CJi7zp105rzO3cvWqPPn5d98icMnGbor1L016EIe4ODKcHVhWvjILIqTK diGdLC0whV X-Google-Smtp-Source: AA6agR7Sy4KHQxE2Zji4B6EH5x2SXRrkvuNGi064vBBC7t0XTMOkLihvHZZRkntYMlzM+WJFHqAoqg== X-Received: by 2002:a17:90a:fe92:b0:1f5:1b0b:1cd7 with SMTP id co18-20020a17090afe9200b001f51b0b1cd7mr1993104pjb.197.1659618020355; Thu, 04 Aug 2022 06:00:20 -0700 (PDT) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id w15-20020aa7954f000000b0052e2a1edab8sm934645pfq.24.2022.08.04.06.00.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Aug 2022 06:00:19 -0700 (PDT) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, Sreekanth Reddy , Himanshu Madhani Subject: [PATCH v2 01/15] mpi3mr: Add config and transport related debug flags Date: Thu, 4 Aug 2022 18:42:12 +0530 Message-Id: <20220804131226.16653-2-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220804131226.16653-1-sreekanth.reddy@broadcom.com> References: <20220804131226.16653-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Add config and transport request related error & info debug flags and functions. Reviewed-by: Himanshu Madhani Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpi3mr/mpi3mr_debug.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/scsi/mpi3mr/mpi3mr_debug.h b/drivers/scsi/mpi3mr/mpi3mr_debug.h index 2464c40..ee6edd8 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_debug.h +++ b/drivers/scsi/mpi3mr/mpi3mr_debug.h @@ -23,9 +23,13 @@ #define MPI3_DEBUG_RESET 0x00000020 #define MPI3_DEBUG_SCSI_ERROR 0x00000040 #define MPI3_DEBUG_REPLY 0x00000080 +#define MPI3_DEBUG_CFG_ERROR 0x00000100 +#define MPI3_DEBUG_TRANSPORT_ERROR 0x00000200 #define MPI3_DEBUG_BSG_ERROR 0x00008000 #define MPI3_DEBUG_BSG_INFO 0x00010000 #define MPI3_DEBUG_SCSI_INFO 0x00020000 +#define MPI3_DEBUG_CFG_INFO 0x00040000 +#define MPI3_DEBUG_TRANSPORT_INFO 0x00080000 #define MPI3_DEBUG 0x01000000 #define MPI3_DEBUG_SG 0x02000000 @@ -122,6 +126,29 @@ pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__); \ } while (0) +#define dprint_cfg_info(ioc, fmt, ...) \ + do { \ + if (ioc->logging_level & MPI3_DEBUG_CFG_INFO) \ + pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__); \ + } while (0) + +#define dprint_cfg_err(ioc, fmt, ...) \ + do { \ + if (ioc->logging_level & MPI3_DEBUG_CFG_ERROR) \ + pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__); \ + } while (0) +#define dprint_transport_info(ioc, fmt, ...) \ + do { \ + if (ioc->logging_level & MPI3_DEBUG_TRANSPORT_INFO) \ + pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__); \ + } while (0) + +#define dprint_transport_err(ioc, fmt, ...) \ + do { \ + if (ioc->logging_level & MPI3_DEBUG_TRANSPORT_ERROR) \ + pr_info("%s: " fmt, (ioc)->name, ##__VA_ARGS__); \ + } while (0) + #endif /* MPT3SAS_DEBUG_H_INCLUDED */ /**