linux/drivers/infiniband/hw/hfi1/opa_compat.h

/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
/*
 * Copyright(c) 2015, 2016 Intel Corporation.
 */

#ifndef _LINUX_H
#define _LINUX_H
/*
 * This header file is for OPA-specific definitions which are
 * required by the HFI driver, and which aren't yet in the Linux
 * IB core. We'll collect these all here, then merge them into
 * the kernel when that's convenient.
 */

/* OPA SMA attribute IDs */
#define OPA_ATTRIB_ID_CONGESTION_INFO
#define OPA_ATTRIB_ID_HFI_CONGESTION_LOG
#define OPA_ATTRIB_ID_HFI_CONGESTION_SETTING
#define OPA_ATTRIB_ID_CONGESTION_CONTROL_TABLE

/* OPA PMA attribute IDs */
#define OPA_PM_ATTRIB_ID_PORT_STATUS
#define OPA_PM_ATTRIB_ID_CLEAR_PORT_STATUS
#define OPA_PM_ATTRIB_ID_DATA_PORT_COUNTERS
#define OPA_PM_ATTRIB_ID_ERROR_PORT_COUNTERS
#define OPA_PM_ATTRIB_ID_ERROR_INFO

/* OPA status codes */
#define OPA_PM_STATUS_REQUEST_TOO_LARGE

static inline u8 port_states_to_logical_state(struct opa_port_states *ps)
{}

static inline u8 port_states_to_phys_state(struct opa_port_states *ps)
{}

/*
 * OPA port physical states
 * IB Volume 1, Table 146 PortInfo/IB Volume 2 Section 5.4.2(1) PortPhysState
 * values are the same in OmniPath Architecture. OPA leverages some of the same
 * concepts as InfiniBand, but has a few other states as well.
 *
 * When writing, only values 0-3 are valid, other values are ignored.
 * When reading, 0 is reserved.
 *
 * Returned by the ibphys_portstate() routine.
 */
enum opa_port_phys_state {};

#endif /* _LINUX_H */