X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fs390%2Fnet%2Fnetiucv.c;h=b452cc1afd550a5c7c24ed4bde87db498539952c;hb=672c6108a51bf559d19595d9f8193dfd81f0f752;hp=ac4c4b83fe1701f297329c03e1ef9f2f1a7a752d;hpb=0825788ff27c7145e9d558cb2a26f3837d1f9be5;p=powerpc.git diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index ac4c4b83fe..b452cc1afd 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c @@ -1,6 +1,4 @@ /* - * $Id: netiucv.c,v 1.69 2006/01/12 14:33:09 cohuck Exp $ - * * IUCV network driver * * Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation @@ -31,10 +29,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * RELEASE-TAG: IUCV network driver $Revision: 1.69 $ - * */ - + #undef DEBUG #include @@ -69,7 +65,7 @@ MODULE_AUTHOR ("(C) 2001 IBM Corporation by Fritz Elfert (felfert@millenux.com)"); MODULE_DESCRIPTION ("Linux for S/390 IUCV network driver"); - + #define PRINTK_HEADER " iucv: " /* for debugging */ static struct device_driver netiucv_driver = { @@ -206,7 +202,7 @@ netiucv_printname(char *name) *p = '\0'; return tmp; } - + /** * States of the interface statemachine. */ @@ -248,7 +244,7 @@ static const char *dev_event_names[] = { "Connection up", "Connection down", }; - + /** * Events of the connection statemachine */ @@ -368,7 +364,7 @@ static const char *conn_state_names[] = { "Connect error", }; - + /** * Debug Facility Stuff */ @@ -520,7 +516,7 @@ static void fsm_action_nop(fsm_instance *fi, int event, void *arg) { } - + /** * Actions of the connection statemachine *****************************************************************************/ @@ -997,7 +993,7 @@ static const fsm_node conn_fsm[] = { static const int CONN_FSM_LEN = sizeof(conn_fsm) / sizeof(fsm_node); - + /** * Actions for interface - statemachine. *****************************************************************************/ @@ -1186,7 +1182,7 @@ netiucv_transmit_skb(struct iucv_connection *conn, struct sk_buff *skb) { fsm_newstate(conn->fsm, CONN_STATE_TX); conn->prof.send_stamp = xtime; - + rc = iucv_send(conn->pathid, NULL, 0, 0, 1 /* single_flag */, 0, nskb->data, nskb->len); /* Shut up, gcc! nskb is always below 2G. */ @@ -1224,7 +1220,7 @@ netiucv_transmit_skb(struct iucv_connection *conn, struct sk_buff *skb) { return rc; } - + /** * Interface API for upper network layers *****************************************************************************/ @@ -1295,7 +1291,7 @@ static int netiucv_tx(struct sk_buff *skb, struct net_device *dev) /** * If connection is not running, try to restart it - * and throw away packet. + * and throw away packet. */ if (fsm_getstate(privptr->fsm) != DEV_STATE_RUNNING) { fsm_event(privptr->fsm, DEV_EVENT_START, dev); @@ -1542,7 +1538,7 @@ static ssize_t maxcq_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct netiucv_priv *priv = dev->driver_data; - + IUCV_DBF_TEXT(trace, 4, __FUNCTION__); priv->conn->prof.maxcqueue = 0; return count; @@ -1563,7 +1559,7 @@ static ssize_t sdoio_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct netiucv_priv *priv = dev->driver_data; - + IUCV_DBF_TEXT(trace, 4, __FUNCTION__); priv->conn->prof.doios_single = 0; return count; @@ -1584,7 +1580,7 @@ static ssize_t mdoio_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct netiucv_priv *priv = dev->driver_data; - + IUCV_DBF_TEXT(trace, 5, __FUNCTION__); priv->conn->prof.doios_multi = 0; return count; @@ -1605,7 +1601,7 @@ static ssize_t txlen_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct netiucv_priv *priv = dev->driver_data; - + IUCV_DBF_TEXT(trace, 4, __FUNCTION__); priv->conn->prof.txlen = 0; return count; @@ -1626,7 +1622,7 @@ static ssize_t txtime_write (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct netiucv_priv *priv = dev->driver_data; - + IUCV_DBF_TEXT(trace, 4, __FUNCTION__); priv->conn->prof.tx_time = 0; return count; @@ -1732,14 +1728,13 @@ static int netiucv_register_device(struct net_device *ndev) { struct netiucv_priv *priv = ndev->priv; - struct device *dev = kmalloc(sizeof(struct device), GFP_KERNEL); + struct device *dev = kzalloc(sizeof(struct device), GFP_KERNEL); int ret; IUCV_DBF_TEXT(trace, 3, __FUNCTION__); if (dev) { - memset(dev, 0, sizeof(struct device)); snprintf(dev->bus_id, BUS_ID_SIZE, "net%s", ndev->name); dev->bus = &iucv_bus; dev->parent = iucv_root; @@ -1788,11 +1783,9 @@ netiucv_new_connection(struct net_device *dev, char *username) { struct iucv_connection **clist = &iucv_connections; struct iucv_connection *conn = - (struct iucv_connection *) - kmalloc(sizeof(struct iucv_connection), GFP_KERNEL); + kzalloc(sizeof(struct iucv_connection), GFP_KERNEL); if (conn) { - memset(conn, 0, sizeof(struct iucv_connection)); skb_queue_head_init(&conn->collect_queue); skb_queue_head_init(&conn->commit_queue); conn->max_buffsize = NETIUCV_BUFSIZE_DEFAULT; @@ -2007,7 +2000,7 @@ conn_write(struct device_driver *drv, const char *buf, size_t count) } PRINT_INFO("%s: '%s'\n", dev->name, netiucv_printname(username)); - + return count; out_free_ndev: @@ -2077,16 +2070,7 @@ DRIVER_ATTR(remove, 0200, NULL, remove_write); static void netiucv_banner(void) { - char vbuf[] = "$Revision: 1.69 $"; - char *version = vbuf; - - if ((version = strchr(version, ':'))) { - char *p = strchr(version + 1, '$'); - if (p) - *p = '\0'; - } else - version = " ??? "; - PRINT_INFO("NETIUCV driver Version%s initialized\n", version); + PRINT_INFO("NETIUCV driver initialized\n"); } static void __exit @@ -2115,7 +2099,7 @@ static int __init netiucv_init(void) { int ret; - + ret = iucv_register_dbf_views(); if (ret) { PRINT_WARN("netiucv_init failed, " @@ -2144,7 +2128,7 @@ netiucv_init(void) } return ret; } - + module_init(netiucv_init); module_exit(netiucv_exit); MODULE_LICENSE("GPL");