<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/net/phy/marvell.c, branch v4.9.15</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Marvell phy: add functions to suspend and resume both interfaces: fiber and copper links.</title>
<updated>2016-07-19T23:05:56+00:00</updated>
<author>
<name>Charles-Antoine Couret</name>
<email>charles-antoine.couret@nexvision.fr</email>
</author>
<published>2016-07-19T09:13:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3758be3dc162b56eaafaa914b98845f914106ef2'/>
<id>3758be3dc162b56eaafaa914b98845f914106ef2</id>
<content type='text'>
These functions used standards registers in a different page
for both interfaces: copper and fiber.

Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Charles-Antoine Couret &lt;charles-antoine.couret@nexvision.fr&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>
These functions used standards registers in a different page
for both interfaces: copper and fiber.

Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Charles-Antoine Couret &lt;charles-antoine.couret@nexvision.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Marvell phy: add configuration of autonegociation for fiber link.</title>
<updated>2016-07-19T23:05:56+00:00</updated>
<author>
<name>Charles-Antoine Couret</name>
<email>charles-antoine.couret@nexvision.fr</email>
</author>
<published>2016-07-19T09:13:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=78301ebe9b5a2645d05aa7f791d068b727e7500f'/>
<id>78301ebe9b5a2645d05aa7f791d068b727e7500f</id>
<content type='text'>
To be correctly initilized, the fiber interface needs
to be configured via autonegociation registers which use
some customs options or registers.

Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Charles-Antoine Couret &lt;charles-antoine.couret@nexvision.fr&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>
To be correctly initilized, the fiber interface needs
to be configured via autonegociation registers which use
some customs options or registers.

Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Charles-Antoine Couret &lt;charles-antoine.couret@nexvision.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Marvell phy: add field to get errors from fiber link.</title>
<updated>2016-07-19T23:05:56+00:00</updated>
<author>
<name>Charles-Antoine Couret</name>
<email>charles-antoine.couret@nexvision.fr</email>
</author>
<published>2016-07-19T09:13:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2170fef78a400ca3c891da5db73db5e70388aba7'/>
<id>2170fef78a400ca3c891da5db73db5e70388aba7</id>
<content type='text'>
Add support for the fiber receiver error counter in the
statistics. Rename the current counter which is for copper errors to
phy_receive_errors_copper, so it is easy to distinguish copper from
fiber.

Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Charles-Antoine Couret &lt;charles-antoine.couret@nexvision.fr&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>
Add support for the fiber receiver error counter in the
statistics. Rename the current counter which is for copper errors to
phy_receive_errors_copper, so it is easy to distinguish copper from
fiber.

Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Charles-Antoine Couret &lt;charles-antoine.couret@nexvision.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Marvell phy: check link status in case of fiber link.</title>
<updated>2016-07-19T23:05:56+00:00</updated>
<author>
<name>Charles-Antoine Couret</name>
<email>charles-antoine.couret@nexvision.fr</email>
</author>
<published>2016-07-19T09:13:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6cfb3bcc0641109951a124019cd2e0623107d18d'/>
<id>6cfb3bcc0641109951a124019cd2e0623107d18d</id>
<content type='text'>
For concerned phy, the fiber link is checked before the copper link.
According to datasheet, the link which is up is enabled.

If both links are down, copper link would be used.
To detect fiber link status, we used the real time status
because of troubles with the copper method.

Tested with Marvell 88E1512.

Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Charles-Antoine Couret &lt;charles-antoine.couret@nexvision.fr&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>
For concerned phy, the fiber link is checked before the copper link.
According to datasheet, the link which is up is enabled.

If both links are down, copper link would be used.
To detect fiber link status, we used the real time status
because of troubles with the copper method.

Tested with Marvell 88E1512.

Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Charles-Antoine Couret &lt;charles-antoine.couret@nexvision.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: marvell: Add separate config ANEG function for Marvell 88E1111</title>
<updated>2016-06-29T08:07:36+00:00</updated>
<author>
<name>Harini Katakam</name>
<email>harini.katakam@xilinx.com</email>
</author>
<published>2016-06-27T07:39:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3ec0a0f10ceb77c78f540ded1d13bf0cf7f89a07'/>
<id>3ec0a0f10ceb77c78f540ded1d13bf0cf7f89a07</id>
<content type='text'>
Marvell 88E1111 currently uses the generic marvell config ANEG function.
This function has a sequence accessing Page 5 and Register 31,
both of which are not defined or reserved for this PHY.
Hence this patch adds a new config ANEG function for Marvell 88E1111
without these erroneous accesses.

Signed-off-by: Harini Katakam &lt;harinik@xilinx.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>
Marvell 88E1111 currently uses the generic marvell config ANEG function.
This function has a sequence accessing Page 5 and Register 31,
both of which are not defined or reserved for this PHY.
Hence this patch adds a new config ANEG function for Marvell 88E1111
without these erroneous accesses.

Signed-off-by: Harini Katakam &lt;harinik@xilinx.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>phy: marvell: fix LED configuration via marvell,reg-init</title>
<updated>2016-06-14T19:23:03+00:00</updated>
<author>
<name>Clemens Gruber</name>
<email>clemens.gruber@pqgruber.com</email>
</author>
<published>2016-06-11T15:21:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fdecf36fcefa9f48c2f2de21c8176f1a8ce2c960'/>
<id>fdecf36fcefa9f48c2f2de21c8176f1a8ce2c960</id>
<content type='text'>
Configuring the PHY LED registers for the Marvell 88E1510 and others is
not possible, because regardless of the values in marvell,reg-init, it
is later overridden in m88e1121_config_aneg with a non-standard default.

This patch moves that default configuration to .config_init to allow
setting the LED configuration through marvell,reg-init in the device
tree, which should override said default if it exists.

Signed-off-by: Clemens Gruber &lt;clemens.gruber@pqgruber.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&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>
Configuring the PHY LED registers for the Marvell 88E1510 and others is
not possible, because regardless of the values in marvell,reg-init, it
is later overridden in m88e1121_config_aneg with a non-standard default.

This patch moves that default configuration to .config_init to allow
setting the LED configuration through marvell,reg-init in the device
tree, which should override said default if it exists.

