src/dpdk/drivers/net/igc/base/igc_mac.c
s32 igc_disable_pcie_master_generic(struct igc_hw *hw)
{
	u32 ctrl;
	s32 timeout = MASTER_DISABLE_TIMEOUT;

	DEBUGFUNC("igc_disable_pcie_master_generic");

	ctrl = IGC_READ_REG(hw, IGC_CTRL);
	ctrl |= IGC_CTRL_GIO_MASTER_DISABLE;
	IGC_WRITE_REG(hw, IGC_CTRL, ctrl);

	while (timeout) {
		if (!(IGC_READ_REG(hw, IGC_STATUS) &
		      IGC_STATUS_GIO_MASTER_ENABLE) ||
				IGC_REMOVED(hw->hw_addr))
			break;
		usec_delay(100);
		timeout--;
	}

	if (!timeout) {
		DEBUGOUT("Master requests are pending.\n");
		return -IGC_ERR_MASTER_REQUESTS_PENDING;
	}

	return IGC_SUCCESS;
}
/**
 *  igc_disable_pcie_master_generic - Disables PCI-express master access
 *  @hw: pointer to the HW structure
 *
 *  Returns IGC_SUCCESS if successful, else returns -10
 *  (-IGC_ERR_MASTER_REQUESTS_PENDING) if master disable bit has not caused
 *  the master requests to be disabled.
 *
 *  Disables PCI-Express master access and verifies there are no pending
 *  requests.
 **/
Disables PCI-express master access
@hw: pointer to the HW structure

Returns IGC_SUCCESS if successful, else returns -10
(-IGC_ERR_MASTER_REQUESTS_PENDING) if master disable bit has not caused
the master requests to be disabled.

Disables PCI-Express master access and verifies there are no pending
requests.
Disables PCI - express master access @hw : pointer to the HW structure Returns IGC_SUCCESS if successful else returns - 10 ( - IGC_ERR_MASTER_REQUESTS_PENDING ) if master disable bit has not caused the master requests to be disabled . Disables PCI - Express master access and verifies there are no pending requests .
s32 igc_disable_pcie_master_generic(struct igc_hw *hw)
{
	u32 ctrl;
	s32 timeout = MASTER_DISABLE_TIMEOUT;
	DEBUGFUNC("igc_disable_pcie_master_generic");
	ctrl = IGC_READ_REG(hw, IGC_CTRL);
	ctrl |= IGC_CTRL_GIO_MASTER_DISABLE;
	IGC_WRITE_REG(hw, IGC_CTRL, ctrl);
	while (timeout) {
		if (!(IGC_READ_REG(hw, IGC_STATUS) &
		      IGC_STATUS_GIO_MASTER_ENABLE) ||
				IGC_REMOVED(hw->hw_addr))
			break;
		usec_delay(100);
		timeout--;
	}
	if (!timeout) {
		DEBUGOUT("Master requests are pending.\n");
		return -IGC_ERR_MASTER_REQUESTS_PENDING;
	}
	return IGC_SUCCESS;
}
s32 igc_disable_pcie_master_generic ( struct igc_hw * hw ) { u32 ctrl ; s32 timeout = MASTER_DISABLE_TIMEOUT ; DEBUGFUNC ( " " ) ; ctrl = IGC_READ_REG ( hw , IGC_CTRL ) ; ctrl |= IGC_CTRL_GIO_MASTER_DISABLE ; IGC_WRITE_REG ( hw , IGC_CTRL , ctrl ) ; while ( timeout ) { if ( ! ( IGC_READ_REG ( hw , IGC_STATUS ) & IGC_STATUS_GIO_MASTER_ENABLE ) || IGC_REMOVED ( hw -> hw_addr ) ) break ; usec_delay ( 100 ) ; timeout -- ; } if ( ! timeout ) { DEBUGOUT ( " \n " ) ; return - IGC_ERR_MASTER_REQUESTS_PENDING ; } return IGC_SUCCESS ; }
igc_disable_pcie_master_generic - Disables PCI-express master access
  @hw: pointer to the HW structure
igc_disable_pcie_master_generic - Disables PCI - express master access @hw : pointer to the HW structure