Ignore:
Timestamp:
Jul 3, 2020, 7:19:17 PM (4 years ago)
Author:
coas-nagasima
Message:

ASP3, TINET, mbed を更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/if_mbed.c

    r331 r429  
    44 *  Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
    55 *                   Tomakomai National College of Technology, JAPAN
    6  *  Copyright (C) 2014 Cores Co., Ltd. Japan
     6 *  Copyright (C) 2014-2019 Cores Co., Ltd. Japan
    77 *
    88 *  上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
     
    6464 * SUCH DAMAGE.
    6565 *
    66  * $FreeBSD: src/sys/i386/isa/if_mbed.c,v 1.148.2.4 1999/09/25 13:08:18 nyan Exp $
     66 * $FreeBSD: src/sys/i386/isa/if_ed.c,v 1.148.2.4 1999/09/25 13:08:18 nyan Exp $
    6767 */
    6868
     
    200200if_mbed_setrcr(T_IF_SOFTC *ic)
    201201{
    202         T_MBED_SOFTC    *sc = ic->sc;
    203202}
    204203
     
    318317if_mbed_init(T_IF_SOFTC *ic)
    319318{
    320         T_MBED_SOFTC *sc = ic->sc;
    321 
    322319        /* mbed_init 本体を呼び出す。*/
    323320        if_mbed_init_sub(ic);
     
    347344                                }
    348345                                if (link_mode_new != NEGO_FAIL) {
    349                                         ethernetext_set_link_mode(link_mode_new);
     346                                        ethernetext_set_link_mode(link_mode_new | PROMISCUOUS_MODE);
    350347                                        ETHER.EESIPR0 |= EDMAC_EESIPR_INI_TRANS;
    351348                                        ether_set_link_up(ether);
     
    373370if_mbed_read(T_IF_SOFTC *ic)
    374371{
    375         T_MBED_SOFTC *sc = ic->sc;
    376372        T_NET_BUF *input = NULL;
    377373        uint_t align;
     
    406402if_mbed_start(T_IF_SOFTC *ic, T_NET_BUF *output)
    407403{
    408         T_MBED_SOFTC *sc = ic->sc;
    409404        int32_t len, res, pos;
    410405
     
    429424if_mbed_eth_handler(void)
    430425{
    431     uint32_t stat_edmac;
    432     uint32_t stat_etherc;
    433 
    434     /* Clear the interrupt request flag */
    435     stat_edmac = (ETHER.EESR0 & ETHER.EESIPR0);       /* Targets are restricted to allowed interrupts */
    436     ETHER.EESR0 = stat_edmac;
    437     /* Reception-related */
    438     if (stat_edmac & EDMAC_EESIPR_INI_RECV) {
    439                 isig_sem(if_softc.semid_rxb_ready);
    440     }
     426        uint32_t stat_edmac;
     427        uint32_t stat_etherc;
     428        ER ret;
     429       
     430        /* Clear the interrupt request flag */
     431        stat_edmac = (ETHER.EESR0 & ETHER.EESIPR0);       /* Targets are restricted to allowed interrupts */
     432        ETHER.EESR0 = stat_edmac;
     433        /* Reception-related */
     434        if (stat_edmac & EDMAC_EESIPR_INI_RECV) {
     435                ret = isig_sem(if_softc.semid_rxb_ready);
     436                if (ret != E_OK)
     437                        syslog(LOG_INFO, "semid_rxb_ready %d %x", ret, stat_edmac & EDMAC_EESIPR_INI_RECV);
     438        }
    441439        if (stat_edmac & EDMAC_EESIPR_INI_TRANS) {
    442                 isig_sem(if_softc.semid_txb_ready);
    443         }
    444     /* E-MAC-related */
    445     if (stat_edmac & EDMAC_EESIPR_INI_EtherC) {
    446         /* Clear the interrupt request flag */
    447         stat_etherc = (ETHER.ECSR0 & ETHER.ECSIPR0);  /* Targets are restricted to allowed interrupts */
    448         ETHER.ECSR0  = stat_etherc;
    449     }
    450 }
     440                ret = isig_sem(if_softc.semid_txb_ready);
     441                if (ret != E_OK)
     442                        syslog(LOG_INFO, "semid_txb_ready %d %x", ret, stat_edmac & EDMAC_EESIPR_INI_TRANS);
     443        }
     444        /* E-MAC-related */
     445        if (stat_edmac & EDMAC_EESIPR_INI_EtherC) {
     446                /* Clear the interrupt request flag */
     447                stat_etherc = (ETHER.ECSR0 & ETHER.ECSIPR0);  /* Targets are restricted to allowed interrupts */
     448                ETHER.ECSR0  = stat_etherc;
     449        }
     450}
Note: See TracChangeset for help on using the changeset viewer.