1) merge almost identical cs_{isa, pccard}_attach() into cs_attach()
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 2 Sep 2005 12:51:00 +0000 (12:51 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 2 Sep 2005 12:51:00 +0000 (12:51 +0000)
commit513da8e7ff8ad7aa83fe1e88f7e933885fa5ce1c
treedb23be11de409511856d6785c99ef949c85b9db9
parent0d680fdbee52f9c11a1cc0fc6fd8ef87470979c2
1) merge almost identical cs_{isa, pccard}_attach() into cs_attach()
2) staticize csintr()
3) add cs_detach()
4) in cs_attach()
   - move ifmedia_init() to the beginning of cs_attach(), so that
     ifmedia_removeall() can be called safely if cs_attach() fails
   - add KASSERT to make sure either I/O port or I/O memory is set up before
     entering cs_attach()
   - set up intr in the last step of cs_attach()
   - remove unnecessary NULL check after malloc(), since M_WAITOK flag is
     used here
   - use newly added cs_detach() as error handling routine
   - use `#if 0' to comment out code, instead of fixing them in the comment.
     this makes the code easy to read as well as the comment
sys/dev/netif/cs/if_cs.c
sys/dev/netif/cs/if_cs_isa.c
sys/dev/netif/cs/if_cs_pccard.c
sys/dev/netif/cs/if_csvar.h