#include <linux/ctype.h>
#include <rdma/ib_sysfs.h>
#include "qib.h"
#include "qib_mad.h"
static struct qib_pportdata *qib_get_pportdata_kobj(struct kobject *kobj)
{ … }
static ssize_t hrtbt_enable_show(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, char *buf)
{ … }
static ssize_t hrtbt_enable_store(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr,
const char *buf, size_t count)
{ … }
static IB_PORT_ATTR_RW(hrtbt_enable);
static ssize_t loopback_store(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, const char *buf,
size_t count)
{ … }
static IB_PORT_ATTR_WO(loopback);
static ssize_t led_override_store(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr,
const char *buf, size_t count)
{ … }
static IB_PORT_ATTR_WO(led_override);
static ssize_t status_show(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, char *buf)
{ … }
static IB_PORT_ATTR_RO(status);
static const char * const qib_status_str[] = …;
static ssize_t status_str_show(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, char *buf)
{ … }
static IB_PORT_ATTR_RO(status_str);
static struct attribute *port_linkcontrol_attributes[] = …;
static const struct attribute_group port_linkcontrol_group = …;
static ssize_t cc_table_bin_read(struct file *filp, struct kobject *kobj,
struct bin_attribute *bin_attr, char *buf,
loff_t pos, size_t count)
{ … }
static BIN_ATTR_RO(cc_table_bin, PAGE_SIZE);
static ssize_t cc_setting_bin_read(struct file *filp, struct kobject *kobj,
struct bin_attribute *bin_attr, char *buf,
loff_t pos, size_t count)
{ … }
static BIN_ATTR_RO(cc_setting_bin, PAGE_SIZE);
static struct bin_attribute *port_ccmgta_attributes[] = …;
static umode_t qib_ccmgta_is_bin_visible(struct kobject *kobj,
struct bin_attribute *attr, int n)
{ … }
static const struct attribute_group port_ccmgta_attribute_group = …;
struct qib_sl2vl_attr { … };
static ssize_t sl2vl_attr_show(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, char *buf)
{ … }
#define QIB_SL2VL_ATTR(N) …
QIB_SL2VL_ATTR(…);
QIB_SL2VL_ATTR(…);
QIB_SL2VL_ATTR(…);
QIB_SL2VL_ATTR(…);
QIB_SL2VL_ATTR(…);
QIB_SL2VL_ATTR(…);
QIB_SL2VL_ATTR(…);
QIB_SL2VL_ATTR(…);
QIB_SL2VL_ATTR(…);
QIB_SL2VL_ATTR(…);
QIB_SL2VL_ATTR(…);
QIB_SL2VL_ATTR(…);
QIB_SL2VL_ATTR(…);
QIB_SL2VL_ATTR(…);
QIB_SL2VL_ATTR(…);
QIB_SL2VL_ATTR(…);
static struct attribute *port_sl2vl_attributes[] = …;
static const struct attribute_group port_sl2vl_group = …;
struct qib_diagc_attr { … };
static ssize_t diagc_attr_show(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, char *buf)
{ … }
static ssize_t diagc_attr_store(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, const char *buf,
size_t count)
{ … }
#define QIB_DIAGC_ATTR(N) …
QIB_DIAGC_ATTR(…);
QIB_DIAGC_ATTR(…);
QIB_DIAGC_ATTR(…);
QIB_DIAGC_ATTR(…);
QIB_DIAGC_ATTR(…);
QIB_DIAGC_ATTR(…);
QIB_DIAGC_ATTR(…);
QIB_DIAGC_ATTR(…);
QIB_DIAGC_ATTR(…);
QIB_DIAGC_ATTR(…);
QIB_DIAGC_ATTR(…);
QIB_DIAGC_ATTR(…);
QIB_DIAGC_ATTR(…);
static u64 get_all_cpu_total(u64 __percpu *cntr)
{ … }
static ssize_t qib_store_per_cpu(struct qib_devdata *dd, const char *buf,
size_t count, u64 *zero, u64 cur)
{ … }
static ssize_t rc_acks_show(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, char *buf)
{ … }
static ssize_t rc_acks_store(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, const char *buf,
size_t count)
{ … }
static IB_PORT_ATTR_RW(rc_acks);
static ssize_t rc_qacks_show(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, char *buf)
{ … }
static ssize_t rc_qacks_store(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, const char *buf,
size_t count)
{ … }
static IB_PORT_ATTR_RW(rc_qacks);
static ssize_t rc_delayed_comp_show(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, char *buf)
{ … }
static ssize_t rc_delayed_comp_store(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr,
const char *buf, size_t count)
{ … }
static IB_PORT_ATTR_RW(rc_delayed_comp);
static struct attribute *port_diagc_attributes[] = …;
static const struct attribute_group port_diagc_group = …;
const struct attribute_group *qib_attr_port_groups[] = …;
static ssize_t hw_rev_show(struct device *device, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(hw_rev);
static ssize_t hca_type_show(struct device *device,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(hca_type);
static DEVICE_ATTR(board_id, 0444, hca_type_show, NULL);
static DEVICE_STRING_ATTR_RO(version, 0444, QIB_DRIVER_VERSION);
static ssize_t boardversion_show(struct device *device,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(boardversion);
static ssize_t localbus_info_show(struct device *device,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(localbus_info);
static ssize_t nctxts_show(struct device *device,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(nctxts);
static ssize_t nfreectxts_show(struct device *device,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(nfreectxts);
static ssize_t serial_show(struct device *device, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(serial);
static ssize_t chip_reset_store(struct device *device,
struct device_attribute *attr, const char *buf,
size_t count)
{ … }
static DEVICE_ATTR_WO(chip_reset);
static ssize_t tempsense_show(struct device *device,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(tempsense);
static struct attribute *qib_attributes[] = …;
const struct attribute_group qib_attr_group = …;