#include <linux/ctype.h>
#include <rdma/ib_sysfs.h>
#include "hfi.h"
#include "mad.h"
#include "trace.h"
static struct hfi1_pportdata *hfi1_get_pportdata_kobj(struct kobject *kobj)
{ … }
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_cc_bin_attributes[] = …;
static ssize_t cc_prescan_show(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, char *buf)
{ … }
static ssize_t cc_prescan_store(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, const char *buf,
size_t count)
{ … }
static IB_PORT_ATTR_ADMIN_RW(cc_prescan);
static struct attribute *port_cc_attributes[] = …;
static const struct attribute_group port_cc_group = …;
struct hfi1_sc2vl_attr { … };
static ssize_t sc2vl_attr_show(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, char *buf)
{ … }
#define HFI1_SC2VL_ATTR(N) …
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
HFI1_SC2VL_ATTR(…);
static struct attribute *port_sc2vl_attributes[] = …;
static const struct attribute_group port_sc2vl_group = …;
struct hfi1_sl2sc_attr { … };
static ssize_t sl2sc_attr_show(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, char *buf)
{ … }
#define HFI1_SL2SC_ATTR(N) …
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
HFI1_SL2SC_ATTR(…);
static struct attribute *port_sl2sc_attributes[] = …;
static const struct attribute_group port_sl2sc_group = …;
struct hfi1_vl2mtu_attr { … };
static ssize_t vl2mtu_attr_show(struct ib_device *ibdev, u32 port_num,
struct ib_port_attribute *attr, char *buf)
{ … }
#define HFI1_VL2MTU_ATTR(N) …
HFI1_VL2MTU_ATTR(…);
HFI1_VL2MTU_ATTR(…);
HFI1_VL2MTU_ATTR(…);
HFI1_VL2MTU_ATTR(…);
HFI1_VL2MTU_ATTR(…);
HFI1_VL2MTU_ATTR(…);
HFI1_VL2MTU_ATTR(…);
HFI1_VL2MTU_ATTR(…);
HFI1_VL2MTU_ATTR(…);
HFI1_VL2MTU_ATTR(…);
HFI1_VL2MTU_ATTR(…);
HFI1_VL2MTU_ATTR(…);
HFI1_VL2MTU_ATTR(…);
HFI1_VL2MTU_ATTR(…);
HFI1_VL2MTU_ATTR(…);
HFI1_VL2MTU_ATTR(…);
static struct attribute *port_vl2mtu_attributes[] = …;
static const struct attribute_group port_vl2mtu_group = …;
static ssize_t hw_rev_show(struct device *device, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(hw_rev);
static ssize_t board_id_show(struct device *device,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(board_id);
static ssize_t boardversion_show(struct device *device,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(boardversion);
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);
#define temp_d(t) …
#define temp_f(t) …
static ssize_t tempsense_show(struct device *device,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(tempsense);
static struct attribute *hfi1_attributes[] = …;
const struct attribute_group ib_hfi1_attr_group = …;
const struct attribute_group *hfi1_attr_port_groups[] = …;
struct sde_attribute { … };
static ssize_t sde_show(struct kobject *kobj, struct attribute *attr, char *buf)
{ … }
static ssize_t sde_store(struct kobject *kobj, struct attribute *attr,
const char *buf, size_t count)
{ … }
static const struct sysfs_ops sde_sysfs_ops = …;
static struct kobj_type sde_ktype = …;
#define SDE_ATTR(_name, _mode, _show, _store) …
static ssize_t sde_show_cpu_to_sde_map(struct sdma_engine *sde, char *buf)
{ … }
static ssize_t sde_store_cpu_to_sde_map(struct sdma_engine *sde,
const char *buf, size_t count)
{ … }
static ssize_t sde_show_vl(struct sdma_engine *sde, char *buf)
{ … }
static SDE_ATTR(cpu_list, S_IWUSR | S_IRUGO,
sde_show_cpu_to_sde_map,
sde_store_cpu_to_sde_map);
static SDE_ATTR(vl, S_IRUGO, sde_show_vl, NULL);
static struct sde_attribute *sde_attribs[] = …;
int hfi1_verbs_register_sysfs(struct hfi1_devdata *dd)
{ … }
void hfi1_verbs_unregister_sysfs(struct hfi1_devdata *dd)
{ … }