RE: [PATCH] PCI: add MSI INTX_DISABLE quirks for AR8161/AR8162/AR8171/AR8172

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >+static void quirk_msi_intx_disable_qca_bug(struct pci_dev *dev) {
> >+	static u16 qca_eth_devid[] = {
> >+			PCI_DEVICE_ID_AR8161,
> >+			PCI_DEVICE_ID_AR8162,
> >+			PCI_DEVICE_ID_AR8171,
> >+			PCI_DEVICE_ID_AR8172};
> >+	struct pci_dev *p;
> >+	int i;
> >+
> >+	/* AR816X/AR817X MSI is fixed at HW level from revision 0x18 */
> >+	for (i = 0; i < ARRAY_SIZE(qca_eth_devid); i++) {
> >+		p = pci_get_device(PCI_VENDOR_ID_ATTANSIC,
> >+				   qca_eth_devid[i],
> 
> xiong,
> 
> The "FINAL" fixup is called just in pci_apply_final_quirks(), if I am correct.
> 
> In this function, it will go through all the pci devices which are registered in
> the system. And try to invoke the fixup hook.
> 
> Also, before invode the hook, in function pci_do_fixups() it will make sure
> the hook just apply to the devices whose VendorID and DeviceID match what
> you defined in DECLARE_PCI_FIXUP_FINAL.
> 
> So I think there is no need to iterate on all those pci device, before you want
> to change the pci_dev->dev_flags.
> 
> >+				   NULL);
> >+		if (!p)
> >+			return;
> >+
> >+		if (p->revision < 0x18)
> >+			dev->dev_flags |=
> PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
> >+		pci_dev_put(p);
> >+	}

Wei, thanks for you feedback, this patch is just follow the function 'quirk_msi_intx_disable_ati_bug' in quirks.c
Is it ok if I revise code as:
	static void quirk_msi_intx_disable_qca_bug(struct pci_dev *dev)
	{
		If (dev->revision < 0x18)
			dev->dev_flags |=  PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
	}

Please advise, thanks !

-Xiong
		

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux