Commit 1b48a776 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras
Browse files

Re-introduce ETH debug info (and minor fixups).

parent 7216fb00
...@@ -58,6 +58,10 @@ ifeq ($(RTEMS_API),4.12) ...@@ -58,6 +58,10 @@ ifeq ($(RTEMS_API),4.12)
TARGET_LDFLAGS += -L$(RUNTIME_PATH)/libs/leon-rtems4.12/ -lm TARGET_LDFLAGS += -L$(RUNTIME_PATH)/libs/leon-rtems4.12/ -lm
endif endif
ifeq ($(RTEMS_BSP),gr740)
TARGET_CFLAGS += -DGRLEON3
endif
ifeq ($(RTEMS_BSP),leon3) ifeq ($(RTEMS_BSP),leon3)
TARGET_CFLAGS += -DGRLEON3 TARGET_CFLAGS += -DGRLEON3
endif endif
......
...@@ -87,7 +87,6 @@ extern void rtems_bsdnet_loopattach(); ...@@ -87,7 +87,6 @@ extern void rtems_bsdnet_loopattach();
extern void rtems_bsdnet_initialize_loop(); extern void rtems_bsdnet_initialize_loop();
#endif #endif
static struct rtems_bsdnet_ifconfig loopback_config = { static struct rtems_bsdnet_ifconfig loopback_config = {
"lo0", /* name */ "lo0", /* name */
#if defined RTEMS48 || defined RTEMS410 #if defined RTEMS48 || defined RTEMS410
...@@ -322,10 +321,8 @@ void __po_hi_c_driver_eth_leon_poller (const __po_hi_device_id dev_id) ...@@ -322,10 +321,8 @@ void __po_hi_c_driver_eth_leon_poller (const __po_hi_device_id dev_id)
__po_hi_messages_debug (&msg); __po_hi_messages_debug (&msg);
#endif #endif
if (len == 0) if (len == 0)
{ {
__DEBUGMSG ("[DRIVER ETH] Zero size from device %d\n",dev); __DEBUGMSG ("[DRIVER ETH] Zero size from device %d\n",dev);
rnodes[dev].socket = -1; rnodes[dev].socket = -1;
continue; continue;
...@@ -361,7 +358,6 @@ void __po_hi_c_driver_eth_leon_init (__po_hi_device_id id) ...@@ -361,7 +358,6 @@ void __po_hi_c_driver_eth_leon_init (__po_hi_device_id id)
struct sockaddr_in sa; struct sockaddr_in sa;
struct hostent* hostinfo; struct hostent* hostinfo;
__po_hi_c_ip_conf_t* ipconf; __po_hi_c_ip_conf_t* ipconf;
char ip_addr[16]; char ip_addr[16];
unsigned short ip_port; unsigned short ip_port;
...@@ -383,7 +379,6 @@ void __po_hi_c_driver_eth_leon_init (__po_hi_device_id id) ...@@ -383,7 +379,6 @@ void __po_hi_c_driver_eth_leon_init (__po_hi_device_id id)
{ {
interface_configs[0].ip_netmask= ipconf->netmask; interface_configs[0].ip_netmask= ipconf->netmask;
} }
#endif #endif
if (ipconf->exist.gateway == 1) if (ipconf->exist.gateway == 1)
...@@ -399,17 +394,15 @@ void __po_hi_c_driver_eth_leon_init (__po_hi_device_id id) ...@@ -399,17 +394,15 @@ void __po_hi_c_driver_eth_leon_init (__po_hi_device_id id)
__po_hi_c_driver_rasta_common_init(); __po_hi_c_driver_rasta_common_init();
rtems_bsdnet_initialize_network(); rtems_bsdnet_initialize_network();
/*
#ifdef __PO_HI_DEBUG_INFO #ifdef __PO_HI_DEBUG_INFO
rtems_bsdnet_show_if_stats (); rtems_bsdnet_show_if_stats ();
rtems_bsdnet_show_inet_routes (); rtems_bsdnet_show_inet_routes ();
rtems_bsdnet_show_ip_stats (); rtems_bsdnet_show_ip_stats ();
rtems_bsdnet_show_mbuf_stats (); rtems_bsdnet_show_mbuf_stats ();
#endif #endif
*/
leon_eth_device_id = id;
leon_eth_device_id = id;
__po_hi_transport_set_sending_func (leon_eth_device_id, __po_hi_c_driver_eth_leon_sender); __po_hi_transport_set_sending_func (leon_eth_device_id, __po_hi_c_driver_eth_leon_sender);
for (node = 0 ; node < __PO_HI_NB_DEVICES ; node++) for (node = 0 ; node < __PO_HI_NB_DEVICES ; node++)
...@@ -738,7 +731,6 @@ int __po_hi_c_driver_eth_leon_sender (__po_hi_task_id task, __po_hi_port_t port ...@@ -738,7 +731,6 @@ int __po_hi_c_driver_eth_leon_sender (__po_hi_task_id task, __po_hi_port_t port
nodes[associated_device].socket = -1; nodes[associated_device].socket = -1;
return __PO_HI_ERROR_TRANSPORT_SEND; return __PO_HI_ERROR_TRANSPORT_SEND;
} }
request->port = __PO_HI_GQUEUE_INVALID_PORT; request->port = __PO_HI_GQUEUE_INVALID_PORT;
break; break;
} }
......
...@@ -88,7 +88,7 @@ int __po_hi_transport_send (__po_hi_task_id id, __po_hi_port_t port) ...@@ -88,7 +88,7 @@ int __po_hi_transport_send (__po_hi_task_id id, __po_hi_port_t port)
__PO_HI_DEBUG_DEBUG ("Send value, emitter task %d, emitter port %d, emitter entity %d, destination ports :\n", id, port, __po_hi_port_global_to_entity[port]); __PO_HI_DEBUG_DEBUG ("Send value, emitter task %d, emitter port %d, emitter entity %d, destination ports :\n", id, port, __po_hi_port_global_to_entity[port]);
#if __PO_HI_DEBUG_LEVEL >= __PO_HI_DEBUG_LEVEL_INFO #if __PO_HI_DEBUG_LEVEL >= __PO_HI_DEBUG_LEVEL_INFO
__DEBUGMSG ("SENT Value: |"); __DEBUGMSG ("Packet to send: |");
{ {
int s; int s;
int i; int i;
...@@ -220,7 +220,7 @@ int __po_hi_transport_call_sending_func_by_device (const __po_hi_device_id devic ...@@ -220,7 +220,7 @@ int __po_hi_transport_call_sending_func_by_device (const __po_hi_device_id devic
if (send_func == NULL) if (send_func == NULL)
{ {
return __PO_HI_UNAVAILABLE; return __PO_HI_UNAVAILABLE;
} }
return send_func (task_id, port); return send_func (task_id, port);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment