Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Dec 2001 14:52:36 -0800 (PST)
From:      Luigi Rizzo <luigi@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/pci if_dc.c if_sis.c
Message-ID:  <200112052252.fB5Mqa521638@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
luigi       2001/12/05 14:52:36 PST

  Modified files:        (Branch: RELENG_4)
    sys/pci              if_dc.c if_sis.c 
  Log:
  Move the clearing of IFF_RUNNING early in *_stop(), before actually
  freeing resources (IFF_RUNNING means resources _are_ allocated).
  
  Because *_stop() is not protected by splimp(), and it is not always
  called at splimp() (e.g. from *_shutdown()), the old code could
  potentially cause a panic at shutdown in the very rare case you
  get an interrupt from a device sharing the same IRQ line in the
  middle of *_stop().
  
  With polling enabled, this "rare" case become slightly more frequent
  because clock interrupts can also hit you in the middle of *_stop().
  
  Note that this was a bug in the original drivers, not in the
  polling code.
  Note also that some other drivers (not all) have a similar bug.
  
  The code in CURRENT seems to be safe because *_stop() is wrapped
  in LOCK/UNLOCK calls. Maybe it would be more robust to use splimp()
  around *_stop() as well.
  
  Revision   Changes    Path
  1.9.2.28   +2 -2      src/sys/pci/if_dc.c
  1.13.4.13  +3 -2      src/sys/pci/if_sis.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?200112052252.fB5Mqa521638>