version 1.16.4.2, 2009/05/16 10:41:42 |
version 1.17, 2008/11/07 00:20:12 |
Line 168 struct dmc_softc { |
|
Line 168 struct dmc_softc { |
|
} dmc_base; |
} dmc_base; |
}; |
}; |
|
|
static int dmcmatch(device_t, cfdata_t, void *); |
static int dmcmatch(struct device *, struct cfdata *, void *); |
static void dmcattach(device_t, device_t, void *); |
static void dmcattach(struct device *, struct device *, void *); |
static int dmcinit(struct ifnet *); |
static int dmcinit(struct ifnet *); |
static void dmcrint(void *); |
static void dmcrint(void *); |
static void dmcxint(void *); |
static void dmcxint(void *); |
Line 181 static void dmctimeout(struct ifnet *); |
|
Line 181 static void dmctimeout(struct ifnet *); |
|
static int dmcioctl(struct ifnet *, u_long, void *); |
static int dmcioctl(struct ifnet *, u_long, void *); |
static int dmcoutput(struct ifnet *, struct mbuf *, struct sockaddr *, |
static int dmcoutput(struct ifnet *, struct mbuf *, struct sockaddr *, |
struct rtentry *); |
struct rtentry *); |
static void dmcreset(device_t); |
static void dmcreset(struct device *); |
|
|
CFATTACH_DECL(dmc, sizeof(struct dmc_softc), |
CFATTACH_DECL(dmc, sizeof(struct dmc_softc), |
dmcmatch, dmcattach, NULL, NULL); |
dmcmatch, dmcattach, NULL, NULL); |
Line 214 CFATTACH_DECL(dmc, sizeof(struct dmc_sof |
|
Line 214 CFATTACH_DECL(dmc, sizeof(struct dmc_sof |
|
(tail) = (head) |
(tail) = (head) |
|
|
int |
int |
dmcmatch(device_t parent, cfdata_t cf, void *aux) |
dmcmatch(struct device *parent, struct cfdata *cf, void *aux) |
{ |
{ |
struct uba_attach_args *ua = aux; |
struct uba_attach_args *ua = aux; |
struct dmc_softc ssc; |
struct dmc_softc ssc; |
Line 247 dmcmatch(device_t parent, cfdata_t cf, v |
|
Line 247 dmcmatch(device_t parent, cfdata_t cf, v |
|
* to accept packets. |
* to accept packets. |
*/ |
*/ |
void |
void |
dmcattach(device_t parent, device_t self, void *aux) |
dmcattach(struct device *parent, struct device *self, void *aux) |
{ |
{ |
struct uba_attach_args *ua = aux; |
struct uba_attach_args *ua = aux; |
struct dmc_softc *sc = device_private(self); |
struct dmc_softc *sc = device_private(self); |
Line 284 dmcattach(device_t parent, device_t self |
|
Line 284 dmcattach(device_t parent, device_t self |
|
* If interface is on specified UBA, reset its state. |
* If interface is on specified UBA, reset its state. |
*/ |
*/ |
void |
void |
dmcreset(device_t dev) |
dmcreset(struct device *dev) |
{ |
{ |
struct dmc_softc *sc = (struct dmc_softc *)dev; |
struct dmc_softc *sc = (struct dmc_softc *)dev; |
|
|
Line 305 dmcinit(struct ifnet *ifp) |
|
Line 305 dmcinit(struct ifnet *ifp) |
|
struct dmcbufs *rp; |
struct dmcbufs *rp; |
struct dmc_command *qp; |
struct dmc_command *qp; |
struct ifaddr *ifa; |
struct ifaddr *ifa; |
cfdata_t ui = device_cfdata(&sc->sc_dev); |
struct cfdata *ui = device_cfdata(&sc->sc_dev); |
int base; |
int base; |
int s; |
int s; |
|
|
Line 695 dmcxint(void *a) |
|
Line 695 dmcxint(void *a) |
|
arg &= DMC_CNTMASK; |
arg &= DMC_CNTMASK; |
if (arg & DMC_FATAL) { |
if (arg & DMC_FATAL) { |
if (arg != DMC_START) { |
if (arg != DMC_START) { |
snprintb(buf, sizeof(buf), CNTLO_BITS, |
bitmask_snprintf(arg, CNTLO_BITS, |
arg); |
buf, sizeof(buf)); |
log(LOG_ERR, |
log(LOG_ERR, |
"%s: fatal error, flags=%s\n", |
"%s: fatal error, flags=%s\n", |
device_xname(&sc->sc_dev), buf); |
device_xname(&sc->sc_dev), buf); |
Line 730 dmcxint(void *a) |
|
Line 730 dmcxint(void *a) |
|
break; |
break; |
report: |
report: |
#ifdef DMCDEBUG |
#ifdef DMCDEBUG |
snprintb(buf, sizeof(buf), CNTLO_BITS, arg); |
bitmask_snprintf(arg, CNTLO_BITS, buf, sizeof(buf)); |
printd("%s: soft error, flags=%s\n", |
printd("%s: soft error, flags=%s\n", |
device_xname(&sc->sc_dev), buf); |
device_xname(&sc->sc_dev), buf); |
#endif |
#endif |
Line 944 dmctimeout(struct ifnet *ifp) |
|
Line 944 dmctimeout(struct ifnet *ifp) |
|
char buf1[64], buf2[64]; |
char buf1[64], buf2[64]; |
|
|
if (sc->sc_flag & DMC_ONLINE) { |
if (sc->sc_flag & DMC_ONLINE) { |
snprintb(buf1, sizeof(buf1), DMC0BITS, |
bitmask_snprintf(DMC_RBYTE(DMC_BSEL0) & 0xff, DMC0BITS, |
DMC_RBYTE(DMC_BSEL0) & 0xff); |
buf1, sizeof(buf1)); |
snprintb(buf2, sizeof(buf2), DMC2BITS, |
bitmask_snprintf(DMC_RBYTE(DMC_BSEL2) & 0xff, DMC2BITS, |
DMC_RBYTE(DMC_BSEL2) & 0xff); |
buf2, sizeof(buf2)); |
log(LOG_ERR, "%s: output timeout, bsel0=%s bsel2=%s\n", |
log(LOG_ERR, "%s: output timeout, bsel0=%s bsel2=%s\n", |
device_xname(&sc->sc_dev), buf1, buf2); |
device_xname(&sc->sc_dev), buf1, buf2); |
dmcrestart(sc); |
dmcrestart(sc); |