<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/ethernet/intel/igc, branch linux-5.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-05-02T05:41:00Z</updated>
<entry>
<title>igc: cleanup PTP module if probe fails</title>
<updated>2025-05-02T05:41:00Z</updated>
<author>
<name>Christopher S M Hall</name>
</author>
<published>2025-04-01T23:35:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac3b4f1677d599abe220ef02710313a0fab5663e'/>
<id>urn:sha1:ac3b4f1677d599abe220ef02710313a0fab5663e</id>
<content type='text'>
[ Upstream commit 1f025759ba394dd53e434d2668cb0597886d9b69 ]

Make sure that the PTP module is cleaned up if the igc_probe() fails by
calling igc_ptp_stop() on exit.

Fixes: d89f88419f99 ("igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support")
Signed-off-by: Christopher S M Hall &lt;christopher.s.hall@intel.com&gt;
Reviewed-by: Corinna Vinschen &lt;vinschen@redhat.com&gt;
Signed-off-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Tested-by: Mor Bar-Gabay &lt;morx.bar.gabay@intel.com&gt;
Acked-by: Vinicius Costa Gomes &lt;vinicius.gomes@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>igc: handle the IGC_PTP_ENABLED flag correctly</title>
<updated>2025-05-02T05:40:59Z</updated>
<author>
<name>Christopher S M Hall</name>
</author>
<published>2025-04-01T23:35:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95ad4cf7a18ee080314bfa28b2f6715ba2740af2'/>
<id>urn:sha1:95ad4cf7a18ee080314bfa28b2f6715ba2740af2</id>
<content type='text'>
[ Upstream commit 26a3910afd111f7c1a96dace6dc02f3225063896 ]

All functions in igc_ptp.c called from igc_main.c should check the
IGC_PTP_ENABLED flag. Adding check for this flag to stop and reset
functions.

Fixes: 5f2958052c58 ("igc: Add basic skeleton for PTP")
Signed-off-by: Christopher S M Hall &lt;christopher.s.hall@intel.com&gt;
Reviewed-by: Corinna Vinschen &lt;vinschen@redhat.com&gt;
Signed-off-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Tested-by: Mor Bar-Gabay &lt;morx.bar.gabay@intel.com&gt;
Acked-by: Vinicius Costa Gomes &lt;vinicius.gomes@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>igc: Unlock on error in igc_io_resume()</title>
<updated>2024-09-12T09:06:47Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2024-08-29T19:22:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=acd29851376012594198080ac077fe0101ebfe4d'/>
<id>urn:sha1:acd29851376012594198080ac077fe0101ebfe4d</id>
<content type='text'>
[ Upstream commit ef4a99a0164e3972abb421cbb1b09ea6c61414df ]

Call rtnl_unlock() on this error path, before returning.

Fixes: bc23aa949aeb ("igc: Add pcie error handler support")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Reviewed-by: Gerhard Engleder &lt;gerhard@engleder-embedded.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>igc: Fix ambiguity in the ethtool advertising</title>
<updated>2023-11-08T16:30:42Z</updated>
<author>
<name>Sasha Neftin</name>
</author>
<published>2023-10-19T20:36:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=634c72adc864124245305b602ac4a4ff0302b044'/>
<id>urn:sha1:634c72adc864124245305b602ac4a4ff0302b044</id>
<content type='text'>
[ Upstream commit e7684d29efdf37304c62bb337ea55b3428ca118e ]

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: 8c5ad0dae93c ("igc: Add ethtool support")
Suggested-by: Dima Ruinskiy &lt;dima.ruinskiy@intel.com&gt;
Suggested-by: Vitaly Lifshits &lt;vitaly.lifshits@intel.com&gt;
Signed-off-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Naama Meir &lt;naamax.meir@linux.intel.com&gt;
Signed-off-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Link: https://lore.kernel.org/r/20231019203641.3661960-1-jacob.e.keller@intel.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>igc: Change IGC_MIN to allow set rx/tx value between 64 and 80</title>
<updated>2023-09-19T10:20:27Z</updated>
<author>
<name>Olga Zaborska</name>
</author>
<published>2023-07-25T08:10:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9444881a375d505ec9caaab6c3f900d099acad9f'/>
<id>urn:sha1:9444881a375d505ec9caaab6c3f900d099acad9f</id>
<content type='text'>
[ Upstream commit 5aa48279712e1f134aac908acde4df798955a955 ]

