Cleanup of event handling.
Disable debugging. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7469 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -21,14 +21,29 @@
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
#define DEBUG
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
#define TRACE(a...) dprintf("ipro1000: " a)
|
||||
|
||||
/* used by if_em.h */
|
||||
#define DEBUG_INIT 1
|
||||
#define DEBUG_IOCTL 1
|
||||
#define DEBUG_HW 1
|
||||
#define DBG_STATS 1
|
||||
|
||||
#else
|
||||
|
||||
#define TRACE(a...)
|
||||
#endif
|
||||
|
||||
#define ERROR(a...) dprintf("ipro1000: " a)
|
||||
/* used by if_em.h */
|
||||
#define DEBUG_INIT 0
|
||||
#define DEBUG_IOCTL 0
|
||||
#define DEBUG_HW 0
|
||||
#undef DBG_STATS
|
||||
|
||||
#endif
|
||||
|
||||
#define ERROR(a...) dprintf("ipro1000: ERROR " a)
|
||||
#define PRINT(a...) dprintf("ipro1000: " a)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,7 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
/*$FreeBSD: /repoman/r/ncvs/src/sys/dev/em/if_em.c,v 1.2.2.19 2004/04/22 22:03:26 ru Exp $*/
|
||||
|
||||
#include "if_em.h"
|
||||
|
||||
#include "util.h"
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
|
||||
@@ -197,9 +197,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#define ETHER_ALIGN 2
|
||||
|
||||
/* Defines for printing debug information */
|
||||
#define DEBUG_INIT 1
|
||||
#define DEBUG_IOCTL 1
|
||||
#define DEBUG_HW 1
|
||||
|
||||
#define INIT_DEBUGOUT(S) if (DEBUG_INIT) printf("ipro1000: " S "\n")
|
||||
#define INIT_DEBUGOUT1(S, A) if (DEBUG_INIT) printf("ipro1000: " S "\n", A)
|
||||
@@ -249,7 +246,13 @@ typedef struct _DESCRIPTOR_PAIR
|
||||
ADDRESS_LENGTH_PAIR descriptor[4];
|
||||
u_int32_t elements;
|
||||
} DESC_ARRAY, *PDESC_ARRAY;
|
||||
|
||||
|
||||
// used by interrupt and event handling thread
|
||||
enum {
|
||||
EVENT_LINK_CHANGED = 0x01,
|
||||
EVENT_RESTART_TX = 0x02,
|
||||
};
|
||||
|
||||
/* Our adapter structure */
|
||||
struct adapter {
|
||||
struct arpcom interface_data;
|
||||
@@ -268,12 +271,10 @@ struct adapter {
|
||||
int io_rid;
|
||||
u_int8_t unit;
|
||||
|
||||
/* Even processing thread, to move link status change out of the interrupt */
|
||||
/* Event processing thread, to move link status change out of the interrupt */
|
||||
thread_id event_thread;
|
||||
sem_id event_sem;
|
||||
volatile int32 event_flags;
|
||||
enum { EVENT_LINK_CHANGED = 0x1, EVENT_RESTART_TX = 0x02 };
|
||||
#define atomic_read(a) atomic_or(a, 0)
|
||||
|
||||
/* Info about the board itself */
|
||||
u_int32_t part_num;
|
||||
|
||||
@@ -201,7 +201,7 @@ void *driver_malloc(int size, int p2, int p3);
|
||||
void driver_free(void *p, int p2);
|
||||
|
||||
/* GCC will always emit a read opcode when reading from */
|
||||
/* a volatile poitner, even if the result is unused */
|
||||
/* a volatile pointer, even if the result is unused */
|
||||
#define E1000_WRITE_FLUSH(a) \
|
||||
E1000_READ_REG(a, STATUS)
|
||||
|
||||
|
||||
@@ -29,4 +29,6 @@ void area_free(void *p);
|
||||
// generic macro for rounding, can only be used for power of 2 blocksize
|
||||
#define ROUNDUP(size, blocksize) (((size) + (blocksize) - 1) & ~((blocksize) - 1))
|
||||
|
||||
#define atomic_read(a) atomic_or(a, 0)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user