]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tg3: remove unnecessary read of PCI_CAP_ID_EXP
authorJon Mason <jdmason@kudzu.us>
Mon, 27 Jun 2011 12:56:50 +0000 (12:56 +0000)
committerJoe Jin <joe.jin@oracle.com>
Tue, 15 May 2012 08:20:54 +0000 (16:20 +0800)
commit14778547d31be8356f0a4454a37a3985ce8c0af5
tree2241d0ac2a5671fb183968b8a5a4cc9d2a3ec53a
parent2d203d6e415dee477e825a32600e648423e23b1b
tg3: remove unnecessary read of PCI_CAP_ID_EXP

The PCIE capability offset is saved during PCI bus walking.  Use the
value from pci_dev instead of checking in the driver and saving it off
the the driver specific structure.  It will remove an unnecessary search
in the PCI configuration space if this value is referenced instead of
reacquiring it.

v2 of the patch re-adds the PCI_EXPRESS flag and adds comments
describing why it is necessary.

[ pdev->pcie_cap --> pci_pcie_cap(pdev) -DaveM ]

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 708ebb3a51489e70bc2b67b2772deea336eba849)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/tg3.c
drivers/net/tg3.h