<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/net/ethernet/microchip, branch linux-6.11.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>net: microchip: vcap: Add typegroup table terminators in kunit tests</title>
<updated>2024-12-05T12:53:58+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2024-11-19T21:32:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e54f1237a8018bca25fe58cc3b5a0442051315d1'/>
<id>e54f1237a8018bca25fe58cc3b5a0442051315d1</id>
<content type='text'>
[ Upstream commit f164b296638d1eb1fb1c537e93ab5c8b49966546 ]

VCAP API unit tests fail randomly with errors such as

   # vcap_api_iterator_init_test: EXPECTATION FAILED at drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:387
   Expected 134 + 7 == iter.offset, but
       134 + 7 == 141 (0x8d)
       iter.offset == 17214 (0x433e)
   # vcap_api_iterator_init_test: EXPECTATION FAILED at drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:388
   Expected 5 == iter.reg_idx, but
       iter.reg_idx == 702 (0x2be)
   # vcap_api_iterator_init_test: EXPECTATION FAILED at drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:389
   Expected 11 == iter.reg_bitpos, but
       iter.reg_bitpos == 15 (0xf)
   # vcap_api_iterator_init_test: pass:0 fail:1 skip:0 total:1

Comments in the code state that "A typegroup table ends with an all-zero
terminator". Add the missing terminators.

Some of the typegroups did have a terminator of ".offset = 0, .width = 0,
.value = 0,". Replace those terminators with "{ }" (no trailing ',') for
consistency and to excplicitly state "this is a terminator".

Fixes: 67d637516fa9 ("net: microchip: sparx5: Adding KUNIT test for the VCAP API")
Cc: Steen Hegelund &lt;steen.hegelund@microchip.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reviewed-by: Daniel Machon &lt;daniel.machon@microchip.com&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Link: https://patch.msgid.link/20241119213202.2884639-1-linux@roeck-us.net
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit f164b296638d1eb1fb1c537e93ab5c8b49966546 ]

VCAP API unit tests fail randomly with errors such as

   # vcap_api_iterator_init_test: EXPECTATION FAILED at drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:387
   Expected 134 + 7 == iter.offset, but
       134 + 7 == 141 (0x8d)
       iter.offset == 17214 (0x433e)
   # vcap_api_iterator_init_test: EXPECTATION FAILED at drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:388
   Expected 5 == iter.reg_idx, but
       iter.reg_idx == 702 (0x2be)
   # vcap_api_iterator_init_test: EXPECTATION FAILED at drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c:389
   Expected 11 == iter.reg_bitpos, but
       iter.reg_bitpos == 15 (0xf)
   # vcap_api_iterator_init_test: pass:0 fail:1 skip:0 total:1

Comments in the code state that "A typegroup table ends with an all-zero
terminator". Add the missing terminators.

Some of the typegroups did have a terminator of ".offset = 0, .width = 0,
.value = 0,". Replace those terminators with "{ }" (no trailing ',') for
consistency and to excplicitly state "this is a terminator".

Fixes: 67d637516fa9 ("net: microchip: sparx5: Adding KUNIT test for the VCAP API")
Cc: Steen Hegelund &lt;steen.hegelund@microchip.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reviewed-by: Daniel Machon &lt;daniel.machon@microchip.com&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Link: https://patch.msgid.link/20241119213202.2884639-1-linux@roeck-us.net
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: sparx5: fix source port register when mirroring</title>
<updated>2024-11-01T01:02:26+00:00</updated>
<author>
<name>Daniel Machon</name>
<email>daniel.machon@microchip.com</email>
</author>
<published>2024-10-09T12:49:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ca18817bd67f6745cc0f7863094b4414038ab83a'/>
<id>ca18817bd67f6745cc0f7863094b4414038ab83a</id>
<content type='text'>
[ Upstream commit 8a6be4bd6fb319cee63d228e37c8dda5fd1eb74a ]

