From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7744D2494F0; Wed, 8 Apr 2026 18:21:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775672465; cv=none; b=iCVDX54NdTO3GQOj8/TJB1Qj4uE080srnkSfP+cQQMfTuzJ1uPr+jesL5Q9DGUB2Nxed7gsuUWpspQ/D4wXbiFqft/Fh+TPIK7qaVWWJ2ddL0kbNrCLuekgQjbnHHNWL+3SSrsuPBKUw5NyQGAlzqcOcAKZm/mmOrxX71t1/CxI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775672465; c=relaxed/simple; bh=yGfcY09Af0kq0GjFrMA/19jdnmi7fLhxQSoPAiYqgRo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NcDFxCN9tUCT7Po3oO6mAq6/a3sT35SPHrE1AssWxK0zk1UKKM9J8gsT97A3vVY3jWz5FuE7essxaRAjc0RoZCKKZiTUKwcw1a3HFn3Q16rFLJhovuRngjVljfhTuq1v3I3VX5pm0hzZEiWklHF24f54Bl+V2HqdEKvUOVLvTGI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WL3vf6L5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="WL3vf6L5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E107C19421; Wed, 8 Apr 2026 18:21:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1775672465; bh=yGfcY09Af0kq0GjFrMA/19jdnmi7fLhxQSoPAiYqgRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WL3vf6L5Nba0Is+wm7slmqvyb4ocrC521OJUp0dMBTYMwljxYCM6+snTP9eKJjgbp Q3zy/ZXtoI96IJ7sC5YeLiR9hgyGI16Qs8GE8kAZAPzEzORQe7FccP9P+1Khi4F1th Yn5ChhxCRqG+qxmml2XIzbTBsJe4OObryP7MoBUk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Buday Csaba , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.6 018/160] net: fec: fix the PTP periodic output sysfs interface Date: Wed, 8 Apr 2026 20:01:45 +0200 Message-ID: <20260408175913.877844449@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260408175913.177092714@linuxfoundation.org> References: <20260408175913.177092714@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Buday Csaba [ Upstream commit e8e44c98f789dee45cfd24ffb9d4936e0606d7c6 ] When the PPS channel configuration was implemented, the channel index for the periodic outputs was configured as the hardware channel number. The sysfs interface uses a logical channel index, and rejects numbers greater than `n_per_out` (see period_store() in ptp_sysfs.c). That property was left at 1, since the driver implements channel selection, not simultaneous operation of multiple PTP hardware timer channels. A second check in fec_ptp_enable() returns -EOPNOTSUPP when the two channel numbers disagree, making channels 1..3 unusable from sysfs. Fix by removing this redundant check in the FEC PTP driver. Fixes: 566c2d83887f ("net: fec: make PPS channel configurable") Signed-off-by: Buday Csaba Link: https://patch.msgid.link/8ec2afe88423c2231f9cf8044d212ce57846670e.1774359059.git.buday.csaba@prolan.hu Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/fec_ptp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c index 4bb894b5afcb9..778713c2fed40 100644 --- a/drivers/net/ethernet/freescale/fec_ptp.c +++ b/drivers/net/ethernet/freescale/fec_ptp.c @@ -546,9 +546,6 @@ static int fec_ptp_enable(struct ptp_clock_info *ptp, if (rq->perout.flags) return -EOPNOTSUPP; - if (rq->perout.index != fep->pps_channel) - return -EOPNOTSUPP; - period.tv_sec = rq->perout.period.sec; period.tv_nsec = rq->perout.period.nsec; period_ns = timespec64_to_ns(&period); -- 2.53.0