diff options
author | markj <markj@FreeBSD.org> | 2016-08-14 19:07:13 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2016-08-14 19:07:13 +0000 |
commit | b2936a4ebf9b21ab7dde3cef02c995a53d353797 (patch) | |
tree | 3edec2e16c37059b6ba8ee1200f0058ea43db447 /sys/ofed/drivers/infiniband | |
parent | 4cbc4c36bafae6a4b24a5d75f26ec33e3cd3d768 (diff) | |
download | FreeBSD-src-b2936a4ebf9b21ab7dde3cef02c995a53d353797.zip FreeBSD-src-b2936a4ebf9b21ab7dde3cef02c995a53d353797.tar.gz |
MFC r303786
mthca: Add a wrapper for the firmware's DIAG_RPRT command.
Diffstat (limited to 'sys/ofed/drivers/infiniband')
-rw-r--r-- | sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c | 7 | ||||
-rw-r--r-- | sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c b/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c index d759750..5c7b9ff 100644 --- a/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c +++ b/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c @@ -1927,6 +1927,13 @@ int mthca_MGID_HASH(struct mthca_dev *dev, struct mthca_mailbox *mailbox, 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); diff --git a/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h b/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h index 6efd326..5dd777c 100644 --- a/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h +++ b/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h @@ -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 *dev, int index, 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 */ |