Re: [Intel-wired-lan] [PATCH iwl-next 7/7] ice: Enable 1PPS out from CGU for E825C products

2024-07-02 Thread Simon Horman
On Mon, Jul 01, 2024 at 05:08:09PM +0200, Przemek Kitszel wrote: > On 7/1/24 15:27, Simon Horman wrote: > > On Thu, Jun 27, 2024 at 05:09:31PM +0200, Karol Kolacinski wrote: > > > From: Sergey Temerkhanov > > > > > > Implement 1PPS signal enabling/disabling in CGU. The amplitude is > > > always t

[Intel-wired-lan] [PATCH iwl-next v3 0/4] Replace auxbus with ice_adapter in the PTP support code

2024-07-02 Thread Sergey Temerkhanov
This series replaces multiple aux buses and devices used in the PTP support code with struct ice_adapter holding the necessary shared data Patches 1,2 add convenience wrappers Patch 3 does the main refactoring Patch 4 finalizes the refactoring Previous discussion: https://lists.osuosl.org/piperm

[Intel-wired-lan] [PATCH iwl-next v3 1/4] ice: Introduce ice_get_phy_model() wrapper

2024-07-02 Thread Sergey Temerkhanov
Introduce ice_get_phy_model() to improve code readability Signed-off-by: Sergey Temerkhanov Reviewed-by: Przemek Kitszel Reviewed-by: Simon Horman --- drivers/net/ethernet/intel/ice/ice.h| 5 + drivers/net/ethernet/intel/ice/ice_ptp.c| 18 - drivers/net/etherne

[Intel-wired-lan] [PATCH iwl-next v3 2/4] ice: Add ice_get_ctrl_ptp() wrapper to simplify the code

2024-07-02 Thread Sergey Temerkhanov
Add ice_get_ctrl_ptp() wrapper to simplify the PTP support code in the functions that do not use ctrl_pf directly. Add the control PF pointer to struct ice_adapter Rearrange fields in struct ice_adapter Signed-off-by: Sergey Temerkhanov Reviewed-by: Przemek Kitszel Reviewed-by: Simon Horman ---

[Intel-wired-lan] [PATCH iwl-next v3 3/4] ice: Use ice_adapter for PTP shared data instead of auxdev

2024-07-02 Thread Sergey Temerkhanov
Use struct ice_adapter to hold shared PTP data and control PTP related actions instead of auxbus. This allows significant code simplification and faster access to the container fields used in the PTP support code. Move the PTP port list to the ice_adapter container to simplify the code and avoid r

[Intel-wired-lan] [PATCH iwl-next v3 4/4] ice: Drop auxbus use for PTP to finalize ice_adapter move

2024-07-02 Thread Sergey Temerkhanov
Drop unused auxbus/auxdev support from the PTP code due to move to the ice_adapter. Signed-off-by: Sergey Temerkhanov Reviewed-by: Przemek Kitszel Reviewed-by: Simon Horman --- drivers/net/ethernet/intel/ice/ice_ptp.c | 252 --- drivers/net/ethernet/intel/ice/ice_ptp.h | 2

[Intel-wired-lan] [PATCH v3 iwl-net 0/3] ice: Fix incorrect input/output pin behavior

2024-07-02 Thread Karol Kolacinski
This patch series fixes incorrect external timestamps handling, which may result in kernel crashes or not requested extts/perout behavior. Jacob Keller (2): ice: Don't process extts if PTP is disabled ice: Reject pin requests with unsupported flags Milena Olech (1): ice: Fix improper extts

[Intel-wired-lan] [PATCH v3 iwl-net 1/3] ice: Fix improper extts handling

2024-07-02 Thread Karol Kolacinski
From: Milena Olech Extts events are disabled and enabled by the application ts2phc. However, in case where the driver is removed when the application is running, a specific extts event remains enabled and can cause a kernel crash. As a side effect, when the driver is reloaded and application is s

[Intel-wired-lan] [PATCH v3 iwl-net 2/3] ice: Don't process extts if PTP is disabled

2024-07-02 Thread Karol Kolacinski
From: Jacob Keller The ice_ptp_extts_event() function can race with ice_ptp_release() and result in a NULL pointer dereference which leads to a kernel panic. Panic occurs because the ice_ptp_extts_event() function calls ptp_clock_event() with a NULL pointer. The ice driver has already released t

