forked from Minki/linux
[PATCH] s390: minor s390 network driver fixes
Hi Jeff, this is a RESEND of the nine s390 network driver patches. I finally found that my kmail corrupted almost every patch I sent the last time. Please apply these 9 patches and forget about my first attempt! Sorry for the delay, I had some fights with sendmail, IMAP and mutt configuration. Frank [RESEND PATCH 1/9] s390: minor s390 network driver fixes From: Frank Pavlic <fpavlic@de.ibm.com> - iucv driver: use do { } while (0) constructs instead of empty defines to avoid compile bugs. - ctc driver: missing lock initialization added - lcs driver: BUG_ON usage was removed accidently with the last lcs patch. Put them back in place. Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
71d2872554
commit
4c7ae6ea59
@ -1714,6 +1714,9 @@ add_channel(struct ccw_device *cdev, enum channel_types type)
|
|||||||
kfree(ch);
|
kfree(ch);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spin_lock_init(&ch->collect_lock);
|
||||||
|
|
||||||
fsm_settimer(ch->fsm, &ch->timer);
|
fsm_settimer(ch->fsm, &ch->timer);
|
||||||
skb_queue_head_init(&ch->io_queue);
|
skb_queue_head_init(&ch->io_queue);
|
||||||
skb_queue_head_init(&ch->collect_queue);
|
skb_queue_head_init(&ch->collect_queue);
|
||||||
|
@ -335,8 +335,8 @@ do { \
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define iucv_debug(lvl, fmt, args...)
|
#define iucv_debug(lvl, fmt, args...) do { } while (0)
|
||||||
#define iucv_dumpit(title, buf, len)
|
#define iucv_dumpit(title, buf, len) do { } while (0)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -670,9 +670,8 @@ lcs_ready_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer)
|
|||||||
int index, rc;
|
int index, rc;
|
||||||
|
|
||||||
LCS_DBF_TEXT(5, trace, "rdybuff");
|
LCS_DBF_TEXT(5, trace, "rdybuff");
|
||||||
if (buffer->state != BUF_STATE_LOCKED &&
|
BUG_ON(buffer->state != BUF_STATE_LOCKED &&
|
||||||
buffer->state != BUF_STATE_PROCESSED)
|
buffer->state != BUF_STATE_PROCESSED);
|
||||||
BUG();
|
|
||||||
spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
|
spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
|
||||||
buffer->state = BUF_STATE_READY;
|
buffer->state = BUF_STATE_READY;
|
||||||
index = buffer - channel->iob;
|
index = buffer - channel->iob;
|
||||||
@ -696,8 +695,7 @@ __lcs_processed_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer)
|
|||||||
int index, prev, next;
|
int index, prev, next;
|
||||||
|
|
||||||
LCS_DBF_TEXT(5, trace, "prcsbuff");
|
LCS_DBF_TEXT(5, trace, "prcsbuff");
|
||||||
if (buffer->state != BUF_STATE_READY)
|
BUG_ON(buffer->state != BUF_STATE_READY);
|
||||||
BUG();
|
|
||||||
buffer->state = BUF_STATE_PROCESSED;
|
buffer->state = BUF_STATE_PROCESSED;
|
||||||
index = buffer - channel->iob;
|
index = buffer - channel->iob;
|
||||||
prev = (index - 1) & (LCS_NUM_BUFFS - 1);
|
prev = (index - 1) & (LCS_NUM_BUFFS - 1);
|
||||||
@ -729,9 +727,8 @@ lcs_release_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer)
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
LCS_DBF_TEXT(5, trace, "relbuff");
|
LCS_DBF_TEXT(5, trace, "relbuff");
|
||||||
if (buffer->state != BUF_STATE_LOCKED &&
|
BUG_ON(buffer->state != BUF_STATE_LOCKED &&
|
||||||
buffer->state != BUF_STATE_PROCESSED)
|
buffer->state != BUF_STATE_PROCESSED);
|
||||||
BUG();
|
|
||||||
spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
|
spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
|
||||||
buffer->state = BUF_STATE_EMPTY;
|
buffer->state = BUF_STATE_EMPTY;
|
||||||
spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags);
|
spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags);
|
||||||
|
Loading…
Reference in New Issue
Block a user