<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/ethernet/broadcom/tg3.h, 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-06-27T09:25:57Z</updated>
<entry>
<title>tg3: spelling corrections</title>
<updated>2025-06-27T09:25:57Z</updated>
<author>
<name>Simon Horman</name>
<email>horms@kernel.org</email>
</author>
<published>2025-06-25T12:52:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8efa26fcbf8a7f783fd1ce7dd2a409e9b7758df0'/>
<id>urn:sha1:8efa26fcbf8a7f783fd1ce7dd2a409e9b7758df0</id>
<content type='text'>
Correct spelling as flagged by codespell.

Signed-off-by: Simon Horman &lt;horms@kernel.org&gt;
Reviewed-by: Michael Chan &lt;michael.chan@broadcom.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tg3: Increase buffer size for IRQ label</title>
<updated>2024-10-18T02:24:24Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2024-10-16T09:05:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=abb7c98b99f62d30bb070a8dfe08b1033b133c0c'/>
<id>urn:sha1:abb7c98b99f62d30bb070a8dfe08b1033b133c0c</id>
<content type='text'>
GCC is not happy with the current code, e.g.:

.../tg3.c:11313:37: error: ‘-txrx-’ directive output may be truncated writing 6 bytes into a region of size between 1 and 16 [-Werror=format-truncation=]
11313 |                                  "%s-txrx-%d", tp-&gt;dev-&gt;name, irq_num);
      |                                     ^~~~~~
.../tg3.c:11313:34: note: using the range [-2147483648, 2147483647] for directive argument
11313 |                                  "%s-txrx-%d", tp-&gt;dev-&gt;name, irq_num);

When `make W=1` is supplied, this prevents kernel building. Fix it by
increasing the buffer size for IRQ label and use sizeoF() instead of
hard coded constants.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Michael Chan &lt;michael.chan@broadcom.com&gt;
Message-ID: &lt;20241016090647.691022-1-andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
</content>
</entry>
<entry>
<title>ethtool: replace struct ethtool_eee with a new struct ethtool_keee on kernel side</title>
<updated>2024-01-31T12:30:47Z</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2024-01-27T13:25:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d80a52335374e484a4ff2afdc9af843e73273945'/>
<id>urn:sha1:d80a52335374e484a4ff2afdc9af843e73273945</id>
<content type='text'>
In order to pass EEE link modes beyond bit 32 to userspace we have to
complement the 32 bit bitmaps in struct ethtool_eee with linkmode
bitmaps. Therefore, similar to ethtool_link_settings and
ethtool_link_ksettings, add a struct ethtool_keee. In a first step
it's an identical copy of ethtool_eee. This patch simply does a
s/ethtool_eee/ethtool_keee/g for all users.
No functional change intended.

Suggested-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tg3: Move the [rt]x_dropped counters to tg3_napi</title>
<updated>2023-11-15T03:50:23Z</updated>
<author>
<name>Alex Pakhunov</name>
<email>alexey.pakhunov@spacex.com</email>
</author>
<published>2023-11-13T18:23:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=907d1bdb8b2cc0357d03a1c34d2a08d9943760b1'/>
<id>urn:sha1:907d1bdb8b2cc0357d03a1c34d2a08d9943760b1</id>
<content type='text'>
This change moves [rt]x_dropped counters to tg3_napi so that they can be
updated by a single writer, race-free.

Signed-off-by: Alex Pakhunov &lt;alexey.pakhunov@spacex.com&gt;
Signed-off-by: Vincent Wong &lt;vincent.wong2@spacex.com&gt;
Reviewed-by: Michael Chan &lt;michael.chan@broadcom.com&gt;
Link: https://lore.kernel.org/r/20231113182350.37472-1-alexey.pakhunov@spacex.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>tg3: Improve PTP TX timestamping logic</title>
<updated>2023-10-15T13:30:24Z</updated>
<author>
<name>Pavan Chebbi</name>
<email>pavan.chebbi@broadcom.com</email>
</author>
<published>2023-10-13T13:59:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b22f21f7a541419d454c5b7c254a9bd02bdd5d58'/>
<id>urn:sha1:b22f21f7a541419d454c5b7c254a9bd02bdd5d58</id>
<content type='text'>
When we are trying to timestamp a TX packet, there may be
occasions when the TX timestamp register is still not
updated with the latest timestamp even if the timestamp
packet descriptor is marked as complete.
This usually happens in cases where the system is under
stress or flow control is affecting the transmit side.

We will solve this problem by saving the snapshot of the
timestamp register when we are posting the TX descriptor.
At this time, the register contains previously timestamped
packet's value and valid timestamp of the current packet must
be different than this.
Upon completion of the current descriptor, we will check if
the timestamp register is updated or not before timestamping
the skb. If not updated, we will schedule the ptp worker to
fetch the updated time later and timestamp the skb.
Also now we restrict number of outstanding PTP TX packet
requests to 1.

