<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/ethernet/intel/igc/igc_base.c, branch linux-6.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2025-01-07T17:01:15Z</updated>
<entry>
<title>igc: return early when failing to read EECD register</title>
<updated>2025-01-07T17:01:15Z</updated>
<author>
<name>En-Wei Wu</name>
<email>en-wei.wu@canonical.com</email>
</author>
<published>2024-12-18T02:37:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bd2776e39c2a82ef4681d02678bb77b3d41e79be'/>
<id>urn:sha1:bd2776e39c2a82ef4681d02678bb77b3d41e79be</id>
<content type='text'>
When booting with a dock connected, the igc driver may get stuck for ~40
seconds if PCIe link is lost during initialization.

This happens because the driver access device after EECD register reads
return all F's, indicating failed reads. Consequently, hw-&gt;hw_addr is set
to NULL, which impacts subsequent rd32() reads. This leads to the driver
hanging in igc_get_hw_semaphore_i225(), as the invalid hw-&gt;hw_addr
prevents retrieving the expected value.

To address this, a validation check and a corresponding return value
catch is added for the EECD register read result. If all F's are
returned, indicating PCIe link loss, the driver will return -ENXIO
immediately. This avoids the 40-second hang and significantly improves
boot time when using a dock with an igc NIC.

Log before the patch:
[    0.911913] igc 0000:70:00.0: enabling device (0000 -&gt; 0002)
[    0.912386] igc 0000:70:00.0: PTM enabled, 4ns granularity
[    1.571098] igc 0000:70:00.0 (unnamed net_device) (uninitialized): PCIe link lost, device now detached
[   43.449095] igc_get_hw_semaphore_i225: igc 0000:70:00.0 (unnamed net_device) (uninitialized): Driver can't access device - SMBI bit is set.
[   43.449186] igc 0000:70:00.0: probe with driver igc failed with error -13
[   46.345701] igc 0000:70:00.0: enabling device (0000 -&gt; 0002)
[   46.345777] igc 0000:70:00.0: PTM enabled, 4ns granularity

Log after the patch:
[    1.031000] igc 0000:70:00.0: enabling device (0000 -&gt; 0002)
[    1.032097] igc 0000:70:00.0: PTM enabled, 4ns granularity
[    1.642291] igc 0000:70:00.0 (unnamed net_device) (uninitialized): PCIe link lost, device now detached
[    5.480490] igc 0000:70:00.0: enabling device (0000 -&gt; 0002)
[    5.480516] igc 0000:70:00.0: PTM enabled, 4ns granularity

Fixes: ab4056126813 ("igc: Add NVM support")
Cc: Chia-Lin Kao (AceLan) &lt;acelan.kao@canonical.com&gt;
Signed-off-by: En-Wei Wu &lt;en-wei.wu@canonical.com&gt;
Reviewed-by: Vitaly Lifshits &lt;vitaly.lifshits@intel.com&gt;
Tested-by: Mor Bar-Gabay &lt;morx.bar.gabay@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>igc: field get conversion</title>
<updated>2023-12-18T19:20:43Z</updated>
<author>
<name>Jesse Brandeburg</name>
<email>jesse.brandeburg@intel.com</email>
</author>
<published>2023-12-06T01:01:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a8e0c7a6800dc466ac815264c16971b9adf7ffbd'/>
<id>urn:sha1:a8e0c7a6800dc466ac815264c16971b9adf7ffbd</id>
<content type='text'>
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 shift,mask;
type T;
expression a;
@@
-((T)((a) &amp; mask) &gt;&gt; shift)
+FIELD_GET(mask, a)

and applied via:
spatch --sp-file field_prep.cocci --in-place --dir \
 drivers/net/ethernet/intel/

Cc: Julia Lawall &lt;Julia.Lawall@inria.fr&gt;
Reviewed-by: Marcin Szycik &lt;marcin.szycik@linux.intel.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Signed-off-by: Jesse Brandeburg &lt;jesse.brandeburg@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>igc: remove I226 Qbv BaseTime restriction</title>
<updated>2023-01-03T17:35:37Z</updated>
<author>
<name>Muhammad Husaini Zulkifli</name>
<email>muhammad.husaini.zulkifli@intel.com</email>
</author>
<published>2022-12-14T16:29:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b8897dc54e3bc9d25281bbb42a7d730782ff4588'/>
<id>urn:sha1:b8897dc54e3bc9d25281bbb42a7d730782ff4588</id>
<content type='text'>
Remove the Qbv BaseTime restriction for I226 so that the BaseTime can be
scheduled to the future time. A new register bit of Tx Qav Control
(Bit-7: FutScdDis) was introduced to allow I226 scheduling future time as
Qbv BaseTime and not having the Tx hang timeout issue.

Besides, according to datasheet section 7.5.2.9.3.3, FutScdDis bit has to
be configured first before the cycle time and base time.

Indeed the FutScdDis bit is only active on re-configuration, thus we have
to set the BASET_L to zero and then only set it to the desired value.

Please also note that the Qbv configuration flow is moved around based on
the Qbv programming guideline that is documented in the latest datasheet.

