/* RETURNS: An appropriate -ERRNO error value on error, or zero for success.  */
int pci_set_mwi(struct pci_dev *dev)
/* RETURNS: An appropriate -ERRNO error value on error, or zero for success.  */
int pci_set_mwi(struct pci_dev *dev)
{
	int rc;
	u16 cmd;
	rc = pci_set_cacheline_size(dev);
	if (rc)
		return rc;
	pci_read_config_word(dev, PCI_COMMAND, &cmd);
	if (! (cmd & PCI_COMMAND_INVALIDATE)) {
		dev_dbg(&dev->dev, "enabling Mem-Wr-Inval\n");
		cmd |= PCI_COMMAND_INVALIDATE;
		pci_write_config_word(dev, PCI_COMMAND, cmd);
	}
	return 0;
}