[Intel-wired-lan] [PATCH v3 iwl-net 3/3] ice: Reject pin requests with unsupported flags

2024-07-02 Thread Karol Kolacinski
From: Jacob Keller The driver receives requests for configuring pins via the .enable callback of the PTP clock object. These requests come into the driver with flags which modify the requested behavior from userspace. Current implementation in ice does not reject flags that it doesn't support. Th

[Intel-wired-lan] [PATCH v2 iwl-next 0/7] ice: Cleanup and refactor PTP pin handling

2024-07-02 Thread Karol Kolacinski
This series cleans up current PTP GPIO pin handling, fixes minor bugs, refactors implementation for all products, introduces SDP (Software Definable Pins) for E825C and implements reading SDP section from NVM for E810 products. Karol Kolacinski (5): ice: Implement ice_ptp_pin_desc ice: Add SDP

[Intel-wired-lan] [PATCH v2 iwl-next 1/7] ice: Implement ice_ptp_pin_desc

2024-07-02 Thread Karol Kolacinski
Add a new internal structure describing PTP pins. Use the new structure for all non-E810T products. Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- V1 -> V2: Removed unused err variable drivers/net/ethernet/intel/ice/ice_ptp.c | 270 +++ drivers/net/et

[Intel-wired-lan] [PATCH v2 iwl-next 2/7] ice: Add SDPs support for E825C

2024-07-02 Thread Karol Kolacinski
Add support of PTP SDPs (Software Definable Pins) for E825C products. Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- V1 -> V2: Removed redundant n_pins assignment and enable and verify move drivers/net/ethernet/intel/ice/ice_ptp.c | 20 ++-- 1 file change

[Intel-wired-lan] [PATCH v2 iwl-next 3/7] ice: Align E810T GPIO to other products

2024-07-02 Thread Karol Kolacinski
Instead of having separate PTP GPIO implementation for E810T, use existing one from all other products. Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- V1 -> V2: restored blank line and moved enable and verify assignment drivers/net/ethernet/intel/ice/ice_gnss.c | 4 +

[Intel-wired-lan] [PATCH v2 iwl-next 4/7] ice: Cache perout/extts requests and check flags

2024-07-02 Thread Karol Kolacinski
Cache original PTP GPIO requests instead of saving each parameter in internal structures for periodic output or external timestamp request. Factor out all periodic output register writes from ice_ptp_cfg_clkout to a separate function to improve readability. Reviewed-by: Arkadiusz Kubalewski Sign

[Intel-wired-lan] [PATCH v2 iwl-next 5/7] ice: Disable shared pin on E810 on setfunc

2024-07-02 Thread Karol Kolacinski
When setting a new supported function for a pin on E810, disable other enabled pin that shares the same GPIO. Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Karol Kolacinski --- V1 -> V2: Fixed incorrect call to ice_ptp_set_sma_cfg_e810t() drivers/net/ethernet/intel/ice/ice_ptp.c | 65 ++

[Intel-wired-lan] [PATCH v2 iwl-next 7/7] ice: Enable 1PPS out from CGU for E825C products

2024-07-02 Thread Karol Kolacinski
From: Sergey Temerkhanov Implement configuring 1PPS signal output from CGU. Use maximal amplitude because Linux PTP pin API does not have any way for user to set signal level. This change is necessary for E825C products to properly output any signal from 1PPS pin. Reviewed-by: Arkadiusz Kubalew

[Intel-wired-lan] [PATCH v2 iwl-next 6/7] ice: Read SDP section from NVM for pin definitions

2024-07-02 Thread Karol Kolacinski
From: Yochai Hagvi PTP pins assignment and their related SDPs (Software Definable Pins) are currently hardcoded. Fix that by reading NVM section instead on products supporting this, which are E810 products. If SDP section is not defined in NVM, the driver continues to use the hardcoded table. Re

[Intel-wired-lan] [PATCH iwl-next] net: intel: Remove MODULE_AUTHORs

2024-07-02 Thread Tony Nguyen
We are moving away from the Sourceforge email address. Rather than removing or updating the email for the affected entries, remove the MODULE_AUTHOR altogether as its usage is incorrect [1]. Link: https://lore.kernel.org/netdev/20200626115236.7f36d...@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com