patch-2.3.45 linux/drivers/net/sk_g16.c
Next file: linux/drivers/net/smc-mca.c
Previous file: linux/drivers/net/sis900.c
Back to the patch index
Back to the overall index
- Lines: 65
- Date:
Sun Feb 13 18:20:21 2000
- Orig file:
v2.3.44/linux/drivers/net/sk_g16.c
- Orig date:
Thu Feb 10 17:11:11 2000
diff -u --recursive --new-file v2.3.44/linux/drivers/net/sk_g16.c linux/drivers/net/sk_g16.c
@@ -472,6 +472,7 @@
int SK_init(struct net_device *dev);
static int SK_probe(struct net_device *dev, short ioaddr);
+static void SK_timeout(struct net_device *dev);
static int SK_open(struct net_device *dev);
static int SK_send_packet(struct sk_buff *skb, struct net_device *dev);
static void SK_interrupt(int irq, void *dev_id, struct pt_regs * regs);
@@ -778,11 +779,13 @@
/* Assign our Device Driver functions */
- dev->open = &SK_open;
- dev->stop = &SK_close;
- dev->hard_start_xmit = &SK_send_packet;
- dev->get_stats = &SK_get_stats;
- dev->set_multicast_list = &set_multicast_list;
+ dev->open = SK_open;
+ dev->stop = SK_close;
+ dev->hard_start_xmit = SK_send_packet;
+ dev->get_stats = SK_get_stats;
+ dev->set_multicast_list = set_multicast_list;
+ dev->tx_timeout = SK_timeout;
+ dev->watchdog_timeo = HZ/7;
/* Set the generic fields of the device structure */
@@ -1169,30 +1172,18 @@
* YY/MM/DD uid Description
-*/
-static int SK_send_packet(struct sk_buff *skb, struct net_device *dev)
+static int SK_timeout(struct net_device *dev)
{
- struct priv *p = (struct priv *) dev->priv;
- struct tmd *tmdp;
-
- if (test_bit(LINK_STATE_XOFF, &dev->flags))
- {
- /* if Transmitter more than 150ms busy -> time_out */
-
- int tickssofar = jiffies - dev->trans_start;
- if (tickssofar < 15)
- {
- return 1; /* We have to try transmit later */
- }
-
- printk("%s: xmitter timed out, try to restart!\n", dev->name);
-
+ printk(KERN_WARNING "%s: xmitter timed out, try to restart!\n", dev->name);
SK_lance_init(dev, MODE_NORMAL); /* Reinit LANCE */
-
netif_start_queue(dev); /* Clear Transmitter flag */
-
dev->trans_start = jiffies; /* Mark Start of transmission */
+}
- }
+static int SK_send_packet(struct sk_buff *skb, struct net_device *dev)
+{
+ struct priv *p = (struct priv *) dev->priv;
+ struct tmd *tmdp;
PRINTK2(("## %s: SK_send_packet() called, CSR0 %#04x.\n",
SK_NAME, SK_read_reg(CSR0)));
FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen (who was at: [email protected])