This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RLTK8139 interrupt enable patch


Hello all,

When re-connected cable in a state of power supply on,
If driver do not enable "PUN/LinkChg" interrupt, the later interrupt
does not continue it.

If communication facility of the OS cannot restore automatically,
be fatal error in an embedded system.

I tested it in SH4 and RTL8139C.

Thanks
Hajime Ishitani
Index: ecos/packages/devs/eth/rltk/8139/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/eth/rltk/8139/current/ChangeLog,v
retrieving revision 1.6
diff -u -r1.6 ChangeLog
--- ecos/packages/devs/eth/rltk/8139/current/ChangeLog	2 Dec 2005 19:33:47 -0000	1.6
+++ ecos/packages/devs/eth/rltk/8139/current/ChangeLog	13 Nov 2006 06:46:22 -0000
@@ -1,3 +1,8 @@
+2006-11-13  Hajime Ishitani <pigmon@mail.snd.co.jp>
+
+	* src/if_8139.h:
+	* src/if_8139.c: Enabled "PUN/LinkChg" interrupt.
+
 2005-12-02  Andrew Lunn  <andrew.lunn@ascom.ch>
 
 	* src/if_8139.c (rltk8139_deliver): Fix the compiler warnings by

Index: ecos/packages/devs/eth/rltk/8139/current/src/if_8139.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/eth/rltk/8139/current/src/if_8139.c,v
retrieving revision 1.6
diff -u -r1.6 if_8139.c
--- ecos/packages/devs/eth/rltk/8139/current/src/if_8139.c	2 Dec 2005 19:33:47 -0000	1.6
+++ ecos/packages/devs/eth/rltk/8139/current/src/if_8139.c	13 Nov 2006 06:46:23 -0000
@@ -127,7 +127,7 @@
 #include "if_8139.h"
 
 /* Which interrupts we will handle */
-#define RLTK8139_IRQ (IR_SERR|IR_FOVW|IR_RXOVW|IR_TER|IR_TOK|IR_RER|IR_ROK)
+#define RLTK8139_IRQ (IR_SERR|IR_FOVW|IR_RXOVW|IR_TER|IR_TOK|IR_RER|IR_ROK|IR_FUN)
 
 /* Allow platform-specific configuration of the driver */
 #ifndef CYGDAT_DEVS_ETH_RLTK_8139_INL
@@ -1248,6 +1248,17 @@
     rltk8139_reset(sc);
     return;
   }
+
+  if (status & IR_FUN) {
+    /*
+     * Packet underrun or link change interrupt.
+     * A cable was packet underrun or re-connected ?
+     */
+#ifdef DEBUG_RLTK8139_DRIVER
+    diag_printf("rltk8139_deliver(%s): packet underrun or link change\n",
+                sc->dev_name);
+#endif
+  }
 
 #ifndef CYGPKG_IO_ETH_DRIVERS_STAND_ALONE
   /* Finally, reenable interrupts */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]