
From: Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2004@gmx.net>

Handle going-away devices.


---

 25-akpm/drivers/net/tulip/interrupt.c |    4 ++++
 1 files changed, 4 insertions(+)

diff -puN drivers/net/tulip/interrupt.c~tulip-driver-deadlocks-on-device-removal drivers/net/tulip/interrupt.c
--- 25/drivers/net/tulip/interrupt.c~tulip-driver-deadlocks-on-device-removal	2004-05-25 20:28:58.763354792 -0700
+++ 25-akpm/drivers/net/tulip/interrupt.c	2004-05-25 20:28:58.767354184 -0700
@@ -133,6 +133,10 @@ int tulip_poll(struct net_device *dev, i
 			   tp->rx_ring[entry].status);
 
        do {
+		if (inl(dev->base_addr + CSR5) == 0xffffffff) {
+			printk(KERN_DEBUG " In tulip_poll(), hardware disappeared.\n");
+			break;
+		}
                /* Acknowledge current RX interrupt sources. */
                outl((RxIntr | RxNoBuf), dev->base_addr + CSR5);
  

_
