- Timestamp:
- Jul 3, 2020, 7:19:17 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/asp3_dcre/tinet/netdev/if_mbed/if_mbed.c
r331 r429 4 4 * Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering 5 5 * Tomakomai National College of Technology, JAPAN 6 * Copyright (C) 2014 Cores Co., Ltd. Japan6 * Copyright (C) 2014-2019 Cores Co., Ltd. Japan 7 7 * 8 8 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ … … 64 64 * SUCH DAMAGE. 65 65 * 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 $ 67 67 */ 68 68 … … 200 200 if_mbed_setrcr(T_IF_SOFTC *ic) 201 201 { 202 T_MBED_SOFTC *sc = ic->sc;203 202 } 204 203 … … 318 317 if_mbed_init(T_IF_SOFTC *ic) 319 318 { 320 T_MBED_SOFTC *sc = ic->sc;321 322 319 /* mbed_init 本体を呼び出す。*/ 323 320 if_mbed_init_sub(ic); … … 347 344 } 348 345 if (link_mode_new != NEGO_FAIL) { 349 ethernetext_set_link_mode(link_mode_new );346 ethernetext_set_link_mode(link_mode_new | PROMISCUOUS_MODE); 350 347 ETHER.EESIPR0 |= EDMAC_EESIPR_INI_TRANS; 351 348 ether_set_link_up(ether); … … 373 370 if_mbed_read(T_IF_SOFTC *ic) 374 371 { 375 T_MBED_SOFTC *sc = ic->sc;376 372 T_NET_BUF *input = NULL; 377 373 uint_t align; … … 406 402 if_mbed_start(T_IF_SOFTC *ic, T_NET_BUF *output) 407 403 { 408 T_MBED_SOFTC *sc = ic->sc;409 404 int32_t len, res, pos; 410 405 … … 429 424 if_mbed_eth_handler(void) 430 425 { 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 } 441 439 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.