cvs commit: src/sys/compat/ndis kern_ndis.c kern_windrv.c ndis_var.h subr_ndis.c subr_ntoskrnl.c winx32_wrap.S src/sys/dev/if_ndis if_ndis.c

Bill Paul wpaul at FreeBSD.org
Wed Nov 2 10:01:06 PST 2005


wpaul       2005-11-02 18:01:05 UTC

  FreeBSD src repository

  Modified files:
    sys/compat/ndis      kern_ndis.c kern_windrv.c ndis_var.h 
                         subr_ndis.c subr_ntoskrnl.c winx32_wrap.S 
    sys/dev/if_ndis      if_ndis.c 
  Log:
  Tests with my dual Opteron system have shown that it's possible
  for code to start out on one CPU when thunking into Windows
  mode in ctxsw_utow(), and then be pre-empted and migrated to another
  CPU before thunking back to UNIX mode in ctxsw_wtou(). This is
  bad, because then we can end up looking at the wrong 'thread environment
  block' when trying to come back to UNIX mode. To avoid this, we now
  pin ourselves to the current CPU when thunking into Windows code.
  
  Few other cleanups, since I'm here:
  
  - Get rid of the ndis_isr(), ndis_enable_interrupt() and
    ndis_disable_interrupt() wrappers from kern_ndis.c and just invoke
    the miniport's methods directly in the interrupt handling routines
    in subr_ndis.c. We may as well lose the function call overhead,
    since we don't need to export these things outside of ndis.ko
    now anyway.
  
  - Remove call to ndis_enable_interrupt() from ndis_init() in if_ndis.c.
    We don't need to do it there anyway (the miniport init routine handles
    it, if needed).
  
  - Fix the logic in NdisWriteErrorLogEntry() a little.
  
  - Change some NDIS_STATUS_xxx codes in subr_ntoskrnl.c into STATUS_xxx
    codes.
  
  - Handle kthread_create() failure correctly in PsCreateSystemThread().
  
  Revision  Changes    Path
  1.91      +4 -66     src/sys/compat/ndis/kern_ndis.c
  1.13      +7 -2      src/sys/compat/ndis/kern_windrv.c
  1.45      +0 -3      src/sys/compat/ndis/ndis_var.h
  1.99      +23 -16    src/sys/compat/ndis/subr_ndis.c
  1.81      +13 -9     src/sys/compat/ndis/subr_ntoskrnl.c
  1.4       +8 -0      src/sys/compat/ndis/winx32_wrap.S
  1.113     +0 -3      src/sys/dev/if_ndis/if_ndis.c


More information about the cvs-src mailing list