diff options
author | Sudarsana Reddy Kalluru <skalluru@marvell.com> | 2019-02-21 17:03:31 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-21 21:51:08 +0300 |
commit | 0ebcebbef1cc50fb94ae17917208b04868de9c38 (patch) | |
tree | 70fd0ddd5f07ab2d9ac9413f38f208072f17c9ce /drivers/net/ethernet/qlogic/qed/qed_ptp.c | |
parent | cceb58b113e1e09818134dfd588627888a91970f (diff) | |
download | linux-0ebcebbef1cc50fb94ae17917208b04868de9c38.tar.xz |
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.c | 2 |
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: |