Re: [Intel-wired-lan] [iwl-net v1 1/1] Revert "igc: fix a log entry using uninitialized netdev"

2024-06-05 Thread naamax.meir
On 5/29/2024 08:13, Sasha Neftin wrote: This reverts commit 86167183a17e03ec77198897975e9fdfbd53cb0b. igc_ptp_init() needs to be called before igc_reset(), otherwise kernel crash could be observed. Following the corresponding discussion [1] and [2] revert this commit. Link: https://lore.kernel.

Re: [Intel-wired-lan] [PATCH iwl-next v1 1/1] igc: add support for ethtool.set_phys_id

2024-06-02 Thread naamax.meir
On 5/22/2024 12:19, Vitaly Lifshits wrote: Add support for ethtool.set_phys_id callback to initiate LED blinking and stopping them by the ethtool interface. This is done by storing the initial LEDCTL register value and restoring it when LED blinking is terminated. In addition, moved IGC_LEDCTL r

Re: [Intel-wired-lan] [iwl-net v1 1/1] igc: Fix Energy Efficient Ethernet support declaration

2024-05-30 Thread naamax.meir
On 5/22/2024 10:23, Sasha Neftin wrote: The commit 01cf893bf0f4 ("net: intel: i40e/igc: Remove setting Autoneg in EEE capabilities") removed SUPPORTED_Autoneg field but left inappropriate ethtool_keee structure initialization. When "ethtool --show " (get_eee) invoke, the 'ethtool_keee' structure

Re: [Intel-wired-lan] [PATCH 1/1] net: e1000e & ixgbe: Remove PCI_HEADER_TYPE_MFD duplicates

2024-05-09 Thread naamax.meir
On 4/23/2024 17:40, Ilpo Järvinen wrote: PCI_HEADER_TYPE_MULTIFUNC is define by e1000e and ixgbe and both are unused. There is already PCI_HEADER_TYPE_MFD in pci_regs.h anyway which should be used instead so remove the duplicated defines of it. Signed-off-by: Ilpo Järvinen --- drivers/net/eth

Re: [Intel-wired-lan] [PATCH] igc: fix a log entry using uninitialized netdev

2024-05-07 Thread naamax.meir
On 4/23/2024 13:24, Corinna Vinschen wrote: During successful probe, igc logs this: [5.133667] igc :01:00.0 (unnamed net_device) (uninitialized): PHC added The reason is that igc_ptp_init() is called very early, even b

Re: [Intel-wired-lan] [PATCH] e1000e: move force SMBUS near the end of enable_ulp function

2024-05-02 Thread naamax.meir
On 4/13/2024 12:27, Hui Wang wrote: The commit 861e8086029e ("e1000e: move force SMBUS from enable ulp function to avoid PHY loss issue") introduces a regression on CH_MTP_I219_LM18 (PCIID: 0x8086550A). Without this commit, the ethernet works well after suspend and resume, but after applying the

Re: [Intel-wired-lan] [PATCH net] igc: Fix LED-related deadlock on driver unbind

2024-04-18 Thread naamax.meir
On 4/15/2024 16:48, Lukas Wunner wrote: Roman reports a deadlock on unplug of a Thunderbolt docking station containing an Intel I225 Ethernet adapter. The root cause is that led_classdev's for LEDs on the adapter are registered such that they're device-managed by the netdev. That results in rec

Re: [Intel-wired-lan] [PATCH 3/3] igc: Remove redundant runtime resume for ethtool ops

2024-04-08 Thread naamax.meir
On 3/26/2024 00:29, Bjorn Helgaas wrote: From: Bjorn Helgaas 8c5ad0dae93c ("igc: Add ethtool support") added ethtool_ops.begin() and .complete(), which used pm_runtime_get_sync() to resume suspended devices before any ethtool_ops callback and allow suspend after it completed. Subsequently, f32

Re: [Intel-wired-lan] [PATCH iwl-next, v4 1/1] igc: Add Tx hardware timestamp request for AF_XDP zero-copy packet

2024-04-08 Thread naamax.meir
On 3/25/2024 04:09, Song Yoong Siang wrote: This patch adds support to per-packet Tx hardware timestamp request to AF_XDP zero-copy packet via XDP Tx metadata framework. Please note that user needs to enable Tx HW timestamp capability via igc_ioctl() with SIOCSHWTSTAMP cmd before sending xsk Tx h

