Commit changes I posted to tech-kern on Oct 14, which makes the ethernet part
of my Xircom RealPort Ethernet 10/100 + Modem (REM56G) work. The modem part is still not usable (this would need some PCMCIA magic that I don't know how to do; see my message to tech-kern on Oct 07). Change to pcmcia_cis.c from OpenBSD. I checked that this doesn't break a 3com 3C562D (ethernet+modem) which I also have.
This commit is contained in:
parent
41ee0930b0
commit
b495351fbf
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_xi.c,v 1.15 2001/09/26 09:01:30 chris Exp $ */
|
||||
/* $NetBSD: if_xi.c,v 1.16 2001/10/25 20:20:24 bouyer Exp $ */
|
||||
/* OpenBSD: if_xe.c,v 1.9 1999/09/16 11:28:42 niklas Exp */
|
||||
|
||||
/*
|
||||
|
@ -246,6 +246,9 @@ const struct xi_pcmcia_product {
|
|||
{ PCMCIA_VENDOR_INTEL, 0x0143,
|
||||
0, XIFLAGS_MOHAWK | XIFLAGS_MODEM,
|
||||
PCMCIA_STR_INTEL_EEPRO100 },
|
||||
{ PCMCIA_VENDOR_XIRCOM, 0x110a,
|
||||
0, XIFLAGS_MOHAWK | XIFLAGS_DINGO | XIFLAGS_MODEM,
|
||||
PCMCIA_STR_XIRCOM_REM56 },
|
||||
#ifdef NOT_SUPPORTED
|
||||
{ PCMCIA_VENDOR_XIRCOM, 0x1141,
|
||||
0, XIFLAGS_MODEM,
|
||||
|
@ -349,6 +352,9 @@ xi_pcmcia_match(parent, match, aux)
|
|||
{
|
||||
struct pcmcia_attach_args *pa = aux;
|
||||
|
||||
if (pa->manufacturer == PCMCIA_VENDOR_XIRCOM &&
|
||||
pa->product == 0x110a)
|
||||
return (2); /* prevent attach to com_pcmcia */
|
||||
if (pa->pf->function != PCMCIA_FUNCTION_NETWORK)
|
||||
return (0);
|
||||
|
||||
|
@ -629,20 +635,20 @@ xi_pcmcia_enable(psc)
|
|||
|
||||
DPRINTF(XID_CONFIG,("xi_pcmcia_enable()\n"));
|
||||
|
||||
if (pcmcia_function_enable(psc->sc_pf))
|
||||
return (1);
|
||||
psc->sc_resource |= XI_RES_PCIC;
|
||||
|
||||
/* establish the interrupt. */
|
||||
psc->sc_ih = pcmcia_intr_establish(psc->sc_pf, IPL_NET, xi_intr, sc);
|
||||
if (psc->sc_ih == NULL) {
|
||||
printf("%s: couldn't establish interrupt\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
pcmcia_function_disable(psc->sc_pf);
|
||||
psc->sc_resource &= ~XI_RES_PCIC;
|
||||
return (1);
|
||||
}
|
||||
|
||||
if (pcmcia_function_enable(psc->sc_pf)) {
|
||||
pcmcia_intr_disestablish(psc->sc_pf, psc->sc_ih);
|
||||
return (1);
|
||||
}
|
||||
psc->sc_resource |= XI_RES_PCIC;
|
||||
|
||||
xi_full_reset(sc);
|
||||
|
||||
return (0);
|
||||
|
@ -656,8 +662,8 @@ xi_pcmcia_disable(psc)
|
|||
DPRINTF(XID_CONFIG,("xi_pcmcia_disable()\n"));
|
||||
|
||||
if (psc->sc_resource & XI_RES_PCIC) {
|
||||
pcmcia_function_disable(psc->sc_pf);
|
||||
pcmcia_intr_disestablish(psc->sc_pf, psc->sc_ih);
|
||||
pcmcia_function_disable(psc->sc_pf);
|
||||
psc->sc_resource &= ~XI_RES_PCIC;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pcmcia_cis.c,v 1.25 2001/09/24 14:19:10 itohy Exp $ */
|
||||
/* $NetBSD: pcmcia_cis.c,v 1.26 2001/10/25 20:20:24 bouyer Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Marc Horowitz. All rights reserved.
|
||||
|
@ -838,7 +838,20 @@ pcmcia_parse_cis_tuple(tuple, arg)
|
|||
tuple->length));
|
||||
break;
|
||||
}
|
||||
if ((state->pf == NULL) || (state->gotmfc == 2)) {
|
||||
if (state->pf) {
|
||||
if (state->pf->function == PCMCIA_FUNCTION_UNSPEC) {
|
||||
/*
|
||||
* This looks like a opportunistic function
|
||||
* created by a CONFIG tuple. Just keep it.
|
||||
*/
|
||||
} else {
|
||||
/*
|
||||
* A function is being defined, end it.
|
||||
*/
|
||||
state->pf = NULL;
|
||||
}
|
||||
}
|
||||
if (state->pf == NULL) {
|
||||
state->pf = malloc(sizeof(*state->pf), M_DEVBUF,
|
||||
M_NOWAIT);
|
||||
memset(state->pf, 0, sizeof(*state->pf));
|
||||
|
|
Loading…
Reference in New Issue