- Change ELINK_ID_PORT; the 3c507 likes 0x100 better.

- Add module metadata.
This commit is contained in:
Matthew N. Dodd 2003-03-29 13:18:20 +00:00
parent d0859c8567
commit 3330d5fb09
2 changed files with 19 additions and 2 deletions

View File

@ -33,7 +33,10 @@
* Common code for dealing with 3COM ethernet cards.
*/
#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <machine/cpufunc.h>
@ -53,6 +56,10 @@ elink_reset()
x = 1;
outb(ELINK_ID_PORT, ELINK_RESET);
}
outb(ELINK_ID_PORT, 0);
outb(ELINK_ID_PORT, 0);
return;
}
/*
@ -75,3 +82,12 @@ elink_idseq(u_char p)
c <<= 1;
}
}
static moduledata_t elink_mod = {
"elink",/* module name */
NULL, /* event handler */
0 /* extra data */
};
DECLARE_MODULE(elink, elink_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
MODULE_VERSION(elink, 1);

View File

@ -32,12 +32,13 @@
#ifdef PC98
#define ELINK_ID_PORT 0x71d0
#else
#define ELINK_ID_PORT 0x110
#define ELINK_ID_PORT 0x100
#endif
#define ELINK_RESET 0xc0
#define ELINK_507_POLY 0xe7
#define ELINK_509_POLY 0xcf
#define TLINK_619_POLY 0x63
void elink_reset(void);
void elink_idseq(u_char p);