This is the mail archive of the ecos-patches@sources.redhat.com 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]

i82559 on ebsa patch


Hi Folks

I found a problem with the generic i82559 driver when used on the EBSA
hardware. I have two ethernet devices and the interrupts are getting
multiplexed onto one interrupt pin. The old, EBSA only, driver handled
this correctly, but the generic driver does not. I had to enable it in
the EBSA inline file, and then fix a problem with the scope of the
variable mux_interrupt_handle. I also fixed a missing variable problem
when debug prints are enabled.

     Andrew




Index: packages/devs/eth//arm/ebsa285/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/eth/arm/ebsa285/current/ChangeLog,v
retrieving revision 1.24
diff -u -r1.24 ChangeLog
--- packages/devs/eth//arm/ebsa285/current/ChangeLog    23 May 2002 23:00:33 -0000      1.24
+++ packages/devs/eth//arm/ebsa285/current/ChangeLog    6 Oct 2002 13:11:16 -0000
@@ -1,3 +1,9 @@
+2002-10-06  Andrew Lunn  <andrew.lunn@ascom.ch>
+
+       * include/devs_eth_ebsa285.inl: EBSA has the ethernet devices
+       multiplexed onto one interrupt. This got losted when generalising
+       the driver.
+
 2002-05-14  Jesper Skov  <jskov@redhat.com>

        * include/devs_eth_ebsa285.inl: Fix warnings.
Index: packages/devs/eth//arm/ebsa285/current/include/devs_eth_ebsa285.inl
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/eth/arm/ebsa285/current/include/devs_eth_ebsa285.inl,v
retrieving revision 1.2
diff -u -r1.2 devs_eth_ebsa285.inl
--- packages/devs/eth//arm/ebsa285/current/include/devs_eth_ebsa285.inl 23 May 2002 23:00:34 -0000      1.2
+++ packages/devs/eth//arm/ebsa285/current/include/devs_eth_ebsa285.inl 6 Oct 2002 13:11:16 -0000
@@ -57,38 +57,16 @@
 // support SDRAM with gaps in it.
 #define CYGHWR_DEVS_ETH_INTEL_I82559_PCIMEM_DISCONTIGUOUS

-// Interrupts are wire-or'd together.
-#if 1 < CYGNUM_DEVS_ETH_INTEL_I82559_DEV_COUNT
-#define CYGHWR_DEVS_ETH_INTEL_I82559_DEMUX_ALL
-#endif // multiple devs, so demux_all needed
-
-// define multiple interrupt handling anyway:
-//? #define CYGHWR_DEVS_ETH_INTRS (SA11X0_GPIO_PIN_10)
-
-// This brings in code to ensure missed interrupts are properly
-// acknowledged so that another interrupt can occur in future.
-// Only a problem with edge-triggered systems.
-
-/* #define CYGHWR_DEVS_ETH_INTEL_I82559_MISSED_INTERRUPT(p_i82559) \
-     (CYGHWR_DEVS_ETH_INTRS != (CYGHWR_DEVS_ETH_INTRS & *SA11X0_GPIO_PIN_LEVEL))
-*/
+// Interrupts are multiplex onto one interrupt pin.
+#define CYGNUM_DEVS_ETH_INTEL_I82559_SEPARATE_MUX_INTERRUPT \
+          CYGNUM_HAL_INTERRUPT_PCI_IRQ

 // This brings on code to perform a selective reset on the device if the CU
 // wedges.

 #define CYGHWR_DEVS_ETH_INTEL_I82559_DEAD_TO (368640) // 0.1S of OS timer

-/*  #define CYGHWR_DEVS_ETH_INTEL_I82559_RESET_TIMEOUT( anon_uint ) \
-    CYG_MACRO_START                                                 \
-        (anon_uint) = *SA11X0_OSCR;                                 \
-    CYG_MACRO_END
-*/
-
-/*  #define CYGHWR_DEVS_ETH_INTEL_I82559_TIMEOUT_FIRED( anon_uint )         \
-      ((*SA11X0_OSCR - (anon_uint)) > CYGHWR_DEVS_ETH_INTEL_I82559_DEAD_TO)
-*/
-
-// The mask on an SA1110 is really an enable: 1 => enabled, 0 => masked.
+// The mask on an SA110 is really an enable: 1 => enabled, 0 => masked.
 // So to behave nestedly, we only need save the old value of the bits
 // of interest.

Index: packages/devs/eth//intel/i82559/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/eth/intel/i82559/current/ChangeLog,v
retrieving revision 1.14
diff -u -r1.14 ChangeLog
--- packages/devs/eth//intel/i82559/current/ChangeLog   14 Jun 2002 22:01:27 -0000      1.14
+++ packages/devs/eth//intel/i82559/current/ChangeLog   6 Oct 2002 13:11:16 -0000
@@ -1,3 +1,10 @@
+2002-10-06  Andrew Lunn  <andrew.lunn@ascom.ch>
+
+       * src/if_i82559.c (pci_init_find_82559s): Changed scope of
+       max_interrupt_handle since its needed in other places.
+       * src/if_i82559.c (i82559_stop): Corrected wrong name of variable
+       in a diag_printf function.
+
 2002-06-14  Gary Thomas  <gary@chez-thomas.org>

        * src/if_i82559.c:
Index: packages/devs/eth//intel/i82559/current/src/if_i82559.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/eth/intel/i82559/current/src/if_i82559.c,v
retrieving revision 1.14
diff -u -r1.14 if_i82559.c
--- packages/devs/eth//intel/i82559/current/src/if_i82559.c     14 Jun 2002 22:01:28 -0000      1.14
+++ packages/devs/eth//intel/i82559/current/src/if_i82559.c     6 Oct 2002 13:11:17 -0000
@@ -1720,7 +1720,8 @@

 #ifdef DEBUG_82559
        os_printf("Stop: TxDone %d %x: KEY %x TxCB %x\n",
-                 p_i82559->index, (int)p_i82559, key, p_txcb );
+                 p_i82559->index, (int)p_i82559, key,
+                  p_i82559->tx_ring[ tx_descriptor_remove ]);
 #endif
        // tx_done() can now cope with a NULL key, no guard needed here
        (sc->funs->eth_drv->tx_done)( sc, key, 1 /* status */ );
@@ -2773,6 +2774,10 @@
     int device_index;
     int found_devices = 0;

+#ifdef CYGNUM_DEVS_ETH_INTEL_I82559_SEPARATE_MUX_INTERRUPT
+    static cyg_handle_t mux_interrupt_handle = 0;
+ #endif
+
 #ifdef DEBUG
     db_printf("pci_init_find_82559s()\n");
 #endif
@@ -2849,7 +2854,6 @@
                 // with a rotation of interrupt lines in the different
                 // slots.
                 {
-                    static cyg_handle_t mux_interrupt_handle = 0;
                     static cyg_interrupt mux_interrupt_object;

                     if ( ! mux_interrupt_handle ) {


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