#ifndef _NE2000_COMMON_H_
#define _NE2000_COMMON_H_
+#define UDI_VERSION 0x101
+#define UDI_PHYSIO_VERSION 0x101
+#define UDI_PCI_VERSION 0x101
+#define UDI_NIC_VERSION 0x101
+
#include <udi.h>
#include <udi_physio.h>
+#include <udi_pci.h>
#include <udi_nic.h>
#include "ne2000_hw.h"
NE2K_PIO_RX,
NE2K_PIO_IRQACK,
NE2K_PIO_TX,
+ N_NE2K_PIO
};
typedef struct
udi_index_t rx_chan_index;
} init;
- udi_pio_handle_t pio_handles[4];
+ udi_pio_handle_t pio_handles[N_NE2K_PIO];
udi_channel_t interrupt_channel;
udi_channel_t rx_channel;
udi_channel_t tx_channel;
udi_nic_rx_cb_t *rx_next_cb;
+ udi_nic_rx_cb_t *rx_last_cb;
udi_ubit8_t rx_next_page;
udi_ubit8_t macaddr[6];
(attr)->attr_type = UDI_ATTR_STRING; \
(attr)->attr_length = (len); \
udi_strncpy_rtrim((char *)(attr)->attr_value, (val), (len))
-#define NE2K_SET_ATTR_STRFMT(attr, name, maxlen, fmt, v...) \
+#define NE2K_SET_ATTR_STRFMT(attr, name, maxlen, fmt, ...) \
udi_strcpy((attr)->attr_name, (name)); \
(attr)->attr_type = UDI_ATTR_STRING; \
- (attr)->attr_length = udi_snprintf((char *)(attr)->attr_value, (maxlen), (fmt) ,## v )
+ (attr)->attr_length = udi_snprintf((char *)(attr)->attr_value, (maxlen), (fmt) ,## __VA_ARGS__ )
+
+extern udi_usage_ind_op_t ne2k_usage_ind;
+extern udi_enumerate_req_op_t ne2k_enumerate_req;
+extern udi_devmgmt_req_op_t ne2k_devmgmt_req;
+extern udi_final_cleanup_req_op_t ne2k_final_cleanup_req;
extern udi_channel_event_ind_op_t ne2k_bus_dev_channel_event_ind;
extern udi_bus_bind_ack_op_t ne2k_bus_dev_bus_bind_ack;
extern udi_channel_spawn_call_t ne2k_nd_ctrl_bind__rx_chan_ok;
extern udi_nd_unbind_req_op_t ne2k_nd_ctrl_unbind_req;
extern udi_nd_enable_req_op_t ne2k_nd_ctrl_enable_req;
+extern udi_pio_trans_call_t ne2k_nd_ctrl_enable_req__trans_done;
extern udi_nd_disable_req_op_t ne2k_nd_ctrl_disable_req;
extern udi_nd_ctrl_req_op_t ne2k_nd_ctrl_ctrl_req;
extern udi_nd_info_req_op_t ne2k_nd_ctrl_info_req;