[GXemul-devel] patch about dev_ether.c (YanaKernel0 Prototype + uIP)
Status: Alpha
Brought to you by:
gavare
From: Yana <op...@ya...> - 2010-01-25 12:48:08
|
Hello, I used GXemul with YanaKernel0 Prototype. http://yana.jp/ Because GXemul(testarm) terminated with "Aborted (core dumped)" or "Segmentation fault (core dumped)", I patched gxemul-0.4.7.2.tar.gz. There seems to be a problem in dev_ether.c. Thanks, Yana diff -ru _/gxemul/src/devices/dev_ether.c gxemul/src/devices/dev_ether.c --- _/gxemul/src/devices/dev_ether.c 2009-06-22 01:03:48.000000000 +0900 +++ gxemul/src/devices/dev_ether.c 2010-01-11 00:00:00.000000000 +0900 @@ -146,9 +146,13 @@ fatal("[ ether: RECEIVE but no net? ]\n"); else { d->status &= ~DEV_ETHER_STATUS_PACKET_RECEIVED; +#if 0 net_ethernet_rx(cpu->machine->emul->net, d, &incoming_ptr, &incoming_len); if (incoming_ptr != NULL) { +#else /* patch */ + if (net_ethernet_rx(cpu->machine->emul->net, d, &incoming_ptr, &incoming_len) != 0) { +#endif d->status |= DEV_ETHER_STATUS_PACKET_RECEIVED; if (incoming_len>DEV_ETHER_BUFFER_SIZE) |