<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/ethernet/ti, branch linux-3.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-02-11T20:03:10Z</updated>
<entry>
<title>net: davinci_cpdma: use dma_addr_t for DMA address</title>
<updated>2020-02-11T20:03:10Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2016-01-29T11:39:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2794d8f0ccabe3a8358930b9faa012dabc964d21'/>
<id>urn:sha1:2794d8f0ccabe3a8358930b9faa012dabc964d21</id>
<content type='text'>
commit 84092996673211f16ef3b942a191d7952e9dfea9 upstream.

The davinci_cpdma mixes up physical addresses as seen from the CPU
and DMA addresses as seen from a DMA master, since it can operate
on both normal memory or an on-chip buffer. If dma_addr_t is
different from phys_addr_t, this means we get a compile-time warning
about the type mismatch:

ethernet/ti/davinci_cpdma.c: In function 'cpdma_desc_pool_create':
ethernet/ti/davinci_cpdma.c:182:48: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]
   pool-&gt;cpumap = dma_alloc_coherent(dev, size, &amp;pool-&gt;phys,
In file included from ethernet/ti/davinci_cpdma.c:21:0:
dma-mapping.h:398:21: note: expected 'dma_addr_t * {aka long long unsigned int *}' but argument is of type 'phys_addr_t * {aka unsigned int *}'
 static inline void *dma_alloc_coherent(struct device *dev, size_t size,

This slightly restructures the code so the address we use for
mapping RAM into a DMA address is always a dma_addr_t, avoiding
the warning. The code is correct even if both types are 32-bit
because the DMA master in this device only supports 32-bit addressing
anyway, independent of the types that are used.

We still assign this value to pool-&gt;phys, and that is wrong if
the driver is ever used with an IOMMU, but that value appears to
be never used, so there is no problem really. I've added a couple
of comments about where we do things that are slightly violating
the API.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Daniel Wagner &lt;dwagner@suse.de&gt;
Cc: Pavel Machek &lt;pavel@denx.de&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>net: ethernet: davinci_emac: Fix printing of base address</title>
<updated>2018-11-20T18:04:59Z</updated>
<author>
<name>Florian Fainelli</name>
</author>
<published>2018-05-21T18:45:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec9c1eee213a777ffb78dff6f403f5eda63fcc00'/>
<id>urn:sha1:ec9c1eee213a777ffb78dff6f403f5eda63fcc00</id>
<content type='text'>
commit 5a04e8f81a4f55ce1c2b7b525744a187c99ba302 upstream.

Use %pa which is the correct formatter to print a physical address,
instead of %p which is just a pointer.

Fixes: a6286ee630f6 ("net: Add TI DaVinci EMAC driver")
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>net: ethernet: davinci_emac: fix error handling in probe()</title>
<updated>2018-10-21T07:46:22Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2018-05-31T06:44:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=19d751c873288da008fe4bef536ef0c4b5d21504'/>
<id>urn:sha1:19d751c873288da008fe4bef536ef0c4b5d21504</id>
<content type='text'>
commit 8005b09d99fac78e6f5fb9da30b5ae94840af03b upstream.

The current error handling code has an issue where it does:

	if (priv-&gt;txchan)
		cpdma_chan_destroy(priv-&gt;txchan);

The problem is that -&gt;txchan is either valid or an error pointer (which
would lead to an Oops).  I've changed it to use multiple error labels so
that the test can be removed.

Also there were some missing calls to netif_napi_del().

Fixes: 3ef0fdb2342c ("net: davinci_emac: switch to new cpdma layer")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>net: davinci_emac: Fix runtime pm calls for davinci_emac</title>
<updated>2018-10-21T07:46:21Z</updated>
<author>
<name>Tony Lindgren</name>
</author>
<published>2015-01-15T22:45:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8c028ed9a2030509cef39512e9cf82f53536d155'/>
<id>urn:sha1:8c028ed9a2030509cef39512e9cf82f53536d155</id>
<content type='text'>
commit b5133e7a988b2cf8e1cd2b23231f36aff35ceffc upstream.

Commit 3ba97381343b ("net: ethernet: davinci_emac: add pm_runtime support")
added support for runtime PM, but it causes issues on omap3 related devices
that actually gate the clocks:

Unhandled fault: external abort on non-linefetch (0x1008)
...
[&lt;c04160f0&gt;] (emac_dev_getnetstats) from [&lt;c04d6a3c&gt;] (dev_get_stats+0x78/0xc8)
[&lt;c04d6a3c&gt;] (dev_get_stats) from [&lt;c04e9ccc&gt;] (rtnl_fill_ifinfo+0x3b8/0x938)
[&lt;c04e9ccc&gt;] (rtnl_fill_ifinfo) from [&lt;c04eade4&gt;] (rtmsg_ifinfo+0x68/0xd8)
[&lt;c04eade4&gt;] (rtmsg_ifinfo) from [&lt;c04dd35c&gt;] (register_netdevice+0x3a0/0x4ec)
[&lt;c04dd35c&gt;] (register_netdevice) from [&lt;c04dd4bc&gt;] (register_netdev+0x14/0x24)
[&lt;c04dd4bc&gt;] (register_netdev) from [&lt;c041755c&gt;] (davinci_emac_probe+0x408/0x5c8)
[&lt;c041755c&gt;] (davinci_emac_probe) from [&lt;c0396d78&gt;] (platform_drv_probe+0x48/0xa4)

Let's fix it by moving the pm_runtime_get() call earlier, and also add it to
the emac_dev_getnetstats(). Also note that we want to use pm_runtime_get_sync()
as we don't want to have deferred_resume happen. And let's also check the
return value for pm_runtime_get_sync() as noted by Felipe Balbi &lt;balbi@ti.com&gt;.

Cc: Brian Hutchinson &lt;b.hutchman@gmail.com&gt;
Acked-by: Mark A. Greer &lt;mgreer@animalcreek.com&gt;
Reviewed-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>net: ethernet: ti: cpdma: correct error handling for chan create</title>
<updated>2018-10-21T07:46:21Z</updated>
<author>
<name>Ivan Khoronzhuk</name>
</author>
<published>2017-12-12T21:06:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=74f27440fb90a4032899796f8978d68265909656'/>
<id>urn:sha1:74f27440fb90a4032899796f8978d68265909656</id>
<content type='text'>
commit 8a83c5d7969b8433584e3cf658a8d76c4dc37f4d upstream.

It's not correct to return NULL when that is actually an error and
function returns errors in any other wrong case. In the same time,
the cpsw driver and davinci emac doesn't check error case while
creating channel and it can miss actual error. Also remove WARNs
replacing them on dev_err msgs.

Signed-off-by: Ivan Khoronzhuk &lt;ivan.khoronzhuk@linaro.org&gt;
Reviewed-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
[bwh: Backported to 3.16:
 - Channel pointers are stored in different fields
 - Adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>net: ti: cpmac: Fix compiler warning due to type confusion</title>
<updated>2017-11-11T13:34:03Z</updated>
<author>
<name>Paul Burton</name>
</author>
<published>2016-09-02T14:22:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=57805a7fca1c2b2b62b38bbbe38b38d85804c16d'/>
<id>urn:sha1:57805a7fca1c2b2b62b38bbbe38b38d85804c16d</id>
<content type='text'>
commit 2f5281ba2a8feaf6f0aee93356f350855bb530fc upstream.

cpmac_start_xmit() used the max() macro on skb-&gt;len (an unsigned int)
and ETH_ZLEN (a signed int literal). This led to the following compiler
warning:

  In file included from include/linux/list.h:8:0,
                   from include/linux/module.h:9,
                   from drivers/net/ethernet/ti/cpmac.c:19:
  drivers/net/ethernet/ti/cpmac.c: In function 'cpmac_start_xmit':
  include/linux/kernel.h:748:17: warning: comparison of distinct pointer
  types lacks a cast
    (void) (&amp;_max1 == &amp;_max2);  \
                   ^
  drivers/net/ethernet/ti/cpmac.c:560:8: note: in expansion of macro 'max'
    len = max(skb-&gt;len, ETH_ZLEN);
          ^

On top of this, it assigned the result of the max() macro to a signed
integer whilst all further uses of it result in it being cast to varying
widths of unsigned integer.

Fix this up by using max_t to ensure the comparison is performed as
unsigned integers, and for consistency change the type of the len
variable to unsigned int.

Signed-off-by: Paul Burton &lt;paul.burton@imgtec.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>cpmac: remove hopeless #warning</title>
<updated>2017-11-11T13:33:52Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2017-01-16T13:20:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9a26891f02499b3eb58e977776b890b7b6bd90b8'/>
<id>urn:sha1:9a26891f02499b3eb58e977776b890b7b6bd90b8</id>
<content type='text'>
commit d43e6fb4ac4abfe4ef7c102833ed02330ad701e0 upstream.

The #warning was present 10 years ago when the driver first got merged.
As the platform is rather obsolete by now, it seems very unlikely that
the warning will cause anyone to fix the code properly.

kernelci.org reports the warning for every build in the meantime, so
I think it's better to just turn it into a code comment to reduce
noise.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>net: ethernet: ti: cpsw: fix secondary-emac probe error path</title>
<updated>2017-02-23T03:54:37Z</updated>
<author>
<name>Johan Hovold</name>
</author>
<published>2016-11-17T16:40:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8b4edf66c48a55fc51b25f20fcafcb9e6b145ab1'/>
<id>urn:sha1:8b4edf66c48a55fc51b25f20fcafcb9e6b145ab1</id>
<content type='text'>
commit a7fe9d466f6a33558a38c7ca9d58bcc83512d577 upstream.

Make sure to deregister the primary device in case the secondary emac
fails to probe.

kernel BUG at /home/johan/work/omicron/src/linux/net/core/dev.c:7743!
...
[&lt;c05b3dec&gt;] (free_netdev) from [&lt;c04fe6c0&gt;] (cpsw_probe+0x9cc/0xe50)
[&lt;c04fe6c0&gt;] (cpsw_probe) from [&lt;c047b28c&gt;] (platform_drv_probe+0x5c/0xc0)

Fixes: d9ba8f9e6298 ("driver: net: ethernet: cpsw: dual emac interface
implementation")
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>net: ethernet: ti: cpsw: fix mdio device reference leak</title>
<updated>2017-02-23T03:54:37Z</updated>
<author>
<name>Johan Hovold</name>
</author>
<published>2016-11-17T16:39:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b19869e3c3eaaa829e18ffed5ce329f0b1fa2e7'/>
<id>urn:sha1:0b19869e3c3eaaa829e18ffed5ce329f0b1fa2e7</id>
<content type='text'>
commit 86e1d5adcef961eb383ce4eacbe0ef22f06e2045 upstream.

Make sure to drop the reference taken by of_find_device_by_node() when
looking up an mdio device from a phy_id property during probe.

Fixes: 549985ee9c72 ("cpsw: simplify the setup of the register
pointers")
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
[bwh: Backported to 3.16: adjust context, indentation]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>net: ethernet: ti: cpsw: fix bad register access in probe error path</title>
<updated>2017-02-23T03:54:37Z</updated>
<author>
<name>Johan Hovold</name>
</author>
<published>2016-11-17T16:39:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b50bf102927b902d44333616544ca13b046dcd68'/>
<id>urn:sha1:b50bf102927b902d44333616544ca13b046dcd68</id>
<content type='text'>
commit c46ab7e08c79be7400f6d59edbc6f26a91941c5a upstream.

Make sure to keep the platform device runtime-resumed throughout probe
to avoid accessing the CPSW registers in the error path (e.g. for
deferred probe) with clocks disabled:

Unhandled fault: external abort on non-linefetch (0x1008) at 0xd0872d08
...
[&lt;c04fabcc&gt;] (cpsw_ale_control_set) from [&lt;c04fb8b4&gt;] (cpsw_ale_destroy+0x2c/0x44)
[&lt;c04fb8b4&gt;] (cpsw_ale_destroy) from [&lt;c04fea58&gt;] (cpsw_probe+0xbd0/0x10c4)
[&lt;c04fea58&gt;] (cpsw_probe) from [&lt;c047b2a0&gt;] (platform_drv_probe+0x5c/0xc0)

Fixes: df828598a755 ("netdev: driver: ethernet: Add TI CPSW driver")
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
[bwh: Backported to 3.16:
 - s/cpsw-&gt;/priv-&gt;/g
 - Adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
</feed>
