aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/netiucv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/net/netiucv.c')
-rw-r--r--drivers/s390/net/netiucv.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
index c358764f3264..3d28e1a5bf79 100644
--- a/drivers/s390/net/netiucv.c
+++ b/drivers/s390/net/netiucv.c
@@ -134,18 +134,6 @@ PRINT_##importance(header "%02x %02x %02x %02x %02x %02x %02x %02x " \
134 *(((char*)ptr)+28),*(((char*)ptr)+29), \ 134 *(((char*)ptr)+28),*(((char*)ptr)+29), \
135 *(((char*)ptr)+30),*(((char*)ptr)+31)); 135 *(((char*)ptr)+30),*(((char*)ptr)+31));
136 136
137static inline void iucv_hex_dump(unsigned char *buf, size_t len)
138{
139 size_t i;
140
141 for (i = 0; i < len; i++) {
142 if (i && !(i % 16))
143 printk("\n");
144 printk("%02x ", *(buf + i));
145 }
146 printk("\n");
147}
148
149#define PRINTK_HEADER " iucv: " /* for debugging */ 137#define PRINTK_HEADER " iucv: " /* for debugging */
150 138
151static struct device_driver netiucv_driver = { 139static struct device_driver netiucv_driver = {
@@ -212,7 +200,7 @@ struct iucv_connection {
212 */ 200 */
213static struct list_head iucv_connection_list = 201static struct list_head iucv_connection_list =
214 LIST_HEAD_INIT(iucv_connection_list); 202 LIST_HEAD_INIT(iucv_connection_list);
215static rwlock_t iucv_connection_rwlock = RW_LOCK_UNLOCKED; 203static DEFINE_RWLOCK(iucv_connection_rwlock);
216 204
217/** 205/**
218 * Representation of event-data for the 206 * Representation of event-data for the
@@ -280,7 +268,7 @@ static u8 iucvMagic[16] = {
280 * 268 *
281 * @returns The printable string (static data!!) 269 * @returns The printable string (static data!!)
282 */ 270 */
283static inline char *netiucv_printname(char *name) 271static char *netiucv_printname(char *name)
284{ 272{
285 static char tmp[9]; 273 static char tmp[9];
286 char *p = tmp; 274 char *p = tmp;
@@ -1315,7 +1303,8 @@ static int netiucv_tx(struct sk_buff *skb, struct net_device *dev)
1315 * and throw away packet. 1303 * and throw away packet.
1316 */ 1304 */
1317 if (fsm_getstate(privptr->fsm) != DEV_STATE_RUNNING) { 1305 if (fsm_getstate(privptr->fsm) != DEV_STATE_RUNNING) {
1318 fsm_event(privptr->fsm, DEV_EVENT_START, dev); 1306 if (!in_atomic())
1307 fsm_event(privptr->fsm, DEV_EVENT_START, dev);
1319 dev_kfree_skb(skb); 1308 dev_kfree_skb(skb);
1320 privptr->stats.tx_dropped++; 1309 privptr->stats.tx_dropped++;
1321 privptr->stats.tx_errors++; 1310 privptr->stats.tx_errors++;
@@ -1729,7 +1718,7 @@ static struct attribute_group netiucv_stat_attr_group = {
1729 .attrs = netiucv_stat_attrs, 1718 .attrs = netiucv_stat_attrs,
1730}; 1719};
1731 1720
1732static inline int netiucv_add_files(struct device *dev) 1721static int netiucv_add_files(struct device *dev)
1733{ 1722{
1734 int ret; 1723 int ret;
1735 1724
@@ -1743,7 +1732,7 @@ static inline int netiucv_add_files(struct device *dev)
1743 return ret; 1732 return ret;
1744} 1733}
1745 1734
1746static inline void netiucv_remove_files(struct device *dev) 1735static void netiucv_remove_files(struct device *dev)
1747{ 1736{
1748 IUCV_DBF_TEXT(trace, 3, __FUNCTION__); 1737 IUCV_DBF_TEXT(trace, 3, __FUNCTION__);
1749 sysfs_remove_group(&dev->kobj, &netiucv_stat_attr_group); 1738 sysfs_remove_group(&dev->kobj, &netiucv_stat_attr_group);