mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 23:23:13 +00:00
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:
@@ -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>
|
2009-05-08 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* irq/irq.c, network/if_1GHz/POSSIBLEBUG: Removed.
|
* irq/irq.c, network/if_1GHz/POSSIBLEBUG: Removed.
|
||||||
|
|||||||
@@ -100,14 +100,6 @@ DiscoveryChipVersion BSP_getDiscoveryChipVersion();
|
|||||||
#define BSP_MAX_PCI_BUS_ON_PCI1 2
|
#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)
|
#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
|
#define BSP_PCI_IRQ0 BSP_GPP_IRQ_LOWEST_OFFSET
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -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_SF) sc->stats.frame_errors++;
|
||||||
if ((cmdsts & RX_STS_LC) || (cmdsts & RX_STS_COL))
|
if ((cmdsts & RX_STS_LC) || (cmdsts & RX_STS_COL))
|
||||||
ifp->if_collisions++;
|
ifp->if_collisions++;
|
||||||
goto give_it_back;
|
/* recycle the buffer */
|
||||||
|
m->m_len=sc->rx_buf_sz;
|
||||||
}
|
}
|
||||||
m = sc->rxq_mbuf[sc->rxq_fi];
|
else {
|
||||||
m->m_len = m->m_pkthdr.len = byteCount - sizeof(struct ether_header);
|
m = sc->rxq_mbuf[sc->rxq_fi];
|
||||||
eh = mtod (m, struct ether_header *);
|
m->m_len = m->m_pkthdr.len = byteCount - sizeof(struct ether_header);
|
||||||
m->m_data += sizeof(struct ether_header);
|
eh = mtod (m, struct ether_header *);
|
||||||
ether_input (ifp, eh, m);
|
m->m_data += sizeof(struct ether_header);
|
||||||
|
ether_input (ifp, eh, m);
|
||||||
|
|
||||||
ifp->if_ipackets++;
|
ifp->if_ipackets++;
|
||||||
ifp->if_ibytes+=byteCount;
|
ifp->if_ibytes+=byteCount;
|
||||||
--sc->rxq_active;
|
--sc->rxq_active;
|
||||||
|
MGETHDR (m, M_WAIT, MT_DATA);
|
||||||
give_it_back:
|
MCLGET (m, M_WAIT);
|
||||||
MGETHDR (m, M_WAIT, MT_DATA);
|
}
|
||||||
MCLGET (m, M_WAIT);
|
|
||||||
m->m_pkthdr.rcvif = ifp;
|
m->m_pkthdr.rcvif = ifp;
|
||||||
sc->rxq_mbuf[sc->rxq_fi]= m;
|
sc->rxq_mbuf[sc->rxq_fi]= m;
|
||||||
/* convert mbuf pointer to data pointer of correct type */
|
/* convert mbuf pointer to data pointer of correct type */
|
||||||
|
|||||||
@@ -1,6 +1,21 @@
|
|||||||
#ifndef RTEMS_BSP_VME_CONFIG_H
|
#ifndef RTEMS_BSP_VME_CONFIG_H
|
||||||
#define 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 */
|
/* BSP specific address space configuration parameters */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -11,6 +26,10 @@
|
|||||||
* layout:
|
* layout:
|
||||||
*/
|
*/
|
||||||
#define _VME_A32_WIN0_ON_PCI 0x90000000
|
#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_A24_ON_PCI 0x9f000000
|
||||||
#define _VME_A16_ON_PCI 0x9fff0000
|
#define _VME_A16_ON_PCI 0x9fff0000
|
||||||
|
|
||||||
@@ -30,7 +49,12 @@
|
|||||||
|
|
||||||
#define BSP_VME_UNIVERSE_INSTALL_IRQ_MGR(err) \
|
#define BSP_VME_UNIVERSE_INSTALL_IRQ_MGR(err) \
|
||||||
do { \
|
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)
|
} while (0)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user