diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-05-15 06:36:22 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-05-15 06:36:22 +0000 |
commit | 29e38a60e233b97f0c58a1aab3bc17e0ac246dd7 (patch) | |
tree | f178f3fad4c926a6f1f787a64fd8854d368cbbff | |
parent | 5f6d63fe731a37e86299daf97bd2efa673052556 (diff) |
Cardbus serial infrastructure
-rw-r--r-- | sys/dev/cardbus/cardbus.c | 14 | ||||
-rw-r--r-- | sys/dev/cardbus/cardbusvar.h | 6 |
2 files changed, 16 insertions, 4 deletions
diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c index 20546bf90de..8d531e165b8 100644 --- a/sys/dev/cardbus/cardbus.c +++ b/sys/dev/cardbus/cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cardbus.c,v 1.1 2000/04/08 05:50:52 aaron Exp $ */ +/* $OpenBSD: cardbus.c,v 1.2 2000/05/15 06:36:21 niklas Exp $ */ /* $NetBSD: cardbus.c,v 1.24 2000/04/02 19:11:37 mycroft Exp $ */ /* @@ -346,8 +346,16 @@ parse_tuple(u_int8_t *tuple, int len, void *data) break; case PCMCIA_CISTPL_FUNCE: - if(cis->funcid == PCMCIA_FUNCTION_NETWORK && tuple[1] >= 8) { - if(tuple[2] == PCMCIA_TPLFE_TYPE_LAN_NID) { + switch(cis->funcid) { + case PCMCIA_FUNCTION_SERIAL: + if(tuple[1] >= 2 && + tuple[2] == 0 /* XXX PCMCIA_TPLFE_TYPE_SERIAL_??? */) { + cis->funce.serial.uart_type = tuple[3] & 0x1f; + cis->funce.serial.uart_present = 1; + } + break; + case PCMCIA_FUNCTION_NETWORK: + if(tuple[1] >= 8 && tuple[2] == PCMCIA_TPLFE_TYPE_LAN_NID) { if(tuple[3] > sizeof(cis->funce.network.netid)) { DPRINTF(("%s: unknown network id type (len = %d)\n", func, tuple[3])); diff --git a/sys/dev/cardbus/cardbusvar.h b/sys/dev/cardbus/cardbusvar.h index 774b5237d9f..70c9d6b8f5b 100644 --- a/sys/dev/cardbus/cardbusvar.h +++ b/sys/dev/cardbus/cardbusvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cardbusvar.h,v 1.2 2000/04/26 14:05:34 brad Exp $ */ +/* $OpenBSD: cardbusvar.h,v 1.3 2000/05/15 06:36:21 niklas Exp $ */ /* $NetBSD: cardbusvar.h,v 1.17 2000/04/02 19:11:37 mycroft Exp $ */ /* @@ -330,6 +330,10 @@ struct cardbus_cis_info { unsigned int funcid; union { struct { + int uart_type; + int uart_present; + } serial; + struct { char netid[6]; char netid_present; char __filler; |