diff options
author | Peter Tiedemann <ptiedem@de.ibm.com> | 2008-12-25 07:39:54 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-12-25 07:39:27 -0500 |
commit | 2a7c6f2c39d1291e55403676b25fcfbff78fc5fb (patch) | |
tree | b37f40a4f4b582e9e3eafa8da923a098c62a7c09 /drivers/s390/net/ctcm_fsms.c | |
parent | ecf39d42129767c0b4b4a6cf4997c1219c860934 (diff) |
[S390] convert ctcm printks to dev_xxx and pr_xxx macros.
Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/net/ctcm_fsms.c')
-rw-r--r-- | drivers/s390/net/ctcm_fsms.c | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/drivers/s390/net/ctcm_fsms.c b/drivers/s390/net/ctcm_fsms.c index 42776550acfd..f29c7086fc19 100644 --- a/drivers/s390/net/ctcm_fsms.c +++ b/drivers/s390/net/ctcm_fsms.c | |||
@@ -13,6 +13,9 @@ | |||
13 | #undef DEBUGDATA | 13 | #undef DEBUGDATA |
14 | #undef DEBUGCCW | 14 | #undef DEBUGCCW |
15 | 15 | ||
16 | #define KMSG_COMPONENT "ctcm" | ||
17 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
18 | |||
16 | #include <linux/module.h> | 19 | #include <linux/module.h> |
17 | #include <linux/init.h> | 20 | #include <linux/init.h> |
18 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
@@ -190,21 +193,22 @@ static void ctcmpc_chx_send_sweep(fsm_instance *fsm, int event, void *arg); | |||
190 | void ctcm_ccw_check_rc(struct channel *ch, int rc, char *msg) | 193 | void ctcm_ccw_check_rc(struct channel *ch, int rc, char *msg) |
191 | { | 194 | { |
192 | CTCM_DBF_TEXT_(ERROR, CTC_DBF_ERROR, | 195 | CTCM_DBF_TEXT_(ERROR, CTC_DBF_ERROR, |
193 | "%s(%s): %s: %04x\n", | 196 | "%s(%s): %s: %04x\n", |
194 | CTCM_FUNTAIL, ch->id, msg, rc); | 197 | CTCM_FUNTAIL, ch->id, msg, rc); |
195 | switch (rc) { | 198 | switch (rc) { |
196 | case -EBUSY: | 199 | case -EBUSY: |
197 | ctcm_pr_warn("%s (%s): Busy !\n", ch->id, msg); | 200 | pr_info("%s: The communication peer is busy\n", |
201 | ch->id); | ||
198 | fsm_event(ch->fsm, CTC_EVENT_IO_EBUSY, ch); | 202 | fsm_event(ch->fsm, CTC_EVENT_IO_EBUSY, ch); |
199 | break; | 203 | break; |
200 | case -ENODEV: | 204 | case -ENODEV: |
201 | ctcm_pr_emerg("%s (%s): Invalid device called for IO\n", | 205 | pr_err("%s: The specified target device is not valid\n", |
202 | ch->id, msg); | 206 | ch->id); |
203 | fsm_event(ch->fsm, CTC_EVENT_IO_ENODEV, ch); | 207 | fsm_event(ch->fsm, CTC_EVENT_IO_ENODEV, ch); |
204 | break; | 208 | break; |
205 | default: | 209 | default: |
206 | ctcm_pr_emerg("%s (%s): Unknown error in do_IO %04x\n", | 210 | pr_err("An I/O operation resulted in error %04x\n", |
207 | ch->id, msg, rc); | 211 | rc); |
208 | fsm_event(ch->fsm, CTC_EVENT_IO_UNKNOWN, ch); | 212 | fsm_event(ch->fsm, CTC_EVENT_IO_UNKNOWN, ch); |
209 | } | 213 | } |
210 | } | 214 | } |
@@ -886,8 +890,15 @@ static void ctcm_chx_rxiniterr(fsm_instance *fi, int event, void *arg) | |||
886 | fsm_newstate(fi, CTC_STATE_RXERR); | 890 | fsm_newstate(fi, CTC_STATE_RXERR); |
887 | fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev); | 891 | fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev); |
888 | } | 892 | } |
889 | } else | 893 | } else { |
890 | ctcm_pr_warn("%s: Error during RX init handshake\n", dev->name); | 894 | CTCM_DBF_TEXT_(ERROR, CTC_DBF_ERROR, |
895 | "%s(%s): %s in %s", CTCM_FUNTAIL, ch->id, | ||
896 | ctc_ch_event_names[event], fsm_getstate_str(fi)); | ||
897 | |||
898 | dev_warn(&dev->dev, | ||
899 | "Initialization failed with RX/TX init handshake " | ||
900 | "error %s\n", ctc_ch_event_names[event]); | ||
901 | } | ||
891 | } | 902 | } |
892 | 903 | ||
893 | /** | 904 | /** |
@@ -969,7 +980,9 @@ static void ctcm_chx_txiniterr(fsm_instance *fi, int event, void *arg) | |||
969 | "%s(%s): %s in %s", CTCM_FUNTAIL, ch->id, | 980 | "%s(%s): %s in %s", CTCM_FUNTAIL, ch->id, |
970 | ctc_ch_event_names[event], fsm_getstate_str(fi)); | 981 | ctc_ch_event_names[event], fsm_getstate_str(fi)); |
971 | 982 | ||
972 | ctcm_pr_warn("%s: Error during TX init handshake\n", dev->name); | 983 | dev_warn(&dev->dev, |
984 | "Initialization failed with RX/TX init handshake " | ||
985 | "error %s\n", ctc_ch_event_names[event]); | ||
973 | } | 986 | } |
974 | } | 987 | } |
975 | 988 | ||
@@ -2101,14 +2114,11 @@ static void dev_action_restart(fsm_instance *fi, int event, void *arg) | |||
2101 | CTCMY_DBF_DEV_NAME(TRACE, dev, ""); | 2114 | CTCMY_DBF_DEV_NAME(TRACE, dev, ""); |
2102 | 2115 | ||
2103 | if (IS_MPC(priv)) { | 2116 | if (IS_MPC(priv)) { |
2104 | ctcm_pr_info("ctcm: %s Restarting Device and " | ||
2105 | "MPC Group in 5 seconds\n", | ||
2106 | dev->name); | ||
2107 | restart_timer = CTCM_TIME_1_SEC; | 2117 | restart_timer = CTCM_TIME_1_SEC; |
2108 | } else { | 2118 | } else { |
2109 | ctcm_pr_info("%s: Restarting\n", dev->name); | ||
2110 | restart_timer = CTCM_TIME_5_SEC; | 2119 | restart_timer = CTCM_TIME_5_SEC; |
2111 | } | 2120 | } |
2121 | dev_info(&dev->dev, "Restarting device\n"); | ||
2112 | 2122 | ||
2113 | dev_action_stop(fi, event, arg); | 2123 | dev_action_stop(fi, event, arg); |
2114 | fsm_event(priv->fsm, DEV_EVENT_STOP, dev); | 2124 | fsm_event(priv->fsm, DEV_EVENT_STOP, dev); |
@@ -2150,16 +2160,16 @@ static void dev_action_chup(fsm_instance *fi, int event, void *arg) | |||
2150 | case DEV_STATE_STARTWAIT_RX: | 2160 | case DEV_STATE_STARTWAIT_RX: |
2151 | if (event == DEV_EVENT_RXUP) { | 2161 | if (event == DEV_EVENT_RXUP) { |
2152 | fsm_newstate(fi, DEV_STATE_RUNNING); | 2162 | fsm_newstate(fi, DEV_STATE_RUNNING); |
2153 | ctcm_pr_info("%s: connected with remote side\n", | 2163 | dev_info(&dev->dev, |
2154 | dev->name); | 2164 | "Connected with remote side\n"); |
2155 | ctcm_clear_busy(dev); | 2165 | ctcm_clear_busy(dev); |
2156 | } | 2166 | } |
2157 | break; | 2167 | break; |
2158 | case DEV_STATE_STARTWAIT_TX: | 2168 | case DEV_STATE_STARTWAIT_TX: |
2159 | if (event == DEV_EVENT_TXUP) { | 2169 | if (event == DEV_EVENT_TXUP) { |
2160 | fsm_newstate(fi, DEV_STATE_RUNNING); | 2170 | fsm_newstate(fi, DEV_STATE_RUNNING); |
2161 | ctcm_pr_info("%s: connected with remote side\n", | 2171 | dev_info(&dev->dev, |
2162 | dev->name); | 2172 | "Connected with remote side\n"); |
2163 | ctcm_clear_busy(dev); | 2173 | ctcm_clear_busy(dev); |
2164 | } | 2174 | } |
2165 | break; | 2175 | break; |