FreeBSD/sys/dev/e1000/if_em.c
/*
 * 82574 only:
 * Write a new value to the EEPROM increasing the number of MSIX
 * vectors from 3 to 5, for proper multiqueue support.
 */
82574 only:
Write a new value to the EEPROM increasing the number of MSIX
vectors from 3 to 5, for proper multiqueue support.
82574 only : Write a new value to the EEPROM increasing the number of MSIX vectors from 3 to 5 for proper multiqueue support .
static void
em_enable_vectors_82574(struct adapter *adapter)
{
	struct e1000_hw *hw = &adapter->hw;
	device_t dev = adapter->dev;
	u16 edata;
	e1000_read_nvm(hw, EM_NVM_PCIE_CTRL, 1, &edata);
	printf("Current cap: %#06x\n", edata);
	if (((edata & EM_NVM_MSIX_N_MASK) >> EM_NVM_MSIX_N_SHIFT) != 4) {
		device_printf(dev, "Writing to eeprom: increasing "
		    "reported MSIX vectors from 3 to 5...\n");
		edata &= ~(EM_NVM_MSIX_N_MASK);
		edata |= 4 << EM_NVM_MSIX_N_SHIFT;
		e1000_write_nvm(hw, EM_NVM_PCIE_CTRL, 1, &edata);
		e1000_update_nvm_checksum(hw);
		device_printf(dev, "Writing to eeprom: done\n");
	}
}
static void em_enable_vectors_82574 ( struct adapter * adapter ) { struct e1000_hw * hw = & adapter -> hw ; device_t dev = adapter -> dev ; u16 edata ; e1000_read_nvm ( hw , EM_NVM_PCIE_CTRL , 1 , & edata ) ; printf ( " \n " , edata ) ; if ( ( ( edata & EM_NVM_MSIX_N_MASK ) >> EM_NVM_MSIX_N_SHIFT ) != 4 ) { device_printf ( dev , " " " \n " ) ; edata &= ~ ( EM_NVM_MSIX_N_MASK ) ; edata |= 4 << EM_NVM_MSIX_N_SHIFT ; e1000_write_nvm ( hw , EM_NVM_PCIE_CTRL , 1 , & edata ) ; e1000_update_nvm_checksum ( hw ) ; device_printf ( dev , " \n " ) ; } }
82574 only:
 Write a new value to the EEPROM increasing the number of MSIX
 vectors from 3 to 5, for proper multiqueue support.
82574 only : Write a new value to the EEPROM increasing the number of MSIX vectors from 3 to 5 for proper multiqueue support .