From c309c4a37b87140efca1866e794337629d569aed Mon Sep 17 00:00:00 2001 From: John Hodge Date: Fri, 4 Oct 2013 21:13:13 +0800 Subject: [PATCH] UDI/ne2000 - Added parent bind CB --- UDI/drivers/net_ne2000/ne2000_core.c | 13 +++++++++++-- UDI/drivers/net_ne2000/udiprops.txt | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/UDI/drivers/net_ne2000/ne2000_core.c b/UDI/drivers/net_ne2000/ne2000_core.c index f5066614..2e916a75 100644 --- a/UDI/drivers/net_ne2000/ne2000_core.c +++ b/UDI/drivers/net_ne2000/ne2000_core.c @@ -21,7 +21,8 @@ enum { NE2K_OPS_IRQ, }; enum { - NE2K_CB_INTR = 1, + NE2K_CB_BUS_BIND = 1, + NE2K_CB_INTR, NE2K_CB_INTR_EVENT, }; @@ -39,6 +40,7 @@ enum { // --- Management void ne2k_usage_ind(udi_usage_cb_t *cb, udi_ubit8_t resource_level) { + udi_usage_res(cb); } void ne2k_enumerate_req(udi_enumerate_cb_t *cb, udi_ubit8_t enumeration_level) { @@ -332,7 +334,14 @@ udi_ops_init_t ne2k_ops_list[] = { }, {0} }; +udi_cb_init_t ne2k_cb_init_list[] = { + // Parent bind + {NE2K_CB_BUS_BIND, NE2K_META_BUS, UDI_BUS_BIND_CB_NUM, 0, 0,NULL}, + {0} +}; +// TODO: cb_init_list const udi_init_t udi_init_info = { .primary_init_info = &ne2k_pri_init, - .ops_init_list = ne2k_ops_list + .ops_init_list = ne2k_ops_list, + .cb_init_list = ne2k_cb_init_list, }; diff --git a/UDI/drivers/net_ne2000/udiprops.txt b/UDI/drivers/net_ne2000/udiprops.txt index 8173018f..9ff15324 100644 --- a/UDI/drivers/net_ne2000/udiprops.txt +++ b/UDI/drivers/net_ne2000/udiprops.txt @@ -13,7 +13,7 @@ requires udi_nic 0x101 meta 1 udi_bridge meta 2 udi_nic -parent_bind_ops 1 0 1 0 +parent_bind_ops 1 0 1 1 # bridge, rgn 0, ops 1, cb 1 child_bind_ops 2 0 1 # Ctrl (TX and RX are set up via this) # Realtek 8029 -- 2.20.1