Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Aug 2000 10:47:56 -0700 (PDT)
From:      Bill Paul <wpaul@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/pci if_fxp.c
Message-ID:  <200008111747.KAA70528@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
wpaul       2000/08/11 10:47:56 PDT

  Modified files:
    sys/pci              if_fxp.c 
  Log:
  Fix a bug brought to light by the people working on SMPng. I don't quite
  understand exactly what it is about SMPng that tickles this bug. What I
  do know is that the foo_init() routine in most drivers is often called
  twice when an interface is brought up. One time is due to the ifconfig(8)
  command calling the SIOCSIFFLAGS ioctl to set the IFF_UP flag, and another
  is probably due to the kernel calling ifp->if_init at some point. In any
  case, the SMPng changes seem to affect the timing of these two events in
  such a way that there is a significant delay before any packets are sent
  onto the wire after the interface is first brought up. This manifested
  itself locally as an SMPng test machine which failed to obtain an address
  via DHCP when booting up.
  
  It looks like the second call to fxp_init() is happening faster now than
  it did before, and I think it catches the chip while it's in the process
  of dealing with the configuration command from the first call. Whatever
  the case, a FXP_CSR_SCB_CNA interrupt event is now generated shortly after
  the second fxp_init() call. (This interrupt is apparently never generated
  by a non-SMPng kernel, so nobody noticed.)
  
  There are two problems with this: first, fxp_intr() does not handle the
  FXP_CSR_SCB_CNA interrupt event (it never tests for it or does anything
  to deal with it), and second, the meaning of FXP_CSR_SCB_CNA is not
  documented in the driver. (Apparently it means "command unit not active.")
  Bad coder. No biscuit.
  
  The fix is to have the FXP_CSR_SCB_CNA interrupt handled just like the
  FXP_SCB_STATACK_CXTNO interrupt. This prevents the state machine for
  the configuration/RX filter programming stuff from getting wedged for
  several seconds and preventing packet transmission.
  
  Noticed by: jhb
  
  Revision  Changes    Path
  1.85      +12 -2     src/sys/pci/if_fxp.c



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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