From owner-svn-src-stable@freebsd.org Sun Aug 14 19:07:15 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33573BBA19C; Sun, 14 Aug 2016 19:07:15 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBBA211CF; Sun, 14 Aug 2016 19:07:14 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7EJ7EDI047987; Sun, 14 Aug 2016 19:07:14 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7EJ7EWX047985; Sun, 14 Aug 2016 19:07:14 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201608141907.u7EJ7EWX047985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 14 Aug 2016 19:07:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r304098 - stable/11/sys/ofed/drivers/infiniband/hw/mthca X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Aug 2016 19:07:15 -0000 Author: markj Date: Sun Aug 14 19:07:13 2016 New Revision: 304098 URL: https://svnweb.freebsd.org/changeset/base/304098 Log: MFC r303786 mthca: Add a wrapper for the firmware's DIAG_RPRT command. Modified: stable/11/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c stable/11/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c Sun Aug 14 19:05:44 2016 (r304097) +++ stable/11/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c Sun Aug 14 19:07:13 2016 (r304098) @@ -1927,6 +1927,13 @@ int mthca_MGID_HASH(struct mthca_dev *de return err; } +int mthca_DIAG_RPRT(struct mthca_dev *dev, int mod, + struct mthca_mailbox *mailbox, u8 *status) +{ + return mthca_cmd_box(dev, 0, mailbox->dma, 0, mod, CMD_DIAG_RPRT, + CMD_TIME_CLASS_A, status); +} + int mthca_NOP(struct mthca_dev *dev, u8 *status) { return mthca_cmd(dev, 0, 0x1f, 0, CMD_NOP, msecs_to_jiffies(100), status); Modified: stable/11/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h Sun Aug 14 19:05:44 2016 (r304097) +++ stable/11/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h Sun Aug 14 19:07:13 2016 (r304098) @@ -112,6 +112,15 @@ enum { DEV_LIM_FLAG_UD_MULTI = 1 << 21, }; +enum { + DIAG_RPRT_Q_XPRT_CIERR = 2, + DIAG_RPRT_QR_XPRT_CIERR = 3, + DIAG_RPRT_Q_PERF = 4, + DIAG_RPRT_QR_PERF = 5, + DIAG_RPRT_Q_MISC = 6, + DIAG_RPRT_QR_MISC = 7, +}; + struct mthca_mailbox { dma_addr_t dma; void *buf; @@ -325,6 +334,8 @@ int mthca_WRITE_MGM(struct mthca_dev *de struct mthca_mailbox *mailbox, u8 *status); int mthca_MGID_HASH(struct mthca_dev *dev, struct mthca_mailbox *mailbox, u16 *hash, u8 *status); +int mthca_DIAG_RPRT(struct mthca_dev *dev, int mod, + struct mthca_mailbox *mailbox, u8 *status); int mthca_NOP(struct mthca_dev *dev, u8 *status); #endif /* MTHCA_CMD_H */