Change the minimum value of RX/TX descriptors to 64 to enable setting the rx/tx
value between 64 and 80. All igc devices can use as low as 64 descriptors.
This change will unify igc with other drivers.
Based on commit 7b1be1987c1e ("e1000e: lower ring minimum size to 64")

Fixes: 0507ef8a0372 ("igc: Add transmit and receive fastpath and interrupt handlers")
Signed-off-by: Olga Zaborska &lt;olga.zaborska@intel.com&gt;
Tested-by: Naama Meir &lt;naamax.meir@linux.intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>igc: Fix inserting of empty frame for launchtime</title>
<updated>2023-07-27T06:44:23Z</updated>
<author>
<name>Florian Kauer</name>
</author>
<published>2023-06-14T14:07:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=83579a626169b35553945ff48aa5936b5db06ed2'/>
<id>urn:sha1:83579a626169b35553945ff48aa5936b5db06ed2</id>
<content type='text'>
[ Upstream commit 0bcc62858d6ba62cbade957d69745e6adeed5f3d ]

The insertion of an empty frame was introduced with
commit db0b124f02ba ("igc: Enhance Qbv scheduling by using first flag bit")
in order to ensure that the current cycle has at least one packet if
there is some packet to be scheduled for the next cycle.

However, the current implementation does not properly check if
a packet is already scheduled for the current cycle. Currently,
an empty packet is always inserted if and only if
txtime &gt;= end_of_cycle &amp;&amp; txtime &gt; last_tx_cycle
but since last_tx_cycle is always either the end of the current
cycle (end_of_cycle) or the end of a previous cycle, the
second part (txtime &gt; last_tx_cycle) is always true unless
txtime == last_tx_cycle.

What actually needs to be checked here is if the last_tx_cycle
was already written within the current cycle, so an empty frame
should only be inserted if and only if
txtime &gt;= end_of_cycle &amp;&amp; end_of_cycle &gt; last_tx_cycle.

This patch does not only avoid an unnecessary insertion, but it
can actually be harmful to insert an empty packet if packets
are already scheduled in the current cycle, because it can lead
to a situation where the empty packet is actually processed
as the first packet in the upcoming cycle shifting the packet
with the first_flag even one cycle into the future, finally leading
to a TX hang.

The TX hang can be reproduced on a i225 with:

    sudo tc qdisc replace dev enp1s0 parent root handle 100 taprio \
	    num_tc 1 \
	    map 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \
	    queues 1@0 \
	    base-time 0 \
	    sched-entry S 01 300000 \
	    flags 0x1 \
	    txtime-delay 500000 \
	    clockid CLOCK_TAI
    sudo tc qdisc replace dev enp1s0 parent 100:1 etf \
	    clockid CLOCK_TAI \
	    delta 500000 \
	    offload \
	    skip_sock_check

and traffic generator

    sudo trafgen -i traffic.cfg -o enp1s0 --cpp -n0 -q -t1400ns