Reported-by: Simon White &lt;Simon.White@viavisolutions.com&gt;
Link: https://lore.kernel.org/netdev/CACKFLikGdN9XPtWk-fdrzxdcD=+bv-GHBvfVfSpJzHY7hrW39g@mail.gmail.com/
Signed-off-by: Pavan Chebbi &lt;pavan.chebbi@broadcom.com&gt;
Signed-off-by: Michael Chan &lt;michael.chan@broadcom.com&gt;
Reviewed-by: Andy Gospodarek &lt;gospo@broadcom.com&gt;
Reviewed-by: Kalesh AP &lt;kalesh-anakkur.purayil@broadcom.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tg3: Read VPD with pci_vpd_alloc()</title>
<updated>2021-08-20T20:49:00Z</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2021-08-18T19:04:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f240e15097c5004811a58f2cbc170bf90d06d0a9'/>
<id>urn:sha1:f240e15097c5004811a58f2cbc170bf90d06d0a9</id>
<content type='text'>
Use pci_vpd_alloc() to dynamically allocate a properly sized buffer and
read the full VPD data into it.

This simplifies the code, and we no longer have to make assumptions about
VPD size.

Link: https://lore.kernel.org/r/bd3cd19c-b74f-9704-5786-476bf35ab5de@gmail.com
Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>tg3: improve PCI VPD access</title>
<updated>2021-01-25T23:24:19Z</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2021-01-22T12:08:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=24f97b6af9a000bfda9ee693110189d7d4d629fe'/>
<id>urn:sha1:24f97b6af9a000bfda9ee693110189d7d4d629fe</id>
<content type='text'>
When working on the PCI VPD code I also tested with a Broadcom BCM95719
card. tg3 uses internal NVRAM access with this card, so I forced it to
PCI VPD mode for testing. PCI VPD access fails
(i + PCI_VPD_LRDT_TAG_SIZE + j &gt; len) because only TG3_NVM_VPD_LEN (256)
bytes are read, but PCI VPD has 400 bytes on this card.

So add a constant TG3_NVM_PCI_VPD_MAX_LEN that defines the maximum
PCI VPD size. The actual VPD size is returned by pci_read_vpd().
In addition it's not worth looping over pci_read_vpd(). If we miss the
125ms timeout per VPD dword read then definitely something is wrong,
and if the tg3 module loading is killed then there's also not much
benefit in retrying the VPD read.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Reviewed-by: Michael Chan &lt;michael.chan@broadcom.com&gt;
Link: https://lore.kernel.org/r/cb9e9113-0861-3904-87e0-d4c4ab3c8860@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>tg3: Avoid the use of one-element array</title>
<updated>2020-07-23T01:11:07Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2020-07-22T18:43:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7ec3e95e7a778f1202f85a9046917d4f231ce799'/>
<id>urn:sha1:7ec3e95e7a778f1202f85a9046917d4f231ce799</id>
<content type='text'>
One-element arrays are being deprecated[1]. Replace the one-element
array with a simple value type 'u32 reserved2'[2], once it seems
this is just a placeholder for alignment.

[1] https://github.com/KSPP/linux/issues/79
[2] https://github.com/KSPP/linux/issues/86

Tested-by: kernel test robot &lt;lkp@intel.com&gt;
Link: https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/0-day/tg3-20200718.md
Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Reviewed-by: Michael Chan &lt;michael.chan@broadcom.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>broadcom: tg3: fix use of SPEED_UNKNOWN ethtool constant</title>
<updated>2019-04-08T23:30:43Z</updated>
<author>
<name>Michael Zhivich</name>
<email>mzhivich@akamai.com</email>
</author>
<published>2019-04-08T14:48:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=caf2c5205d82ff0d758096a69a7e0466c38d4dbb'/>
<id>urn:sha1:caf2c5205d82ff0d758096a69a7e0466c38d4dbb</id>
<content type='text'>
tg3 driver uses u16 to store SPEED_UKNOWN ethtool constant,
which is defined as -1, resulting in value truncation and
thus incorrect test results against SPEED_UNKNOWN.

For example, the following test will print "False":

	u16 speed = SPEED_UNKNOWN;

	if (speed == SPEED_UNKNOWN)
	    printf("True");
	else
	    printf("False");

Change storage of speed to use u32 to avoid this issue.

Signed-off-by: Michael Zhivich &lt;mzhivich@akamai.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tg3: Update copyright</title>
<updated>2018-07-16T21:42:10Z</updated>
<author>
<name>Siva Reddy Kallam</name>
<email>siva.kallam@broadcom.com</email>
</author>
<published>2018-07-16T05:43:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0f2605fbafb0c0c05d0d4655114530de972ee8ad'/>
<id>urn:sha1:0f2605fbafb0c0c05d0d4655114530de972ee8ad</id>
<content type='text'>
Signed-off-by: Siva Reddy Kallam &lt;siva.kallam@broadcom.com&gt;
Reviewed-by: Michael Chan &lt;michael.chan@broadcom.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