Re: [Intel-wired-lan] [PATCH 1/3] e1000e: Remove redundant runtime resume for ethtool_ops

2024-04-02 Thread naamax.meir
On 3/26/2024 00:29, Bjorn Helgaas wrote: From: Bjorn Helgaas e60b22c5b7e5 ("e1000e: fix accessing to suspended device") added ethtool_ops.begin() and .complete(), which used pm_runtime_get_sync() to resume suspended devices before any ethtool_ops callback and allow suspend after it completed.

Re: [Intel-wired-lan] [PATCH RESEND iwl-net v2 1/1] e1000e: move force SMBUS from enable ulp function to avoid PHY loss issue

2024-03-26 Thread naamax.meir
On 3/3/2024 12:51, Vitaly Lifshits wrote: Forcing SMBUS inside the ULP enabling flow leads to sporadic PHY loss on some systems. It is suspected to be caused by initiating PHY transactions before the interface settles. Separating this configuration from the ULP enabling flow and moving it to the

Re: [Intel-wired-lan] [PATCH iwl-net] igc: Remove stale comment about Tx timestamping

2024-03-20 Thread naamax.meir
On 3/13/2024 15:03, Kurt Kanzenbach wrote: The initial igc Tx timestamping implementation used only one register for retrieving Tx timestamps. Commit 3ed247e78911 ("igc: Add support for multiple in-flight TX timestamps") added support for utilizing all four of them e.g., for multiple domain suppo

Re: [Intel-wired-lan] [iwl-net v2 1/2] igc: Fix missing time sync events

2024-03-06 Thread naamax.meir
On 2/21/2024 01:57, Vinicius Costa Gomes wrote: Fix "double" clearing of interrupts, which can cause external events or timestamps to be missed. The IGC_TSIRC Time Sync Interrupt Cause register can be cleared in two ways, by either reading it or by writing '1' into the specific cause bit. This i

Re: [Intel-wired-lan] [PATCH net 1/1] igc: avoid returning frame twice in XDP_REDIRECT

