]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ctcm: make ctcmpc debugging compilable
authorUrsula Braun <ursula.braun@de.ibm.com>
Wed, 7 Mar 2012 02:06:26 +0000 (02:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Mar 2012 06:52:25 +0000 (22:52 -0800)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/ctcm_main.c
drivers/s390/net/ctcm_mpc.c

index 5cb93a8e340326b5a23a4d6e3c3e64a75b09749b..11f3b071f30539abd07001c25b09f9213fb6effa 100644 (file)
@@ -562,6 +562,9 @@ static int ctcm_transmit_skb(struct channel *ch, struct sk_buff *skb)
                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);
index da4c747335e7ca448f5c69d803ba7dd898242df1..ac7975b7a837a9a3db240787d162e57d0fe26e17 100644 (file)
@@ -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