Signed-off-by: Clemens Gruber &lt;clemens.gruber@pqgruber.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>phy: marvell: Fix 88E1510 initialization</title>
<updated>2016-02-25T21:08:37+00:00</updated>
<author>
<name>Clemens Gruber</name>
<email>clemens.gruber@pqgruber.com</email>
</author>
<published>2016-02-23T19:16:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=407353ec85ccc775ce342a6c5a1202f34ed827cc'/>
<id>407353ec85ccc775ce342a6c5a1202f34ed827cc</id>
<content type='text'>
A bug was introduced in the merge commit b633353115e3 ("Merge
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")
The generic marvell_config_init (and therefore marvell_of_reg_init) is
not called anymore for the Marvell 88E1510 (in net-next).

This patch calls marvell_config_init and moves the specific init
function for the 88E1510 below the marvell_config_init function to avoid
adding a function predeclaration.

Signed-off-by: Clemens Gruber &lt;clemens.gruber@pqgruber.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>
A bug was introduced in the merge commit b633353115e3 ("Merge
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net")
The generic marvell_config_init (and therefore marvell_of_reg_init) is
not called anymore for the Marvell 88E1510 (in net-next).

This patch calls marvell_config_init and moves the specific init
function for the 88E1510 below the marvell_config_init function to avoid
adding a function predeclaration.

Signed-off-by: Clemens Gruber &lt;clemens.gruber@pqgruber.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2016-02-23T05:09:14+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2016-02-23T05:09:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b633353115e352d3c31c12d4c61978c810f05ea1'/>
<id>b633353115e352d3c31c12d4c61978c810f05ea1</id>
<content type='text'>
Conflicts:
	drivers/net/phy/bcm7xxx.c
	drivers/net/phy/marvell.c
	drivers/net/vxlan.c

All three conflicts were cases of simple overlapping changes.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/net/phy/bcm7xxx.c
	drivers/net/phy/marvell.c
	drivers/net/vxlan.c

All three conflicts were cases of simple overlapping changes.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>phy: marvell/micrel: Fix Unpossible condition</title>
<updated>2016-02-20T04:41:37+00:00</updated>
<author>
<name>Andrew Lunn</name>
<email>andrew@lunn.ch</email>
</author>
<published>2016-02-19T23:35:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=321b4d4bd12f90e7497c9ab057aafcc2649aa902'/>
<id>321b4d4bd12f90e7497c9ab057aafcc2649aa902</id>
<content type='text'>
commit 2b2427d06426 ("phy: micrel: Add ethtool statistics counters")
from Dec 30, 2015, leads to the following static checker
warning:

        drivers/net/phy/micrel.c:609 kszphy_get_stat()
        warn: unsigned 'val' is never less than zero.

drivers/net/phy/micrel.c
   602  static u64 kszphy_get_stat(struct phy_device *phydev, int i)
   603  {
   604          struct kszphy_hw_stat stat = kszphy_hw_stats[i];
   605          struct kszphy_priv *priv = phydev-&gt;priv;
   606          u64 val;
   607
   608          val = phy_read(phydev, stat.reg);
   609          if (val &lt; 0) {
                    ^^^^^^^
Unpossible!

   610                  val = UINT64_MAX;
   611          } else {
   612                  val = val &amp; ((1 &lt;&lt; stat.bits) - 1);
   613                  priv-&gt;stats[i] += val;
   614                  val = priv-&gt;stats[i];
   615          }
   616
   617          return val;
   618  }

The same problem exists in the Marvell driver. Fix both.

Fixes: 2b2427d06426 ("phy: micrel: Add ethtool statistics counters")
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reported-by: Julia.Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Andrew Lunn &lt;andrew@lunn.ch&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>
commit 2b2427d06426 ("phy: micrel: Add ethtool statistics counters")
from Dec 30, 2015, leads to the following static checker
warning:

        drivers/net/phy/micrel.c:609 kszphy_get_stat()
        warn: unsigned 'val' is never less than zero.

drivers/net/phy/micrel.c
   602  static u64 kszphy_get_stat(struct phy_device *phydev, int i)
   603  {
   604          struct kszphy_hw_stat stat = kszphy_hw_stats[i];
   605          struct kszphy_priv *priv = phydev-&gt;priv;
   606          u64 val;
   607
   608          val = phy_read(phydev, stat.reg);
   609          if (val &lt; 0) {
                    ^^^^^^^
Unpossible!

   610                  val = UINT64_MAX;
   611          } else {
   612                  val = val &amp; ((1 &lt;&lt; stat.bits) - 1);
   613                  priv-&gt;stats[i] += val;
   614                  val = priv-&gt;stats[i];
   615          }
   616
   617          return val;
   618  }

The same problem exists in the Marvell driver. Fix both.

Fixes: 2b2427d06426 ("phy: micrel: Add ethtool statistics counters")
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reported-by: Julia.Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: phy: Add SGMII support for Marvell 88E1510/1512/1514/1518</title>
<updated>2016-02-18T16:13:12+00:00</updated>
<author>
<name>Stefan Roese</name>
<email>sr@denx.de</email>
</author>
<published>2016-02-18T09:59:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=930b37ee8d84e1f3008c89e9ce09acbe1a6b5670'/>
<id>930b37ee8d84e1f3008c89e9ce09acbe1a6b5670</id>
<content type='text'>
Add code to select SGMII-to-copper mode upon SGMII interface selection.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&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>
Add code to select SGMII-to-copper mode upon SGMII interface selection.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
