2011-03-31 Kate Feng <feng@bnl.gov>

PR 1778/bsps
	* vme/VMEConfig.h: Used the VME shared IRQ handlers.
	* include/bsp.h: Removed BSP_PIC_DO_EOI.
	* network/if_100MHz/GT64260eth.c:
	  Recycle the Rx mbuf if there is any Rx error.
This commit is contained in:
Joel Sherrill
2011-07-22 13:02:37 +00:00
parent 43622d542d
commit c05bc62b82
4 changed files with 48 additions and 23 deletions

View File

@@ -1,3 +1,11 @@
2011-03-31 Kate Feng <feng@bnl.gov>
PR 1778/bsps
* vme/VMEConfig.h: Used the VME shared IRQ handlers.
* include/bsp.h: Removed BSP_PIC_DO_EOI.
* network/if_100MHz/GT64260eth.c:
Recycle the Rx mbuf if there is any Rx error.
2009-05-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* irq/irq.c, network/if_1GHz/POSSIBLEBUG: Removed.

View File

@@ -100,14 +100,6 @@ DiscoveryChipVersion BSP_getDiscoveryChipVersion();
#define BSP_MAX_PCI_BUS_ON_PCI1 2
#define BSP_MAX_PCI_BUS (BSP_MAX_PCI_BUS_ON_PCI0+BSP_MAX_PCI_BUS_ON_PCI1)
/* The glues to Till's vmeUniverse, although the name does not
* actually reflect the relevant architect of the MVME5500.
* Till TODO ? : BSP_PCI_DO_EOI instead ?
* BSP_EXT_IRQ0 instead of BSP_PCI_IRQ0 ?
*
*/
#define BSP_PIC_DO_EOI inl(0xc34) /* PCI IACK */
#define BSP_PCI_IRQ0 BSP_GPP_IRQ_LOWEST_OFFSET
/*

View File

@@ -743,21 +743,22 @@ static int GT64260eth_rx(struct GTeth_softc *sc)
if (cmdsts & RX_STS_SF) sc->stats.frame_errors++;
if ((cmdsts & RX_STS_LC) || (cmdsts & RX_STS_COL))
ifp->if_collisions++;
goto give_it_back;
/* recycle the buffer */
m->m_len=sc->rx_buf_sz;
}
m = sc->rxq_mbuf[sc->rxq_fi];
m->m_len = m->m_pkthdr.len = byteCount - sizeof(struct ether_header);
eh = mtod (m, struct ether_header *);
m->m_data += sizeof(struct ether_header);
ether_input (ifp, eh, m);
else {
m = sc->rxq_mbuf[sc->rxq_fi];
m->m_len = m->m_pkthdr.len = byteCount - sizeof(struct ether_header);
eh = mtod (m, struct ether_header *);
m->m_data += sizeof(struct ether_header);
ether_input (ifp, eh, m);
ifp->if_ipackets++;
ifp->if_ibytes+=byteCount;
--sc->rxq_active;
give_it_back:
MGETHDR (m, M_WAIT, MT_DATA);
MCLGET (m, M_WAIT);
ifp->if_ipackets++;
ifp->if_ibytes+=byteCount;
--sc->rxq_active;
MGETHDR (m, M_WAIT, MT_DATA);
MCLGET (m, M_WAIT);
}
m->m_pkthdr.rcvif = ifp;
sc->rxq_mbuf[sc->rxq_fi]= m;
/* convert mbuf pointer to data pointer of correct type */

View File

@@ -1,6 +1,21 @@
#ifndef RTEMS_BSP_VME_CONFIG_H
#define RTEMS_BSP_VME_CONFIG_H
/* VMEConfig.h, S. Kate Feng modified it for MVME5500 3/04 */
/* VMEConfig.h, S. Kate Feng modified it for MVME5500 3/04
*
* May 2011 : Use the VME shared IRQ handlers.
*
* It seems that the implementation of VMEUNIVERSE_IRQ_MGR_FLAG_PW_WORKAROUND
* is not fully developed. The UNIV_REGOFF_VCSR_BS is defined for VME64
* specification, which does not apply to a VME32 crate. In order to avoid
* spurious VME interrupts, a better and more universal solution is
* to flush the vmeUniverse FIFO by reading a register back within the
* users' Interrupt Service Routine (ISR) before returning.
*
* Some devices might require the ISR to issue an interrupt status READ
* after its IRQ is cleared, but before its corresponding interrupt
* is enabled again.
*
*/
/* BSP specific address space configuration parameters */
/*
@@ -11,6 +26,10 @@
* layout:
*/
#define _VME_A32_WIN0_ON_PCI 0x90000000
/* If _VME_CSR_ON_PCI is defined then the A32 window is reduced to accommodate
* CSR for space.
*/
#define _VME_CSR_ON_PCI 0x9e000000
#define _VME_A24_ON_PCI 0x9f000000
#define _VME_A16_ON_PCI 0x9fff0000
@@ -30,7 +49,12 @@
#define BSP_VME_UNIVERSE_INSTALL_IRQ_MGR(err) \
do { \
err = vmeUniverseInstallIrqMgr(0,64+12,1,64+13); \
err = vmeUniverseInstallIrqMgrAlt(VMEUNIVERSE_IRQ_MGR_FLAG_SHARED,\
0, BSP_GPP_VME_VLINT0, \
1, BSP_GPP_VME_VLINT1, \
2, BSP_GPP_VME_VLINT2, \
3, BSP_GPP_VME_VLINT3, \
-1 /* terminate list */); \
} while (0)
#endif