]> git.itanic.dy.fi Git - linux-stable/commit
e1000e: Use pcie_capability_read_word() for reading LNKSTA
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 21 Nov 2023 12:34:28 +0000 (14:34 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 12 Dec 2023 20:21:29 +0000 (12:21 -0800)
commitbf88f7d920da2bbabef16404a449a4f72cc0ffcd
tree13bbce7f8136b427db7634acb5776919e07fa8b1
parent4c39e76846b2500910b5378b1e868e6c4d5e6df8
e1000e: Use pcie_capability_read_word() for reading LNKSTA

Use pcie_capability_read_word() for reading LNKSTA and remove the
custom define that matches to PCI_EXP_LNKSTA.

As only single user for cap_offset remains, replace it with a call to
pci_pcie_cap(). Instead of e1000_adapter, make local variable out of
pci_dev because both users are interested in it.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/e1000e/defines.h
drivers/net/ethernet/intel/e1000e/mac.c