DragonFly commits List (threaded) for 2006-12
DragonFly BSD
DragonFly commits List (threaded) for 2006-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/sys/dev/netif/re if_re.c if_revar.h


From: Sepherosa Ziehau <sephe@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 22 Dec 2006 19:41:55 -0800 (PST)

sephe       2006/12/22 19:41:55 PST

DragonFly src repository

  Modified files:
    sys/dev/netif/re     if_re.c if_revar.h 
  Log:
  - Don't call m_adj() to make RX buffer's _payload_ on longword aligned,
    because some re(4) chips (e.g. RTL8101E) require RX buffer to be
    8-bytes aligned.  This change shows no noticeable performance change.
    Reported-by: Joe Talbott <josepht@cstone.net>
  - Avoid writing extra hardware registers by writing 2 bytes to IDR4
    instead instead of writing 4 bytes, bacause:
    1) the extra two registers after IDR5 are reserved.
    2) accessing arpcom.ac_enaddr[6,7] should be invalid.
  - Add a flag field in re_softc and re_hwrev.  Currently only one flag,
    RE_F_HASMPC, is defined.  This flag is used to indicate whether the
    hardware has MPC register or not, so we can avoid writing to MPC's
    position, if that position is reserved.
  - Move descriptor ring address setting up before RX/TX enabling, since
    some re(4) chips (e.g. RTL8101E) will try accessing descriptor ring
    immediately after RX/TX is enabled, which results in intermittent
    kernel panic or system hanging.
    Paniced-by: Joe Talbott <josepht@cstone.net>
  - Avoid calling re_init(), if hw.reX.tx_moderation is changed but NIC
    is not up yet.
  - Const-fy global hardware id arrays and nuke unused macro while I'm here.
  
  Thank Joe Talbott <josepht@cstone.net> to help debugging and provide
  valuable information (esp. locating the problematic RX/TX enabling :)
  
  Thank dillon@ to provide debugging hints.
  
  Tested-by:
    Joe Talbott <josepht@cstone.net> (RTL8101E)
    swildner@ (onboard RTL8169S) (*)
    me (RTL8169S)
  
  # (*) swildner@'s card is still half broken even after this commit :\
  
  Revision  Changes    Path
  1.29      +44 -40    src/sys/dev/netif/re/if_re.c
  1.2       +5 -5      src/sys/dev/netif/re/if_revar.h


http://www.dragonflybsd.org/cvsweb/src/sys/dev/netif/re/if_re.c.diff?r1=1.28&r2=1.29&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/dev/netif/re/if_revar.h.diff?r1=1.1&r2=1.2&f=u



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]