aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2010-07-20 18:19:47 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 10:05:51 -0400
commitfdb068c6cd6e30d43664f856d3530715a5742713 (patch)
treea500212cc66aee42c7a3659ff0cfecbfb9be6b18 /include/scsi
parentf90377abcab2e305450ee76a0f9042907560c5d8 (diff)
[SCSI] libfcoe: convert FIP to lock with mutex instead of spin lock
It turns out most of the FIP work is now done from worker threads or process context now, so there's no need to use a spin lock. Change to use mutex instead of spin lock and delayed_work instead of a timer. This will make it nicer for the VN_port to VN_port feature that will interact more with the libfc layers requiring that spinlocks not be held. Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libfcoe.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h
index 81aee1c4c2f3..7d18b500f2c1 100644
--- a/include/scsi/libfcoe.h
+++ b/include/scsi/libfcoe.h
@@ -75,14 +75,12 @@ enum fip_state {
75 * @flogi_count: number of FLOGI attempts in AUTO mode. 75 * @flogi_count: number of FLOGI attempts in AUTO mode.
76 * @map_dest: use the FC_MAP mode for destination MAC addresses. 76 * @map_dest: use the FC_MAP mode for destination MAC addresses.
77 * @spma: supports SPMA server-provided MACs mode 77 * @spma: supports SPMA server-provided MACs mode
78 * @send_ctlr_ka: need to send controller keep alive
79 * @send_port_ka: need to send port keep alives
80 * @dest_addr: MAC address of the selected FC forwarder. 78 * @dest_addr: MAC address of the selected FC forwarder.
81 * @ctl_src_addr: the native MAC address of our local port. 79 * @ctl_src_addr: the native MAC address of our local port.
82 * @send: LLD-supplied function to handle sending FIP Ethernet frames 80 * @send: LLD-supplied function to handle sending FIP Ethernet frames
83 * @update_mac: LLD-supplied function to handle changes to MAC addresses. 81 * @update_mac: LLD-supplied function to handle changes to MAC addresses.
84 * @get_src_addr: LLD-supplied function to supply a source MAC address. 82 * @get_src_addr: LLD-supplied function to supply a source MAC address.
85 * @lock: lock protecting this structure. 83 * @ctlr_mutex: lock protecting this structure.
86 * 84 *
87 * This structure is used by all FCoE drivers. It contains information 85 * This structure is used by all FCoE drivers. It contains information
88 * needed by all FCoE low-level drivers (LLDs) as well as internal state 86 * needed by all FCoE low-level drivers (LLDs) as well as internal state
@@ -106,18 +104,15 @@ struct fcoe_ctlr {
106 u16 user_mfs; 104 u16 user_mfs;
107 u16 flogi_oxid; 105 u16 flogi_oxid;
108 u8 flogi_count; 106 u8 flogi_count;
109 u8 reset_req;
110 u8 map_dest; 107 u8 map_dest;
111 u8 spma; 108 u8 spma;
112 u8 send_ctlr_ka;
113 u8 send_port_ka;
114 u8 dest_addr[ETH_ALEN]; 109 u8 dest_addr[ETH_ALEN];
115 u8 ctl_src_addr[ETH_ALEN]; 110 u8 ctl_src_addr[ETH_ALEN];
116 111
117 void (*send)(struct fcoe_ctlr *, struct sk_buff *); 112 void (*send)(struct fcoe_ctlr *, struct sk_buff *);
118 void (*update_mac)(struct fc_lport *, u8 *addr); 113 void (*update_mac)(struct fc_lport *, u8 *addr);
119 u8 * (*get_src_addr)(struct fc_lport *); 114 u8 * (*get_src_addr)(struct fc_lport *);
120 spinlock_t lock; 115 struct mutex ctlr_mutex;
121}; 116};
122 117
123/** 118/**