mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 14:21:47 +00:00
[S390] convert iucv printks to dev_xxx and pr_xxx macros.
Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
136f7a1c42
commit
8f7c502c26
@ -31,6 +31,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define KMSG_COMPONENT "netiucv"
|
||||||
|
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
|
||||||
|
|
||||||
#undef DEBUG
|
#undef DEBUG
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
@ -846,7 +849,8 @@ static void conn_action_connsever(fsm_instance *fi, int event, void *arg)
|
|||||||
|
|
||||||
fsm_deltimer(&conn->timer);
|
fsm_deltimer(&conn->timer);
|
||||||
iucv_path_sever(conn->path, NULL);
|
iucv_path_sever(conn->path, NULL);
|
||||||
PRINT_INFO("%s: Remote dropped connection\n", netdev->name);
|
dev_info(privptr->dev, "The peer interface of the IUCV device"
|
||||||
|
" has closed the connection\n");
|
||||||
IUCV_DBF_TEXT(data, 2,
|
IUCV_DBF_TEXT(data, 2,
|
||||||
"conn_action_connsever: Remote dropped connection\n");
|
"conn_action_connsever: Remote dropped connection\n");
|
||||||
fsm_newstate(fi, CONN_STATE_STARTWAIT);
|
fsm_newstate(fi, CONN_STATE_STARTWAIT);
|
||||||
@ -856,13 +860,15 @@ static void conn_action_connsever(fsm_instance *fi, int event, void *arg)
|
|||||||
static void conn_action_start(fsm_instance *fi, int event, void *arg)
|
static void conn_action_start(fsm_instance *fi, int event, void *arg)
|
||||||
{
|
{
|
||||||
struct iucv_connection *conn = arg;
|
struct iucv_connection *conn = arg;
|
||||||
|
struct net_device *netdev = conn->netdev;
|
||||||
|
struct netiucv_priv *privptr = netdev_priv(netdev);
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
IUCV_DBF_TEXT(trace, 3, __func__);
|
IUCV_DBF_TEXT(trace, 3, __func__);
|
||||||
|
|
||||||
fsm_newstate(fi, CONN_STATE_STARTWAIT);
|
fsm_newstate(fi, CONN_STATE_STARTWAIT);
|
||||||
IUCV_DBF_TEXT_(setup, 2, "%s('%s'): connecting ...\n",
|
IUCV_DBF_TEXT_(setup, 2, "%s('%s'): connecting ...\n",
|
||||||
conn->netdev->name, conn->userid);
|
netdev->name, conn->userid);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We must set the state before calling iucv_connect because the
|
* We must set the state before calling iucv_connect because the
|
||||||
@ -876,41 +882,45 @@ static void conn_action_start(fsm_instance *fi, int event, void *arg)
|
|||||||
NULL, iucvMagic, conn);
|
NULL, iucvMagic, conn);
|
||||||
switch (rc) {
|
switch (rc) {
|
||||||
case 0:
|
case 0:
|
||||||
conn->netdev->tx_queue_len = conn->path->msglim;
|
netdev->tx_queue_len = conn->path->msglim;
|
||||||
fsm_addtimer(&conn->timer, NETIUCV_TIMEOUT_5SEC,
|
fsm_addtimer(&conn->timer, NETIUCV_TIMEOUT_5SEC,
|
||||||
CONN_EVENT_TIMER, conn);
|
CONN_EVENT_TIMER, conn);
|
||||||
return;
|
return;
|
||||||
case 11:
|
case 11:
|
||||||
PRINT_INFO("%s: User %s is currently not available.\n",
|
dev_warn(privptr->dev,
|
||||||
conn->netdev->name,
|
"The IUCV device failed to connect to z/VM guest %s\n",
|
||||||
netiucv_printname(conn->userid));
|
netiucv_printname(conn->userid));
|
||||||
fsm_newstate(fi, CONN_STATE_STARTWAIT);
|
fsm_newstate(fi, CONN_STATE_STARTWAIT);
|
||||||
break;
|
break;
|
||||||
case 12:
|
case 12:
|
||||||
PRINT_INFO("%s: User %s is currently not ready.\n",
|
dev_warn(privptr->dev,
|
||||||
conn->netdev->name,
|
"The IUCV device failed to connect to the peer on z/VM"
|
||||||
netiucv_printname(conn->userid));
|
" guest %s\n", netiucv_printname(conn->userid));
|
||||||
fsm_newstate(fi, CONN_STATE_STARTWAIT);
|
fsm_newstate(fi, CONN_STATE_STARTWAIT);
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
PRINT_WARN("%s: Too many IUCV connections.\n",
|
dev_err(privptr->dev,
|
||||||
conn->netdev->name);
|
"Connecting the IUCV device would exceed the maximum"
|
||||||
|
" number of IUCV connections\n");
|
||||||
fsm_newstate(fi, CONN_STATE_CONNERR);
|
fsm_newstate(fi, CONN_STATE_CONNERR);
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 14:
|
||||||
PRINT_WARN("%s: User %s has too many IUCV connections.\n",
|
dev_err(privptr->dev,
|
||||||
conn->netdev->name,
|
"z/VM guest %s has too many IUCV connections"
|
||||||
netiucv_printname(conn->userid));
|
" to connect with the IUCV device\n",
|
||||||
|
netiucv_printname(conn->userid));
|
||||||
fsm_newstate(fi, CONN_STATE_CONNERR);
|
fsm_newstate(fi, CONN_STATE_CONNERR);
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
PRINT_WARN("%s: No IUCV authorization in CP directory.\n",
|
dev_err(privptr->dev,
|
||||||
conn->netdev->name);
|
"The IUCV device cannot connect to a z/VM guest with no"
|
||||||
|
" IUCV authorization\n");
|
||||||
fsm_newstate(fi, CONN_STATE_CONNERR);
|
fsm_newstate(fi, CONN_STATE_CONNERR);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
PRINT_WARN("%s: iucv_connect returned error %d\n",
|
dev_err(privptr->dev,
|
||||||
conn->netdev->name, rc);
|
"Connecting the IUCV device failed with error %d\n",
|
||||||
|
rc);
|
||||||
fsm_newstate(fi, CONN_STATE_CONNERR);
|
fsm_newstate(fi, CONN_STATE_CONNERR);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1059,8 +1069,9 @@ dev_action_connup(fsm_instance *fi, int event, void *arg)
|
|||||||
switch (fsm_getstate(fi)) {
|
switch (fsm_getstate(fi)) {
|
||||||
case DEV_STATE_STARTWAIT:
|
case DEV_STATE_STARTWAIT:
|
||||||
fsm_newstate(fi, DEV_STATE_RUNNING);
|
fsm_newstate(fi, DEV_STATE_RUNNING);
|
||||||
PRINT_INFO("%s: connected with remote side %s\n",
|
dev_info(privptr->dev,
|
||||||
dev->name, privptr->conn->userid);
|
"The IUCV device has been connected"
|
||||||
|
" successfully to %s\n", privptr->conn->userid);
|
||||||
IUCV_DBF_TEXT(setup, 3,
|
IUCV_DBF_TEXT(setup, 3,
|
||||||
"connection is up and running\n");
|
"connection is up and running\n");
|
||||||
break;
|
break;
|
||||||
@ -1982,6 +1993,8 @@ static ssize_t conn_write(struct device_driver *drv,
|
|||||||
if (rc)
|
if (rc)
|
||||||
goto out_unreg;
|
goto out_unreg;
|
||||||
|
|
||||||
|
dev_info(priv->dev, "The IUCV interface to %s has been"
|
||||||
|
" established successfully\n", netiucv_printname(username));
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
|
|
||||||
@ -2027,10 +2040,9 @@ static ssize_t remove_write (struct device_driver *drv,
|
|||||||
continue;
|
continue;
|
||||||
read_unlock_bh(&iucv_connection_rwlock);
|
read_unlock_bh(&iucv_connection_rwlock);
|
||||||
if (ndev->flags & (IFF_UP | IFF_RUNNING)) {
|
if (ndev->flags & (IFF_UP | IFF_RUNNING)) {
|
||||||
PRINT_WARN("netiucv: net device %s active with peer "
|
dev_warn(dev, "The IUCV device is connected"
|
||||||
"%s\n", ndev->name, priv->conn->userid);
|
" to %s and cannot be removed\n",
|
||||||
PRINT_WARN("netiucv: %s cannot be removed\n",
|
priv->conn->userid);
|
||||||
ndev->name);
|
|
||||||
IUCV_DBF_TEXT(data, 2, "remove_write: still active\n");
|
IUCV_DBF_TEXT(data, 2, "remove_write: still active\n");
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
}
|
}
|
||||||
@ -2062,7 +2074,7 @@ static struct attribute_group *netiucv_drv_attr_groups[] = {
|
|||||||
|
|
||||||
static void netiucv_banner(void)
|
static void netiucv_banner(void)
|
||||||
{
|
{
|
||||||
PRINT_INFO("NETIUCV driver initialized\n");
|
pr_info("driver initialized\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit netiucv_exit(void)
|
static void __exit netiucv_exit(void)
|
||||||
@ -2088,7 +2100,7 @@ static void __exit netiucv_exit(void)
|
|||||||
iucv_unregister(&netiucv_handler, 1);
|
iucv_unregister(&netiucv_handler, 1);
|
||||||
iucv_unregister_dbf_views();
|
iucv_unregister_dbf_views();
|
||||||
|
|
||||||
PRINT_INFO("NETIUCV driver unloaded\n");
|
pr_info("driver unloaded\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
* Author(s): Jennifer Hunt <jenhunt@us.ibm.com>
|
* Author(s): Jennifer Hunt <jenhunt@us.ibm.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define KMSG_COMPONENT "af_iucv"
|
||||||
|
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
@ -616,6 +619,8 @@ static int iucv_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
|
|||||||
struct iucv_sock *iucv = iucv_sk(sk);
|
struct iucv_sock *iucv = iucv_sk(sk);
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
struct iucv_message txmsg;
|
struct iucv_message txmsg;
|
||||||
|
char user_id[9];
|
||||||
|
char appl_id[9];
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = sock_error(sk);
|
err = sock_error(sk);
|
||||||
@ -651,8 +656,15 @@ static int iucv_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
|
|||||||
err = iucv_message_send(iucv->path, &txmsg, 0, 0,
|
err = iucv_message_send(iucv->path, &txmsg, 0, 0,
|
||||||
(void *) skb->data, skb->len);
|
(void *) skb->data, skb->len);
|
||||||
if (err) {
|
if (err) {
|
||||||
if (err == 3)
|
if (err == 3) {
|
||||||
printk(KERN_ERR "AF_IUCV msg limit exceeded\n");
|
user_id[8] = 0;
|
||||||
|
memcpy(user_id, iucv->dst_user_id, 8);
|
||||||
|
appl_id[8] = 0;
|
||||||
|
memcpy(appl_id, iucv->dst_name, 8);
|
||||||
|
pr_err("Application %s on z/VM guest %s"
|
||||||
|
" exceeds message limit\n",
|
||||||
|
user_id, appl_id);
|
||||||
|
}
|
||||||
skb_unlink(skb, &iucv->send_skb_q);
|
skb_unlink(skb, &iucv->send_skb_q);
|
||||||
err = -EPIPE;
|
err = -EPIPE;
|
||||||
goto fail;
|
goto fail;
|
||||||
@ -1190,7 +1202,8 @@ static int __init afiucv_init(void)
|
|||||||
int err;
|
int err;
|
||||||
|
|
||||||
if (!MACHINE_IS_VM) {
|
if (!MACHINE_IS_VM) {
|
||||||
printk(KERN_ERR "AF_IUCV connection needs VM as base\n");
|
pr_err("The af_iucv module cannot be loaded"
|
||||||
|
" without z/VM\n");
|
||||||
err = -EPROTONOSUPPORT;
|
err = -EPROTONOSUPPORT;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,9 @@
|
|||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define KMSG_COMPONENT "iucv"
|
||||||
|
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/moduleparam.h>
|
#include <linux/moduleparam.h>
|
||||||
#include <linux/spinlock.h>
|
#include <linux/spinlock.h>
|
||||||
@ -424,8 +427,8 @@ static void iucv_declare_cpu(void *data)
|
|||||||
err = "Paging or storage error";
|
err = "Paging or storage error";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
printk(KERN_WARNING "iucv_register: iucv_declare_buffer "
|
pr_warning("Defining an interrupt buffer on CPU %i"
|
||||||
"on cpu %i returned error 0x%02x (%s)\n", cpu, rc, err);
|
" failed with 0x%02x (%s)\n", cpu, rc, err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1652,7 +1655,7 @@ static void iucv_external_interrupt(u16 code)
|
|||||||
BUG_ON(p->iptype < 0x01 || p->iptype > 0x09);
|
BUG_ON(p->iptype < 0x01 || p->iptype > 0x09);
|
||||||
work = kmalloc(sizeof(struct iucv_irq_list), GFP_ATOMIC);
|
work = kmalloc(sizeof(struct iucv_irq_list), GFP_ATOMIC);
|
||||||
if (!work) {
|
if (!work) {
|
||||||
printk(KERN_WARNING "iucv_external_interrupt: out of memory\n");
|
pr_warning("iucv_external_interrupt: out of memory\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
memcpy(&work->data, p, sizeof(work->data));
|
memcpy(&work->data, p, sizeof(work->data));
|
||||||
|
Loading…
Reference in New Issue
Block a user