#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/etherdevice.h>
#include <linux/ctype.h>
#include <linux/string.h>
#include <scsi/fcoe_sysfs.h>
#include <scsi/libfcoe.h>
#include "libfcoe.h"
static atomic_t ctlr_num;
static atomic_t fcf_num;
static unsigned int fcoe_fcf_dev_loss_tmo = …;
module_param_named(fcf_dev_loss_tmo, fcoe_fcf_dev_loss_tmo,
uint, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(…) …;
#define fcoe_ctlr_id(x) …
#define fcoe_ctlr_work_q_name(x) …
#define fcoe_ctlr_work_q(x) …
#define fcoe_ctlr_devloss_work_q_name(x) …
#define fcoe_ctlr_devloss_work_q(x) …
#define fcoe_ctlr_mode(x) …
#define fcoe_ctlr_fcf_dev_loss_tmo(x) …
#define fcoe_ctlr_link_fail(x) …
#define fcoe_ctlr_vlink_fail(x) …
#define fcoe_ctlr_miss_fka(x) …
#define fcoe_ctlr_symb_err(x) …
#define fcoe_ctlr_err_block(x) …
#define fcoe_ctlr_fcs_error(x) …
#define fcoe_ctlr_enabled(x) …
#define fcoe_fcf_state(x) …
#define fcoe_fcf_fabric_name(x) …
#define fcoe_fcf_switch_name(x) …
#define fcoe_fcf_fc_map(x) …
#define fcoe_fcf_vfid(x) …
#define fcoe_fcf_mac(x) …
#define fcoe_fcf_priority(x) …
#define fcoe_fcf_fka_period(x) …
#define fcoe_fcf_dev_loss_tmo(x) …
#define fcoe_fcf_selected(x) …
#define fcoe_fcf_vlan_id(x) …
static int fcoe_str_to_dev_loss(const char *buf, unsigned long *val)
{ … }
static int fcoe_fcf_set_dev_loss_tmo(struct fcoe_fcf_device *fcf,
unsigned long val)
{ … }
#define FCOE_DEVICE_ATTR(_prefix, _name, _mode, _show, _store) …
#define fcoe_ctlr_show_function(field, format_string, sz, cast) …
#define fcoe_fcf_show_function(field, format_string, sz, cast) …
#define fcoe_ctlr_private_show_function(field, format_string, sz, cast) …
#define fcoe_fcf_private_show_function(field, format_string, sz, cast) …
#define fcoe_ctlr_private_rd_attr(field, format_string, sz) …
#define fcoe_ctlr_rd_attr(field, format_string, sz) …
#define fcoe_fcf_rd_attr(field, format_string, sz) …
#define fcoe_fcf_private_rd_attr(field, format_string, sz) …
#define fcoe_ctlr_private_rd_attr_cast(field, format_string, sz, cast) …
#define fcoe_fcf_private_rd_attr_cast(field, format_string, sz, cast) …
#define fcoe_enum_name_search(title, table_type, table) …
static const char * const fip_conn_type_names[] = …;
fcoe_enum_name_search(ctlr_mode, fip_conn_type, fip_conn_type_names)
static char *fcf_state_names[] = …;
fcoe_enum_name_search(fcf_state, fcf_state, fcf_state_names)
#define FCOE_FCF_STATE_MAX_NAMELEN …
static ssize_t show_fcf_state(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static FCOE_DEVICE_ATTR(fcf, state, S_IRUGO, show_fcf_state, NULL);
#define FCOE_MAX_MODENAME_LEN …
static ssize_t show_ctlr_mode(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t store_ctlr_mode(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static FCOE_DEVICE_ATTR(ctlr, mode, S_IRUGO | S_IWUSR,
show_ctlr_mode, store_ctlr_mode);
static ssize_t store_ctlr_enabled(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static char *ctlr_enabled_state_names[] = …;
fcoe_enum_name_search(ctlr_enabled_state, ctlr_enabled_state,
ctlr_enabled_state_names)
#define FCOE_CTLR_ENABLED_MAX_NAMELEN …
static ssize_t show_ctlr_enabled_state(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static FCOE_DEVICE_ATTR(ctlr, enabled, S_IRUGO | S_IWUSR,
show_ctlr_enabled_state,
store_ctlr_enabled);
static ssize_t store_ctlr_fip_resp(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t show_ctlr_fip_resp(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static FCOE_DEVICE_ATTR(ctlr, fip_vlan_responder, S_IRUGO | S_IWUSR,
show_ctlr_fip_resp,
store_ctlr_fip_resp);
static ssize_t
fcoe_ctlr_var_store(u32 *var, const char *buf, size_t count)
{ … }
static ssize_t store_ctlr_r_a_tov(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t show_ctlr_r_a_tov(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static FCOE_DEVICE_ATTR(ctlr, r_a_tov, S_IRUGO | S_IWUSR,
show_ctlr_r_a_tov, store_ctlr_r_a_tov);
static ssize_t store_ctlr_e_d_tov(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t show_ctlr_e_d_tov(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static FCOE_DEVICE_ATTR(ctlr, e_d_tov, S_IRUGO | S_IWUSR,
show_ctlr_e_d_tov, store_ctlr_e_d_tov);
static ssize_t
store_private_fcoe_ctlr_fcf_dev_loss_tmo(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
fcoe_ctlr_private_show_function(fcf_dev_loss_tmo, "%d\n", 20, );
static FCOE_DEVICE_ATTR(ctlr, fcf_dev_loss_tmo, S_IRUGO | S_IWUSR,
show_fcoe_ctlr_device_fcf_dev_loss_tmo,
store_private_fcoe_ctlr_fcf_dev_loss_tmo);
fcoe_ctlr_rd_attr(…);
fcoe_ctlr_rd_attr(…);
fcoe_ctlr_rd_attr(…);
fcoe_ctlr_rd_attr(…);
fcoe_ctlr_rd_attr(…);
fcoe_ctlr_rd_attr(…);
fcoe_fcf_private_rd_attr_cast(…);
fcoe_fcf_private_rd_attr_cast(…);
fcoe_fcf_private_rd_attr(…);
fcoe_fcf_private_rd_attr(…);
fcoe_fcf_private_rd_attr(…);
fcoe_fcf_private_rd_attr(…);
fcoe_fcf_private_rd_attr(…);
fcoe_fcf_rd_attr(…);
fcoe_fcf_rd_attr(…);
fcoe_fcf_private_show_function(…)
static ssize_t
store_fcoe_fcf_dev_loss_tmo(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static FCOE_DEVICE_ATTR(fcf, dev_loss_tmo, S_IRUGO | S_IWUSR,
show_fcoe_fcf_device_dev_loss_tmo,
store_fcoe_fcf_dev_loss_tmo);
static struct attribute *fcoe_ctlr_lesb_attrs[] = …;
static struct attribute_group fcoe_ctlr_lesb_attr_group = …;
static struct attribute *fcoe_ctlr_attrs[] = …;
static struct attribute_group fcoe_ctlr_attr_group = …;
static const struct attribute_group *fcoe_ctlr_attr_groups[] = …;
static struct attribute *fcoe_fcf_attrs[] = …;
static struct attribute_group fcoe_fcf_attr_group = …;
static const struct attribute_group *fcoe_fcf_attr_groups[] = …;
static const struct bus_type fcoe_bus_type;
static int fcoe_bus_match(struct device *dev,
const struct device_driver *drv)
{ … }
static void fcoe_ctlr_device_release(struct device *dev)
{ … }
static void fcoe_fcf_device_release(struct device *dev)
{ … }
static const struct device_type fcoe_ctlr_device_type = …;
static const struct device_type fcoe_fcf_device_type = …;
static ssize_t ctlr_create_store(const struct bus_type *bus, const char *buf,
size_t count)
{ … }
static BUS_ATTR_WO(ctlr_create);
static ssize_t ctlr_destroy_store(const struct bus_type *bus, const char *buf,
size_t count)
{ … }
static BUS_ATTR_WO(ctlr_destroy);
static struct attribute *fcoe_bus_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static const struct bus_type fcoe_bus_type = …;
static void fcoe_ctlr_device_flush_work(struct fcoe_ctlr_device *ctlr)
{ … }
static int fcoe_ctlr_device_queue_work(struct fcoe_ctlr_device *ctlr,
struct work_struct *work)
{ … }
static void fcoe_ctlr_device_flush_devloss(struct fcoe_ctlr_device *ctlr)
{ … }
static int fcoe_ctlr_device_queue_devloss_work(struct fcoe_ctlr_device *ctlr,
struct delayed_work *work,
unsigned long delay)
{ … }
static int fcoe_fcf_device_match(struct fcoe_fcf_device *new,
struct fcoe_fcf_device *old)
{ … }
struct fcoe_ctlr_device *fcoe_ctlr_device_add(struct device *parent,
struct fcoe_sysfs_function_template *f,
int priv_size)
{ … }
EXPORT_SYMBOL_GPL(…);
void fcoe_ctlr_device_delete(struct fcoe_ctlr_device *ctlr)
{ … }
EXPORT_SYMBOL_GPL(…);
static void fcoe_fcf_device_final_delete(struct work_struct *work)
{ … }
static void fip_timeout_deleted_fcf(struct work_struct *work)
{ … }
void fcoe_fcf_device_delete(struct fcoe_fcf_device *fcf)
{ … }
EXPORT_SYMBOL_GPL(…);
struct fcoe_fcf_device *fcoe_fcf_device_add(struct fcoe_ctlr_device *ctlr,
struct fcoe_fcf_device *new_fcf)
{ … }
EXPORT_SYMBOL_GPL(…);
int __init fcoe_sysfs_setup(void)
{ … }
void __exit fcoe_sysfs_teardown(void)
{ … }