Skip to contentSkip to conversation

s390 (5/12): network driver fixes.

PATCH New Martin Schwidefsky 1 participant 1 message Apr 8, 2004

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390 (5/12): network driver fixes.

Network driver changes:
- ctc: move kfree of driver structure after the last use of it.
- netiucv: stay in state startwait if peer is down.
- lcs: initialize ipm_list and unregister netdev only if it is present.

diffstat:

 drivers/s390/net/ctctty.c  |    4 +-
 drivers/s390/net/lcs.c     |   10 +++--
 drivers/s390/net/netiucv.c |   88 ++++++++++++++-------------------------------
 3 files changed, 37 insertions(+), 65 deletions(-)
drivers/s390/net/ctctty.c +2 -2
diff -urN linux-2.6/drivers/s390/net/ctctty.c linux-2.6-s390/drivers/s390/net/ctctty.c
@@ -1,5 +1,5 @@
 /*
- * $Id: ctctty.c,v 1.16 2004/02/05 12:39:55 felfert Exp $
+ * $Id: ctctty.c,v 1.17 2004/03/31 17:06:34 ptiedem Exp $
  *
  * CTC / ESCON network driver, tty interface.
  *
@@ -1232,7 +1232,7 @@
 	ctc_tty_shuttingdown = 1;
 	spin_unlock_irqrestore(&ctc_tty_lock, saveflags);
 	tty_unregister_driver(driver->ctc_tty_device);
-	kfree(driver);
 	put_tty_driver(driver->ctc_tty_device);
+	kfree(driver);
 	driver = NULL;
 }
drivers/s390/net/lcs.c +7 -3
diff -urN linux-2.6/drivers/s390/net/lcs.c linux-2.6-s390/drivers/s390/net/lcs.c
@@ -11,7 +11,7 @@
  *			  Frank Pavlic ([email protected]) and
  *		 	  Martin Schwidefsky <[email protected]>
  *
- *    $Revision: 1.72 $	 $Date: 2004/03/22 09:34:27 $
+ *    $Revision: 1.74 $	 $Date: 2004/04/05 00:01:04 $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -58,7 +58,7 @@
 /**
  * initialization string for output
  */
-#define VERSION_LCS_C  "$Revision: 1.72 $"
+#define VERSION_LCS_C  "$Revision: 1.74 $"
 
 static char version[] __initdata = "LCS driver ("VERSION_LCS_C "/" VERSION_LCS_H ")";
 static char debug_buffer[255];
@@ -206,6 +206,9 @@
 		return NULL;
 	}
 
+#ifdef CONFIG_IP_MULTICAST
+	INIT_LIST_HEAD(&card->ipm_list);
+#endif
 	LCS_DBF_HEX(2, setup, &card, sizeof(void*));
 	return card;
 }
@@ -1967,7 +1970,8 @@
 	if (ccwgdev->state == CCWGROUP_ONLINE) {
 		lcs_shutdown_device(ccwgdev);
 	}
-	unregister_netdev(card->dev);
+	if (card->dev)
+		unregister_netdev(card->dev);
 	sysfs_remove_group(&ccwgdev->dev.kobj, &lcs_attr_group);
 	lcs_cleanup_card(card);
 	lcs_free_card(card);
drivers/s390/net/netiucv.c +28 -60

255 lines not on this page · raw message