Author: sbruno
Date: Fri Jan 27 22:30:27 2017
New Revision: 312903
URL: https://svnweb.freebsd.org/changeset/base/312903

Log:
  Replace customized busmaster code with standardized setup call.
  
  Reported by:  jhb

Modified:
  head/sys/net/iflib.c

Modified: head/sys/net/iflib.c
==============================================================================
--- head/sys/net/iflib.c        Fri Jan 27 22:14:42 2017        (r312902)
+++ head/sys/net/iflib.c        Fri Jan 27 22:30:27 2017        (r312903)
@@ -4781,12 +4781,9 @@ iflib_msix_init(if_ctx_t ctx)
        ** successfully initialize us.
        */
        {
-               uint16_t pci_cmd_word;
                int msix_ctrl, rid;
 
-               pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2);
-               pci_cmd_word |= PCIM_CMD_BUSMASTEREN;
-               pci_write_config(dev, PCIR_COMMAND, pci_cmd_word, 2);
+               pci_enable_busmaster(dev);
                rid = 0;
                if (pci_find_cap(dev, PCIY_MSIX, &rid) == 0 && rid != 0) {
                        rid += PCIR_MSIX_CTRL;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to