Skip to content

Commit cb4b120

Browse files
Raju Lakkarajudavem330
authored andcommitted
eth: lan743x: reject extts for non-pci11x1x devices
Remove PTP_PF_EXTTS support for non-PCI11x1x devices since they do not support the PTP-IO Input event triggered timestamping mechanisms added Fixes: 60942c3 ("net: lan743x: Add support for PTP-IO Event Input External Timestamp (extts)") Signed-off-by: Raju Lakkaraju <[email protected]> Reviewed-by: Horatiu Vultur <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9e6fd87 commit cb4b120

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/net/ethernet/microchip/lan743x_ptp.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
10491049
enum ptp_pin_function func,
10501050
unsigned int chan)
10511051
{
1052+
struct lan743x_ptp *lan_ptp =
1053+
container_of(ptp, struct lan743x_ptp, ptp_clock_info);
1054+
struct lan743x_adapter *adapter =
1055+
container_of(lan_ptp, struct lan743x_adapter, ptp);
10521056
int result = 0;
10531057

10541058
/* Confirm the requested function is supported. Parameter
@@ -1057,7 +1061,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
10571061
switch (func) {
10581062
case PTP_PF_NONE:
10591063
case PTP_PF_PEROUT:
1064+
break;
10601065
case PTP_PF_EXTTS:
1066+
if (!adapter->is_pci11x1x)
1067+
result = -1;
10611068
break;
10621069
case PTP_PF_PHYSYNC:
10631070
default:

0 commit comments

Comments
 (0)