/* Returns 0 if the device function was successfully reset or negative if the device doesn't support resetting a single function.  */
int pci_reset_function(struct pci_dev *dev)
/* Returns 0 if the device function was successfully reset or negative if the device doesn't support resetting a single function.  */
int pci_reset_function(struct pci_dev *dev)
{
	int rc;
	rc = pci_dev_reset(dev, 1);
	if (rc)
		return rc;
	pci_save_state(dev);
	pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_INTX_DISABLE);
	rc = pci_dev_reset(dev, 0);
	pci_restore_state(dev);
	return rc;
}