svn commit: r303786 - head/sys/ofed/drivers/infiniband/hw/mthca
Mark Johnston
markj at FreeBSD.org
Fri Aug 5 21:34:11 UTC 2016
Author: markj
Date: Fri Aug 5 21:34:09 2016
New Revision: 303786
URL: https://svnweb.freebsd.org/changeset/base/303786
Log:
mthca: Add a wrapper for the firmware's DIAG_RPRT command.
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
Modified:
head/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c
head/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h
Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c
==============================================================================
--- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c Fri Aug 5 19:24:52 2016 (r303785)
+++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c Fri Aug 5 21:34:09 2016 (r303786)
@@ -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: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h
==============================================================================
--- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h Fri Aug 5 19:24:52 2016 (r303785)
+++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.h Fri Aug 5 21:34:09 2016 (r303786)
@@ -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 */
More information about the svn-src-head
mailing list