patch-2.4.21 linux-2.4.21/drivers/net/tokenring/lanstreamer.c
Next file: linux-2.4.21/drivers/net/tokenring/madgemc.c
Previous file: linux-2.4.21/drivers/net/tokenring/3c359.c
Back to the patch index
Back to the overall index
- Lines: 60
- Date:
2003-06-13 07:51:35.000000000 -0700
- Orig file:
linux-2.4.20/drivers/net/tokenring/lanstreamer.c
- Orig date:
2002-11-28 15:53:14.000000000 -0800
diff -urN linux-2.4.20/drivers/net/tokenring/lanstreamer.c linux-2.4.21/drivers/net/tokenring/lanstreamer.c
@@ -66,6 +66,8 @@
* the number of TX descriptors to 1, which together can prevent
* the card from locking up the box - <yoder1@us.ibm.com>
* 09/27/02 - New PCI interface + bug fix. - <yoder1@us.ibm.com>
+ * 11/13/02 - Removed free_irq calls which could cause a hang, added
+ * netif_carrier_{on|off} - <yoder1@us.ibm.com>
*
* To Do:
*
@@ -137,7 +139,7 @@
*/
static char version[] = "LanStreamer.c v0.4.0 03/08/01 - Mike Sullivan\n"
- " v0.5.2 09/30/02 - Kent Yoder";
+ " v0.5.3 11/13/02 - Kent Yoder";
static struct pci_device_id streamer_pci_tbl[] __initdata = {
{ PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_TR, PCI_ANY_ID, PCI_ANY_ID,},
@@ -879,6 +881,7 @@
#endif
netif_start_queue(dev);
+ netif_carrier_on(dev);
return 0;
}
@@ -1102,7 +1105,9 @@
ntohs(readw(streamer_mmio + LAPDINC)),
ntohs(readw(streamer_mmio + LAPDINC)),
ntohs(readw(streamer_mmio + LAPDINC)));
- free_irq(dev->irq, dev);
+ netif_stop_queue(dev);
+ netif_carrier_off(dev);
+ printk(KERN_WARNING "%s: Adapter must be manually reset.\n", dev->name);
}
/* SISR_ADAPTER_CHECK */
@@ -1200,6 +1205,7 @@
int i;
netif_stop_queue(dev);
+ netif_carrier_off(dev);
writew(streamer_priv->srb, streamer_mmio + LAPA);
writew(htons(SRB_CLOSE_ADAPTER << 8),streamer_mmio+LAPDINC);
writew(htons(STREAMER_CLEAR_RET_CODE << 8), streamer_mmio+LAPDINC);
@@ -1670,11 +1676,10 @@
/* @TBD. no llc reset on autostreamer writel(readl(streamer_mmio+BCTL)|(3<<13),streamer_mmio+BCTL);
udelay(1);
writel(readl(streamer_mmio+BCTL)&~(3<<13),streamer_mmio+BCTL); */
- netif_stop_queue(dev);
- free_irq(dev->irq, dev);
-
- printk(KERN_WARNING "%s: Adapter has been closed \n", dev->name);
+ netif_stop_queue(dev);
+ netif_carrier_off(dev);
+ printk(KERN_WARNING "%s: Adapter must be manually reset.\n", dev->name);
}
/* If serious error */
if (streamer_priv->streamer_message_level) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)