Skip to content

Commit f82acf6

Browse files
hyperenjuanguy11
authored andcommitted
ixgbe: use EOPNOTSUPP instead of ENOTSUPP in ixgbe_ptp_feature_enable()
When the requested PTP feature is not supported, ixgbe_ptp_feature_enable() returns -ENOTSUPP, causing userland programs to get "Unknown error 524". Since EOPNOTSUPP should be used when error is propagated to userland, return -EOPNOTSUPP instead of -ENOTSUPP. Fixes: 3a6a4ed ("ixgbe: Hardware Timestamping + PTP Hardware Clock (PHC)") Signed-off-by: Kohei Enju <enjuk@amazon.com> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent 21d08d1 commit f82acf6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ static int ixgbe_ptp_feature_enable(struct ptp_clock_info *ptp,
641641
* disabled
642642
*/
643643
if (rq->type != PTP_CLK_REQ_PPS || !adapter->ptp_setup_sdp)
644-
return -ENOTSUPP;
644+
return -EOPNOTSUPP;
645645

646646
if (on)
647647
adapter->flags2 |= IXGBE_FLAG2_PTP_PPS_ENABLED;

0 commit comments

Comments
 (0)