Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Oct 2005 19:52:15 +0000 (UTC)
From:      Bill Paul <wpaul@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/compat/ndis kern_ndis.c ndis_var.h ntoskrnl_var.h subr_ndis.c subr_ntoskrnl.c src/sys/dev/if_ndis if_ndis.c if_ndisvar.h
Message-ID:  <200510181952.j9IJqFmC001753@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
wpaul       2005-10-18 19:52:15 UTC

  FreeBSD src repository

  Modified files:
    sys/compat/ndis      kern_ndis.c ndis_var.h ntoskrnl_var.h 
                         subr_ndis.c subr_ntoskrnl.c 
    sys/dev/if_ndis      if_ndis.c if_ndisvar.h 
  Log:
  Another round of cleanups and fixes:
  
  - Change ndis_return() from a DPC to a workitem so that it doesn't
    run at DISPATCH_LEVEL (with the dispatcher lock held).
  
  - In if_ndis.c, submit packets to the stack via (*ifp->if_input)() in
    a workitem instead of doing it directly in ndis_rxeof(), because
    ndis_rxeof() runs in a DPC, and hence at DISPATCH_LEVEL. This
    implies that the 'dispatch level' mutex for the current CPU is
    being held, and we don't want to call if_input while holding
    any locks.
  
  - Reimplement IoConnectInterrupt()/IoDisconnectInterrupt(). The original
    approach I used to track down the interrupt resource (by scanning
    the device tree starting at the nexus) is prone to problems when
    two devices share an interrupt. (E.g removing ndis1 might disable
    interrupts for ndis0.) The new approach is to multiplex all the
    NDIS interrupts through a common internal dispatcher (ntoskrnl_intr())
    and allow IoConnectInterrupt()/IoDisconnectInterrupt() to add or
    remove interrupts from the dispatch list.
  
  - Implement KeAcquireInterruptSpinLock() and KeReleaseInterruptSpinLock().
  
  - Change the DPC and workitem threads to use the KeXXXSpinLock
    API instead of mtx_lock_spin()/mtx_unlock_spin().
  
  - Simplify the NdisXXXPacket routines by creating an actual
    packet pool structure and using the InterlockedSList routines
    to manage the packet queue.
  
  - Only honor the value returned by OID_GEN_MAXIMUM_SEND_PACKETS
    for serialized drivers. For deserialized drivers, we now create
    a packet array of 64 entries. (The Microsoft DDK documentation
    says that for deserialized miniports, OID_GEN_MAXIMUM_SEND_PACKETS
    is ignored, and the driver for the Marvell 8335 chip, which is
    a deserialized miniport, returns 1 when queried.)
  
  - Clean up timer handling in subr_ntoskrnl.
  
  - Add the following conditional debugging code:
          NTOSKRNL_DEBUG_TIMERS - add debugging and stats for timers
          NDIS_DEBUG_PACKETS - add extra sanity checking for NdisXXXPacket API
          NTOSKRNL_DEBUG_SPINLOCKS - add test for spinning too long
  
  - In kern_ndis.c, always start the HAL first and shut it down last,
    since Windows spinlocks depend on it. Ntoskrnl should similarly be
    started second and shut down next to last.
  
  Revision  Changes    Path
  1.88      +93 -25    src/sys/compat/ndis/kern_ndis.c
  1.44      +19 -3     src/sys/compat/ndis/ndis_var.h
  1.39      +12 -0     src/sys/compat/ndis/ntoskrnl_var.h
  1.96      +93 -92    src/sys/compat/ndis/subr_ndis.c
  1.74      +328 -273  src/sys/compat/ndis/subr_ntoskrnl.c
  1.108     +98 -12    src/sys/dev/if_ndis/if_ndis.c
  1.25      +5 -4      src/sys/dev/if_ndis/if_ndisvar.h



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