/* pci_enable_acs - enable ACS if hardware support it @dev: the PCI device  */
void pci_enable_acs(struct pci_dev *dev)
/* pci_enable_acs - enable ACS if hardware support it @dev: the PCI device  */
void pci_enable_acs(struct pci_dev *dev)
{
	int pos;
	u16 cap;
	u16 ctrl;
	if (!pci_acs_enable)
		return;
	if (!pci_is_pcie(dev))
		return;
	pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ACS);
	if (!pos)
		return;
	pci_read_config_word(dev, pos + PCI_ACS_CAP, &cap);
	pci_read_config_word(dev, pos + PCI_ACS_CTRL, &ctrl);
	ctrl |= (cap & PCI_ACS_SV);
	ctrl |= (cap & PCI_ACS_RR);
	ctrl |= (cap & PCI_ACS_CR);
	ctrl |= (cap & PCI_ACS_UF);
	pci_write_config_word(dev, pos + PCI_ACS_CTRL, ctrl);
}