ARCnet fix for 2.1.9x

David Woodhouse (Dave@imladris.demon.co.uk)
Sun, 19 Apr 1998 16:37:15 +0200


This is a multipart MIME message.

--==_Exmh_-20982727550
Content-Type: text/plain; charset=us-ascii

This appears to fix some problems which people were having with ARCnet drivers
receiving interrupts during arcnet_open()

Could it go into 2.1.98, please?

--==_Exmh_-20982727550
Content-Type: text/plain ; name="patch-arcnet-3.01"; charset=us-ascii
Content-Description: patch-arcnet-3.01
Content-Disposition: attachment; filename="patch-arcnet-3.01"

--- arcnet.c.orig Fri Apr 17 10:27:50 1998
+++ arcnet.c Fri Apr 17 10:49:30 1998
@@ -18,6 +18,10 @@

**********************

+ v3.01 (98/04/17)
+ - Interrupt handler now also checks dev->[se]dev are non-NULL
+ to avoid crashes in interrupts during card init. [dw]
+
v3.00 (97/11/09)
- Minor cleanup of debugging messages. [mj]

@@ -41,10 +45,10 @@

v2.80 ALPHA (97/08/01)
- Split source into multiple files; generic arcnet support and
- individual chipset drivers. <dwmw2@cam.ac.uk>
+ individual chipset drivers. <Dave@imladris.demon.co.uk>

- v2.61 ALPHA (97/07/30) by David Woodhouse (dwmw2@cam.ac.uk) for
- Nortel (Northern Telecom).
+ v2.61 ALPHA (97/07/30) by David Woodhouse (Dave@imladris.demon.co.uk)
+ for Nortel (Northern Telecom).
- Added support for IO-mapped modes and for SMC COM20020 chipset.
- Fixed (avoided) race condition in send_packet routines which was
discovered when the buffer copy routines got slow (?).
@@ -956,20 +960,24 @@
return; /* don't even try. */
}
#ifdef CONFIG_ARCNET_1051
- lp->sdev->interrupt=1;
+ if (lp->sdev)
+ lp->sdev->interrupt=1;
#endif
#ifdef CONFIG_ARCNET_ETH
- lp->edev->interrupt=1;
+ if (lp->edev)
+ lp->edev->interrupt=1;
#endif

/* Call the "real" interrupt handler. */
(*lp->inthandler)(dev);

#ifdef CONFIG_ARCNET_ETH
- lp->edev->interrupt=0;
+ if (lp->edev)
+ lp->edev->interrupt=0;
#endif
#ifdef CONFIG_ARCNET_1051
- lp->sdev->interrupt=0;
+ if (lp->sdev)
+ lp->sdev->interrupt=0;
#endif
if (!test_and_clear_bit(0, (int *)&dev->interrupt))
BUGMSG(D_NORMAL, "Someone cleared our dev->interrupt flag!\n");

--==_Exmh_-20982727550
Content-Type: text/plain; charset=us-ascii

---- ---- ----
David Woodhouse, Robinson College, CB3 9AN, England. (+44) 0976 658355
Dave@imladris.demon.co.uk http://www.imladris.demon.co.uk
finger pgp@dwmw2.robinson.cam.ac.uk for PGP key.

--==_Exmh_-20982727550--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu