<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/ethernet/dec, branch v5.18.2</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.18.2</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.18.2'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-05-09T22:52:38+00:00</updated>
<entry>
<title>ethernet: tulip: fix missing pci_disable_device() on error in tulip_init_one()</title>
<updated>2022-05-09T22:52:38+00:00</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2022-05-06T09:42:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=51ca86b4c9c7c75f5630fa0dbe5f8f0bd98e3c3e'/>
<id>urn:sha1:51ca86b4c9c7c75f5630fa0dbe5f8f0bd98e3c3e</id>
<content type='text'>
Fix the missing pci_disable_device() before return
from tulip_init_one() in the error handling case.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Link: https://lore.kernel.org/r/20220506094250.3630615-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: tulip: remove redundant assignment to variable new_csr6</title>
<updated>2022-01-25T15:40:44+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.i.king@gmail.com</email>
</author>
<published>2022-01-23T18:34:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6b0671a23dd6cc949d12fa8d65171856159cd17b'/>
<id>urn:sha1:6b0671a23dd6cc949d12fa8d65171856159cd17b</id>
<content type='text'>
Variable new_csr6 is being initialized with a value that is never
read, it is being re-assigned later on. The assignment is redundant
and can be removed.

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Link: https://lore.kernel.org/r/20220123183440.112495-1-colin.i.king@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: dec: tulip: de4x5: fix possible array overflows in type3_infoblock()</title>
<updated>2021-11-18T12:03:17+00:00</updated>
<author>
<name>Teng Qi</name>
<email>starmiku1207184332@gmail.com</email>
</author>
<published>2021-11-18T07:01:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0fa68da72c3be09e06dd833258ee89c33374195f'/>
<id>urn:sha1:0fa68da72c3be09e06dd833258ee89c33374195f</id>
<content type='text'>
The definition of macro MOTO_SROM_BUG is:
  #define MOTO_SROM_BUG    (lp-&gt;active == 8 &amp;&amp; (get_unaligned_le32(
  dev-&gt;dev_addr) &amp; 0x00ffffff) == 0x3e0008)

and the if statement
  if (MOTO_SROM_BUG) lp-&gt;active = 0;

using this macro indicates lp-&gt;active could be 8. If lp-&gt;active is 8 and
the second comparison of this macro is false. lp-&gt;active will remain 8 in:
  lp-&gt;phy[lp-&gt;active].gep = (*p ? p : NULL); p += (2 * (*p) + 1);
  lp-&gt;phy[lp-&gt;active].rst = (*p ? p : NULL); p += (2 * (*p) + 1);
  lp-&gt;phy[lp-&gt;active].mc  = get_unaligned_le16(p); p += 2;
  lp-&gt;phy[lp-&gt;active].ana = get_unaligned_le16(p); p += 2;
  lp-&gt;phy[lp-&gt;active].fdx = get_unaligned_le16(p); p += 2;
  lp-&gt;phy[lp-&gt;active].ttm = get_unaligned_le16(p); p += 2;
  lp-&gt;phy[lp-&gt;active].mci = *p;

However, the length of array lp-&gt;phy is 8, so array overflows can occur.
To fix these possible array overflows, we first check lp-&gt;active and then
return -EINVAL if it is greater or equal to ARRAY_SIZE(lp-&gt;phy) (i.e. 8).

Reported-by: TOTE Robot &lt;oslab@tsinghua.edu.cn&gt;
Signed-off-by: Teng Qi &lt;starmiku1207184332@gmail.com&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: tulip: de4x5: fix the problem that the array 'lp-&gt;phy[8]' may be out of bound</title>
<updated>2021-11-18T11:59:26+00:00</updated>
<author>
<name>zhangyue</name>
<email>zhangyue1@kylinos.cn</email>
</author>
<published>2021-11-18T05:46:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=61217be886b5f7402843677e4be7e7e83de9cb41'/>
<id>urn:sha1:61217be886b5f7402843677e4be7e7e83de9cb41</id>
<content type='text'>
In line 5001, if all id in the array 'lp-&gt;phy[8]' is not 0, when the
'for' end, the 'k' is 8.

At this time, the array 'lp-&gt;phy[8]' may be out of bound.

Signed-off-by: zhangyue &lt;zhangyue1@kylinos.cn&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: tulip: winbond-840: fix build for UML</title>
<updated>2021-10-15T02:18:53+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2021-10-14T05:06:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a3d708925fcca1a2f7219bc9ce93e6341f85c1e0'/>
<id>urn:sha1:a3d708925fcca1a2f7219bc9ce93e6341f85c1e0</id>
<content type='text'>
On i386, when builtin (not a loadable module), the winbond-840 driver
inspects boot_cpu_data to see what CPU family it is running on, and
then acts on that data. The "family" struct member (x86) does not exist
when running on UML, so prevent that test and do the default action.

Prevents this build error on UML + i386:

../drivers/net/ethernet/dec/tulip/winbond-840.c: In function ‘init_registers’:
../drivers/net/ethernet/dec/tulip/winbond-840.c:882:19: error: ‘struct cpuinfo_um’ has no member named ‘x86’
  if (boot_cpu_data.x86 &lt;= 4) {

Fixes: 68f5d3f3b654 ("um: add PCI over virtio emulation driver")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: linux-um@lists.infradead.org
Cc: Jeff Dike &lt;jdike@addtoit.com&gt;
Cc: Richard Weinberger &lt;richard@nod.at&gt;
Cc: Anton Ivanov &lt;anton.ivanov@cambridgegreys.com&gt;
Link: https://lore.kernel.org/r/20211014050606.7288-1-rdunlap@infradead.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>ethernet: replace netdev-&gt;dev_addr 16bit writes</title>
<updated>2021-10-14T16:22:27+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-10-13T20:44:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=923ca6f61887c9ed5797af096ffb23bdb6e4c6fa'/>
<id>urn:sha1:923ca6f61887c9ed5797af096ffb23bdb6e4c6fa</id>
<content type='text'>
Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
of VLANs...") introduced a rbtree for faster Ethernet address look
up. To maintain netdev-&gt;dev_addr in this tree we need to make all
the writes to it got through appropriate helpers.

This patch takes care of drivers which cast netdev-&gt;dev_addr to
a 16bit type, often with an explicit byte order.

Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>ethernet: tulip: avoid duplicate variable name on sparc</title>
<updated>2021-10-12T11:12:13+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-10-12T00:00:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=177c92353be935db555d0d08729e871145ec698c'/>
<id>urn:sha1:177c92353be935db555d0d08729e871145ec698c</id>
<content type='text'>
I recently added a variable called addr to tulip_init_one()
but for sparc there's already a variable called that half
way thru the function. Rename it to fix build.

Fixes: ca8793175564 ("ethernet: tulip: remove direct netdev-&gt;dev_addr writes")
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tulip: fix setting device address from rom</title>
<updated>2021-10-12T10:29:16+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-10-11T13:09:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=25b90c19102f50ae261cbc328361c0fc66b7c901'/>
<id>urn:sha1:25b90c19102f50ae261cbc328361c0fc66b7c901</id>
<content type='text'>
I missed removing i from the array index when converting
from a loop to a direct copy.

Fixes: ca8793175564 ("ethernet: tulip: remove direct netdev-&gt;dev_addr writes")
Reported-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ethernet: tulip: remove direct netdev-&gt;dev_addr writes</title>
<updated>2021-10-09T10:46:56+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-10-08T17:59:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ca87931755648655e4b57806deefe5c5d38024de'/>
<id>urn:sha1:ca87931755648655e4b57806deefe5c5d38024de</id>
<content type='text'>
Consify the casts of netdev-&gt;dev_addr.

Convert pointless to eth_hw_addr_set() where possible.

Use local buffers in a number of places.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ethernet: use eth_hw_addr_set()</title>
<updated>2021-10-02T13:18:25+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2021-10-01T21:32:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a96d317fb1a30b9f323548eb2ff05d4e4600ead9'/>
<id>urn:sha1:a96d317fb1a30b9f323548eb2ff05d4e4600ead9</id>
<content type='text'>
Convert all Ethernet drivers from memcpy(... ETH_ADDR)
to eth_hw_addr_set():

  @@
  expression dev, np;
  @@
  - memcpy(dev-&gt;dev_addr, np, ETH_ALEN)
  + eth_hw_addr_set(dev, np)

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
