diff options
author | Frank Pavlic <fpavlic@de.ibm.com> | 2006-09-15 10:25:03 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-17 01:03:06 -0400 |
commit | 4c7ae6ea595aef732d029647d708eaeac7238036 (patch) | |
tree | 8875abb0310f38a82b818e92c5a6deeecf39527b /drivers/s390 | |
parent | 71d28725548be203e8b8f6ad63b1f64fd7f02d4d (diff) |
[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>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/ctcmain.c | 3 | ||||
-rw-r--r-- | drivers/s390/net/iucv.c | 4 | ||||
-rw-r--r-- | drivers/s390/net/lcs.c | 13 |
3 files changed, 10 insertions, 10 deletions
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c index 8a4b58120146..3257c22dd79c 100644 --- a/drivers/s390/net/ctcmain.c +++ b/drivers/s390/net/ctcmain.c | |||
@@ -1714,6 +1714,9 @@ add_channel(struct ccw_device *cdev, enum channel_types type) | |||
1714 | kfree(ch); | 1714 | kfree(ch); |
1715 | return 0; | 1715 | return 0; |
1716 | } | 1716 | } |
1717 | |||
1718 | spin_lock_init(&ch->collect_lock); | ||
1719 | |||
1717 | fsm_settimer(ch->fsm, &ch->timer); | 1720 | fsm_settimer(ch->fsm, &ch->timer); |
1718 | skb_queue_head_init(&ch->io_queue); | 1721 | skb_queue_head_init(&ch->io_queue); |
1719 | skb_queue_head_init(&ch->collect_queue); | 1722 | skb_queue_head_init(&ch->collect_queue); |
diff --git a/drivers/s390/net/iucv.c b/drivers/s390/net/iucv.c index 0e863df4027a..821dde86e240 100644 --- a/drivers/s390/net/iucv.c +++ b/drivers/s390/net/iucv.c | |||
@@ -335,8 +335,8 @@ do { \ | |||
335 | 335 | ||
336 | #else | 336 | #else |
337 | 337 | ||
338 | #define iucv_debug(lvl, fmt, args...) | 338 | #define iucv_debug(lvl, fmt, args...) do { } while (0) |
339 | #define iucv_dumpit(title, buf, len) | 339 | #define iucv_dumpit(title, buf, len) do { } while (0) |
340 | 340 | ||
341 | #endif | 341 | #endif |
342 | 342 | ||
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index 2eded55ae88d..16ac68c27a27 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c | |||
@@ -670,9 +670,8 @@ lcs_ready_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer) | |||
670 | int index, rc; | 670 | int index, rc; |
671 | 671 | ||
672 | LCS_DBF_TEXT(5, trace, "rdybuff"); | 672 | LCS_DBF_TEXT(5, trace, "rdybuff"); |
673 | if (buffer->state != BUF_STATE_LOCKED && | 673 | BUG_ON(buffer->state != BUF_STATE_LOCKED && |
674 | buffer->state != BUF_STATE_PROCESSED) | 674 | buffer->state != BUF_STATE_PROCESSED); |
675 | BUG(); | ||
676 | spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); | 675 | spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); |
677 | buffer->state = BUF_STATE_READY; | 676 | buffer->state = BUF_STATE_READY; |
678 | index = buffer - channel->iob; | 677 | index = buffer - channel->iob; |
@@ -696,8 +695,7 @@ __lcs_processed_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer) | |||
696 | int index, prev, next; | 695 | int index, prev, next; |
697 | 696 | ||
698 | LCS_DBF_TEXT(5, trace, "prcsbuff"); | 697 | LCS_DBF_TEXT(5, trace, "prcsbuff"); |
699 | if (buffer->state != BUF_STATE_READY) | 698 | BUG_ON(buffer->state != BUF_STATE_READY); |
700 | BUG(); | ||
701 | buffer->state = BUF_STATE_PROCESSED; | 699 | buffer->state = BUF_STATE_PROCESSED; |
702 | index = buffer - channel->iob; | 700 | index = buffer - channel->iob; |
703 | prev = (index - 1) & (LCS_NUM_BUFFS - 1); | 701 | prev = (index - 1) & (LCS_NUM_BUFFS - 1); |
@@ -729,9 +727,8 @@ lcs_release_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer) | |||
729 | unsigned long flags; | 727 | unsigned long flags; |
730 | 728 | ||
731 | LCS_DBF_TEXT(5, trace, "relbuff"); | 729 | LCS_DBF_TEXT(5, trace, "relbuff"); |
732 | if (buffer->state != BUF_STATE_LOCKED && | 730 | BUG_ON(buffer->state != BUF_STATE_LOCKED && |
733 | buffer->state != BUF_STATE_PROCESSED) | 731 | buffer->state != BUF_STATE_PROCESSED); |
734 | BUG(); | ||
735 | spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); | 732 | spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); |
736 | buffer->state = BUF_STATE_EMPTY; | 733 | buffer->state = BUF_STATE_EMPTY; |
737 | spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); | 734 | spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); |