aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qlogic/qed/qed_ptp.c
diff options
context:
space:
mode:
authorSudarsana Reddy Kalluru <skalluru@marvell.com>2019-02-21 06:03:31 -0800
committerDavid S. Miller <davem@davemloft.net>2019-02-21 10:51:08 -0800
commit0ebcebbef1cc50fb94ae17917208b04868de9c38 (patch)
tree70fd0ddd5f07ab2d9ac9413f38f208072f17c9ce /drivers/net/ethernet/qlogic/qed/qed_ptp.c
parentMerge branch 'devlink-next' (diff)
downloadlinux-dev-0ebcebbef1cc50fb94ae17917208b04868de9c38.tar.xz
linux-dev-0ebcebbef1cc50fb94ae17917208b04868de9c38.zip
qed: Read device port count from the shmem
Read port count from the shared memory instead of driver deriving this value. This change simplifies the driver implementation and also avoids any dependencies for finding the port-count. Signed-off-by: Sudarsana Reddy Kalluru <skalluru@marvell.com> Signed-off-by: Michal Kalderon <mkalderon@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_ptp.c')
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_ptp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_ptp.c b/drivers/net/ethernet/qlogic/qed/qed_ptp.c
index 5a90d69dc2f8..1302b308bd87 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_ptp.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_ptp.c
@@ -47,7 +47,7 @@
static enum qed_resc_lock qed_ptcdev_to_resc(struct qed_hwfn *p_hwfn)
{
- switch (qed_device_get_port_id(p_hwfn->cdev)) {
+ switch (MFW_PORT(p_hwfn)) {
case 0:
return QED_RESC_LOCK_PTP_PORT0;
case 1: