patch-2.3.44 linux/drivers/net/tlan.c
Next file: linux/drivers/net/tokenring/ibmtr.c
Previous file: linux/drivers/net/sunqe.c
Back to the patch index
Back to the overall index
- Lines: 195
- Date:
Thu Feb 10 19:01:42 2000
- Orig file:
v2.3.43/linux/drivers/net/tlan.c
- Orig date:
Thu Feb 10 17:11:11 2000
diff -u --recursive --new-file v2.3.43/linux/drivers/net/tlan.c linux/drivers/net/tlan.c
@@ -62,6 +62,10 @@
* driver (almost)
* - Other minor stuff
*
+ * v1.4 Feb 10, 2000 - Updated with more changes required after Dave's
+ * network cleanup in 2.3.43pre7 (Tigran & myself)
+ * - Minor stuff.
+ *
*******************************************************************************/
@@ -102,7 +106,7 @@
static u8 *TLanPadBuffer;
static char TLanSignature[] = "TLAN";
static int TLanVersionMajor = 1;
-static int TLanVersionMinor = 3;
+static int TLanVersionMinor = 4;
static TLanAdapterEntry TLanAdapterList[] __initdata = {
@@ -361,7 +365,7 @@
u32 io_base, index;
int found;
- printk(KERN_INFO "ThunderLAN driver v%d.%d:\n",
+ printk(KERN_INFO "ThunderLAN driver v%d.%d\n",
TLanVersionMajor,
TLanVersionMinor);
@@ -461,7 +465,7 @@
*
**************************************************************/
-int TLan_PciProbe(u8 *pci_dfn, u8 *pci_irq, u8 *pci_rev, u32 *pci_io_base, u32 *dl_ix )
+static int __init TLan_PciProbe(u8 *pci_dfn, u8 *pci_irq, u8 *pci_rev, u32 *pci_io_base, u32 *dl_ix )
{
static int dl_index = 0;
static struct pci_dev * pdev = NULL;
@@ -626,7 +630,7 @@
*
**************************************************************/
-int TLan_Open( struct net_device *dev )
+static int TLan_Open( struct net_device *dev )
{
TLanPrivateInfo *priv = (TLanPrivateInfo *) dev->priv;
int err;
@@ -642,7 +646,7 @@
}
netif_start_queue(dev);
-
+
/* NOTE: It might not be necessary to read the stats before a
reset if you don't care what the values are.
*/
@@ -680,7 +684,7 @@
*
**************************************************************/
-int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
+static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
{
TLanPrivateInfo *priv = (TLanPrivateInfo *) dev->priv;
TLanList *tail_list;
@@ -690,7 +694,10 @@
if ( ! priv->phyOnline ) {
TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: %s PHY is not ready\n", dev->name );
- dev_kfree_skb( skb );
+ if (in_irq())
+ dev_kfree_skb_irq(skb);
+ else
+ dev_kfree_skb(skb);
return 0;
}
@@ -748,7 +755,10 @@
CIRC_INC( priv->txTail, TLAN_NUM_TX_LISTS );
if ( bbuf ) {
- dev_kfree_skb( skb );
+ if (in_irq())
+ dev_kfree_skb_irq(skb);
+ else
+ dev_kfree_skb(skb);
}
dev->trans_start = jiffies;
@@ -780,7 +790,7 @@
*
**************************************************************/
-void TLan_HandleInterrupt(int irq, void *dev_id, struct pt_regs *regs)
+static void TLan_HandleInterrupt(int irq, void *dev_id, struct pt_regs *regs)
{
u32 ack;
struct net_device *dev;
@@ -828,7 +838,7 @@
*
**************************************************************/
-int TLan_Close(struct net_device *dev)
+static int TLan_Close(struct net_device *dev)
{
TLanPrivateInfo *priv = (TLanPrivateInfo *) dev->priv;
@@ -866,7 +876,7 @@
*
**************************************************************/
-struct net_device_stats *TLan_GetStats( struct net_device *dev )
+static struct net_device_stats *TLan_GetStats( struct net_device *dev )
{
TLanPrivateInfo *priv = (TLanPrivateInfo *) dev->priv;
int i;
@@ -914,7 +924,7 @@
*
**************************************************************/
-void TLan_SetMulticastList( struct net_device *dev )
+static void TLan_SetMulticastList( struct net_device *dev )
{
struct dev_mc_list *dmi = dev->mc_list;
u32 hash1 = 0;
@@ -1033,7 +1043,7 @@
head_list = priv->txList + priv->txHead;
if ( ! bbuf ) {
- dev_kfree_skb( (struct sk_buff *) head_list->buffer[9].address );
+ dev_kfree_skb_irq( (struct sk_buff *) head_list->buffer[9].address );
head_list->buffer[9].address = 0;
}
@@ -1046,7 +1056,9 @@
priv->stats.tx_bytes += head_list->frameSize;
head_list->cStat = TLAN_CSTAT_UNUSED;
+
netif_start_queue(dev);
+
CIRC_INC( priv->txHead, TLAN_NUM_TX_LISTS );
if ( eoc ) {
TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: Handling TX EOC (Head=%d Tail=%d)\n", priv->txHead, priv->txTail );
@@ -1614,7 +1626,10 @@
list = priv->txList + i;
skb = (struct sk_buff *) list->buffer[9].address;
if ( skb ) {
- dev_kfree_skb( skb );
+ if (in_irq())
+ dev_kfree_skb_irq( skb );
+ else
+ dev_kfree_skb( skb );
list->buffer[9].address = 0;
}
}
@@ -1623,7 +1638,10 @@
list = priv->rxList + i;
skb = (struct sk_buff *) list->buffer[9].address;
if ( skb ) {
- dev_kfree_skb( skb );
+ if (in_irq())
+ dev_kfree_skb_irq( skb );
+ else
+ dev_kfree_skb( skb );
list->buffer[9].address = 0;
}
}
@@ -2413,6 +2431,7 @@
*val = tmp;
spin_unlock_irqrestore(&priv->lock, flags);
+
return err;
} /* TLan_MiiReadReg */
@@ -2552,6 +2571,7 @@
TLan_SetBit( TLAN_NET_SIO_MINTEN, sio );
spin_unlock_irqrestore(&priv->lock, flags);
+
} /* TLan_MiiWriteReg */
@@ -2775,9 +2795,9 @@
goto fail;
}
TLan_EeReceiveByte( dev->base_addr, data, TLAN_EEPROM_STOP );
-
fail:
spin_unlock_irqrestore(&priv->lock, flags);
+
return ret;
} /* TLan_EeReadByte */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)