Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/cardbus extract serial funce



details:   https://anonhg.NetBSD.org/src/rev/79a9c95af36e
branches:  trunk
changeset: 485041:79a9c95af36e
user:      joda <joda%NetBSD.org@localhost>
date:      Mon Apr 17 09:16:38 2000 +0000

description:
extract serial funce

diffstat:

 sys/dev/cardbus/cardbus.c |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 680c37446258 -r 79a9c95af36e sys/dev/cardbus/cardbus.c
--- a/sys/dev/cardbus/cardbus.c Mon Apr 17 09:15:58 2000 +0000
+++ b/sys/dev/cardbus/cardbus.c Mon Apr 17 09:16:38 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cardbus.c,v 1.24 2000/04/02 19:11:37 mycroft Exp $     */
+/*     $NetBSD: cardbus.c,v 1.25 2000/04/17 09:16:38 joda Exp $        */
 
 /*
  * Copyright (c) 1997, 1998, 1999 and 2000
@@ -360,8 +360,16 @@
        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]));
@@ -371,6 +379,7 @@
                           tuple + 4, tuple[3]);
                }
            }
+           break;
        }
        break;
     }



Home | Main Index | Thread Index | Old Index