Skip to content

Commit 0f84758

Browse files
YijingWangdavem330
authored andcommitted
tg3: clean up unnecessary MSI/MSI-X capability find
PCI core will initialize device MSI/MSI-X capability in pci_msi_init_pci_dev(). So device driver should use pci_dev->msi_cap/msix_cap to determine whether the device support MSI/MSI-X instead of using pci_find_capability(pci_dev, PCI_CAP_ID_MSI/MSIX). Access to PCIe device config space again will consume more time. Signed-off-by: Yijing Wang <[email protected]> Cc: Nithin Nayak Sujir <[email protected]> Cc: Michael Chan <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
1 parent b83082e commit 0f84758

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/broadcom

1 file changed

+1
-1
lines changed

drivers/net/ethernet/broadcom/tg3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15967,7 +15967,7 @@ static int tg3_get_invariants(struct tg3 *tp, const struct pci_device_id *ent)
1596715967
*/
1596815968
if (tg3_flag(tp, 5780_CLASS)) {
1596915969
tg3_flag_set(tp, 40BIT_DMA_BUG);
15970-
tp->msi_cap = pci_find_capability(tp->pdev, PCI_CAP_ID_MSI);
15970+
tp->msi_cap = tp->pdev->msi_cap;
1597115971
} else {
1597215972
struct pci_dev *bridge = NULL;
1597315973

0 commit comments

Comments
 (0)