aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/libfcoe.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/libfcoe.h')
-rw-r--r--include/scsi/libfcoe.h32
1 files changed, 30 insertions, 2 deletions
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h
index 8742d853a3b8..4427393115ea 100644
--- a/include/scsi/libfcoe.h
+++ b/include/scsi/libfcoe.h
@@ -260,6 +260,9 @@ void __fcoe_get_lesb(struct fc_lport *lport, struct fc_els_lesb *fc_lesb,
260 struct net_device *netdev); 260 struct net_device *netdev);
261void fcoe_wwn_to_str(u64 wwn, char *buf, int len); 261void fcoe_wwn_to_str(u64 wwn, char *buf, int len);
262int fcoe_validate_vport_create(struct fc_vport *vport); 262int fcoe_validate_vport_create(struct fc_vport *vport);
263int fcoe_link_speed_update(struct fc_lport *);
264void fcoe_get_lesb(struct fc_lport *, struct fc_els_lesb *);
265void fcoe_ctlr_get_lesb(struct fcoe_ctlr_device *ctlr_dev);
263 266
264/** 267/**
265 * is_fip_mode() - returns true if FIP mode selected. 268 * is_fip_mode() - returns true if FIP mode selected.
@@ -289,8 +292,11 @@ static inline bool is_fip_mode(struct fcoe_ctlr *fip)
289 * @attached: whether this transport is already attached 292 * @attached: whether this transport is already attached
290 * @list: list linkage to all attached transports 293 * @list: list linkage to all attached transports
291 * @match: handler to allow the transport driver to match up a given netdev 294 * @match: handler to allow the transport driver to match up a given netdev
295 * @alloc: handler to allocate per-instance FCoE structures
296 * (no discovery or login)
292 * @create: handler to sysfs entry of create for FCoE instances 297 * @create: handler to sysfs entry of create for FCoE instances
293 * @destroy: handler to sysfs entry of destroy for FCoE instances 298 * @destroy: handler to delete per-instance FCoE structures
299 * (frees all memory)
294 * @enable: handler to sysfs entry of enable for FCoE instances 300 * @enable: handler to sysfs entry of enable for FCoE instances
295 * @disable: handler to sysfs entry of disable for FCoE instances 301 * @disable: handler to sysfs entry of disable for FCoE instances
296 */ 302 */
@@ -299,6 +305,7 @@ struct fcoe_transport {
299 bool attached; 305 bool attached;
300 struct list_head list; 306 struct list_head list;
301 bool (*match) (struct net_device *device); 307 bool (*match) (struct net_device *device);
308 int (*alloc) (struct net_device *device);
302 int (*create) (struct net_device *device, enum fip_state fip_mode); 309 int (*create) (struct net_device *device, enum fip_state fip_mode);
303 int (*destroy) (struct net_device *device); 310 int (*destroy) (struct net_device *device);
304 int (*enable) (struct net_device *device); 311 int (*enable) (struct net_device *device);
@@ -347,7 +354,20 @@ struct fcoe_port {
347 struct timer_list timer; 354 struct timer_list timer;
348 struct work_struct destroy_work; 355 struct work_struct destroy_work;
349 u8 data_src_addr[ETH_ALEN]; 356 u8 data_src_addr[ETH_ALEN];
357 struct net_device * (*get_netdev)(const struct fc_lport *lport);
350}; 358};
359
360/**
361 * fcoe_get_netdev() - Return the net device associated with a local port
362 * @lport: The local port to get the net device from
363 */
364static inline struct net_device *fcoe_get_netdev(const struct fc_lport *lport)
365{
366 struct fcoe_port *port = ((struct fcoe_port *)lport_priv(lport));
367
368 return (port->get_netdev) ? port->get_netdev(lport) : NULL;
369}
370
351void fcoe_clean_pending_queue(struct fc_lport *); 371void fcoe_clean_pending_queue(struct fc_lport *);
352void fcoe_check_wait_queue(struct fc_lport *lport, struct sk_buff *skb); 372void fcoe_check_wait_queue(struct fc_lport *lport, struct sk_buff *skb);
353void fcoe_queue_timer(ulong lport); 373void fcoe_queue_timer(ulong lport);
@@ -356,7 +376,7 @@ int fcoe_get_paged_crc_eof(struct sk_buff *skb, int tlen,
356 376
357/* FCoE Sysfs helpers */ 377/* FCoE Sysfs helpers */
358void fcoe_fcf_get_selected(struct fcoe_fcf_device *); 378void fcoe_fcf_get_selected(struct fcoe_fcf_device *);
359void fcoe_ctlr_get_fip_mode(struct fcoe_ctlr_device *); 379void fcoe_ctlr_set_fip_mode(struct fcoe_ctlr_device *);
360 380
361/** 381/**
362 * struct netdev_list 382 * struct netdev_list
@@ -372,4 +392,12 @@ struct fcoe_netdev_mapping {
372int fcoe_transport_attach(struct fcoe_transport *ft); 392int fcoe_transport_attach(struct fcoe_transport *ft);
373int fcoe_transport_detach(struct fcoe_transport *ft); 393int fcoe_transport_detach(struct fcoe_transport *ft);
374 394
395/* sysfs store handler for ctrl_control interface */
396ssize_t fcoe_ctlr_create_store(struct bus_type *bus,
397 const char *buf, size_t count);
398ssize_t fcoe_ctlr_destroy_store(struct bus_type *bus,
399 const char *buf, size_t count);
400
375#endif /* _LIBFCOE_H */ 401#endif /* _LIBFCOE_H */
402
403