Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Mar 2003 09:29:44 -0800 (PST)
From:      Nate Lawson <njl@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/pci if_dc.c if_pcn.c if_rl.c if_sf.c if_sis.c if_sk.c if_ste.c if_ti.c if_tl.c if_vr.c if_wb.c if_xl.c
Message-ID:  <200303311729.h2VHTi9k095144@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
njl         2003/03/31 09:29:44 PST

  FreeBSD src repository

  Modified files:
    sys/pci              if_dc.c if_pcn.c if_rl.c if_sf.c if_sis.c 
                         if_sk.c if_ste.c if_ti.c if_tl.c if_vr.c 
                         if_wb.c if_xl.c 
  Log:
  Clean up locking and resource management for pci/if_*
  
  - Remove locking of the softc in the attach method, instead depending on
    bus_setup_intr being at the end of attach (delaying interrupt enable until
    after ether_ifattach is called)
  - Call *_detach directly in the error case of attach, depending on checking
    in detach to only free resources that were allocated.  This puts all
    resource freeing in one place, avoiding thinkos that lead to memory leaks.
  - Add bus_child_present check to calls to *_stop in the detach method to
    be sure hw is present before touching its registers.
  - Remove bzero softc calls since device_t should do this for us.
  - dc: move interrupt allocation back where it was before.  It was unnecessary
    to move it.  This reverts part of 1.88
  - rl: move irq allocation before ether_ifattach.  Problems might have been
    caused by allocating the irq after enabling interrupts on the card.
  - rl: call rl_stop before ether_ifdetach
  - sf: call sf_stop before ether_ifdetach
  - sis: add missed free of sis_tag
  - sis: check errors from tag creation
  - sis: move dmamem_alloc and dmamap_load to happen at same time as tag creation
  - sk: remove duplicate initialization of sk_dev
  - ste: add missed bus_generic_detach
  - ti: call ti_stop before ether_ifdetach
  - ti: add missed error setting in ti_rdata alloc failure
  - vr: add missed error setting in I/O, memory mapping cases
  - xl: add missed error setting in I/O, memory mapping cases
  - xl: remove multi-level goto on attach failure
  - xl: move dmamem_alloc and dmamap_load to happen at same time as tag creation
  - Calls to free(9) are unconditional because it is valid to call free with a
    null pointer.
  
  Reviewed by:    imp, mdodd
  
  Revision  Changes    Path
  1.97      +32 -33    src/sys/pci/if_dc.c
  1.36      +29 -33    src/sys/pci/if_pcn.c
  1.91      +34 -34    src/sys/pci/if_rl.c
  1.50      +28 -33    src/sys/pci/if_sf.c
  1.67      +102 -86   src/sys/pci/if_sis.c
  1.55      +59 -60    src/sys/pci/if_sk.c
  1.46      +30 -38    src/sys/pci/if_ste.c
  1.72      +32 -50    src/sys/pci/if_ti.c
  1.75      +28 -34    src/sys/pci/if_tl.c
  1.64      +28 -35    src/sys/pci/if_vr.c
  1.54      +27 -33    src/sys/pci/if_wb.c
  1.135     +103 -113  src/sys/pci/if_xl.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303311729.h2VHTi9k095144>