When port mirroring is added to a port, the bit position of the source
port, needs to be written to the register ANA_AC_PROBE_PORT_CFG.  This
register is replicated for n_ports &gt; 32, and therefore we need to derive
the correct register from the port number.

Before this patch, we wrongly calculate the register from portno /
BITS_PER_BYTE, where the divisor ought to be 32, causing any port &gt;=8 to
be written to the wrong register. We fix this, by using do_div(), where
the dividend is the register, the remainder is the bit position and the
divisor is now 32.

Fixes: 4e50d72b3b95 ("net: sparx5: add port mirroring implementation")
Signed-off-by: Daniel Machon &lt;daniel.machon@microchip.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://patch.msgid.link/20241009-mirroring-fix-v1-1-9ec962301989@microchip.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 8a6be4bd6fb319cee63d228e37c8dda5fd1eb74a ]

When port mirroring is added to a port, the bit position of the source
port, needs to be written to the register ANA_AC_PROBE_PORT_CFG.  This
register is replicated for n_ports &gt; 32, and therefore we need to derive
the correct register from the port number.

Before this patch, we wrongly calculate the register from portno /
BITS_PER_BYTE, where the divisor ought to be 32, causing any port &gt;=8 to
be written to the wrong register. We fix this, by using do_div(), where
the dividend is the register, the remainder is the bit position and the
divisor is now 32.

Fixes: 4e50d72b3b95 ("net: sparx5: add port mirroring implementation")
Signed-off-by: Daniel Machon &lt;daniel.machon@microchip.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Link: https://patch.msgid.link/20241009-mirroring-fix-v1-1-9ec962301989@microchip.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: microchip: vcap api: Fix memory leaks in vcap_api_encode_rule_test()</title>
<updated>2024-10-22T13:51:19+00:00</updated>
<author>
<name>Jinjie Ruan</name>
<email>ruanjinjie@huawei.com</email>
</author>
<published>2024-10-14T12:19:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=170792097bb21e5da77443b6a03d35489813eabe'/>
<id>170792097bb21e5da77443b6a03d35489813eabe</id>
<content type='text'>
commit 217a3d98d1e9891a8b1438a27dfbc64ddf01f691 upstream.

