[SCSI] Merge tag 'fcoe-02-19-13' into for-linus

FCoE Updates for 3.9

Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
James Bottomley
2013-03-01 09:09:51 +00:00
19 changed files with 821 additions and 297 deletions

View File

@ -1,4 +0,0 @@
header-y += fc_els.h
header-y += fc_fs.h
header-y += fc_gs.h
header-y += fc_ns.h

View File

@ -34,7 +34,8 @@ struct fcoe_sysfs_function_template {
void (*get_fcoe_ctlr_symb_err)(struct fcoe_ctlr_device *);
void (*get_fcoe_ctlr_err_block)(struct fcoe_ctlr_device *);
void (*get_fcoe_ctlr_fcs_error)(struct fcoe_ctlr_device *);
void (*get_fcoe_ctlr_mode)(struct fcoe_ctlr_device *);
void (*set_fcoe_ctlr_mode)(struct fcoe_ctlr_device *);
int (*set_fcoe_ctlr_enabled)(struct fcoe_ctlr_device *);
void (*get_fcoe_fcf_selected)(struct fcoe_fcf_device *);
void (*get_fcoe_fcf_vlan_id)(struct fcoe_fcf_device *);
};
@ -48,6 +49,12 @@ enum fip_conn_type {
FIP_CONN_TYPE_VN2VN,
};
enum ctlr_enabled_state {
FCOE_CTLR_ENABLED,
FCOE_CTLR_DISABLED,
FCOE_CTLR_UNUSED,
};
struct fcoe_ctlr_device {
u32 id;
@ -64,6 +71,8 @@ struct fcoe_ctlr_device {
int fcf_dev_loss_tmo;
enum fip_conn_type mode;
enum ctlr_enabled_state enabled;
/* expected in host order for displaying */
struct fcoe_fc_els_lesb lesb;
};

View File

@ -260,6 +260,9 @@ void __fcoe_get_lesb(struct fc_lport *lport, struct fc_els_lesb *fc_lesb,
struct net_device *netdev);
void fcoe_wwn_to_str(u64 wwn, char *buf, int len);
int fcoe_validate_vport_create(struct fc_vport *vport);
int fcoe_link_speed_update(struct fc_lport *);
void fcoe_get_lesb(struct fc_lport *, struct fc_els_lesb *);
void fcoe_ctlr_get_lesb(struct fcoe_ctlr_device *ctlr_dev);
/**
* is_fip_mode() - returns true if FIP mode selected.
@ -289,8 +292,11 @@ static inline bool is_fip_mode(struct fcoe_ctlr *fip)
* @attached: whether this transport is already attached
* @list: list linkage to all attached transports
* @match: handler to allow the transport driver to match up a given netdev
* @alloc: handler to allocate per-instance FCoE structures
* (no discovery or login)
* @create: handler to sysfs entry of create for FCoE instances
* @destroy: handler to sysfs entry of destroy for FCoE instances
* @destroy: handler to delete per-instance FCoE structures
* (frees all memory)
* @enable: handler to sysfs entry of enable for FCoE instances
* @disable: handler to sysfs entry of disable for FCoE instances
*/
@ -299,6 +305,7 @@ struct fcoe_transport {
bool attached;
struct list_head list;
bool (*match) (struct net_device *device);
int (*alloc) (struct net_device *device);
int (*create) (struct net_device *device, enum fip_state fip_mode);
int (*destroy) (struct net_device *device);
int (*enable) (struct net_device *device);
@ -347,7 +354,20 @@ struct fcoe_port {
struct timer_list timer;
struct work_struct destroy_work;
u8 data_src_addr[ETH_ALEN];
struct net_device * (*get_netdev)(const struct fc_lport *lport);
};
/**
* fcoe_get_netdev() - Return the net device associated with a local port
* @lport: The local port to get the net device from
*/
static inline struct net_device *fcoe_get_netdev(const struct fc_lport *lport)
{
struct fcoe_port *port = ((struct fcoe_port *)lport_priv(lport));
return (port->get_netdev) ? port->get_netdev(lport) : NULL;
}
void fcoe_clean_pending_queue(struct fc_lport *);
void fcoe_check_wait_queue(struct fc_lport *lport, struct sk_buff *skb);
void fcoe_queue_timer(ulong lport);
@ -356,7 +376,7 @@ int fcoe_get_paged_crc_eof(struct sk_buff *skb, int tlen,
/* FCoE Sysfs helpers */
void fcoe_fcf_get_selected(struct fcoe_fcf_device *);
void fcoe_ctlr_get_fip_mode(struct fcoe_ctlr_device *);
void fcoe_ctlr_set_fip_mode(struct fcoe_ctlr_device *);
/**
* struct netdev_list
@ -372,4 +392,12 @@ struct fcoe_netdev_mapping {
int fcoe_transport_attach(struct fcoe_transport *ft);
int fcoe_transport_detach(struct fcoe_transport *ft);
/* sysfs store handler for ctrl_control interface */
ssize_t fcoe_ctlr_create_store(struct bus_type *bus,
const char *buf, size_t count);
ssize_t fcoe_ctlr_destroy_store(struct bus_type *bus,
const char *buf, size_t count);
#endif /* _LIBFCOE_H */

View File

@ -1 +1,5 @@
# UAPI Header export list
header-y += fc_els.h
header-y += fc_fs.h
header-y += fc_gs.h
header-y += fc_ns.h