Changeset 06ff7d2 in rtems
- Timestamp:
- 02/17/09 18:37:14 (15 years ago)
- Branches:
- 4.9
- Children:
- 432ddef
- Parents:
- 3017689
- Location:
- c/src/lib/libbsp/m68k/mvme167
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/m68k/mvme167/ChangeLog
r3017689 r06ff7d2 1 2009-02-17 Till Straumann <strauman@slac.stanford.edu> 2 3 PR 1371/bsps 4 * network/network.c: mvme167 network driver buggy. 5 1 6 2009-02-17 Till Straumann <strauman@slac.stanford.edu> 2 7 -
c/src/lib/libbsp/m68k/mvme167/network/network.c
r3017689 r06ff7d2 30 30 */ 31 31 32 #define IGNORE_SPURIOUS_IRQ 33 #define IGNORE_NO_RFA 34 #define IGNORE_MULTIPLE_RF 35 32 36 /* 33 37 * Default number of buffer descriptors and buffer sizes. … … 70 74 71 75 /* If we are running interrupt driven I/O no debug output is printed */ 72 #if CD2401_ POLLED_IO == 173 #define printk(arglist) printk arglist;76 #if CD2401_IO_MODE == 0 77 #define printk(arglist) do { printk arglist; printk("\r"); } while (0); 74 78 #else 75 79 #define printk(arglist) … … 907 911 908 912 uti596_softc.pEndRFA->next = I596_NULL; 909 UTI_596_ASSERT(uti596_softc.countRFD == RX_BUF_COUNT,"INIT:WRONG RFD COUNT\n" )913 UTI_596_ASSERT(uti596_softc.countRFD == num,"INIT:WRONG RFD COUNT\n" ) 910 914 911 915 #ifdef DBG_INIT … … 1030 1034 * internal triggering, linear mode 1031 1035 */ 1032 sc->pScp->sysbus = 0x 54;1036 sc->pScp->sysbus = 0x44; 1033 1037 1034 1038 /* provide the iscp to the scp, keep a pointer for our use */ … … 1220 1224 } 1221 1225 1222 sc->pEndRFA->next = sc->pSavedRfdQueue;1226 sc->pEndRFA->next = (i596_rfd*)word_swap((uint32_t)sc->pSavedRfdQueue); 1223 1227 if ( sc->pSavedRfdQueue != I596_NULL ) { 1224 1228 sc->pEndRFA = sc->pEndSavedQueue; … … 1847 1851 #endif 1848 1852 } 1853 1854 /* 1855 * In case the ISR discovers there are no resources it reclaims 1856 * them and restarts 1857 */ 1858 sc->started = 1; 1849 1859 1850 1860 /* … … 2133 2143 ) 2134 2144 { 2145 int fullStatus; 2146 2135 2147 #ifdef DBG_ISR 2136 2148 printk(("uti596_DynamicInterruptHandler: begins")) … … 2139 2151 uti596_wait (&uti596_softc, UTI596_WAIT_FOR_CU_ACCEPT); 2140 2152 2141 scbStatus = uti596_softc.scb.status& 0xf000;2153 scbStatus = (fullStatus = uti596_softc.scb.status) & 0xf000; 2142 2154 2143 2155 if ( scbStatus ) { … … 2167 2179 } 2168 2180 else { 2169 printk(("\n***ERROR: Spurious interrupt. Resetting...\n")) 2181 #ifndef IGNORE_SPURIOUS_IRQ 2182 printk(("\n***ERROR: Spurious interrupt (full status 0x%x). Resetting...\n", fullStatus)) 2170 2183 uti596_softc.nic_reset = 1; 2184 #endif 2171 2185 } 2172 2186 … … 2218 2232 if ( uti596_softc.pBeginRFA == I596_NULL || 2219 2233 !( uti596_softc.pBeginRFA -> stat & STAT_C)) { 2234 #ifndef IGNORE_NO_RFA 2220 2235 uti596_dump_scb(); 2221 2236 uti596_softc.nic_reset = 1; 2237 #endif 2222 2238 } 2223 2239 else { … … 2229 2245 #endif 2230 2246 count_rx ++; 2247 #ifndef IGNORE_MULTIPLE_RF 2231 2248 if ( count_rx > 1) { 2232 printk(("****WARNING: Received 2 frames on 1 interrupt \n")) 2233 } 2249 printk(("****WARNING: Received %i frames on 1 interrupt \n", count_rx)) 2250 } 2251 #endif 2234 2252 /* Give Received Frame to the ULCS */ 2235 2253 uti596_softc.countRFD--; … … 2712 2730 for( pRfd = uti596_softc.pSavedRfdQueue; 2713 2731 pRfd != I596_NULL; 2714 pRfd = pRfd -> next) {2732 pRfd = (i596_rfd*)word_swap((uint32_t)pRfd -> next)) { 2715 2733 printk(("pRfd: %p, stat: 0x%x cmd: 0x%x\n",pRfd,pRfd -> stat,pRfd -> cmd)) 2716 2734 } … … 2720 2738 for( pRfd = uti596_softc.pInboundFrameQueue; 2721 2739 pRfd != I596_NULL; 2722 pRfd = pRfd -> next) {2740 pRfd = (i596_rfd*)word_swap((uint32_t)pRfd -> next)) { 2723 2741 printk(("pRfd: %p, stat: 0x%x cmd: 0x%x\n",pRfd,pRfd -> stat,pRfd -> cmd)) 2724 2742 } … … 2729 2747 for( pRfd = uti596_softc.pBeginRFA; 2730 2748 pRfd != I596_NULL; 2731 pRfd = pRfd -> next) {2749 pRfd = (i596_rfd*)word_swap((uint32_t)pRfd -> next)) { 2732 2750 printk(("pRfd: %p, stat: 0x%x cmd: 0x%x\n",pRfd,pRfd -> stat,pRfd -> cmd)) 2733 2751 } … … 2752 2770 for ( pRfd = uti596_softc.pBeginRFA; 2753 2771 pRfd != I596_NULL; 2754 pRfd = pRfd->next) {2772 pRfd = (i596_rfd *)word_swap((uint32_t)pRfd->next) ) { 2755 2773 printk(("Frame @ %p, status: %2.2x, cmd: %2.2x\n", 2756 2774 pRfd, pRfd->stat, pRfd->cmd)) … … 2760 2778 for ( pRfd = uti596_softc.pInboundFrameQueue; 2761 2779 pRfd != I596_NULL; 2762 pRfd = pRfd->next) {2780 pRfd = (i596_rfd *)word_swap((uint32_t)pRfd->next) ) { 2763 2781 printk(("Frame @ %p, status: %2.2x, cmd: %2.2x\n", 2764 2782 pRfd, pRfd->stat, pRfd->cmd)) … … 2769 2787 for ( pRfd = uti596_softc.pSavedRfdQueue; 2770 2788 pRfd != I596_NULL; 2771 pRfd = pRfd->next) {2789 pRfd = (i596_rfd *)word_swap((uint32_t)pRfd->next) ) { 2772 2790 printk(("Frame @ %p, status: %2.2x, cmd: %2.2x\n", 2773 2791 pRfd, pRfd->stat, pRfd->cmd)) … … 2794 2812 pRfd != I596_NULL && 2795 2813 pRfd != NULL; 2796 pRfd = pRfd->next) {2814 pRfd = (i596_rfd *)word_swap((uint32_t)pRfd->next) ) { 2797 2815 printk(("0x%p\n", pRfd)) 2798 2816 } … … 2805 2823 pRfd != I596_NULL && 2806 2824 pRfd != NULL; 2807 pRfd = pRfd->next) {2825 pRfd = (i596_rfd *)word_swap((uint32_t)pRfd->next) ) { 2808 2826 printk(("0x%p\n", pRfd)) 2809 2827 }
Note: See TracChangeset
for help on using the changeset viewer.