s390: ctc patches for 2.6.25 (3rd try)
Subsystems (5)
cover s390: ctc patches for 2.6.25 (3rd try)
Signature · 17 lines
Jeff, hmmm, another send is necessary, sorry again. Description for patch 3/4 needs to be changed. The following patches are intended for 2.6.25. Besides clean-ups they replace the old ctc driver by a reworked ctcm driver. This ctcm driver supports the channel-to-channel connections of the old ctc driver plus an additional MPC protocol to provide SNA connectivity. Patch 1/4: clean-ups in ctc and netiucv Patch 2/4: clean-ups in Kconfig Patch 3/4: reworked ctc driver Patch 4/4: removal of old ctc driver Regards, Ursula Braun
PATCH 1/4 ctc / netiucv: consolidate fsm_action_nop
From: Peter Tiedemann <[email protected]>
move fsm_action_nop to fsm.h to avoid duplicate definitions in both drivers ctc and netiucv.
--- drivers/s390/net/ctcmain.c | 8 -------- drivers/s390/net/fsm.h | 8 ++++++++ drivers/s390/net/netiucv.c | 8 +------- 3 files changed, 9 insertions(+), 15 deletions(-)
drivers/s390/net/fsm.h +8 -0
@@ -260,4 +260,12 @@ extern int fsm_addtimer(fsm_timer *timer*/ extern void fsm_modtimer (fsm_timer *timer,int millisec,int event,void *arg); +/** +* NOP action for statemachines +*/ +static inline void +fsm_action_nop (fsm_instance *fi,int event,void *arg) +{ +} +#endif /* _FSM_H_ */
drivers/s390/net/netiucv.c +1 -7
@@ -137,6 +137,7 @@ PRINT_##importance(header "%02x %02x %02#define PRINTK_HEADER " iucv: "/* for debugging */ static struct device_driver netiucv_driver = { + .owner =THIS_MODULE , .name ="netiucv" , .bus = &iucv_bus, };
@@ -571,13 +572,6 @@ static void netiucv_callback_connres(strfsm_event (conn->fsm,CONN_EVENT_CONN_RES , conn); } -/** -* Dummy NOP action for all statemachines -*/ -static void fsm_action_nop (fsm_instance *fi,int event,void *arg) -{ -} -/* * Actions of the connection statemachine */
drivers/s390/net/ctcmain.c +0 -8
@@ -644,14 +644,6 @@ ctc_checkalloc_buffer(struct channel *ch }/** -* Dummy NOP action for statemachines -*/ -static void -fsm_action_nop (fsm_instance * fi,int event,void *arg) -{ -} - -/** * Actions for channel - statemachines. *****************************************************************************/
Re: [patch 1/4] ctc / netiucv: consolidate fsm_action_nop
drivers/s390/net/fsm.h extern int fsm_addtimer(fsm_timer *timer · line 269
Quoted 7 lines · Ursula Braun
drivers/s390/net/fsm.h +7
-0+/** +* NOP action for statemachines +*/ +static inline void +fsm_action_nop (fsm_instance *fi,int event,void *arg) +{ +}
This is put into a method table, which means taking the address of it. So marking this inline doesn't make much sense, it should be out of line somewhere in common code.
drivers/s390/net/netiucv.c PRINT_##importance(header "%02x %02x %02 · line 142
Quoted 4 lines
static struct
device_drivernetiucv_driver= {drivers/s390/net/netiucv.c +1
-0+ .owner = THIS_MODULE, .name = "netiucv", .bus = &iucv_bus,
This is uncodumented in the changelog and completely unrelated to the other change in here.
PATCH 2/4 drivers/s390/net: Kconfig brush up
In reply to Ursula BraunFrom: Peter Tiedemann <[email protected]>
From: Ursula Braun <[email protected]>
adapt drivers/s390/net/Kconfig to current IBM wording and further cosmetics
--- drivers/s390/net/Kconfig | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-)
drivers/s390/net/Kconfig +22 -21
@@ -5,22 +5,23 @@ config LCS tristate "Lan Channel Station Interface" depends on CCW && NETDEVICES && (NET_ETHERNET || TR || FDDI) help - Select this option if you want to use LCS networking on IBM S/390 - or zSeries. This device driver supports Token Ring (IEEE 802.5), - FDDI (IEEE 802.7) and Ethernet. - This option is also available as a module which will be - called lcs.ko. If you do not know what it is, it's safe to say "Y". + Select this option if you want to use LCS networking on IBM System z. + This device driver supports Token Ring (IEEE 802.5), + FDDI (IEEE 802.7) and Ethernet. + To compile as a module, choose M. The module name is lcs.ko. + If you do not know what it is, it's safe to choose Y. config CTC tristate "CTC device support" depends on CCW && NETDEVICES help - Select this option if you want to use channel-to-channel networking - on IBM S/390 or zSeries. This device driver supports real CTC - coupling using ESCON. It also supports virtual CTCs when running - under VM. It will use the channel device configuration if this is - available. This option is also available as a module which will be - called ctc.ko. If you do not know what it is, it's safe to say "Y". + Select this option if you want to use channel-to-channel + point-to-point networking on IBM System z. + This device driver supports real CTC coupling using ESCON. + It also supports virtual CTCs when running under VM. + To compile as a module, choose M. The module name is ctc.ko. + To compile into the kernel, choose Y. + If you do not need any channel-to-channel connection, choose N. config NETIUCV tristate "IUCV network device support (VM only)"
@@ -29,9 +30,9 @@ config NETIUCV Select this option if you want to use inter-user communication vehicle networking under VM or VIF. It enables a fast communication link between VM guests. Using ifconfig a point-to-point connection - can be established to the Linux for zSeries and S7390 system - running on the other VM guest. This option is also available - as a module which will be called netiucv.ko. If unsure, say "Y". + can be established to the Linux on IBM System z + running on the other VM guest. To compile as a module, choose M. + The module name is netiucv.ko. If unsure, choose Y. config SMSGIUCV tristate "IUCV special message support (VM only)"
@@ -47,22 +48,22 @@ config CLAW This driver supports channel attached CLAW devices. CLAW is Common Link Access for Workstation. Common devices that use CLAW are RS/6000s, Cisco Routers (CIP) and 3172 devices. - To compile as a module choose M here: The module will be called - claw.ko to compile into the kernel choose Y + To compile as a module, choose M. The module name is claw.ko. + To compile into the kernel, choose Y. config QETH tristate "Gigabit Ethernet device support" depends on CCW && NETDEVICES && IP_MULTICAST && QDIO help - This driver supports the IBM S/390 and zSeries OSA Express adapters + This driver supports the IBM System z OSA Express adapters in QDIO mode (all media types), HiperSockets interfaces and VM GuestLAN interfaces in QDIO and HIPER mode. - For details please refer to the documentation provided by IBM at - <http://www10.software.ibm.com/developerworks/opensource/linux390> + For details please refer to the documentation provided by IBM at + <http://www.ibm.com/developerworks/linux/linux390> - To compile this driver as a module, choose M here: the - module will be called qeth.ko. + To compile this driver as a module, choose M. + The module name is qeth.ko. comment "Gigabit Ethernet default settings"
PATCH 3/4 ctcm: infrastructure for replaced ctc driver
In reply to Ursula BraunFrom: Peter Tiedemann <[email protected]>
ctcm driver supports the channel-to-channel connections of the old ctc driver plus an additional MPC protocol to provide SNA connectivity.
This new ctcm driver replaces the existing ctc driver.
---
drivers/s390/net/Kconfig | 12 drivers/s390/net/Makefile | 5 drivers/s390/net/ctcm_dbug.c | 67 + drivers/s390/net/ctcm_dbug.h | 158 ++ drivers/s390/net/ctcm_fsms.c | 2338 +++++++++++++++++++++++++++++++++++++++ drivers/s390/net/ctcm_fsms.h | 359 ++++++ drivers/s390/net/ctcm_main.c | 1772 ++++++++++++++++++++++++++++++ drivers/s390/net/ctcm_main.h | 287 ++++ drivers/s390/net/ctcm_mpc.c | 2467 ++++++++++++++++++++++++++++++++++++++++++ drivers/s390/net/ctcm_mpc.h | 239 ++++ drivers/s390/net/ctcm_sysfs.c | 210 +++ 11 files changed, 7906 insertions(+), 8 deletions(-)
drivers/s390/net/Makefile +2 -3
@@ -2,11 +2,10 @@ # S/390 network devices # -ctc-objs := ctcmain.o ctcdbug.o - +ctcm-objs := ctcm_main.o ctcm_fsms.o ctcm_mpc.o ctcm_sysfs.o ctcm_dbug.o +obj-$(CONFIG_CTCM) += ctcm.o fsm.o cu3088.o obj-$(CONFIG_NETIUCV) += netiucv.o fsm.o obj-$(CONFIG_SMSGIUCV) += smsgiucv.o -obj-$(CONFIG_CTC) += ctc.o fsm.o cu3088.o obj-$(CONFIG_LCS) += lcs.o cu3088.o obj-$(CONFIG_CLAW) += claw.o cu3088.o qeth-y := qeth_main.o qeth_mpc.o qeth_sys.o qeth_eddp.o
drivers/s390/net/Kconfig +7 -5
@@ -11,15 +11,17 @@ config LCS To compile as a module, choose M. The module name is lcs.ko. If you do not know what it is, it's safe to choose Y. -config CTC - tristate "CTC device support" +config CTCM + tristate "CTC and MPC SNA device support" depends on CCW && NETDEVICES help Select this option if you want to use channel-to-channel point-to-point networking on IBM System z. This device driver supports real CTC coupling using ESCON. It also supports virtual CTCs when running under VM. - To compile as a module, choose M. The module name is ctc.ko. + This driver also supports channel-to-channel MPC SNA devices. + MPC is an SNA protocol device used by Communication Server for Linux. + To compile as a module, choose M. The module name is ctcm.ko. To compile into the kernel, choose Y. If you do not need any channel-to-channel connection, choose N.
@@ -84,7 +86,7 @@ config QETH_VLAN 802.1q VLAN support in the qeth device driver. config CCWGROUP - tristate - default (LCS || CTC || QETH) + tristate + default (LCS || CTCM || QETH) endmenu
drivers/s390/net/ctcm_dbug.c new file +67 -0
67 lines not on this page · raw message
drivers/s390/net/ctcm_dbug.h new file +158 -0
158 lines not on this page · raw message
drivers/s390/net/ctcm_fsms.c new file +2338 -0
2,338 lines not on this page · raw message
drivers/s390/net/ctcm_fsms.h new file +359 -0
359 lines not on this page · raw message
drivers/s390/net/ctcm_main.c new file +1772 -0
36 lines not on this page · raw message
drivers/s390/net/ctcm_main.h new file +287 -0
287 lines not on this page · raw message
drivers/s390/net/ctcm_mpc.c new file +2467 -0
2,467 lines not on this page · raw message
drivers/s390/net/ctcm_mpc.h new file +239 -0
239 lines not on this page · raw message
drivers/s390/net/ctcm_sysfs.c new file +210 -0
210 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Re: [patch 3/4] ctcm: infrastructure for replaced ctc driver
Quoted 30 lines · Ursula Braun
From: Peter Tiedemann <[email protected]>
ctcm driver supports the channel-to-channel connections of the old ctc driver plus an additional MPC protocol to provide SNA connectivity.
This new ctcm driver replaces the existing ctc driver.
Signed-off-by Peter Tiedemann <[email protected]>Signed-off-by Ursula Braun <[email protected]>---
drivers/s390/net/Kconfig | 12 drivers/s390/net/Makefile | 5 drivers/s390/net/ctcm_dbug.c | 67 + drivers/s390/net/ctcm_dbug.h | 158 ++ drivers/s390/net/ctcm_fsms.c | 2338 +++++++++++++++++++++++++++++++++++++++ drivers/s390/net/ctcm_fsms.h | 359 ++++++ drivers/s390/net/ctcm_main.c | 1772 ++++++++++++++++++++++++++++++ drivers/s390/net/ctcm_main.h | 287 ++++ drivers/s390/net/ctcm_mpc.c | 2467 ++++++++++++++++++++++++++++++++++++++++++ drivers/s390/net/ctcm_mpc.h | 239 ++++ drivers/s390/net/ctcm_sysfs.c | 210 +++ 11 files changed, 7906 insertions(+), 8 deletions(-)Index: linux-2.6-uschi/drivers/s390/net/Makefile
===================================================================
drivers/s390/net/Makefile line 5
Quoted 6 lines
drivers/s390/net/Makefile +1
-2@@ -2,11 +2,10 @@ # S/390 network devices # -ctc-objs := ctcmain.o ctcdbug.o - +ctcm-objs := ctcm_main.o ctcm_fsms.o ctcm_mpc.o ctcm_sysfs.o ctcm_dbug.o
please don't use foo-objs := but always foo-y +=
drivers/s390/net/ctcm_dbug.c line 7
Quoted 12 lines
Index:
linux-2.6-uschi/drivers/s390/net/ctcm_dbug.c
===================================================================drivers/s390/net/ctcm_dbug.c new file +7
-0@@ -0,0 +1,67 @@ +/* +* drivers/s390/net/ctcm_dbug.c +* +* Copyright IBM Corp. 2001, 2007 +* Authors: Peter Tiedemann ([email protected]) +* +*/
Please don't mention filenames in the top of file comments. On the other hand a little description of what this file does would be quite useful. (This comment applies to all files in this patch)
Quoted 5 lines
drivers/s390/net/ctcm_dbug.c new file +5
-0+#ifdef DEBUG +#define do_debug 1 +#else +#define do_debug 0 +#endif
drivers/s390/net/ctcm_dbug.c line 22
Quoted 10 lines
drivers/s390/net/ctcm_dbug.c new file +10
-0+#ifdef DEBUGDATA +#define do_debug_data 1 +#else +#define do_debug_data 0 +#endif +#ifdef DEBUGCCW +#define do_debug_ccw 1 +#else +#define do_debug_ccw 0 +#endif
Please don't indent cpp directives with tabs. Normally we don't indent them at all, but if we have to it's just a single space after the # per indentiation level.
drivers/s390/net/ctcm_dbug.c line 23
Quoted 1 line
drivers/s390/net/ctcm_dbug.c new file +1
-0+static void chx_rxidle (fsm_instance *fi,int event,void *arg);
Please don't put forward declarations in the middle of a file. If you have to have them please put all somewhere at the top of the file, but it would be even nicer to re-order the code to avoid them completely.
drivers/s390/net/ctcm_dbug.c line 30
Quoted 7 lines
drivers/s390/net/ctcm_dbug.c new file +7
-0+/** +* Initialize connection by sending a __u16 of value 0. +* +* @param fi An instance of a channel statemachine. +* @param event The event, just happened. +* @param arg Generic pointer, casted from channel * upon call. +*/
This is not a kerneldoc comment. Please read Documentation/kernel-doc-nano-HOWTO.txt for the correct format, and run it through the extraction script to make sure it's valid.
drivers/s390/net/ctcm_dbug.c line 33
Quoted 3 lines
drivers/s390/net/ctcm_dbug.c new file +3
-0+static void chx_firstio (fsm_instance *fi,int event,void *arg) +{ +struct channel *ch = (struct channel *)arg;
no cast needed when converting to/from void *
Quoted 7 lines
drivers/s390/net/ctcm_dbug.c new file +7
-0+struct channel *ch = (struct channel *)arg; +struct channel *ch2; +struct net_device *dev = ch->netdev; + +CTCM_DBF_DEV_NAME (TRACE , dev,"Got remote disconnect, re-initializing" ); +fsm_deltimer (&ch->timer); +if (do_debug)
drivers/s390/net/ctcm_dbug.c line 50
Quoted 10 lines
drivers/s390/net/ctcm_dbug.c new file +10
-0+ctcm_pr_debug ("%s: Got remote disconnect, " +"re-initializing ...\n" , dev->name); +/* +* Notify device statemachine +*/ +fsm_event (((struct ctcm_priv *)dev->priv)->fsm,DEV_EVENT_RXDOWN , dev); +fsm_event (((struct ctcm_priv *)dev->priv)->fsm,DEV_EVENT_TXDOWN , dev); + +fsm_newstate (fi,CTC_STATE_DTERM ); + ch2 = ((struct ctcm_priv *)dev->priv)->channel[WRITE ];
keeping a local variable of type struct ctcm_priv * would be a lot cleaner than all these casts. This applies to a lot of functions all over this patch.
drivers/s390/net/ctcm_dbug.c line 54
Quoted 4 lines
drivers/s390/net/ctcm_dbug.c new file +4
-0+fsm_newstate (ch2->fsm,CTC_STATE_DTERM ); + +ccw_device_halt (ch->cdev, (unsigned long )ch); +ccw_device_halt (ch2->cdev, (unsigned long )ch2);
what an odd calling convention. Why does ccw_device_halt take an unsigned long argument that's actually a pointer?
drivers/s390/net/ctcm_dbug.c line 62
Quoted 8 lines
drivers/s390/net/ctcm_dbug.c new file +8
-0+ header =kzalloc (TH_HEADER_LENGTH ,gfp_type ()); + +if (!header) { +printk (KERN_WARNING "ctcmpc: OUT OF MEMORY IN %s()" +": Data Lost \n" , __FUNCTION__); +spin_unlock (&ch->collect_lock); +fsm_event (privptr->mpcg->fsm,MPCG_EVENT_INOP , dev); + goto done;
odd indentation messup.
drivers/s390/net/ctcm_dbug.c line 63
Quoted 1 line
drivers/s390/net/ctcm_dbug.c new file +1
-0+ min((int)ch->trans_skb->len, 50));
please don't case arguments to min but use min_t instead.
I gave up here for now, but you should probably run this through checkpatch.pl aswell before resubmitting it.
Re: [patch 3/4] ctcm: infrastructure for replaced ctc driver
On Thu, 7 Feb 2008, Christoph Hellwig wrote:
...
Quoted 8 lines
Quoted 7 lines
+/*
+ *drivers/s390/net/ctcm_dbug.c
+ *
+ * Copyright IBM Corp. 2001, 2007
+ * Authors: Peter Tiedemann ([email protected])
+ *
+ */
Quoted 4 lines
Please don't mention filenames in the top of file comments. On the other hand a little description of what this file does would be quite useful. (This comment applies to all files in this patch)
Better descriptions, yes. Of course.
But are you saying to NOT name the file in its comments? I am surprised. If I am reading correctly, then I disagree.
Is the exclusion of the name of the source file from its comments a stylistic decision the other kernel developers have agreed to? Or is it tied to automation? Or have I (hopefully) misunderstood?
-- R; <><
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
PATCH 4/4 ctc: removal of the old ctc driver
In reply to Ursula BraunFrom: Peter Tiedemann <[email protected]>
ctc driver is replaced by a new ctcm driver.
The ctcm driver supports the channel-to-channel connections of the old ctc driver plus an additional MPC protocol to provide SNA connectivity.
This patch removes the functions of the old ctc driver.
--- drivers/s390/net/ctcdbug.c | 80 - drivers/s390/net/ctcdbug.h | 125 - drivers/s390/net/ctcmain.c | 3054 --------------------------------------------- drivers/s390/net/ctcmain.h | 270 --- 4 files changed, 3529 deletions(-)
drivers/s390/net/ctcdbug.c deleted +0 -80
@@ -1,80 +0,0 @@ -/* -* -* linux/drivers/s390/net/ctcdbug.c -* -* CTC / ESCON network driver - s390 dbf exploit. -* -* Copyright 2000,2003 IBM Corporation -* -* Author(s): Original Code written by -* Peter Tiedemann ([email protected]) -* -* 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 -* the Free Software Foundation; either version 2, or (at your option) -* any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include "ctcdbug.h" - -/** -* Debug Facility Stuff -*/ -debug_info_t *ctc_dbf_setup =NULL ; -debug_info_t *ctc_dbf_data =NULL ; -debug_info_t *ctc_dbf_trace =NULL ; - -DEFINE_PER_CPU (char[256 ], ctc_dbf_txt_buf); - -void -ctc_unregister_dbf_views (void ) -{ -if (ctc_dbf_setup) -debug_unregister (ctc_dbf_setup); -if (ctc_dbf_data) -debug_unregister (ctc_dbf_data); -if (ctc_dbf_trace) -debug_unregister (ctc_dbf_trace); -} -int -ctc_register_dbf_views (void ) -{ - ctc_dbf_setup =debug_register (CTC_DBF_SETUP_NAME , -CTC_DBF_SETUP_PAGES , -CTC_DBF_SETUP_NR_AREAS , -CTC_DBF_SETUP_LEN ); - ctc_dbf_data =debug_register (CTC_DBF_DATA_NAME , -CTC_DBF_DATA_PAGES , -CTC_DBF_DATA_NR_AREAS , -CTC_DBF_DATA_LEN ); - ctc_dbf_trace =debug_register (CTC_DBF_TRACE_NAME , -CTC_DBF_TRACE_PAGES , -CTC_DBF_TRACE_NR_AREAS , -CTC_DBF_TRACE_LEN ); - -if ((ctc_dbf_setup ==NULL ) || (ctc_dbf_data ==NULL ) || - (ctc_dbf_trace ==NULL )) { -ctc_unregister_dbf_views (); -return -ENOMEM ; - } -debug_register_view (ctc_dbf_setup, &debug_hex_ascii_view); -debug_set_level (ctc_dbf_setup,CTC_DBF_SETUP_LEVEL ); - -debug_register_view (ctc_dbf_data, &debug_hex_ascii_view); -debug_set_level (ctc_dbf_data,CTC_DBF_DATA_LEVEL ); - -debug_register_view (ctc_dbf_trace, &debug_hex_ascii_view); -debug_set_level (ctc_dbf_trace,CTC_DBF_TRACE_LEVEL ); - -return 0 ; -} -
drivers/s390/net/ctcdbug.h deleted +0 -125
125 lines not on this page · raw message
drivers/s390/net/ctcmain.c deleted +0 -3054
2,795 lines not on this page · raw message
drivers/s390/net/ctcmain.h deleted +0 -270
270 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.