diff options
author | James Bottomley <JBottomley@Parallels.com> | 2013-03-01 04:09:51 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-03-01 04:10:08 -0500 |
commit | 3e34c1fc2b51f117045e4a2472572f14ac91df6e (patch) | |
tree | 12c7c79931e657483f965bc944861bc8a6a9694d /include | |
parent | c157750a901d767ecb95f1dbabd0972dee396b1e (diff) | |
parent | 1f953b0dbc2549318afcc0a70af5542dffbce34a (diff) |
[SCSI] Merge tag 'fcoe-02-19-13' into for-linus
FCoE Updates for 3.9
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/fc/Kbuild | 4 | ||||
-rw-r--r-- | include/scsi/fcoe_sysfs.h | 11 | ||||
-rw-r--r-- | include/scsi/libfcoe.h | 32 | ||||
-rw-r--r-- | include/uapi/scsi/fc/Kbuild | 4 | ||||
-rw-r--r-- | include/uapi/scsi/fc/fc_els.h (renamed from include/scsi/fc/fc_els.h) | 0 | ||||
-rw-r--r-- | include/uapi/scsi/fc/fc_fs.h (renamed from include/scsi/fc/fc_fs.h) | 0 | ||||
-rw-r--r-- | include/uapi/scsi/fc/fc_gs.h (renamed from include/scsi/fc/fc_gs.h) | 0 | ||||
-rw-r--r-- | include/uapi/scsi/fc/fc_ns.h (renamed from include/scsi/fc/fc_ns.h) | 0 |
8 files changed, 44 insertions, 7 deletions
diff --git a/include/scsi/fc/Kbuild b/include/scsi/fc/Kbuild index 56603813c6cd..e69de29bb2d1 100644 --- a/include/scsi/fc/Kbuild +++ b/include/scsi/fc/Kbuild | |||
@@ -1,4 +0,0 @@ | |||
1 | header-y += fc_els.h | ||
2 | header-y += fc_fs.h | ||
3 | header-y += fc_gs.h | ||
4 | header-y += fc_ns.h | ||
diff --git a/include/scsi/fcoe_sysfs.h b/include/scsi/fcoe_sysfs.h index 604cb9bb3e76..7e2314870341 100644 --- a/include/scsi/fcoe_sysfs.h +++ b/include/scsi/fcoe_sysfs.h | |||
@@ -34,7 +34,8 @@ struct fcoe_sysfs_function_template { | |||
34 | void (*get_fcoe_ctlr_symb_err)(struct fcoe_ctlr_device *); | 34 | void (*get_fcoe_ctlr_symb_err)(struct fcoe_ctlr_device *); |
35 | void (*get_fcoe_ctlr_err_block)(struct fcoe_ctlr_device *); | 35 | void (*get_fcoe_ctlr_err_block)(struct fcoe_ctlr_device *); |
36 | void (*get_fcoe_ctlr_fcs_error)(struct fcoe_ctlr_device *); | 36 | void (*get_fcoe_ctlr_fcs_error)(struct fcoe_ctlr_device *); |
37 | void (*get_fcoe_ctlr_mode)(struct fcoe_ctlr_device *); | 37 | void (*set_fcoe_ctlr_mode)(struct fcoe_ctlr_device *); |
38 | int (*set_fcoe_ctlr_enabled)(struct fcoe_ctlr_device *); | ||
38 | void (*get_fcoe_fcf_selected)(struct fcoe_fcf_device *); | 39 | void (*get_fcoe_fcf_selected)(struct fcoe_fcf_device *); |
39 | void (*get_fcoe_fcf_vlan_id)(struct fcoe_fcf_device *); | 40 | void (*get_fcoe_fcf_vlan_id)(struct fcoe_fcf_device *); |
40 | }; | 41 | }; |
@@ -48,6 +49,12 @@ enum fip_conn_type { | |||
48 | FIP_CONN_TYPE_VN2VN, | 49 | FIP_CONN_TYPE_VN2VN, |
49 | }; | 50 | }; |
50 | 51 | ||
52 | enum ctlr_enabled_state { | ||
53 | FCOE_CTLR_ENABLED, | ||
54 | FCOE_CTLR_DISABLED, | ||
55 | FCOE_CTLR_UNUSED, | ||
56 | }; | ||
57 | |||
51 | struct fcoe_ctlr_device { | 58 | struct fcoe_ctlr_device { |
52 | u32 id; | 59 | u32 id; |
53 | 60 | ||
@@ -64,6 +71,8 @@ struct fcoe_ctlr_device { | |||
64 | int fcf_dev_loss_tmo; | 71 | int fcf_dev_loss_tmo; |
65 | enum fip_conn_type mode; | 72 | enum fip_conn_type mode; |
66 | 73 | ||
74 | enum ctlr_enabled_state enabled; | ||
75 | |||
67 | /* expected in host order for displaying */ | 76 | /* expected in host order for displaying */ |
68 | struct fcoe_fc_els_lesb lesb; | 77 | struct fcoe_fc_els_lesb lesb; |
69 | }; | 78 | }; |
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); |
261 | void fcoe_wwn_to_str(u64 wwn, char *buf, int len); | 261 | void fcoe_wwn_to_str(u64 wwn, char *buf, int len); |
262 | int fcoe_validate_vport_create(struct fc_vport *vport); | 262 | int fcoe_validate_vport_create(struct fc_vport *vport); |
263 | int fcoe_link_speed_update(struct fc_lport *); | ||
264 | void fcoe_get_lesb(struct fc_lport *, struct fc_els_lesb *); | ||
265 | void 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 | */ | ||
364 | static 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 | |||
351 | void fcoe_clean_pending_queue(struct fc_lport *); | 371 | void fcoe_clean_pending_queue(struct fc_lport *); |
352 | void fcoe_check_wait_queue(struct fc_lport *lport, struct sk_buff *skb); | 372 | void fcoe_check_wait_queue(struct fc_lport *lport, struct sk_buff *skb); |
353 | void fcoe_queue_timer(ulong lport); | 373 | void 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 */ |
358 | void fcoe_fcf_get_selected(struct fcoe_fcf_device *); | 378 | void fcoe_fcf_get_selected(struct fcoe_fcf_device *); |
359 | void fcoe_ctlr_get_fip_mode(struct fcoe_ctlr_device *); | 379 | void 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 { | |||
372 | int fcoe_transport_attach(struct fcoe_transport *ft); | 392 | int fcoe_transport_attach(struct fcoe_transport *ft); |
373 | int fcoe_transport_detach(struct fcoe_transport *ft); | 393 | int fcoe_transport_detach(struct fcoe_transport *ft); |
374 | 394 | ||
395 | /* sysfs store handler for ctrl_control interface */ | ||
396 | ssize_t fcoe_ctlr_create_store(struct bus_type *bus, | ||
397 | const char *buf, size_t count); | ||
398 | ssize_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 | |||
diff --git a/include/uapi/scsi/fc/Kbuild b/include/uapi/scsi/fc/Kbuild index aafaa5aa54d4..5ead9fac265c 100644 --- a/include/uapi/scsi/fc/Kbuild +++ b/include/uapi/scsi/fc/Kbuild | |||
@@ -1 +1,5 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | header-y += fc_els.h | ||
3 | header-y += fc_fs.h | ||
4 | header-y += fc_gs.h | ||
5 | header-y += fc_ns.h | ||
diff --git a/include/scsi/fc/fc_els.h b/include/uapi/scsi/fc/fc_els.h index 481abbd48e39..481abbd48e39 100644 --- a/include/scsi/fc/fc_els.h +++ b/include/uapi/scsi/fc/fc_els.h | |||
diff --git a/include/scsi/fc/fc_fs.h b/include/uapi/scsi/fc/fc_fs.h index 50f28b143451..50f28b143451 100644 --- a/include/scsi/fc/fc_fs.h +++ b/include/uapi/scsi/fc/fc_fs.h | |||
diff --git a/include/scsi/fc/fc_gs.h b/include/uapi/scsi/fc/fc_gs.h index a37346d47eb1..a37346d47eb1 100644 --- a/include/scsi/fc/fc_gs.h +++ b/include/uapi/scsi/fc/fc_gs.h | |||
diff --git a/include/scsi/fc/fc_ns.h b/include/uapi/scsi/fc/fc_ns.h index f7751d53f1d3..f7751d53f1d3 100644 --- a/include/scsi/fc/fc_ns.h +++ b/include/uapi/scsi/fc/fc_ns.h | |||