2024-03-04 Thread naamax.meir
On 2/19/2024 11:08, Florian Kauer wrote: When a frame can not be transmitted in XDP_REDIRECT (e.g. due to a full queue), it is necessary to free it by calling xdp_return_frame_rx_napi. However, this is the reponsibility of the caller of the ndo_xdp_xmit (see for example bq_xmit_all in kernel/bpf

Re: [Intel-wired-lan] [PATCH iwl-net v1 1/1] intel: legacy: Partially revert of field get conversion

2024-02-28 Thread naamax.meir
On 2/18/2024 09:42, Sasha Neftin wrote: Refactoring of the field gets conversion introduced a regression in the legacy Wake On Lan from a magic packet with i219 devices. Rx address copied not correctly from MAC to PHY with FIELD_GET macro. Fixes: b9a452545075 ("intel: legacy: field get conversio

Re: [Intel-wired-lan] [PATCH iwl-next v1 1/1] igc: Refactor runtime power management flow

2024-02-20 Thread naamax.meir
On 2/11/2024 09:30, Sasha Neftin wrote: Following the corresponding discussion [1] and [2] refactor the 'igc_open' method and avoid taking the rtnl_lock() during the 'igc_resume' method. The rtnl_lock is held by the upper layer and could lead to the deadlock during resuming from a runtime power m

Re: [Intel-wired-lan] [PATH iwl-next v2 1/1] e1000e: Minor flow correction in e1000_shutdown function

2024-02-14 Thread naamax.meir
On 1/4/2024 21:34, Vitaly Lifshits wrote: Add curly braces to avoid entering to an if statement where it is not always required in e1000_shutdown function. This improves code readability and might prevent a non-deterministic behaviour in the future. Signed-off-by: Vitaly Lifshits --- v2: fix co

Re: [Intel-wired-lan] [PATCH iwl-net v4 1/1] e1000e: Workaround for sporadic MDI error on Meteor Lake systems

2024-02-14 Thread naamax.meir
On 1/4/2024 16:16, Vitaly Lifshits wrote: On some Meteor Lake systems accessing the PHY via the MDIO interface may result in an MDI error. This issue happens sporadically and in most cases a second access to the PHY via the MDIO interface results in success. As a workaround, introduce a retry co

Re: [Intel-wired-lan] [PATCH iwl-next v3] igc: Add support for LEDs on i225/i226

2024-02-12 Thread naamax.meir
On 2/6/2024 16:27, Kurt Kanzenbach wrote: Add support for LEDs on i225/i226. The LEDs can be controlled via sysfs from user space using the netdev trigger. The LEDs are named as igc-- to be easily identified. Offloading link speed and activity are supported. Other modes are simulated in software

Re: [Intel-wired-lan] [PATCH iwl-net v1 1/1] igc: Remove temporary workaround

2024-02-05 Thread naamax.meir
On 1/24/2024 07:57, Sasha Neftin wrote: PHY_CONTROL register works as defined in the IEEE 802.3 specification. (IEEE 802.3-2008 22.2.4.1). Tide up the temporary workaround. Fixes: 5586838fe9ce ("igc: Add code for PHY support") Signed-off-by: Sasha Neftin --- drivers/net/ethernet/intel/igc/igc

Re: [Intel-wired-lan] [PATCH v2 iwl-next 3/3] igc: Unify filtering rule fields

2024-02-04 Thread naamax.meir
On 1/24/2024 10:55, Kurt Kanzenbach wrote: All filtering parameters such as EtherType and VLAN TCI are stored in host byte order except for the VLAN EtherType. Unify it. Signed-off-by: Kurt Kanzenbach Acked-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc.h | 2 +- d

Re: [Intel-wired-lan] [PATCH v2 iwl-next 2/3] igc: Use netdev printing functions for flex filters

2024-02-04 Thread naamax.meir
On 1/24/2024 10:55, Kurt Kanzenbach wrote: All igc filter implementations use netdev_*() printing functions except for the flex filters. Unify it. Signed-off-by: Kurt Kanzenbach Acked-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_main.c | 9 - 1 file changed, 4 ins

Re: [Intel-wired-lan] [PATCH v2 iwl-next 1/3] igc: Use reverse xmas tree

2024-02-04 Thread naamax.meir
On 1/24/2024 10:55, Kurt Kanzenbach wrote: Use reverse xmas tree coding style convention in igc_add_flex_filter(). Signed-off-by: Kurt Kanzenbach Acked-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Tested-by: N

Re: [Intel-wired-lan] [PATCH iwl-net] e1000e: correct maximum frequency adjustment values

2024-01-21 Thread naamax.meir
On 12/12/2023 04:05, Jacob Keller wrote: The e1000e driver supports hardware with a variety of different clock speeds, and thus a variety of different increment values used for programming its PTP hardware clock. The values currently programmed in e1000e_ptp_init are incorrect. In particular, on

Re: [Intel-wired-lan] [PATCH iwl-net] igc: Fix hicredit calculation

2023-12-28 Thread naamax.meir
On 12/8/2023 16:58, Rodrigo Cataldo via B4 Relay wrote: From: Rodrigo Cataldo According to the Intel Software Manual for I225, Section 7.5.2.7, hicredit should be multiplied by the constant link-rate value, 0x7736. Currently, the old constant link-rate value, 0x7735, from the boards supported

Re: [Intel-wired-lan] [PATCH iwl-net] igc: Check VLAN EtherType mask

2023-12-26 Thread naamax.meir
On 12/6/2023 16:07, Kurt Kanzenbach wrote: Currently the driver accepts VLAN EtherType steering rules regardless of the configured mask. And things might fail silently or with confusing error messages to the user. The VLAN EtherType can only be matched by full mask. Therefore, add a check for tha

Re: [Intel-wired-lan] [PATCH iwl-net v2 2/2] igc: Check VLAN TCI mask

2023-12-26 Thread naamax.meir
On 12/1/2023 09:50, Kurt Kanzenbach wrote: Currently the driver accepts VLAN TCI steering rules regardless of the configured mask. And things might fail silently or with confusing error messages to the user. There are two ways to handle the VLAN TCI mask: 1. Match on the PCP field using a VLA

Re: [Intel-wired-lan] [PATCH iwl-net v2 1/2] igc: Report VLAN EtherType matching back to user

2023-12-25 Thread naamax.meir
On 12/1/2023 09:50, Kurt Kanzenbach wrote: Currently the driver allows to configure matching by VLAN EtherType. However, the retrieval function does not report it back to the user. Add it. Before: |root@host:~# ethtool -N enp3s0 flow-type ether vlan-etype 0x8100 action 0 |Added rule with ID 63 |

Re: [Intel-wired-lan] [PATCH iwl-next v2 01/15] e1000e: make lost bits explicit

2023-12-18 Thread naamax.meir
On 12/6/2023 03:01, Jesse Brandeburg wrote: For more than 15 years this code has passed in a request for a page and masked off that page when read/writing. This code has been here forever, but FIELD_PREP finds the bug when converted to use it. Change the code to do exactly the same thing but allo

Re: [Intel-wired-lan] [PATCH v4 2/3] e1000e: Use PCI_EXP_LNKSTA_NLW & FIELD_GET() instead of custom defines/code

2023-12-10 Thread naamax.meir
On 11/21/2023 14:34, Ilpo Järvinen wrote: e1000e has own copy of PCI Negotiated Link Width field defines. Use the ones from include/uapi/linux/pci_regs.h instead of the custom ones and remove the custom ones and convert to FIELD_GET(). Suggested-by: Jonathan Cameron Signed-off-by: Ilpo Järvinen

Re: [Intel-wired-lan] [PATCH v4 3/3] e1000e: Use pcie_capability_read_word() for reading LNKSTA

2023-12-07 Thread naamax.meir
On 11/21/2023 14:34, Ilpo Järvinen wrote: Use pcie_capability_read_word() for reading LNKSTA and remove the custom define that matches to PCI_EXP_LNKSTA. As only single user for cap_offset remains, replace it with a call to pci_pcie_cap(). Instead of e1000_adapter, make local variable out of pci

Re: [Intel-wired-lan] [PATCH iwl-next v1 10/13] igc: field get conversion

2023-12-06 Thread naamax.meir
On 11/21/2023 23:19, Jesse Brandeburg wrote: Refactor the igc driver to use FIELD_GET() for mask and shift reads, which reduces lines of code and adds clarity of intent. This code was generated by the following coccinelle/spatch script and then manually repaired in a later patch. @get@ constant

Re: [Intel-wired-lan] [PATCH iwl-next v1 08/13] igc: field prep conversion

2023-12-05 Thread naamax.meir
On 11/21/2023 23:19, Jesse Brandeburg wrote: Refactor igc driver to use FIELD_PREP(), which reduces lines of code and adds clarity of intent. This code was generated by the following coccinelle/spatch script and then manually repaired in a later patch. @prep@ constant shift,mask; expression a;

Re: [Intel-wired-lan] [PATCH iwl-next 2/2] igc: Add support for PTP .getcyclesx64()

2023-10-22 Thread naamax.meir
On 9/22/2023 04:40, Vinicius Costa Gomes wrote: Add support for using Timer 1 (i225/i226 have 4 timer registers) as a free-running clock (the "cycles" clock) in addition to Timer 0 (the default, "adjustable clock"). The objective is to allow taprio/etf offloading to coexist with PTP vclocks. Bes

Re: [Intel-wired-lan] [PATCH iwl-next 1/2] igc: Simplify setting flags in the TX data descriptor

2023-10-18 Thread naamax.meir
On 9/22/2023 04:40, Vinicius Costa Gomes wrote: We can re-use the IGC_SET_FLAG() macro to simplify setting some values in the TX data descriptor. With the macro it's easier to get the meaning of the operations. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_main.c

Re: [Intel-wired-lan] [PATCH iwl-net v1 1/1] igc: Fix ambiguity in the ethtool advertising

2023-10-17 Thread naamax.meir
On 10/3/2023 08:48, Sasha Neftin wrote: The 'ethtool_convert_link_mode_to_legacy_u32' method does not allow us to advertise 2500M speed support and TP (twisted pair) properly. Convert to 'ethtool_link_ksettings_test_link_mode' to advertise supported speed and eliminate ambiguity. Fixes: 8c5ad0da

Re: [Intel-wired-lan] [PATCH iwl-net v5] igc: Expose tx-usecs coalesce setting to user

2023-09-20 Thread naamax.meir
On 9/8/2023 11:17, Muhammad Husaini Zulkifli wrote: When users attempt to obtain the coalesce setting using the ethtool command, current code always returns 0 for tx-usecs. This is because I225/6 always uses a queue pair setting, hence tx_coalesce_usecs does not return a value during the igc_etht