The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/bitsy/etherwavelan.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* Bitsy pcmcia code for wavelan.c */
    2 
    3 #include "u.h"
    4 #include "../port/lib.h"
    5 #include "mem.h"
    6 #include "dat.h"
    7 #include "fns.h"
    8 #include "io.h"
    9 #include "../port/error.h"
   10 #include "../port/netif.h"
   11 #include "etherif.h"
   12 #include "../pc/wavelan.h"
   13 
   14 static int
   15 wavelanpcmciareset(Ether *ether)
   16 {
   17         Ctlr *ctlr;
   18 
   19         if((ctlr = malloc(sizeof(Ctlr))) == nil)
   20                 return -1;
   21 
   22         ilock(ctlr);
   23         ctlr->ctlrno = ether->ctlrno;
   24 
   25         if (ether->ports == nil){
   26                 ether->ports = malloc(sizeof(Devport));
   27                 ether->ports[0].port = 0;
   28                 ether->ports[0].size = 0;
   29                 ether->nports= 1;
   30         }
   31         if (ether->ports[0].port==0)
   32                 ether->ports[0].port=WDfltIOB;
   33         ctlr->iob = ether->ports[0].port;
   34 
   35         if(wavelanreset(ether, ctlr) < 0){
   36                 iunlock(ctlr);
   37                 free(ctlr);
   38                 ether->ctlr = nil;
   39                 return -1;
   40         }
   41         iunlock(ctlr);
   42         return 0;
   43 }
   44 
   45 void
   46 etherwavelanlink(void)
   47 {
   48         addethercard("wavelan", wavelanpcmciareset);
   49 }

Cache object: 67f932696f7f9a81aaad20a2b9d7bf63


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.