<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/ethernet/allwinner, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-12-29T12:42:40Z</updated>
<entry>
<title>net: allwinner: Fix some resources leak in the error handling path of the probe and in the remove function</title>
<updated>2020-12-29T12:42:40Z</updated>
<author>
<name>Christophe JAILLET</name>
</author>
<published>2020-12-14T20:21:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96eb7bda05448abdab3a82da0c0156b94097682a'/>
<id>urn:sha1:96eb7bda05448abdab3a82da0c0156b94097682a</id>
<content type='text'>
[ Upstream commit 322e53d1e2529ae9d501f5e0f20604a79b873aef ]

'irq_of_parse_and_map()' should be balanced by a corresponding
'irq_dispose_mapping()' call. Otherwise, there is some resources leaks.

Add such a call in the error handling path of the probe function and in the
remove function.

Fixes: 492205050d77 ("net: Add EMAC ethernet driver found on Allwinner A10 SoC's")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Link: https://lore.kernel.org/r/20201214202117.146293-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: allwinner: Fix use correct return type for ndo_start_xmit()</title>
<updated>2020-06-20T08:23:21Z</updated>
<author>
<name>Yunjian Wang</name>
</author>
<published>2020-05-05T02:49:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7bd9c798d971d4c9cca25d897ac368145e6f51bb'/>
<id>urn:sha1:7bd9c798d971d4c9cca25d897ac368145e6f51bb</id>
<content type='text'>
[ Upstream commit 09f6c44aaae0f1bdb8b983d7762676d5018c53bc ]

The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix
the ndo function to use the correct type. And emac_start_xmit() can
leak one skb if 'channel' == 3.

Signed-off-by: Yunjian Wang &lt;wangyunjian@huawei.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>net: sun4i-emac: Properly free resources on probe failure and remove</title>
<updated>2015-10-22T02:47:45Z</updated>
<author>
<name>Hans de Goede</name>
</author>
<published>2015-10-20T08:42:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=104eb270e665f4fcd8cb8c8ab4c4d4538c604e92'/>
<id>urn:sha1:104eb270e665f4fcd8cb8c8ab4c4d4538c604e92</id>
<content type='text'>
Fix sun4i-emac not releasing the following resources:
-iomapped memory not released on probe-failure nor on remove
-clock not getting disabled on probe-failure nor on remove
-sram not being released on remove

And while at it also add error checking to the clk_prepare_enable call
done on probe.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sun4i-emac: Claim emac sram</title>
<updated>2015-08-25T20:48:59Z</updated>
<author>
<name>Hans de Goede</name>
</author>
<published>2015-08-23T18:31:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=542a64c7076565d73eea39057113914e1607db30'/>
<id>urn:sha1:542a64c7076565d73eea39057113914e1607db30</id>
<content type='text'>
Claim the emac sram ourselves, rather then relying on the bootloader
having mapped the sram to the emac controller during boot.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>drivers/net: remove all references to obsolete Ethernet-HOWTO</title>
<updated>2015-06-23T13:50:35Z</updated>
<author>
<name>Paul Gortmaker</name>
</author>
<published>2015-06-21T20:28:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=138b15ed877eff8149ae32c12fa1f4795c9cb4cf'/>
<id>urn:sha1:138b15ed877eff8149ae32c12fa1f4795c9cb4cf</id>
<content type='text'>
This howto made sense in the 1990s when users had to manually configure
ISA cards with jumpers or vendor utilities, but with the implementation
of PCI it became increasingly less and less relevant, to the point where
it has been well over a decade since I last updated it.  And there is
no value in anyone else taking over updating it either.

However the references to it continue to spread as boiler plate text
from one Kconfig file into the next.  We are not doing end users any
favours by pointing them at this old document, so lets kill it with
fire, once and for all, to hopefully stop any further spread.

No code is changed in this commit, just Kconfig help text.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ethernet: codespell comment spelling fixes</title>
<updated>2015-03-09T02:54:22Z</updated>
<author>
<name>Joe Perches</name>
</author>
<published>2015-03-07T04:49:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dbedd44e982d61c156337b1a3fb252b24085f8e3'/>
<id>urn:sha1:dbedd44e982d61c156337b1a3fb252b24085f8e3</id>
<content type='text'>
To test a checkpatch spelling patch, I ran codespell against
drivers/net/ethernet/.

$ git ls-files drivers/net/ethernet/ | \
  while read file ; do \
    codespell -w $file; \
  done

I removed a false positive in e1000_hw.h

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sun4i-emac: fix error return code</title>
<updated>2015-01-01T00:19:00Z</updated>
<author>
<name>Julia Lawall</name>
</author>
<published>2014-12-29T17:04:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d2232f54dc6cf1512a707dbf32c94f6f6a1be87'/>
<id>urn:sha1:3d2232f54dc6cf1512a707dbf32c94f6f6a1be87</id>
<content type='text'>
Return a negative error code on failure.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret &lt; 0\|ret != 0\))
 { ... return ret; }
|
ret = 0
)
... when != ret = e1
    when != &amp;ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ethernet: Remove superfluous ether_setup after alloc_etherdev</title>
<updated>2014-10-03T22:31:40Z</updated>
<author>
<name>Tobias Klauser</name>
</author>
<published>2014-10-02T08:15:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6a05880a8b22c6ba2ffdabbceb4635d28abe9072'/>
<id>urn:sha1:6a05880a8b22c6ba2ffdabbceb4635d28abe9072</id>
<content type='text'>
There is no need to call ether_setup after alloc_ethdev since it was
already called there.

Follow commits c706471b2601 ("net: axienet: remove unnecessary
ether_setup after alloc_etherdev") and 3c87dcbfb36c ("net: ll_temac:
Remove unnecessary ether_setup after alloc_etherdev") and fix the
pattern in all remaining ethernet drivers.

Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sun4i-emac: fix memory leak on bad packet</title>
<updated>2014-08-05T23:43:49Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2014-08-05T15:44:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2670cc699a66c4cf268cb3e3f6dfc325ec14f224'/>
<id>urn:sha1:2670cc699a66c4cf268cb3e3f6dfc325ec14f224</id>
<content type='text'>
Upon reception of a new frame, the emac driver checks for a number
of error conditions, and flag the packet as "bad" if any of these
are present. It then allocates a skb unconditionally, but only uses
it if the packet is "good". On the error path, the skb is just forgotten,
and the system leaks memory.

The piece of junk I have on my desk seems to encounter such error
frequently enough so that the box goes OOM after a couple of days,
which makes me grumpy.

Fix this by moving the allocation on the "good_packet" path (and
convert it to netdev_alloc_skb while we're at it).

Tested on a random Allwinner A20 board.

Cc: Stefan Roese &lt;sr@denx.de&gt;
Cc: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # 3.11+
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Acked-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: allwinner: emac: Add missing free_irq</title>
<updated>2014-06-25T23:31:17Z</updated>
<author>
<name>Maxime Ripard</name>
</author>
<published>2014-06-23T20:49:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b91113282bf44df46aba374a0b8f88a75bfd4b3f'/>
<id>urn:sha1:b91113282bf44df46aba374a0b8f88a75bfd4b3f</id>
<content type='text'>
If the mdio probe function fails in emac_open, the interrupt we just requested
isn't freed. If emac_open is called again, for example because we try to set up
the interface again, the kernel will oops because the interrupt wasn't properly
released.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # 3.11+
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
