- lcs: Don't free net_device in lcs_stop_device.
- lcs: Reset card after LGW initiaited stoplan.
- lcs: Fix bug in lcs_tasklet
- ctc: Get channel structure from private pointer. Remove __NO_VERSION__.
- lcs,ctc,iucv: Remove MOD_INC_USE_COUNT/MOD_DEC_USE_COUNT. Set dev->owner.
or zSeries. This device driver supports Token Ring (IEEE 802.5),
FDDI (IEEE 802.7) and Ethernet.
This option is also available as a module which will be
- called lcs.o . If you do not know what it is, it's safe to say "Y".
+ called lcs.ko. If you do not know what it is, it's safe to say "Y".
config CTC
tristate "CTC device support"
coupling using ESCON. It also supports virtual CTCs when running
under VM. It will use the channel device configuration if this is
available. This option is also available as a module which will be
- called ctc.o. If you do not know what it is, it's safe to say "Y".
+ called ctc.ko. If you do not know what it is, it's safe to say "Y".
config IUCV
tristate "IUCV device support (VM only)"
help
Select this option if you want to use inter-user communication
vehicle networking under VM or VIF. This option is also available
- as a module which will be called iucv.o. If unsure, say "Y".
+ as a module which will be called iucv.ko. If unsure, say "Y".
config CCWGROUP
tristate
/*
- * $Id: ctcmain.c,v 1.36 2003/02/18 09:15:14 mschwide Exp $
+ * $Id: ctcmain.c,v 1.40 2003/04/08 16:00:17 mschwide Exp $
*
* CTC / ESCON network driver
*
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.36 $
+ * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.40 $
*
*/
\f
#undef DEBUG
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
print_banner(void)
{
static int printed = 0;
- char vbuf[] = "$Revision: 1.36 $";
+ char vbuf[] = "$Revision: 1.40 $";
char *version = vbuf;
if (printed)
}
priv = cdev->dev.driver_data;
- ch = (struct channel *) intparm;
- if ((ch != priv->channel[READ]) && (ch != priv->channel[WRITE]))
- ch = NULL;
-
- if (!ch) {
- /* Try to extract channel from driver data. */
- if (priv->channel[READ]->cdev == cdev)
- ch = priv->channel[READ];
- else if (priv->channel[WRITE]->cdev == cdev)
- ch = priv->channel[READ];
- else {
- printk(KERN_ERR
- "ctc: Can't determine channel for interrupt, "
- "device %s\n", cdev->dev.bus_id);
- return;
- }
+
+ /* Try to extract channel from driver data. */
+ if (priv->channel[READ]->cdev == cdev)
+ ch = priv->channel[READ];
+ else if (priv->channel[WRITE]->cdev == cdev)
+ ch = priv->channel[READ];
+ else {
+ printk(KERN_ERR
+ "ctc: Can't determine channel for interrupt, "
+ "device %s\n", cdev->dev.bus_id);
+ return;
}
dev = (struct net_device *) (ch->netdev);
static int
ctc_open(struct net_device * dev)
{
- MOD_INC_USE_COUNT;
fsm_event(((struct ctc_priv *) dev->priv)->fsm, DEV_EVENT_START, dev);
return 0;
}
ctc_close(struct net_device * dev)
{
fsm_event(((struct ctc_priv *) dev->priv)->fsm, DEV_EVENT_STOP, dev);
- MOD_DEC_USE_COUNT;
return 0;
}
dev->addr_len = 0;
dev->type = ARPHRD_SLIP;
dev->tx_queue_len = 100;
+ dev->owner = THIS_MODULE;
dev->flags = IFF_POINTOPOINT | IFF_NOARP;
return dev;
}
/*
- * $Id: ctctty.c,v 1.9 2002/12/02 15:25:13 aberg Exp $
+ * $Id: ctctty.c,v 1.10 2003/03/21 18:47:31 aberg Exp $
*
* CTC / ESCON network driver, tty interface.
*
*
*/
-#define __NO_VERSION__
#include <linux/config.h>
#include <linux/module.h>
#include <linux/tty.h>
/**
- * $Id: fsm.c,v 1.3 2002/10/08 16:53:45 mschwide Exp $
+ * $Id: fsm.c,v 1.4 2003/03/28 08:54:40 mschwide Exp $
*
* A generic FSM based on fsm used in isdn4linux
*
*/
#include "fsm.h"
-#include <linux/version.h>
#include <linux/config.h>
#include <linux/module.h>
#include <linux/timer.h>
/*
- * $Id: iucv.c,v 1.9 2002/11/06 13:37:25 cohuck Exp $
+ * $Id: iucv.c,v 1.10 2003/03/28 08:54:40 mschwide Exp $
*
* IUCV network driver
*
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * RELEASE-TAG: IUCV lowlevel driver $Revision: 1.9 $
+ * RELEASE-TAG: IUCV lowlevel driver $Revision: 1.10 $
*
*/
\f
#include <linux/module.h>
#include <linux/config.h>
-#include <linux/version.h>
#include <linux/spinlock.h>
#include <linux/kernel.h>
#include <linux/slab.h>
static void
iucv_banner(void)
{
- char vbuf[] = "$Revision: 1.9 $";
+ char vbuf[] = "$Revision: 1.10 $";
char *version = vbuf;
if ((version = strchr(version, ':'))) {
* Frank Pavlic (pavlic@de.ibm.com) and
* Martin Schwidefsky <schwidefsky@de.ibm.com>
*
- * $Revision: 1.44 $ $Date: 2003/02/18 19:49:02 $
+ * $Revision: 1.51 $ $Date: 2003/03/28 08:54:40 $
*
* 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
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/if.h>
#include <linux/netdevice.h>
/**
* initialization string for output
*/
-#define VERSION_LCS_C "$Revision: 1.44 $"
+#define VERSION_LCS_C "$Revision: 1.51 $"
static char version[] __initdata = "LCS driver ("VERSION_LCS_C "/" VERSION_LCS_H ")";
(void *)lcs_start_kernel_thread,card);
card->thread_mask = 0;
spin_lock_init(&card->lock);
+#ifdef CONFIG_IP_MULTICAST
INIT_LIST_HEAD(&card->ipm_list);
+#endif
INIT_LIST_HEAD(&card->lancmd_waiters);
return 0;
}
kfree(ipm_list);
}
#endif
+ kfree(card->dev);
/* Cleanup channels. */
lcs_cleanup_channel(&card->write);
lcs_cleanup_channel(&card->read);
static int
__lcs_processed_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer)
{
- int index, prevprev, prev, next;
+ int index, prev, next;
if (buffer->state != BUF_STATE_READY)
BUG();
buffer->state = BUF_STATE_PROCESSED;
index = buffer - channel->iob;
- prevprev = (index - 1) & (LCS_NUM_BUFFS - 1);
prev = (index - 1) & (LCS_NUM_BUFFS - 1);
next = (index + 1) & (LCS_NUM_BUFFS - 1);
/* Set the suspend bit and clear the PCI bit of this buffer. */
unsigned long flags;
struct lcs_channel *channel;
struct lcs_buffer *iob;
- int buf_idx, io_idx;
+ int buf_idx;
int rc;
channel = (struct lcs_channel *) data;
/* Check for processed buffers. */
iob = channel->iob;
buf_idx = channel->buf_idx;
- io_idx = channel->io_idx;
- while (buf_idx != io_idx &&
- iob[buf_idx].state == BUF_STATE_PROCESSED) {
+ while (iob[buf_idx].state == BUF_STATE_PROCESSED) {
/* Do the callback thing. */
if (iob[buf_idx].callback != NULL)
iob[buf_idx].callback(channel, iob + buf_idx);
lcs_lgw_stoplan_thread(void *data)
{
struct lcs_card *card;
+ int rc;
card = (struct lcs_card *) data;
daemonize("lgwstop");
else
PRINT_ERR("Stoplan %s initiated by LGW failed!\n",
card->dev->name);
- return 0;
+ /*Try to reset the card, stop it on failure */
+ rc = lcs_resetcard(card);
+ if (rc != 0)
+ rc = lcs_stopcard(card);
+ return rc;
}
/**
kernel_thread(lcs_lgw_startlan_thread, (void *) card, SIGCHLD);
if (test_and_clear_bit(2, &card->thread_mask))
kernel_thread(lcs_lgw_stoplan_thread, (void *) card, SIGCHLD);
+#ifdef CONFIG_IP_MULTICAST
if (test_and_clear_bit(3, &card->thread_mask))
kernel_thread(lcs_fix_multicast_list, (void *) card, SIGCHLD);
+#endif
}
/**
LCS_DBF_TEXT(2, trace, "stopdev");
card = (struct lcs_card *) dev->priv;
netif_stop_queue(dev);
- // FIXME: really free the net_device here ?!?
- kfree(card->dev);
rc = lcs_stopcard(card);
if (rc)
PRINT_ERR("Try it again!\n ");
- MOD_DEC_USE_COUNT;
return rc;
}
PRINT_ERR("LCS:Error in opening device!\n");
} else {
- MOD_INC_USE_COUNT;
netif_wake_queue(dev);
card->state = DEV_STATE_UP;
}
dev->set_multicast_list = lcs_set_multicast_list;
#endif
dev->get_stats = lcs_getstats;
+ dev->owner = THIS_MODULE;
netif_stop_queue(dev);
lcs_stopcard(card);
return 0;
/*
- * $Id: netiucv.c,v 1.16 2003/02/18 09:15:14 mschwide Exp $
+ * $Id: netiucv.c,v 1.19 2003/04/08 16:00:17 mschwide Exp $
*
* IUCV network driver
*
* 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.16 $
+ * RELEASE-TAG: IUCV network driver $Revision: 1.19 $
*
*/
\f
*/
static int
netiucv_open(struct net_device *dev) {
- MOD_INC_USE_COUNT;
SET_DEVICE_START(dev, 1);
fsm_event(((struct netiucv_priv *)dev->priv)->fsm, DEV_EVENT_START, dev);
return 0;
netiucv_close(struct net_device *dev) {
SET_DEVICE_START(dev, 0);
fsm_event(((struct netiucv_priv *)dev->priv)->fsm, DEV_EVENT_STOP, dev);
- MOD_DEC_USE_COUNT;
return 0;
}
conn->max_buffsize = NETIUCV_BUFSIZE_DEFAULT;
conn->netdev = dev;
- conn->rx_buff = alloc_skb(NETIUCV_BUFSIZE_DEFAULT, GFP_DMA);
+ conn->rx_buff = alloc_skb(NETIUCV_BUFSIZE_DEFAULT,
+ GFP_KERNEL | GFP_DMA);
if (!conn->rx_buff) {
kfree(conn);
return NULL;
}
- conn->tx_buff = alloc_skb(NETIUCV_BUFSIZE_DEFAULT, GFP_DMA);
+ conn->tx_buff = alloc_skb(NETIUCV_BUFSIZE_DEFAULT,
+ GFP_KERNEL | GFP_DMA);
if (!conn->tx_buff) {
kfree_skb(conn->rx_buff);
kfree(conn);
dev->addr_len = 0;
dev->type = ARPHRD_SLIP;
dev->tx_queue_len = NETIUCV_QUEUELEN_DEFAULT;
+ dev->owner = THIS_MODULE;
dev->flags = IFF_POINTOPOINT | IFF_NOARP;
return dev;
}
static void
netiucv_banner(void)
{
- char vbuf[] = "$Revision: 1.16 $";
+ char vbuf[] = "$Revision: 1.19 $";
char *version = vbuf;
if ((version = strchr(version, ':'))) {