* [patch 0/5] s390: claw/lcs/netiucv network driver patches for 2.6.25
@ 2008-02-08 12:09 Ursula Braun
2008-02-08 12:09 ` [patch 1/5] claw: removal of volatile variables Ursula Braun
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Ursula Braun @ 2008-02-08 12:09 UTC (permalink / raw)
To: jgarzik, netdev, linux-s390
--
Jeff,
The following patches are intended for 2.6.25.
They affect the s390 network drivers claw, lcs, and netiucv.
Patch summary:
claw: remove unused volatile variables
netiucv: define module owner in device_driver structure
netiucv: renaming of NOP action
lcs: improvement for debug area setup
claw/lcs/netiucv: optimize a debugging macro
Regards, Ursula Braun
^ permalink raw reply [flat|nested] 7+ messages in thread
* [patch 1/5] claw: removal of volatile variables
2008-02-08 12:09 [patch 0/5] s390: claw/lcs/netiucv network driver patches for 2.6.25 Ursula Braun
@ 2008-02-08 12:09 ` Ursula Braun
2008-02-11 16:15 ` Jeff Garzik
2008-02-08 12:09 ` [patch 2/5] netiucv: Remember to set driver->owner Ursula Braun
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Ursula Braun @ 2008-02-08 12:09 UTC (permalink / raw)
To: jgarzik, netdev, linux-s390
[-- Attachment #1: 719-claw-volatile.diff --]
[-- Type: text/plain, Size: 1013 bytes --]
From: Ursula Braun <braunu@de.ibm.com>
Volatile variables queme_switch and pk_delay are not used anyway.
They are just a left over from an unused timer based packing logic.
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
---
drivers/s390/net/claw.h | 2 --
1 file changed, 2 deletions(-)
Index: linux-2.6-uschi/drivers/s390/net/claw.h
===================================================================
--- linux-2.6-uschi.orig/drivers/s390/net/claw.h
+++ linux-2.6-uschi/drivers/s390/net/claw.h
@@ -278,8 +278,6 @@ struct claw_env {
__u16 write_size; /* write buffer size */
__u16 dev_id; /* device ident */
__u8 packing; /* are we packing? */
- volatile __u8 queme_switch; /* gate for imed packing */
- volatile unsigned long pk_delay; /* Delay for adaptive packing */
__u8 in_use; /* device active flag */
struct net_device *ndev; /* backward ptr to the net dev*/
};
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* [patch 2/5] netiucv: Remember to set driver->owner.
2008-02-08 12:09 [patch 0/5] s390: claw/lcs/netiucv network driver patches for 2.6.25 Ursula Braun
2008-02-08 12:09 ` [patch 1/5] claw: removal of volatile variables Ursula Braun
@ 2008-02-08 12:09 ` Ursula Braun
2008-02-08 12:09 ` [patch 3/5] netiucv: change name of nop function Ursula Braun
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Ursula Braun @ 2008-02-08 12:09 UTC (permalink / raw)
To: jgarzik, netdev, linux-s390; +Cc: Cornelia Huck
[-- Attachment #1: 752-netiucv-owner.diff --]
[-- Type: text/plain, Size: 689 bytes --]
From: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
---
drivers/s390/net/netiucv.c | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6-uschi/drivers/s390/net/netiucv.c
===================================================================
--- linux-2.6-uschi.orig/drivers/s390/net/netiucv.c
+++ linux-2.6-uschi/drivers/s390/net/netiucv.c
@@ -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,
};
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* [patch 3/5] netiucv: change name of nop function
2008-02-08 12:09 [patch 0/5] s390: claw/lcs/netiucv network driver patches for 2.6.25 Ursula Braun
2008-02-08 12:09 ` [patch 1/5] claw: removal of volatile variables Ursula Braun
2008-02-08 12:09 ` [patch 2/5] netiucv: Remember to set driver->owner Ursula Braun
@ 2008-02-08 12:09 ` Ursula Braun
2008-02-08 12:09 ` [patch 4/5] lcs: avoid/reduce unused s390dbf debug areas Ursula Braun
2008-02-08 12:09 ` [patch 5/5] claw/lcs/netiucv: check s390dbf level before sprints Ursula Braun
4 siblings, 0 replies; 7+ messages in thread
From: Ursula Braun @ 2008-02-08 12:09 UTC (permalink / raw)
To: jgarzik, netdev, linux-s390
[-- Attachment #1: 753-netiucv-fsm.diff --]
[-- Type: text/plain, Size: 1322 bytes --]
From: Ursula Braun <braunu@de.ibm.com>
Dummy NOP actions for fsm-statemachines have to be defined
separately for every using module of fsm-statemachines.
Thus the generic name fsm_action_nop is replaced by
module specific name netiucv_action_nop.
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
---
drivers/s390/net/netiucv.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: linux-2.6-uschi/drivers/s390/net/netiucv.c
===================================================================
--- linux-2.6-uschi.orig/drivers/s390/net/netiucv.c
+++ linux-2.6-uschi/drivers/s390/net/netiucv.c
@@ -573,9 +573,9 @@ static void netiucv_callback_connres(str
}
/**
- * Dummy NOP action for all statemachines
+ * NOP action for statemachines
*/
-static void fsm_action_nop(fsm_instance *fi, int event, void *arg)
+static void netiucv_action_nop(fsm_instance *fi, int event, void *arg)
{
}
@@ -1111,7 +1111,7 @@ static const fsm_node dev_fsm[] = {
{ DEV_STATE_RUNNING, DEV_EVENT_STOP, dev_action_stop },
{ DEV_STATE_RUNNING, DEV_EVENT_CONDOWN, dev_action_conndown },
- { DEV_STATE_RUNNING, DEV_EVENT_CONUP, fsm_action_nop },
+ { DEV_STATE_RUNNING, DEV_EVENT_CONUP, netiucv_action_nop },
};
static const int DEV_FSM_LEN = sizeof(dev_fsm) / sizeof(fsm_node);
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* [patch 4/5] lcs: avoid/reduce unused s390dbf debug areas.
2008-02-08 12:09 [patch 0/5] s390: claw/lcs/netiucv network driver patches for 2.6.25 Ursula Braun
` (2 preceding siblings ...)
2008-02-08 12:09 ` [patch 3/5] netiucv: change name of nop function Ursula Braun
@ 2008-02-08 12:09 ` Ursula Braun
2008-02-08 12:09 ` [patch 5/5] claw/lcs/netiucv: check s390dbf level before sprints Ursula Braun
4 siblings, 0 replies; 7+ messages in thread
From: Ursula Braun @ 2008-02-08 12:09 UTC (permalink / raw)
To: jgarzik, netdev, linux-s390; +Cc: Peter Tiedemann
[-- Attachment #1: 760-lcs-dbf.diff --]
[-- Type: text/plain, Size: 955 bytes --]
From: Peter Tiedemann <ptiedem@de.ibm.com>
Since lcs makes use of 1 debug area only, the number of debug areas
is reduced, while the number of pages per area is increased.
Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
---
drivers/s390/net/lcs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6-uschi/drivers/s390/net/lcs.c
===================================================================
--- linux-2.6-uschi.orig/drivers/s390/net/lcs.c
+++ linux-2.6-uschi/drivers/s390/net/lcs.c
@@ -94,7 +94,7 @@ static int
lcs_register_debug_facility(void)
{
lcs_dbf_setup = debug_register("lcs_setup", 2, 1, 8);
- lcs_dbf_trace = debug_register("lcs_trace", 2, 2, 8);
+ lcs_dbf_trace = debug_register("lcs_trace", 4, 1, 8);
if (lcs_dbf_setup == NULL || lcs_dbf_trace == NULL) {
PRINT_ERR("Not enough memory for debug facility.\n");
lcs_unregister_debug_facility();
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* [patch 5/5] claw/lcs/netiucv: check s390dbf level before sprints
2008-02-08 12:09 [patch 0/5] s390: claw/lcs/netiucv network driver patches for 2.6.25 Ursula Braun
` (3 preceding siblings ...)
2008-02-08 12:09 ` [patch 4/5] lcs: avoid/reduce unused s390dbf debug areas Ursula Braun
@ 2008-02-08 12:09 ` Ursula Braun
4 siblings, 0 replies; 7+ messages in thread
From: Ursula Braun @ 2008-02-08 12:09 UTC (permalink / raw)
To: jgarzik, netdev, linux-s390; +Cc: Peter Tiedemann
[-- Attachment #1: 765-dbf-macros.diff --]
[-- Type: text/plain, Size: 3554 bytes --]
From: Peter Tiedemann <ptiedem@de.ibm.com>
additional check of s390dbf level results in better performance
if the default low debugging level is active.
Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
---
drivers/s390/net/claw.h | 17 +++++++++++++----
drivers/s390/net/lcs.h | 16 ++++++++++++----
drivers/s390/net/netiucv.c | 22 ++++++++++++++++------
3 files changed, 41 insertions(+), 14 deletions(-)
Index: linux-2.6-uschi/drivers/s390/net/claw.h
===================================================================
--- linux-2.6-uschi.orig/drivers/s390/net/claw.h
+++ linux-2.6-uschi/drivers/s390/net/claw.h
@@ -114,11 +114,20 @@ do { \
debug_event(claw_dbf_##name,level,(void*)(addr),len); \
} while (0)
+/* Allow to sort out low debug levels early to avoid wasted sprints */
+static inline int claw_dbf_passes(debug_info_t *dbf_grp, int level)
+{
+ return (level <= dbf_grp->level);
+}
+
#define CLAW_DBF_TEXT_(level,name,text...) \
-do { \
- sprintf(debug_buffer, text); \
- debug_text_event(claw_dbf_##name,level, debug_buffer);\
-} while (0)
+ do { \
+ if (claw_dbf_passes(claw_dbf_##name, level)) { \
+ sprintf(debug_buffer, text); \
+ debug_text_event(claw_dbf_##name, level, \
+ debug_buffer); \
+ } \
+ } while (0)
/*******************************************************
* Define Control Blocks *
Index: linux-2.6-uschi/drivers/s390/net/lcs.h
===================================================================
--- linux-2.6-uschi.orig/drivers/s390/net/lcs.h
+++ linux-2.6-uschi/drivers/s390/net/lcs.h
@@ -16,11 +16,19 @@ do { \
debug_event(lcs_dbf_##name,level,(void*)(addr),len); \
} while (0)
+/* Allow to sort out low debug levels early to avoid wasted sprints */
+static inline int lcs_dbf_passes(debug_info_t *dbf_grp, int level)
+{
+ return (level <= dbf_grp->level);
+}
+
#define LCS_DBF_TEXT_(level,name,text...) \
-do { \
- sprintf(debug_buffer, text); \
- debug_text_event(lcs_dbf_##name,level, debug_buffer);\
-} while (0)
+ do { \
+ if (lcs_dbf_passes(lcs_dbf_##name, level)) { \
+ sprintf(debug_buffer, text); \
+ debug_text_event(lcs_dbf_##name, level, debug_buffer); \
+ } \
+ } while (0)
/**
* sysfs related stuff
Index: linux-2.6-uschi/drivers/s390/net/netiucv.c
===================================================================
--- linux-2.6-uschi.orig/drivers/s390/net/netiucv.c
+++ linux-2.6-uschi/drivers/s390/net/netiucv.c
@@ -97,12 +97,22 @@ MODULE_DESCRIPTION ("Linux for S/390 IUC
DECLARE_PER_CPU(char[256], iucv_dbf_txt_buf);
-#define IUCV_DBF_TEXT_(name,level,text...) \
- do { \
- char* iucv_dbf_txt_buf = get_cpu_var(iucv_dbf_txt_buf); \
- sprintf(iucv_dbf_txt_buf, text); \
- debug_text_event(iucv_dbf_##name,level,iucv_dbf_txt_buf); \
- put_cpu_var(iucv_dbf_txt_buf); \
+/* Allow to sort out low debug levels early to avoid wasted sprints */
+static inline int iucv_dbf_passes(debug_info_t *dbf_grp, int level)
+{
+ return (level <= dbf_grp->level);
+}
+
+#define IUCV_DBF_TEXT_(name, level, text...) \
+ do { \
+ if (iucv_dbf_passes(iucv_dbf_##name, level)) { \
+ char* iucv_dbf_txt_buf = \
+ get_cpu_var(iucv_dbf_txt_buf); \
+ sprintf(iucv_dbf_txt_buf, text); \
+ debug_text_event(iucv_dbf_##name, level, \
+ iucv_dbf_txt_buf); \
+ put_cpu_var(iucv_dbf_txt_buf); \
+ } \
} while (0)
#define IUCV_DBF_SPRINTF(name,level,text...) \
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [patch 1/5] claw: removal of volatile variables
2008-02-08 12:09 ` [patch 1/5] claw: removal of volatile variables Ursula Braun
@ 2008-02-11 16:15 ` Jeff Garzik
0 siblings, 0 replies; 7+ messages in thread
From: Jeff Garzik @ 2008-02-11 16:15 UTC (permalink / raw)
To: Ursula Braun; +Cc: netdev, linux-s390
applied 1-5 to #upstream-fixes (2.6.25)
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-02-11 16:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-08 12:09 [patch 0/5] s390: claw/lcs/netiucv network driver patches for 2.6.25 Ursula Braun
2008-02-08 12:09 ` [patch 1/5] claw: removal of volatile variables Ursula Braun
2008-02-11 16:15 ` Jeff Garzik
2008-02-08 12:09 ` [patch 2/5] netiucv: Remember to set driver->owner Ursula Braun
2008-02-08 12:09 ` [patch 3/5] netiucv: change name of nop function Ursula Braun
2008-02-08 12:09 ` [patch 4/5] lcs: avoid/reduce unused s390dbf debug areas Ursula Braun
2008-02-08 12:09 ` [patch 5/5] claw/lcs/netiucv: check s390dbf level before sprints Ursula Braun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).