From patchwork Fri Jul 29 13:16:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 594453 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 3BCC1C19F29 for ; Fri, 29 Jul 2022 13:04:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236330AbiG2NEp (ORCPT ); Fri, 29 Jul 2022 09:04:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236182AbiG2NEb (ORCPT ); Fri, 29 Jul 2022 09:04:31 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64AF6558D5 for ; Fri, 29 Jul 2022 06:04:20 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id 206so480039pgb.0 for ; Fri, 29 Jul 2022 06:04:20 -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 :mime-version; bh=Z8yfIglZ9mWzoTx5gZoraZf9oaZgIwZUzk4b5dGYNig=; b=gCxPkSWRYdwKbroRaoly3rmNR3vJ9a2YvZkIX3oXWMYDY4uCBHLKwfQfG2X+jxjnEs eTZpNFkBUs1yABCMsnFtb5Ltw4q7fI5k5Spqu7yyRzakd5cihDSMPBxDO7jOSLV4Nm4M aNXMm4TwDt0/dgp5zMGo07XBrScdM4MA5jvaE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=Z8yfIglZ9mWzoTx5gZoraZf9oaZgIwZUzk4b5dGYNig=; b=VHjNyro4kkNXoEesGWfORxNbKWvK7FFIjjDm0+ynOdpxCcR4EVDohcUMsrCpSaFWB9 vr7aFgOEneaKrIPXvcufkjdIk8CQbMUu6sHBRWeD4ASoRCBJqIuaoiBRaNl+PK7l1NUv Kx67hzY8sKFpCU2DMD0uAz3AB6B6nMWTnctnA04KVzab534z48dGd5B9JUXjlGZB1Eyq iQzjJA5Yv3HOq0OEI579ZpnKGwZU9q2NmMa3x+wImsMw53AQ1RqDXS9Wl/9SUMVmYbau Ace97/5nZa/mOlvsETUqDHs8mu8kRuqac5rWnwFLW8pR+MTf4RO7hKu4IzgHgOCy+N7u LKRA== X-Gm-Message-State: AJIora92JhxBatD3vTj8qBf8nU7UALt86ia9Wk6CDjESFZFKeREsuMlq Ks/F2Sn4tkqxtDp7zrEc5JftODj4zPMi6hT8tz5ofGntOvynJOFYGaGWs93lkR/E++pEPgMmGQk Uo1Vy4f+Asu74vSicD3e/FYVv0eeKodwDjjq06TEHTDQQ3md0wuJhhjmJVPNhZUC8cS4aIJM2j6 2Rv80JR+Z4 X-Google-Smtp-Source: AGRyM1uJVfstfWsHVpFjNQhUqXDe33kbTOFMPgOaSmR2UlC/LxU8TJNcOapthq1/ewpdACV3KchpOA== X-Received: by 2002:a65:68d4:0:b0:41b:7702:6361 with SMTP id k20-20020a6568d4000000b0041b77026361mr2973812pgt.299.1659099859167; Fri, 29 Jul 2022 06:04:19 -0700 (PDT) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id d9-20020a170902b70900b0016dd6929af5sm1225816pls.206.2022.07.29.06.04.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 06:04:18 -0700 (PDT) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, Sreekanth Reddy Subject: [PATCH 01/15] mpi3mr: Add config and transport related debug flags Date: Fri, 29 Jul 2022 18:46:13 +0530 Message-Id: <20220729131627.15019-2-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220729131627.15019-1-sreekanth.reddy@broadcom.com> References: <20220729131627.15019-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. 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 */ /**