diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/iseries_veth.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c index 74ee937c4606..231b2d2d3264 100644 --- a/drivers/net/iseries_veth.c +++ b/drivers/net/iseries_veth.c | |||
@@ -143,7 +143,6 @@ struct veth_lpar_connection { | |||
143 | struct VethCapData remote_caps; | 143 | struct VethCapData remote_caps; |
144 | u32 ack_timeout; | 144 | u32 ack_timeout; |
145 | 145 | ||
146 | spinlock_t msg_stack_lock; | ||
147 | struct veth_msg *msg_stack_head; | 146 | struct veth_msg *msg_stack_head; |
148 | }; | 147 | }; |
149 | 148 | ||
@@ -190,27 +189,23 @@ static void veth_timed_ack(unsigned long connectionPtr); | |||
190 | #define veth_debug(fmt, args...) do {} while (0) | 189 | #define veth_debug(fmt, args...) do {} while (0) |
191 | #endif | 190 | #endif |
192 | 191 | ||
192 | /* You must hold the connection's lock when you call this function. */ | ||
193 | static inline void veth_stack_push(struct veth_lpar_connection *cnx, | 193 | static inline void veth_stack_push(struct veth_lpar_connection *cnx, |
194 | struct veth_msg *msg) | 194 | struct veth_msg *msg) |
195 | { | 195 | { |
196 | unsigned long flags; | ||
197 | |||
198 | spin_lock_irqsave(&cnx->msg_stack_lock, flags); | ||
199 | msg->next = cnx->msg_stack_head; | 196 | msg->next = cnx->msg_stack_head; |
200 | cnx->msg_stack_head = msg; | 197 | cnx->msg_stack_head = msg; |
201 | spin_unlock_irqrestore(&cnx->msg_stack_lock, flags); | ||
202 | } | 198 | } |
203 | 199 | ||
200 | /* You must hold the connection's lock when you call this function. */ | ||
204 | static inline struct veth_msg *veth_stack_pop(struct veth_lpar_connection *cnx) | 201 | static inline struct veth_msg *veth_stack_pop(struct veth_lpar_connection *cnx) |
205 | { | 202 | { |
206 | unsigned long flags; | ||
207 | struct veth_msg *msg; | 203 | struct veth_msg *msg; |
208 | 204 | ||
209 | spin_lock_irqsave(&cnx->msg_stack_lock, flags); | ||
210 | msg = cnx->msg_stack_head; | 205 | msg = cnx->msg_stack_head; |
211 | if (msg) | 206 | if (msg) |
212 | cnx->msg_stack_head = cnx->msg_stack_head->next; | 207 | cnx->msg_stack_head = cnx->msg_stack_head->next; |
213 | spin_unlock_irqrestore(&cnx->msg_stack_lock, flags); | 208 | |
214 | return msg; | 209 | return msg; |
215 | } | 210 | } |
216 | 211 | ||
@@ -645,7 +640,6 @@ static int veth_init_connection(u8 rlp) | |||
645 | 640 | ||
646 | cnx->msgs = msgs; | 641 | cnx->msgs = msgs; |
647 | memset(msgs, 0, VETH_NUMBUFFERS * sizeof(struct veth_msg)); | 642 | memset(msgs, 0, VETH_NUMBUFFERS * sizeof(struct veth_msg)); |
648 | spin_lock_init(&cnx->msg_stack_lock); | ||
649 | 643 | ||
650 | for (i = 0; i < VETH_NUMBUFFERS; i++) { | 644 | for (i = 0; i < VETH_NUMBUFFERS; i++) { |
651 | msgs[i].token = i; | 645 | msgs[i].token = i; |