Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932835AbcDNPmN (ORCPT ); Thu, 14 Apr 2016 11:42:13 -0400 Received: from mga09.intel.com ([134.134.136.24]:6925 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932810AbcDNPmK (ORCPT ); Thu, 14 Apr 2016 11:42:10 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,485,1455004800"; d="scan'208";a="85212141" Subject: [PATCH 5/7] IB/hfi1: Add trace message in user IOCTL handling To: dledford@redhat.com From: Dennis Dalessandro Cc: linux-rdma@vger.kernel.org, Ira Weiny , linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, torvalds@linux-foundation.org Date: Thu, 14 Apr 2016 08:42:05 -0700 Message-ID: <20160414154204.6387.71546.stgit@scvm10.sc.intel.com> In-Reply-To: <20160414153727.6387.96381.stgit@scvm10.sc.intel.com> References: <20160414153727.6387.96381.stgit@scvm10.sc.intel.com> User-Agent: StGit/0.16 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1680 Lines: 45 Add a trace message to HFI1s user IOCTL handling. This allows debugging of which IOCTLs are being handled by the driver. Reviewed-by: Ira Weiny Signed-off-by: Dennis Dalessandro --- drivers/staging/rdma/hfi1/file_ops.c | 2 ++ drivers/staging/rdma/hfi1/trace.c | 1 + drivers/staging/rdma/hfi1/trace.h | 1 + 3 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/staging/rdma/hfi1/file_ops.c b/drivers/staging/rdma/hfi1/file_ops.c index c8c1acd..26f3d8f 100644 --- a/drivers/staging/rdma/hfi1/file_ops.c +++ b/drivers/staging/rdma/hfi1/file_ops.c @@ -193,6 +193,8 @@ static long hfi1_file_ioctl(struct file *fp, unsigned int cmd, if (ret) return ret; + hfi1_cdbg(IOCTL, "IOCTL recv: 0x%x", cmd); + switch (cmd) { case HFI1_IOCTL_ASSIGN_CTXT: uctxt_required = 0; /* assigned user context not required */ diff --git a/drivers/staging/rdma/hfi1/trace.c b/drivers/staging/rdma/hfi1/trace.c index 8b62fef..caddb2a 100644 --- a/drivers/staging/rdma/hfi1/trace.c +++ b/drivers/staging/rdma/hfi1/trace.c @@ -233,3 +233,4 @@ __hfi1_trace_fn(FIRMWARE); __hfi1_trace_fn(RCVCTRL); __hfi1_trace_fn(TID); __hfi1_trace_fn(MMU); +__hfi1_trace_fn(IOCTL); diff --git a/drivers/staging/rdma/hfi1/trace.h b/drivers/staging/rdma/hfi1/trace.h index 963dc94..3cb0391 100644 --- a/drivers/staging/rdma/hfi1/trace.h +++ b/drivers/staging/rdma/hfi1/trace.h @@ -1341,6 +1341,7 @@ __hfi1_trace_def(FIRMWARE); __hfi1_trace_def(RCVCTRL); __hfi1_trace_def(TID); __hfi1_trace_def(MMU); +__hfi1_trace_def(IOCTL); #define hfi1_cdbg(which, fmt, ...) \ __hfi1_trace_##which(__func__, fmt, ##__VA_ARGS__)