Commit ea584e0c authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Linus Torvalds

[PATCH] s390: network driver

From: Thomas Spatzier <tspat@de.ibm.com>
From: Peter Tiedemann <ptiedem@de.ibm.com>

network driver changes:
 - qeth: return -EINVAL if an skb is too large.
 - qeth: don't call netif_stop_queue after cable pull. Drop the
   packets instead.
 - qeth: fix race between SET_IP and SET_MC kernel thread by removing
   SET_MC thread and let the SET_IP thread do multicast requests as well.
 - qeth: make it compile without CONFIG_VLAN.
 - ctc: avoid compiler warnings.
 - lcs: write package sequence number to skb->cb.
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c5c1e830
/* /*
* $Id: ctcmain.c,v 1.63 2004/07/28 12:27:54 ptiedem Exp $ * $Id: ctcmain.c,v 1.65 2004/10/27 09:12:48 mschwide Exp $
* *
* CTC / ESCON network driver * CTC / ESCON network driver
* *
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *
* RELEASE-TAG: CTC/ESCON network driver $Revision: 1.63 $ * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.65 $
* *
*/ */
...@@ -320,7 +320,7 @@ static void ...@@ -320,7 +320,7 @@ static void
print_banner(void) print_banner(void)
{ {
static int printed = 0; static int printed = 0;
char vbuf[] = "$Revision: 1.63 $"; char vbuf[] = "$Revision: 1.65 $";
char *version = vbuf; char *version = vbuf;
if (printed) if (printed)
...@@ -1224,7 +1224,9 @@ ch_action_setmode(fsm_instance * fi, int event, void *arg) ...@@ -1224,7 +1224,9 @@ ch_action_setmode(fsm_instance * fi, int event, void *arg)
fsm_deltimer(&ch->timer); fsm_deltimer(&ch->timer);
fsm_addtimer(&ch->timer, CTC_TIMEOUT_5SEC, CH_EVENT_TIMER, ch); fsm_addtimer(&ch->timer, CTC_TIMEOUT_5SEC, CH_EVENT_TIMER, ch);
fsm_newstate(fi, CH_STATE_SETUPWAIT); fsm_newstate(fi, CH_STATE_SETUPWAIT);
if (event == CH_EVENT_TIMER) saveflags = 0; /* avoids compiler warning with
spin_unlock_irqrestore */
if (event == CH_EVENT_TIMER) // only for timer not yet locked
spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags); spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags);
rc = ccw_device_start(ch->cdev, &ch->ccw[6], (unsigned long) ch, 0xff, 0); rc = ccw_device_start(ch->cdev, &ch->ccw[6], (unsigned long) ch, 0xff, 0);
if (event == CH_EVENT_TIMER) if (event == CH_EVENT_TIMER)
...@@ -1335,7 +1337,9 @@ ch_action_haltio(fsm_instance * fi, int event, void *arg) ...@@ -1335,7 +1337,9 @@ ch_action_haltio(fsm_instance * fi, int event, void *arg)
DBF_TEXT(trace, 3, __FUNCTION__); DBF_TEXT(trace, 3, __FUNCTION__);
fsm_deltimer(&ch->timer); fsm_deltimer(&ch->timer);
fsm_addtimer(&ch->timer, CTC_TIMEOUT_5SEC, CH_EVENT_TIMER, ch); fsm_addtimer(&ch->timer, CTC_TIMEOUT_5SEC, CH_EVENT_TIMER, ch);
if (event == CH_EVENT_STOP) saveflags = 0; /* avoids comp warning with
spin_unlock_irqrestore */
if (event == CH_EVENT_STOP) // only for STOP not yet locked
spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags); spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags);
oldstate = fsm_getstate(fi); oldstate = fsm_getstate(fi);
fsm_newstate(fi, CH_STATE_TERM); fsm_newstate(fi, CH_STATE_TERM);
...@@ -1508,7 +1512,9 @@ ch_action_restart(fsm_instance * fi, int event, void *arg) ...@@ -1508,7 +1512,9 @@ ch_action_restart(fsm_instance * fi, int event, void *arg)
fsm_addtimer(&ch->timer, CTC_TIMEOUT_5SEC, CH_EVENT_TIMER, ch); fsm_addtimer(&ch->timer, CTC_TIMEOUT_5SEC, CH_EVENT_TIMER, ch);
oldstate = fsm_getstate(fi); oldstate = fsm_getstate(fi);
fsm_newstate(fi, CH_STATE_STARTWAIT); fsm_newstate(fi, CH_STATE_STARTWAIT);
if (event == CH_EVENT_TIMER) saveflags = 0; /* avoids compiler warning with
spin_unlock_irqrestore */
if (event == CH_EVENT_TIMER) // only for timer not yet locked
spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags); spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags);
rc = ccw_device_halt(ch->cdev, (unsigned long) ch); rc = ccw_device_halt(ch->cdev, (unsigned long) ch);
if (event == CH_EVENT_TIMER) if (event == CH_EVENT_TIMER)
...@@ -1674,7 +1680,9 @@ ch_action_txretry(fsm_instance * fi, int event, void *arg) ...@@ -1674,7 +1680,9 @@ ch_action_txretry(fsm_instance * fi, int event, void *arg)
return; return;
} }
fsm_addtimer(&ch->timer, 1000, CH_EVENT_TIMER, ch); fsm_addtimer(&ch->timer, 1000, CH_EVENT_TIMER, ch);
if (event == CH_EVENT_TIMER) saveflags = 0; /* avoids compiler warning with
spin_unlock_irqrestore */
if (event == CH_EVENT_TIMER) // only for TIMER not yet locked
spin_lock_irqsave(get_ccwdev_lock(ch->cdev), spin_lock_irqsave(get_ccwdev_lock(ch->cdev),
saveflags); saveflags);
rc = ccw_device_start(ch->cdev, &ch->ccw[3], rc = ccw_device_start(ch->cdev, &ch->ccw[3],
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* Frank Pavlic (pavlic@de.ibm.com) and * Frank Pavlic (pavlic@de.ibm.com) and
* Martin Schwidefsky <schwidefsky@de.ibm.com> * Martin Schwidefsky <schwidefsky@de.ibm.com>
* *
* $Revision: 1.94 $ $Date: 2004/10/19 09:30:54 $ * $Revision: 1.96 $ $Date: 2004/11/11 13:42:33 $
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
/** /**
* initialization string for output * initialization string for output
*/ */
#define VERSION_LCS_C "$Revision: 1.94 $" #define VERSION_LCS_C "$Revision: 1.96 $"
static char version[] __initdata = "LCS driver ("VERSION_LCS_C "/" VERSION_LCS_H ")"; static char version[] __initdata = "LCS driver ("VERSION_LCS_C "/" VERSION_LCS_H ")";
static char debug_buffer[255]; static char debug_buffer[255];
...@@ -191,6 +191,7 @@ lcs_alloc_card(void) ...@@ -191,6 +191,7 @@ lcs_alloc_card(void)
return NULL; return NULL;
memset(card, 0, sizeof(struct lcs_card)); memset(card, 0, sizeof(struct lcs_card));
card->lan_type = LCS_FRAME_TYPE_AUTO; card->lan_type = LCS_FRAME_TYPE_AUTO;
card->pkt_seq = 0;
card->lancmd_timeout = LCS_LANCMD_TIMEOUT_DEFAULT; card->lancmd_timeout = LCS_LANCMD_TIMEOUT_DEFAULT;
/* Allocate io buffers for the read channel. */ /* Allocate io buffers for the read channel. */
rc = lcs_alloc_channel(&card->read); rc = lcs_alloc_channel(&card->read);
...@@ -1874,6 +1875,7 @@ lcs_get_skb(struct lcs_card *card, char *skb_data, unsigned int skb_len) ...@@ -1874,6 +1875,7 @@ lcs_get_skb(struct lcs_card *card, char *skb_data, unsigned int skb_len)
skb->protocol = card->lan_type_trans(skb, card->dev); skb->protocol = card->lan_type_trans(skb, card->dev);
card->stats.rx_bytes += skb_len; card->stats.rx_bytes += skb_len;
card->stats.rx_packets++; card->stats.rx_packets++;
*((__u32 *)skb->cb) = ++card->pkt_seq;
netif_rx(skb); netif_rx(skb);
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <asm/ccwdev.h> #include <asm/ccwdev.h>
#define VERSION_LCS_H "$Revision: 1.18 $" #define VERSION_LCS_H "$Revision: 1.19 $"
#define LCS_DBF_TEXT(level, name, text) \ #define LCS_DBF_TEXT(level, name, text) \
do { \ do { \
...@@ -309,6 +309,7 @@ struct lcs_card { ...@@ -309,6 +309,7 @@ struct lcs_card {
__u16 ip_assists_supported; __u16 ip_assists_supported;
__u16 ip_assists_enabled; __u16 ip_assists_enabled;
__s8 lan_type; __s8 lan_type;
__u32 pkt_seq;
__u16 sequence_no; __u16 sequence_no;
__s16 portno; __s16 portno;
/* Some info copied from probeinfo */ /* Some info copied from probeinfo */
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "qeth_mpc.h" #include "qeth_mpc.h"
#define VERSION_QETH_H "$Revision: 1.116 $" #define VERSION_QETH_H "$Revision: 1.123 $"
#ifdef CONFIG_QETH_IPV6 #ifdef CONFIG_QETH_IPV6
#define QETH_VERSION_IPV6 ":IPv6" #define QETH_VERSION_IPV6 ":IPv6"
...@@ -557,6 +557,7 @@ enum qeth_ip_types { ...@@ -557,6 +557,7 @@ enum qeth_ip_types {
QETH_IP_TYPE_NORMAL, QETH_IP_TYPE_NORMAL,
QETH_IP_TYPE_VIPA, QETH_IP_TYPE_VIPA,
QETH_IP_TYPE_RXIP, QETH_IP_TYPE_RXIP,
QETH_IP_TYPE_DEL_ALL_MC,
}; };
enum qeth_cmd_buffer_state { enum qeth_cmd_buffer_state {
...@@ -713,8 +714,7 @@ struct qeth_card_options { ...@@ -713,8 +714,7 @@ struct qeth_card_options {
*/ */
enum qeth_threads { enum qeth_threads {
QETH_SET_IP_THREAD = 1, QETH_SET_IP_THREAD = 1,
QETH_SET_MC_THREAD = 2, QETH_RECOVER_THREAD = 2,
QETH_RECOVER_THREAD = 4,
}; };
struct qeth_card { struct qeth_card {
...@@ -748,7 +748,7 @@ struct qeth_card { ...@@ -748,7 +748,7 @@ struct qeth_card {
volatile unsigned long thread_running_mask; volatile unsigned long thread_running_mask;
spinlock_t ip_lock; spinlock_t ip_lock;
struct list_head ip_list; struct list_head ip_list;
struct list_head ip_tbd_list; struct list_head *ip_tbd_list;
struct qeth_ipato ipato; struct qeth_ipato ipato;
struct list_head cmd_waiter_list; struct list_head cmd_waiter_list;
/* QDIO buffer handling */ /* QDIO buffer handling */
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment