Author: sbruno
Date: Thu Jul 16 16:32:57 2015
New Revision: 285639
URL: https://svnweb.freebsd.org/changeset/base/285639

Log:
  Add an adapter CORE lock in the DDB hook em_dump_queue to avoid WITNESS
  panic in em_init_locked() while debugging.
  
  MFC after:    2 weeks
  Sponsored by: Limelight Networks

Modified:
  head/sys/dev/e1000/if_em.c

Modified: head/sys/dev/e1000/if_em.c
==============================================================================
--- head/sys/dev/e1000/if_em.c  Thu Jul 16 16:08:40 2015        (r285638)
+++ head/sys/dev/e1000/if_em.c  Thu Jul 16 16:32:57 2015        (r285639)
@@ -5998,7 +5998,9 @@ DB_COMMAND(em_reset_dev, em_ddb_reset_de
                dev = devclass_get_device(dc, index);
                if (device_get_driver(dev) == &em_driver) {
                        struct adapter *adapter = device_get_softc(dev);
+                       EM_CORE_LOCK(adapter);
                        em_init_locked(adapter);
+                       EM_CORE_UNLOCK(adapter);
                }
        }
 }
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to