with traffic.cfg

    #define ETH_P_IP        0x0800

    {
      /* Ethernet Header */
      0x30, 0x1f, 0x9a, 0xd0, 0xf0, 0x0e,  # MAC Dest - adapt as needed
      0x24, 0x5e, 0xbe, 0x57, 0x2e, 0x36,  # MAC Src  - adapt as needed
      const16(ETH_P_IP),

      /* IPv4 Header */
      0b01000101, 0,   # IPv4 version, IHL, TOS
      const16(1028),   # IPv4 total length (UDP length + 20 bytes (IP header))
      const16(2),      # IPv4 ident
      0b01000000, 0,   # IPv4 flags, fragmentation off
      64,              # IPv4 TTL
      17,              # Protocol UDP
      csumip(14, 33),  # IPv4 checksum

      /* UDP Header */
      10,  0, 48, 1,   # IP Src - adapt as needed
      10,  0, 48, 10,  # IP Dest - adapt as needed
      const16(5555),   # UDP Src Port
      const16(6666),   # UDP Dest Port
      const16(1008),   # UDP length (UDP header 8 bytes + payload length)
      csumudp(14, 34), # UDP checksum

      /* Payload */
      fill('W', 1000),
    }

and the observed message with that is for example

 igc 0000:01:00.0 enp1s0: Detected Tx Unit Hang
   Tx Queue             &lt;0&gt;
   TDH                  &lt;32&gt;
   TDT                  &lt;3c&gt;
   next_to_use          &lt;3c&gt;
   next_to_clean        &lt;32&gt;
 buffer_info[next_to_clean]
   time_stamp           &lt;ffff26a8&gt;
   next_to_watch        &lt;00000000632a1828&gt;
   jiffies              &lt;ffff27f8&gt;
   desc.status          &lt;1048000&gt;

Fixes: db0b124f02ba ("igc: Enhance Qbv scheduling by using first flag bit")
Signed-off-by: Florian Kauer &lt;florian.kauer@linutronix.de&gt;
Reviewed-by: Kurt Kanzenbach &lt;kurt@linutronix.de&gt;
Tested-by: Naama Meir &lt;naamax.meir@linux.intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>igc: Fix launchtime before start of cycle</title>
<updated>2023-07-27T06:44:23Z</updated>
<author>
<name>Florian Kauer</name>
</author>
<published>2023-06-14T14:07:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c48e8ee81ad35ceace0e971b37948887d4411da8'/>
<id>urn:sha1:c48e8ee81ad35ceace0e971b37948887d4411da8</id>
<content type='text'>
[ Upstream commit c1bca9ac0bcb355be11354c2e68bc7bf31f5ac5a ]

It is possible (verified on a running system) that frames are processed
by igc_tx_launchtime with a txtime before the start of the cycle
(baset_est).

However, the result of txtime - baset_est is written into a u32,
leading to a wrap around to a positive number. The following
launchtime &gt; 0 check will only branch to executing launchtime = 0
if launchtime is already 0.

Fix it by using a s32 before checking launchtime &gt; 0.

Fixes: db0b124f02ba ("igc: Enhance Qbv scheduling by using first flag bit")
Signed-off-by: Florian Kauer &lt;florian.kauer@linutronix.de&gt;
Reviewed-by: Kurt Kanzenbach &lt;kurt@linutronix.de&gt;
Tested-by: Naama Meir &lt;naamax.meir@linux.intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>igc: set TP bit in 'supported' and 'advertising' fields of ethtool_link_ksettings</title>
<updated>2023-07-27T06:44:20Z</updated>
<author>
<name>Prasad Koya</name>
</author>
<published>2023-06-05T18:09:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b687b7836157d3a8afbe778957f7199003d7460f'/>
<id>urn:sha1:b687b7836157d3a8afbe778957f7199003d7460f</id>
<content type='text'>
[ Upstream commit 9ac3fc2f42e5ffa1e927dcbffb71b15fa81459e2 ]

set TP bit in the 'supported' and 'advertising' fields. i225/226 parts
only support twisted pair copper.

