From: frank.blaschka@de.ibm.com
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
Ursula Braun <ursula.braun@de.ibm.com>
Subject: [patch 4/7] [PATCH] ctcm: make ctcmpc debugging compilable
Date: Wed, 07 Mar 2012 13:06:26 +0100 [thread overview]
Message-ID: <20120307120707.933695671@de.ibm.com> (raw)
In-Reply-To: 20120307120622.922387262@de.ibm.com
[-- Attachment #1: 611-ctcm-debug.diff --]
[-- Type: text/plain, Size: 2518 bytes --]
From: Ursula Braun <ursula.braun@de.ibm.com>
ctcmpc debugging can be activated defining constant DEBUGCCW.
The debugging part contains wrong checks for 64 bit addresses.
Thus the debugging version does not compile.
This patch corrects the 64-bit address checks to make it
compilable.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Reviewed-by: Belinda Thompson <belindat@us.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
drivers/s390/net/ctcm_main.c | 3 +++
drivers/s390/net/ctcm_mpc.c | 12 ++++++------
2 files changed, 9 insertions(+), 6 deletions(-)
diff -urpN linux-2.6/drivers/s390/net/ctcm_main.c linux-2.6-patched/drivers/s390/net/ctcm_main.c
--- linux-2.6/drivers/s390/net/ctcm_main.c 2012-01-05 00:55:44.000000000 +0100
+++ linux-2.6-patched/drivers/s390/net/ctcm_main.c 2012-03-06 13:36:00.000000000 +0100
@@ -562,6 +562,9 @@ static int ctcm_transmit_skb(struct chan
skb_queue_tail(&ch->io_queue, skb);
ccw_idx = 3;
}
+ if (do_debug_ccw)
+ ctcmpc_dumpit((char *)&ch->ccw[ccw_idx],
+ sizeof(struct ccw1) * 3);
ch->retry = 0;
fsm_newstate(ch->fsm, CTC_STATE_TX);
fsm_addtimer(&ch->timer, CTCM_TIME_5_SEC, CTC_EVENT_TIMER, ch);
diff -urpN linux-2.6/drivers/s390/net/ctcm_mpc.c linux-2.6-patched/drivers/s390/net/ctcm_mpc.c
--- linux-2.6/drivers/s390/net/ctcm_mpc.c 2012-01-05 00:55:44.000000000 +0100
+++ linux-2.6-patched/drivers/s390/net/ctcm_mpc.c 2012-03-06 13:36:00.000000000 +0100
@@ -53,8 +53,8 @@
#include <linux/moduleparam.h>
#include <asm/idals.h>
-#include "ctcm_mpc.h"
#include "ctcm_main.h"
+#include "ctcm_mpc.h"
#include "ctcm_fsms.h"
static const struct xid2 init_xid = {
@@ -132,7 +132,7 @@ void ctcmpc_dumpit(char *buf, int len)
__u32 ct, sw, rm, dup;
char *ptr, *rptr;
char tbuf[82], tdup[82];
- #if (UTS_MACHINE == s390x)
+ #ifdef CONFIG_64BIT
char addr[22];
#else
char addr[12];
@@ -149,8 +149,8 @@ void ctcmpc_dumpit(char *buf, int len)
for (ct = 0; ct < len; ct++, ptr++, rptr++) {
if (sw == 0) {
- #if (UTS_MACHINE == s390x)
- sprintf(addr, "%16.16lx", (__u64)rptr);
+ #ifdef CONFIG_64BIT
+ sprintf(addr, "%16.16llx", (__u64)rptr);
#else
sprintf(addr, "%8.8X", (__u32)rptr);
#endif
@@ -164,8 +164,8 @@ void ctcmpc_dumpit(char *buf, int len)
if (sw == 8)
strcat(bhex, " ");
- #if (UTS_MACHINE == s390x)
- sprintf(tbuf, "%2.2lX", (__u64)*ptr);
+ #if CONFIG_64BIT
+ sprintf(tbuf, "%2.2llX", (__u64)*ptr);
#else
sprintf(tbuf, "%2.2X", (__u32)*ptr);
#endif
next prev parent reply other threads:[~2012-03-07 12:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-07 12:06 [patch 0/7] s390: network driver fixes for net-next frank.blaschka
2012-03-07 12:06 ` [patch 1/7] [PATCH] af_iucv: handle netdev events frank.blaschka
2012-03-07 12:06 ` [patch 2/7] [PATCH] af_iucv: add shutdown for HS transport frank.blaschka
2012-03-07 12:06 ` [patch 3/7] [PATCH] qeth: synchronize discipline module loading frank.blaschka
2012-03-07 12:06 ` frank.blaschka [this message]
2012-03-07 12:20 ` [patch 4/7] [PATCH] ctcm: make ctcmpc debugging compilable David Laight
2012-03-07 12:20 ` David Laight
2012-03-07 12:06 ` [patch 5/7] [PATCH] ctcm: use correct idal word list for ctcmpc frank.blaschka
2012-03-07 12:06 ` [patch 6/7] [PATCH] qeth: meaningful return code for set_mac_address frank.blaschka
2012-03-07 12:06 ` [patch 7/7] [PATCH] lcs: Return zero from ccwgroup devs set_offline function frank.blaschka
2012-03-08 6:52 ` [patch 0/7] s390: network driver fixes for net-next David Miller
[not found] <OFA80676C5.CF55E2E0-ONC12579BA.005B3444-C12579BA.005B44A4@de.ibm.com>
2012-03-07 16:53 ` [patch 4/7] [PATCH] ctcm: make ctcmpc debugging compilable Ursula Braun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120307120707.933695671@de.ibm.com \
--to=frank.blaschka@de.ibm.com \
--cc=davem@davemloft.net \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ursula.braun@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.