#include "mlx4_ib.h"
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/stat.h>
#include <rdma/ib_mad.h>
static ssize_t show_admin_alias_guid(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t store_admin_alias_guid(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t show_port_gid(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t show_phys_port_pkey(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
#define DENTRY_REMOVE(_dentry) …
static int create_sysfs_entry(void *_ctx, struct mlx4_ib_iov_sysfs_attr *_dentry,
char *_name, struct kobject *_kobj,
ssize_t (*show)(struct device *dev,
struct device_attribute *attr,
char *buf),
ssize_t (*store)(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
)
{ … }
int add_sysfs_port_mcg_attr(struct mlx4_ib_dev *device, int port_num,
struct attribute *attr)
{ … }
void del_sysfs_port_mcg_attr(struct mlx4_ib_dev *device, int port_num,
struct attribute *attr)
{ … }
static int add_port_entries(struct mlx4_ib_dev *device, int port_num)
{ … }
static void get_name(struct mlx4_ib_dev *dev, char *name, int i, int max)
{ … }
struct mlx4_port { … };
static void mlx4_port_release(struct kobject *kobj)
{ … }
struct port_attribute { … };
static ssize_t port_attr_show(struct kobject *kobj,
struct attribute *attr, char *buf)
{ … }
static ssize_t port_attr_store(struct kobject *kobj,
struct attribute *attr,
const char *buf, size_t size)
{ … }
static const struct sysfs_ops port_sysfs_ops = …;
static struct kobj_type port_type = …;
struct port_table_attribute { … };
static ssize_t show_port_pkey(struct mlx4_port *p, struct port_attribute *attr,
char *buf)
{ … }
static ssize_t store_port_pkey(struct mlx4_port *p, struct port_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t show_port_gid_idx(struct mlx4_port *p,
struct port_attribute *attr, char *buf)
{ … }
static struct attribute **
alloc_group_attrs(ssize_t (*show)(struct mlx4_port *,
struct port_attribute *, char *buf),
ssize_t (*store)(struct mlx4_port *, struct port_attribute *,
const char *buf, size_t count),
int len)
{ … }
static ssize_t sysfs_show_smi_enabled(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t sysfs_show_enable_smi_admin(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t sysfs_store_enable_smi_admin(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static int add_vf_smi_entries(struct mlx4_port *p)
{ … }
static void remove_vf_smi_entries(struct mlx4_port *p)
{ … }
static int add_port(struct mlx4_ib_dev *dev, int port_num, int slave)
{ … }
static int register_one_pkey_tree(struct mlx4_ib_dev *dev, int slave)
{ … }
static int register_pkey_tree(struct mlx4_ib_dev *device)
{ … }
static void unregister_pkey_tree(struct mlx4_ib_dev *device)
{ … }
int mlx4_ib_device_register_sysfs(struct mlx4_ib_dev *dev)
{ … }
static void unregister_alias_guid_tree(struct mlx4_ib_dev *device)
{ … }
void mlx4_ib_device_unregister_sysfs(struct mlx4_ib_dev *device)
{ … }