Fixes: 8c5ad0dae93c ("igc: Add ethtool support")
Signed-off-by: Prasad Koya &lt;prasad@arista.com&gt;
Acked-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Naama Meir &lt;naamax.meir@linux.intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>igc: Remove delay during TX ring configuration</title>
<updated>2023-07-27T06:44:19Z</updated>
<author>
<name>Muhammad Husaini Zulkifli</name>
</author>
<published>2023-05-17T00:18:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d4bba694aed2b10be5f925a46a3ffe40d904bdc'/>
<id>urn:sha1:3d4bba694aed2b10be5f925a46a3ffe40d904bdc</id>
<content type='text'>
[ Upstream commit cca28ceac7c7857bc2d313777017585aef00bcc4 ]

Remove unnecessary delay during the TX ring configuration.
This will cause delay, especially during link down and
link up activity.

Furthermore, old SKUs like as I225 will call the reset_adapter
to reset the controller during TSN mode Gate Control List (GCL)
setting. This will add more time to the configuration of the
real-time use case.

It doesn't mentioned about this delay in the Software User Manual.
It might have been ported from legacy code I210 in the past.

Fixes: 13b5b7fd6a4a ("igc: Add support for Tx/Rx rings")
Signed-off-by: Muhammad Husaini Zulkifli &lt;muhammad.husaini.zulkifli@intel.com&gt;
Acked-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Naama Meir &lt;naamax.meir@linux.intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>igc: Fix race condition in PTP tx code</title>
<updated>2023-07-27T06:43:41Z</updated>
<author>
<name>Vinicius Costa Gomes</name>
</author>
<published>2023-06-07T21:32:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1ba91ffa1a0ed4cd134c5bf43508f797a7ea9dd0'/>
<id>urn:sha1:1ba91ffa1a0ed4cd134c5bf43508f797a7ea9dd0</id>
<content type='text'>
[ Upstream commit 9c50e2b150c8ee0eee5f8154e2ad168cdd748877 ]

Currently, the igc driver supports timestamping only one tx packet at a
time. During the transmission flow, the skb that requires hardware
timestamping is saved in adapter-&gt;ptp_tx_skb. Once hardware has the
timestamp, an interrupt is delivered, and adapter-&gt;ptp_tx_work is
scheduled. In igc_ptp_tx_work(), we read the timestamp register, update
adapter-&gt;ptp_tx_skb, and notify the network stack.

While the thread executing the transmission flow (the user process
running in kernel mode) and the thread executing ptp_tx_work don't
access adapter-&gt;ptp_tx_skb concurrently, there are two other places
where adapter-&gt;ptp_tx_skb is accessed: igc_ptp_tx_hang() and
igc_ptp_suspend().

igc_ptp_tx_hang() is executed by the adapter-&gt;watchdog_task worker
thread which runs periodically so it is possible we have two threads
accessing ptp_tx_skb at the same time. Consider the following scenario:
right after __IGC_PTP_TX_IN_PROGRESS is set in igc_xmit_frame_ring(),
igc_ptp_tx_hang() is executed. Since adapter-&gt;ptp_tx_start hasn't been
written yet, this is considered a timeout and adapter-&gt;ptp_tx_skb is
cleaned up.

This patch fixes the issue described above by adding the ptp_tx_lock to
protect access to ptp_tx_skb and ptp_tx_start fields from igc_adapter.
Since igc_xmit_frame_ring() called in atomic context by the networking
stack, ptp_tx_lock is defined as a spinlock, and the irq safe variants
of lock/unlock are used.

With the introduction of the ptp_tx_lock, the __IGC_PTP_TX_IN_PROGRESS
flag doesn't provide much of a use anymore so this patch gets rid of it.

Fixes: 2c344ae24501 ("igc: Add support for TX timestamping")
Signed-off-by: Andre Guedes &lt;andre.guedes@intel.com&gt;
Signed-off-by: Vinicius Costa Gomes &lt;vinicius.gomes@intel.com&gt;
Reviewed-by: Kurt Kanzenbach &lt;kurt@linutronix.de&gt;
Tested-by: Naama Meir &lt;naamax.meir@linux.intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