Commit a3c1e45156ad ("net: microchip: vcap: Fix use-after-free error in
kunit test") fixed the use-after-free error, but introduced below
memory leaks by removing necessary vcap_free_rule(), add it to fix it.

	unreferenced object 0xffffff80ca58b700 (size 192):
	  comm "kunit_try_catch", pid 1215, jiffies 4294898264
	  hex dump (first 32 bytes):
	    00 12 7a 00 05 00 00 00 0a 00 00 00 64 00 00 00  ..z.........d...
	    00 00 00 00 00 00 00 00 00 04 0b cc 80 ff ff ff  ................
	  backtrace (crc 9c09c3fe):
	    [&lt;0000000052a0be73&gt;] kmemleak_alloc+0x34/0x40
	    [&lt;0000000043605459&gt;] __kmalloc_cache_noprof+0x26c/0x2f4
	    [&lt;0000000040a01b8d&gt;] vcap_alloc_rule+0x3cc/0x9c4
	    [&lt;000000003fe86110&gt;] vcap_api_encode_rule_test+0x1ac/0x16b0
	    [&lt;00000000b3595fc4&gt;] kunit_try_run_case+0x13c/0x3ac
	    [&lt;0000000010f5d2bf&gt;] kunit_generic_run_threadfn_adapter+0x80/0xec
	    [&lt;00000000c5d82c9a&gt;] kthread+0x2e8/0x374
	    [&lt;00000000f4287308&gt;] ret_from_fork+0x10/0x20
	unreferenced object 0xffffff80cc0b0400 (size 64):
	  comm "kunit_try_catch", pid 1215, jiffies 4294898265
	  hex dump (first 32 bytes):
	    80 04 0b cc 80 ff ff ff 18 b7 58 ca 80 ff ff ff  ..........X.....
	    39 00 00 00 02 00 00 00 06 05 04 03 02 01 ff ff  9...............
	  backtrace (crc daf014e9):
	    [&lt;0000000052a0be73&gt;] kmemleak_alloc+0x34/0x40
	    [&lt;0000000043605459&gt;] __kmalloc_cache_noprof+0x26c/0x2f4
	    [&lt;000000000ff63fd4&gt;] vcap_rule_add_key+0x2cc/0x528
	    [&lt;00000000dfdb1e81&gt;] vcap_api_encode_rule_test+0x224/0x16b0
	    [&lt;00000000b3595fc4&gt;] kunit_try_run_case+0x13c/0x3ac
	    [&lt;0000000010f5d2bf&gt;] kunit_generic_run_threadfn_adapter+0x80/0xec
	    [&lt;00000000c5d82c9a&gt;] kthread+0x2e8/0x374
	    [&lt;00000000f4287308&gt;] ret_from_fork+0x10/0x20
	unreferenced object 0xffffff80cc0b0700 (size 64):
	  comm "kunit_try_catch", pid 1215, jiffies 4294898265
	  hex dump (first 32 bytes):
	    80 07 0b cc 80 ff ff ff 28 b7 58 ca 80 ff ff ff  ........(.X.....
	    3c 00 00 00 00 00 00 00 01 2f 03 b3 ec ff ff ff  &lt;......../......
	  backtrace (crc 8d877792):
	    [&lt;0000000052a0be73&gt;] kmemleak_alloc+0x34/0x40
	    [&lt;0000000043605459&gt;] __kmalloc_cache_noprof+0x26c/0x2f4
	    [&lt;000000006eadfab7&gt;] vcap_rule_add_action+0x2d0/0x52c
	    [&lt;00000000323475d1&gt;] vcap_api_encode_rule_test+0x4d4/0x16b0
	    [&lt;00000000b3595fc4&gt;] kunit_try_run_case+0x13c/0x3ac
	    [&lt;0000000010f5d2bf&gt;] kunit_generic_run_threadfn_adapter+0x80/0xec
	    [&lt;00000000c5d82c9a&gt;] kthread+0x2e8/0x374
	    [&lt;00000000f4287308&gt;] ret_from_fork+0x10/0x20
	unreferenced object 0xffffff80cc0b0900 (size 64):
	  comm "kunit_try_catch", pid 1215, jiffies 4294898266
	  hex dump (first 32 bytes):
	    80 09 0b cc 80 ff ff ff 80 06 0b cc 80 ff ff ff  ................
	    7d 00 00 00 01 00 00 00 00 00 00 00 ff 00 00 00  }...............
	  backtrace (crc 34181e56):
	    [&lt;0000000052a0be73&gt;] kmemleak_alloc+0x34/0x40
	    [&lt;0000000043605459&gt;] __kmalloc_cache_noprof+0x26c/0x2f4
	    [&lt;000000000ff63fd4&gt;] vcap_rule_add_key+0x2cc/0x528
	    [&lt;00000000991e3564&gt;] vcap_val_rule+0xcf0/0x13e8
	    [&lt;00000000fc9868e5&gt;] vcap_api_encode_rule_test+0x678/0x16b0
	    [&lt;00000000b3595fc4&gt;] kunit_try_run_case+0x13c/0x3ac
	    [&lt;0000000010f5d2bf&gt;] kunit_generic_run_threadfn_adapter+0x80/0xec
	    [&lt;00000000c5d82c9a&gt;] kthread+0x2e8/0x374
	    [&lt;00000000f4287308&gt;] ret_from_fork+0x10/0x20
	unreferenced object 0xffffff80cc0b0980 (size 64):
	  comm "kunit_try_catch", pid 1215, jiffies 4294898266
	  hex dump (first 32 bytes):
	    18 b7 58 ca 80 ff ff ff 00 09 0b cc 80 ff ff ff  ..X.............
	    67 00 00 00 00 00 00 00 01 01 74 88 c0 ff ff ff  g.........t.....
	  backtrace (crc 275fd9be):
	    [&lt;0000000052a0be73&gt;] kmemleak_alloc+0x34/0x40
	    [&lt;0000000043605459&gt;] __kmalloc_cache_noprof+0x26c/0x2f4
	    [&lt;000000000ff63fd4&gt;] vcap_rule_add_key+0x2cc/0x528
	    [&lt;000000001396a1a2&gt;] test_add_def_fields+0xb0/0x100
	    [&lt;000000006e7621f0&gt;] vcap_val_rule+0xa98/0x13e8
	    [&lt;00000000fc9868e5&gt;] vcap_api_encode_rule_test+0x678/0x16b0
	    [&lt;00000000b3595fc4&gt;] kunit_try_run_case+0x13c/0x3ac
	    [&lt;0000000010f5d2bf&gt;] kunit_generic_run_threadfn_adapter+0x80/0xec
	    [&lt;00000000c5d82c9a&gt;] kthread+0x2e8/0x374
	    [&lt;00000000f4287308&gt;] ret_from_fork+0x10/0x20
	......

Cc: stable@vger.kernel.org
Fixes: a3c1e45156ad ("net: microchip: vcap: Fix use-after-free error in kunit test")
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Reviewed-by: Jens Emil Schulz Østergaard &lt;jensemil.schulzostergaard@microchip.com&gt;
Signed-off-by: Jinjie Ruan &lt;ruanjinjie@huawei.com&gt;
Link: https://patch.msgid.link/20241014121922.1280583-1-ruanjinjie@huawei.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 217a3d98d1e9891a8b1438a27dfbc64ddf01f691 upstream.

Commit a3c1e45156ad ("net: microchip: vcap: Fix use-after-free error in
kunit test") fixed the use-after-free error, but introduced below
memory leaks by removing necessary vcap_free_rule(), add it to fix it.

	unreferenced object 0xffffff80ca58b700 (size 192):
	  comm "kunit_try_catch", pid 1215, jiffies 4294898264
	  hex dump (first 32 bytes):
	    00 12 7a 00 05 00 00 00 0a 00 00 00 64 00 00 00  ..z.........d...
	    00 00 00 00 00 00 00 00 00 04 0b cc 80 ff ff ff  ................
	  backtrace (crc 9c09c3fe):
	    [&lt;0000000052a0be73&gt;] kmemleak_alloc+0x34/0x40
	    [&lt;0000000043605459&gt;] __kmalloc_cache_noprof+0x26c/0x2f4
	    [&lt;0000000040a01b8d&gt;] vcap_alloc_rule+0x3cc/0x9c4
	    [&lt;000000003fe86110&gt;] vcap_api_encode_rule_test+0x1ac/0x16b0
	    [&lt;00000000b3595fc4&gt;] kunit_try_run_case+0x13c/0x3ac
	    [&lt;0000000010f5d2bf&gt;] kunit_generic_run_threadfn_adapter+0x80/0xec
	    [&lt;00000000c5d82c9a&gt;] kthread+0x2e8/0x374
	    [&lt;00000000f4287308&gt;] ret_from_fork+0x10/0x20
	unreferenced object 0xffffff80cc0b0400 (size 64):
	  comm "kunit_try_catch", pid 1215, jiffies 4294898265
	  hex dump (first 32 bytes):
	    80 04 0b cc 80 ff ff ff 18 b7 58 ca 80 ff ff ff  ..........X.....
	    39 00 00 00 02 00 00 00 06 05 04 03 02 01 ff ff  9...............
	  backtrace (crc daf014e9):
	    [&lt;0000000052a0be73&gt;] kmemleak_alloc+0x34/0x40
	    [&lt;0000000043605459&gt;] __kmalloc_cache_noprof+0x26c/0x2f4
	    [&lt;000000000ff63fd4&gt;] vcap_rule_add_key+0x2cc/0x528
	    [&lt;00000000dfdb1e81&gt;] vcap_api_encode_rule_test+0x224/0x16b0
	    [&lt;00000000b3595fc4&gt;] kunit_try_run_case+0x13c/0x3ac
	    [&lt;0000000010f5d2bf&gt;] kunit_generic_run_threadfn_adapter+0x80/0xec
	    [&lt;00000000c5d82c9a&gt;] kthread+0x2e8/0x374
	    [&lt;00000000f4287308&gt;] ret_from_fork+0x10/0x20
	unreferenced object 0xffffff80cc0b0700 (size 64):
	  comm "kunit_try_catch", pid 1215, jiffies 4294898265
	  hex dump (first 32 bytes):
	    80 07 0b cc 80 ff ff ff 28 b7 58 ca 80 ff ff ff  ........(.X.....
	    3c 00 00 00 00 00 00 00 01 2f 03 b3 ec ff ff ff  &lt;......../......
	  backtrace (crc 8d877792):
	    [&lt;0000000052a0be73&gt;] kmemleak_alloc+0x34/0x40
	    [&lt;0000000043605459&gt;] __kmalloc_cache_noprof+0x26c/0x2f4
	    [&lt;000000006eadfab7&gt;] vcap_rule_add_action+0x2d0/0x52c
	    [&lt;00000000323475d1&gt;] vcap_api_encode_rule_test+0x4d4/0x16b0
	    [&lt;00000000b3595fc4&gt;] kunit_try_run_case+0x13c/0x3ac
	    [&lt;0000000010f5d2bf&gt;] kunit_generic_run_threadfn_adapter+0x80/0xec
	    [&lt;00000000c5d82c9a&gt;] kthread+0x2e8/0x374
	    [&lt;00000000f4287308&gt;] ret_from_fork+0x10/0x20
	unreferenced object 0xffffff80cc0b0900 (size 64):
	  comm "kunit_try_catch", pid 1215, jiffies 4294898266
	  hex dump (first 32 bytes):
	    80 09 0b cc 80 ff ff ff 80 06 0b cc 80 ff ff ff  ................
	    7d 00 00 00 01 00 00 00 00 00 00 00 ff 00 00 00  }...............
	  backtrace (crc 34181e56):
	    [&lt;0000000052a0be73&gt;] kmemleak_alloc+0x34/0x40
	    [&lt;0000000043605459&gt;] __kmalloc_cache_noprof+0x26c/0x2f4
	    [&lt;000000000ff63fd4&gt;] vcap_rule_add_key+0x2cc/0x528
	    [&lt;00000000991e3564&gt;] vcap_val_rule+0xcf0/0x13e8
	    [&lt;00000000fc9868e5&gt;] vcap_api_encode_rule_test+0x678/0x16b0
	    [&lt;00000000b3595fc4&gt;] kunit_try_run_case+0x13c/0x3ac
	    [&lt;0000000010f5d2bf&gt;] kunit_generic_run_threadfn_adapter+0x80/0xec
	    [&lt;00000000c5d82c9a&gt;] kthread+0x2e8/0x374
	    [&lt;00000000f4287308&gt;] ret_from_fork+0x10/0x20
	unreferenced object 0xffffff80cc0b0980 (size 64):
	  comm "kunit_try_catch", pid 1215, jiffies 4294898266
	  hex dump (first 32 bytes):
	    18 b7 58 ca 80 ff ff ff 00 09 0b cc 80 ff ff ff  ..X.............
	    67 00 00 00 00 00 00 00 01 01 74 88 c0 ff ff ff  g.........t.....
	  backtrace (crc 275fd9be):
	    [&lt;0000000052a0be73&gt;] kmemleak_alloc+0x34/0x40
	    [&lt;0000000043605459&gt;] __kmalloc_cache_noprof+0x26c/0x2f4
	    [&lt;000000000ff63fd4&gt;] vcap_rule_add_key+0x2cc/0x528
	    [&lt;000000001396a1a2&gt;] test_add_def_fields+0xb0/0x100
	    [&lt;000000006e7621f0&gt;] vcap_val_rule+0xa98/0x13e8
	    [&lt;00000000fc9868e5&gt;] vcap_api_encode_rule_test+0x678/0x16b0
	    [&lt;00000000b3595fc4&gt;] kunit_try_run_case+0x13c/0x3ac
	    [&lt;0000000010f5d2bf&gt;] kunit_generic_run_threadfn_adapter+0x80/0xec
	    [&lt;00000000c5d82c9a&gt;] kthread+0x2e8/0x374
	    [&lt;00000000f4287308&gt;] ret_from_fork+0x10/0x20
	......

Cc: stable@vger.kernel.org
Fixes: a3c1e45156ad ("net: microchip: vcap: Fix use-after-free error in kunit test")
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Reviewed-by: Jens Emil Schulz Østergaard &lt;jensemil.schulzostergaard@microchip.com&gt;
Signed-off-by: Jinjie Ruan &lt;ruanjinjie@huawei.com&gt;
Link: https://patch.msgid.link/20241014121922.1280583-1-ruanjinjie@huawei.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: sparx5: Fix invalid timestamps</title>
<updated>2024-10-10T10:02:56+00:00</updated>
<author>
<name>Aakash Menon</name>
<email>aakash.r.menon@gmail.com</email>
</author>
<published>2024-09-17T05:18:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e28013f39ab8112c427f66a43ca267fa268f8ed1'/>
<id>e28013f39ab8112c427f66a43ca267fa268f8ed1</id>
<content type='text'>
[ Upstream commit 151ac45348afc5b56baa584c7cd4876addf461ff ]

Bit 270-271 are occasionally unexpectedly set by the hardware. This issue
was observed with 10G SFPs causing huge time errors (&gt; 30ms) in PTP. Only
30 bits are needed for the nanosecond part of the timestamp, clear 2 most
significant bits before extracting timestamp from the internal frame
header.

Fixes: 70dfe25cd866 ("net: sparx5: Update extraction/injection for timestamping")
Signed-off-by: Aakash Menon &lt;aakash.menon@protempis.com&gt;
Reviewed-by: Horatiu Vultur &lt;horatiu.vultur@microchip.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 151ac45348afc5b56baa584c7cd4876addf461ff ]

Bit 270-271 are occasionally unexpectedly set by the hardware. This issue
was observed with 10G SFPs causing huge time errors (&gt; 30ms) in PTP. Only
30 bits are needed for the nanosecond part of the timestamp, clear 2 most
significant bits before extracting timestamp from the internal frame
header.

Fixes: 70dfe25cd866 ("net: sparx5: Update extraction/injection for timestamping")
Signed-off-by: Aakash Menon &lt;aakash.menon@protempis.com&gt;
Reviewed-by: Horatiu Vultur &lt;horatiu.vultur@microchip.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: microchip: vcap: Fix use-after-free error in kunit test</title>
<updated>2024-09-02T09:35:17+00:00</updated>
<author>
<name>Jens Emil Schulz Østergaard</name>
<email>jensemil.schulzostergaard@microchip.com</email>
</author>
<published>2024-08-29T09:52:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a3c1e45156ad39f225cd7ddae0f81230a3b1e657'/>
<id>a3c1e45156ad39f225cd7ddae0f81230a3b1e657</id>
<content type='text'>
This is a clear use-after-free error. We remove it, and rely on checking
the return code of vcap_del_rule.

Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Closes: https://lore.kernel.org/kernel-janitors/7bffefc6-219a-4f71-baa0-ad4526e5c198@kili.mountain/
Fixes: c956b9b318d9 ("net: microchip: sparx5: Adding KUNIT tests of key/action values in VCAP API")
Signed-off-by: Jens Emil Schulz Østergaard &lt;jensemil.schulzostergaard@microchip.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a clear use-after-free error. We remove it, and rely on checking
the return code of vcap_del_rule.

Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Closes: https://lore.kernel.org/kernel-janitors/7bffefc6-219a-4f71-baa0-ad4526e5c198@kili.mountain/
Fixes: c956b9b318d9 ("net: microchip: sparx5: Adding KUNIT tests of key/action values in VCAP API")
Signed-off-by: Jens Emil Schulz Østergaard &lt;jensemil.schulzostergaard@microchip.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Add struct kernel_ethtool_ts_info</title>
<updated>2024-07-15T15:02:26+00:00</updated>
<author>
<name>Kory Maincent</name>
<email>kory.maincent@bootlin.com</email>
</author>
<published>2024-07-09T13:53:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2111375b85ad173d58e7b8604246a3de60950ac8'/>
<id>2111375b85ad173d58e7b8604246a3de60950ac8</id>
<content type='text'>
In prevision to add new UAPI for hwtstamp we will be limited to the struct
ethtool_ts_info that is currently passed in fixed binary format through the
ETHTOOL_GET_TS_INFO ethtool ioctl. It would be good if new kernel code
already started operating on an extensible kernel variant of that
structure, similar in concept to struct kernel_hwtstamp_config vs struct
hwtstamp_config.

Since struct ethtool_ts_info is in include/uapi/linux/ethtool.h, here
we introduce the kernel-only structure in include/linux/ethtool.h.
The manual copy is then made in the function called by ETHTOOL_GET_TS_INFO.

Acked-by: Shannon Nelson &lt;shannon.nelson@amd.com&gt;
Acked-by: Alexandra Winter &lt;wintera@linux.ibm.com&gt;
Signed-off-by: Kory Maincent &lt;kory.maincent@bootlin.com&gt;
Link: https://patch.msgid.link/20240709-feature_ptp_netnext-v17-6-b5317f50df2a@bootlin.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In prevision to add new UAPI for hwtstamp we will be limited to the struct
ethtool_ts_info that is currently passed in fixed binary format through the
ETHTOOL_GET_TS_INFO ethtool ioctl. It would be good if new kernel code
already started operating on an extensible kernel variant of that
structure, similar in concept to struct kernel_hwtstamp_config vs struct
hwtstamp_config.

Since struct ethtool_ts_info is in include/uapi/linux/ethtool.h, here
we introduce the kernel-only structure in include/linux/ethtool.h.
The manual copy is then made in the function called by ETHTOOL_GET_TS_INFO.

Acked-by: Shannon Nelson &lt;shannon.nelson@amd.com&gt;
Acked-by: Alexandra Winter &lt;wintera@linux.ibm.com&gt;
Signed-off-by: Kory Maincent &lt;kory.maincent@bootlin.com&gt;
Link: https://patch.msgid.link/20240709-feature_ptp_netnext-v17-6-b5317f50df2a@bootlin.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: encx24j600: constify struct regmap_bus/regmap_config</title>
<updated>2024-07-06T00:02:20+00:00</updated>
<author>
<name>Javier Carrasco</name>
<email>javier.carrasco.cruz@gmail.com</email>
</author>
<published>2024-07-03T21:46:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9969163c447229af8d144913500ef14e57b68235'/>
<id>9969163c447229af8d144913500ef14e57b68235</id>
<content type='text'>
`regmap_encx24j600`, `phycfg` and `phymap_encx24j600` are not modified
and can be declared as const to move their data to a read-only section.

Signed-off-by: Javier Carrasco &lt;javier.carrasco.cruz@gmail.com&gt;
Link: https://patch.msgid.link/20240703-net-const-regmap-v1-3-ff4aeceda02c@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`regmap_encx24j600`, `phycfg` and `phymap_encx24j600` are not modified
and can be declared as const to move their data to a read-only section.

Signed-off-by: Javier Carrasco &lt;javier.carrasco.cruz@gmail.com&gt;
Link: https://patch.msgid.link/20240703-net-const-regmap-v1-3-ff4aeceda02c@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2024-06-20T20:49:59+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2024-06-20T20:02:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a6ec08beec9ea93f342d6daeac922208709694dc'/>
<id>a6ec08beec9ea93f342d6daeac922208709694dc</id>
<content type='text'>
Cross-merge networking fixes after downstream PR.

Conflicts:

drivers/net/ethernet/broadcom/bnxt/bnxt.c
  1e7962114c10 ("bnxt_en: Restore PTP tx_avail count in case of skb_pad() error")
  165f87691a89 ("bnxt_en: add timestamping statistics support")

No adjacent changes.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cross-merge networking fixes after downstream PR.

Conflicts:

drivers/net/ethernet/broadcom/bnxt/bnxt.c
  1e7962114c10 ("bnxt_en: Restore PTP tx_avail count in case of skb_pad() error")
  165f87691a89 ("bnxt_en: add timestamping statistics support")

No adjacent changes.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: microchip: Constify struct vcap_operations</title>
<updated>2024-06-18T13:26:39+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2024-06-16T07:57:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8c379e3ce404347acf35fbb4cf8694dd8d35f2a0'/>
<id>8c379e3ce404347acf35fbb4cf8694dd8d35f2a0</id>
<content type='text'>
"struct vcap_operations" are not modified in these drivers.

Constifying this structure moves some data to a read-only section, so
increase overall security.

In order to do it, "struct vcap_control" also needs to be adjusted to this
new const qualifier.

As an example, on a x86_64, with allmodconfig:
Before:
======
   text	   data	    bss	    dec	    hex	filename
  15176	   1094	     16	  16286	   3f9e	drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
  15268	    998	     16	  16282	   3f9a	drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.o

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Daniel Machon &lt;daniel.machon@microchip.com&gt;
Link: https://lore.kernel.org/r/d8e76094d2e98ebb5bfc8205799b3a9db0b46220.1718524644.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"struct vcap_operations" are not modified in these drivers.

Constifying this structure moves some data to a read-only section, so
increase overall security.

In order to do it, "struct vcap_control" also needs to be adjusted to this
new const qualifier.

As an example, on a x86_64, with allmodconfig:
Before:
======
   text	   data	    bss	    dec	    hex	filename
  15176	   1094	     16	  16286	   3f9e	drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
  15268	    998	     16	  16282	   3f9a	drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.o

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Daniel Machon &lt;daniel.machon@microchip.com&gt;
Link: https://lore.kernel.org/r/d8e76094d2e98ebb5bfc8205799b3a9db0b46220.1718524644.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>net: lan743x: Support WOL at both the PHY and MAC appropriately</title>
<updated>2024-06-18T10:04:23+00:00</updated>
<author>
<name>Raju Lakkaraju</name>
<email>Raju.Lakkaraju@microchip.com</email>
</author>
<published>2024-06-14T17:11:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8c248cd836014339498486f14f435c0e344183a7'/>
<id>8c248cd836014339498486f14f435c0e344183a7</id>
<content type='text'>
Prevent options not supported by the PHY from being requested to it by the MAC
Whenever a WOL option is supported by both, the PHY is given priority
since that usually leads to better power savings.

Fixes: e9e13b6adc33 ("lan743x: fix for potential NULL pointer dereference with bare card")
Reviewed-by: Wojciech Drewek &lt;wojciech.drewek@intel.com&gt;
Signed-off-by: Raju Lakkaraju &lt;Raju.Lakkaraju@microchip.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prevent options not supported by the PHY from being requested to it by the MAC
Whenever a WOL option is supported by both, the PHY is given priority
since that usually leads to better power savings.

Fixes: e9e13b6adc33 ("lan743x: fix for potential NULL pointer dereference with bare card")
Reviewed-by: Wojciech Drewek &lt;wojciech.drewek@intel.com&gt;
Signed-off-by: Raju Lakkaraju &lt;Raju.Lakkaraju@microchip.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</pre>
</div>
</content>
</entry>
</feed>