Co-developed-by: Tan Tee Min &lt;tee.min.tan@linux.intel.com&gt;
Signed-off-by: Tan Tee Min &lt;tee.min.tan@linux.intel.com&gt;
Signed-off-by: Muhammad Husaini Zulkifli &lt;muhammad.husaini.zulkifli@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;
</content>
</entry>
<entry>
<title>igc: Remove unused phy_type enum</title>
<updated>2022-05-10T21:02:40Z</updated>
<author>
<name>Sasha Neftin</name>
<email>sasha.neftin@intel.com</email>
</author>
<published>2022-04-23T16:53:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7241069f7a0715f85ec868cf807446a6113b84fe'/>
<id>urn:sha1:7241069f7a0715f85ec868cf807446a6113b84fe</id>
<content type='text'>
Complete to commit 8e153faf5827 ("igc: Remove unused phy type")
i225 parts have only one PHY. There is no point to use phy_type enum.
Clean up the code accordingly, and get rid of the unused enum lines.

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: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>igc: Change Device Reset to Port Reset</title>
<updated>2021-10-29T17:36:58Z</updated>
<author>
<name>Sasha Neftin</name>
<email>sasha.neftin@intel.com</email>
</author>
<published>2021-09-09T06:46:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e377a063e2c267287f69c7cd3c4400ba900dce48'/>
<id>urn:sha1:e377a063e2c267287f69c7cd3c4400ba900dce48</id>
<content type='text'>
The _reset_hw_base method switched from port reset (CTRL[26]) to device
reset (CTRL[29]) since the FW was receiving an interrupt on CTRL[29].
FW code was later modified to also receive an interrupt on CTRL[26].
Since certain HW values are not reset to default by CTRL[29], we go back
to CTRL[26] for the HW reset, as it meets all current requirements.

This reverts commit bb4265ec24c1 ("igc: Update the MAC reset flow").

Signed-off-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Nechama Kraus &lt;nechamax.kraus@linux.intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>igc: Add new device ID</title>
<updated>2021-10-29T16:51:26Z</updated>
<author>
<name>Sasha Neftin</name>
<email>sasha.neftin@intel.com</email>
</author>
<published>2021-08-31T07:39:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8f20571db5270d549a087318840fd1312fad4051'/>
<id>urn:sha1:8f20571db5270d549a087318840fd1312fad4051</id>
<content type='text'>
Add new device ID for the next step of the silicon and
reflect the I226_LMVP part.

Signed-off-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Nechama Kraus &lt;nechamax.kraus@linux.intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>igc: Remove media type checking on the PHY initialization</title>
<updated>2021-10-29T16:51:21Z</updated>
<author>
<name>Sasha Neftin</name>
<email>sasha.neftin@intel.com</email>
</author>
<published>2021-07-18T09:42:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8643d0b6b367fb97d8220e62719205d7398730b2'/>
<id>urn:sha1:8643d0b6b367fb97d8220e62719205d7398730b2</id>
<content type='text'>
i225 devices only have copper phy media type. There is no point in
checking phy media type during the phy initialization. This patch cleans
up a pointless check.

Signed-off-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Dvora Fuxbrumer &lt;dvorax.fuxbrumer@linux.intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>igc: Remove _I_PHY_ID checking</title>
<updated>2021-07-20T23:11:36Z</updated>
<author>
<name>Sasha Neftin</name>
<email>sasha.neftin@intel.com</email>
</author>
<published>2021-07-07T05:14:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7c496de538eebd8212dc2a3c9a468386b264d0d4'/>
<id>urn:sha1:7c496de538eebd8212dc2a3c9a468386b264d0d4</id>
<content type='text'>
i225 devices have only one PHY vendor. There is no point checking
_I_PHY_ID during the link establishment and auto-negotiation process.
This patch comes to clean up these pointless checkings.

Signed-off-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Dvora Fuxbrumer &lt;dvorax.fuxbrumer@linux.intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>igc: Add new device ID</title>
<updated>2020-12-10T21:13:24Z</updated>
<author>
<name>Sasha Neftin</name>
<email>sasha.neftin@intel.com</email>
</author>
<published>2020-12-10T19:08:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bfa5e98c9de466bfe25a9b4bf6ef9122aee2d06a'/>
<id>urn:sha1:bfa5e98c9de466bfe25a9b4bf6ef9122aee2d06a</id>
<content type='text'>
Add new device ID for the next step of the silicon and
reflect the I226_K part.

Signed-off-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>igc: Add new device ID's</title>
<updated>2020-09-28T21:42:45Z</updated>
<author>
<name>Sasha Neftin</name>
<email>sasha.neftin@intel.com</email>
</author>
<published>2020-08-03T18:33:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=43546211738ec5e903a3f123e848f6f13bdfb25a'/>
<id>urn:sha1:43546211738ec5e903a3f123e848f6f13bdfb25a</id>
<content type='text'>
Add new device ID's for the next step of the silicon and
reflect i221 and i226 parts

Signed-off-by: Sasha Neftin &lt;sasha.neftin@intel.com&gt;
Tested-by: Aaron Brown &lt;aaron.f.brown@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
</feed>
