<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/drivers/net/pcs, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=master</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2024-10-23T14:10:16Z</updated>
<entry>
<title>net: pcs: xpcs: remove return statements in void function</title>
<updated>2024-10-23T14:10:16Z</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2024-10-17T11:53:10Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=fd4056db7aee901677a3c62534b2d31b38678cb4'/>
<id>urn:sha1:fd4056db7aee901677a3c62534b2d31b38678cb4</id>
<content type='text'>
While using "return" when calling a void returning function inside a
function that returns void doesn't cause a compiler warning, it looks
weird. Convert the bunch of if() statements to a switch() and remove
these return statements.

Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Tested-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: pcs: xpcs: rename xpcs_config_usxgmii()</title>
<updated>2024-10-23T14:10:16Z</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2024-10-17T11:53:05Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=11afdf3b2ecee038dda8a38b6b6e6d232e64a210'/>
<id>urn:sha1:11afdf3b2ecee038dda8a38b6b6e6d232e64a210</id>
<content type='text'>
xpcs_config_usxgmii() is only called from the xpcs_link_up() method, so
let's name it similarly to the SGMII and 1000BASEX functions.

Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Tested-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: pcs: xpcs: combine xpcs_link_up_{1000basex,sgmii}()</title>
<updated>2024-10-23T14:10:16Z</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2024-10-17T11:52:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=4145921c305545cf86d49c0dd665084fb7245225'/>
<id>urn:sha1:4145921c305545cf86d49c0dd665084fb7245225</id>
<content type='text'>
xpcs_link_up_sgmii() and xpcs_link_up_1000basex() are almost identical
with the exception of checking the speed and duplex for 1000BASE-X.
Combine the two functions.

Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Tested-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: pcs: xpcs: replace open-coded mii_bmcr_encode_fixed()</title>
<updated>2024-10-23T14:10:16Z</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2024-10-17T11:52:54Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=1c17f9d3fe17d296ff2d93740ee96a52a2343628'/>
<id>urn:sha1:1c17f9d3fe17d296ff2d93740ee96a52a2343628</id>
<content type='text'>
We can now see that we have an open-coded version of
mii_bmcr_encode_fixed() when this is called with SPEED_1000:

        val = BMCR_SPEED1000;
        if (duplex == DUPLEX_FULL)
                val |= BMCR_FULLDPLX;

Replace this with a call to mii_bmcr_encode_fixed().

Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Tested-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: pcs: xpcs: rearrange xpcs_link_up_1000basex()</title>
<updated>2024-10-23T14:10:16Z</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2024-10-17T11:52:49Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=b61a465a761921d11f99492ce41b85cfba7d6161'/>
<id>urn:sha1:b61a465a761921d11f99492ce41b85cfba7d6161</id>
<content type='text'>
Rearrange xpcs_link_up_1000basex() to make it more obvious what will
happen in the following commit.

Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Tested-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: pcs: xpcs: remove switch() in xpcs_link_up_1000basex()</title>
<updated>2024-10-23T14:10:16Z</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2024-10-17T11:52:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=8d2aeab4ce782df9d7cd035938f4545af7db260e'/>
<id>urn:sha1:8d2aeab4ce782df9d7cd035938f4545af7db260e</id>
<content type='text'>
Remove an unnecessary switch() statement in xpcs_link_up_1000basex().
The only value this switch statement is interested in is SPEED_1000,
all other values lead to an error. Replace this with a simple if()
statement.

Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Tested-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: pcs: xpcs: use generic register definitions</title>
<updated>2024-10-23T14:10:16Z</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2024-10-17T11:52:39Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=1d2709d6d3902786bfc3e9ede627e7364633cff7'/>
<id>urn:sha1:1d2709d6d3902786bfc3e9ede627e7364633cff7</id>
<content type='text'>
As a general policy, we refer our generic register definitions over
vendor specific definitions. In XPCS, it appears that the register
layout follows a BMCR, BMSR and ADVERTISE register definition. We
already refer to this BMCR register using several different macros
which is confusing.

Convert the following register definitions to generic versions:

DW_VR_MII_MMD_CTRL =&gt; MII_BMCR
MDIO_CTRL1 =&gt; MII_BMCR
AN_CL37_EN =&gt; BMCR_ANENABLE
SGMII_SPEED_SS6 =&gt; BMCR_SPEED1000
SGMII_SPEED_SS13 =&gt; BMCR_SPEED100
MDIO_CTRL1_RESET =&gt; BMCR_RESET

DW_VR_MII_MMD_STS =&gt; MII_BMSR
DW_VR_MII_MMD_STS_LINK_STS =&gt; BMSR_LSTATUS

DW_FULL_DUPLEX =&gt; ADVERTISE_1000XFULL
iDW_HALF_DUPLEX =&gt; ADVERTISE_1000XHALF

Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Tested-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>net: pcs: xpcs: move Wangxun VR_XS_PCS_DIG_CTRL1 configuration</title>
<updated>2024-10-09T11:13:12Z</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2024-10-04T10:21:42Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=bb0b8aeca636373a9136a7a5b7594031c7587c5e'/>
<id>urn:sha1:bb0b8aeca636373a9136a7a5b7594031c7587c5e</id>
<content type='text'>
According to commits 2a22b7ae2fa3 ("net: pcs: xpcs: adapt Wangxun NICs
for SGMII mode") and 2deea43f386d ("net: pcs: xpcs: add 1000BASE-X AN
interrupt support"), Wangxun devices need special VR_XS_PCS_DIG_CTRL1
settings for SGMII and 1000BASE-X. Both SGMII and 1000BASE-X use the
same settings.

Rather than placing these in the individual xpcs_config_*() functions,
move it to where we already test for the Wangxun devices in
xpcs_do_config().

Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: pcs: xpcs: correctly place DW_VR_MII_DIG_CTRL1_2G5_EN</title>
<updated>2024-10-09T11:13:11Z</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2024-10-04T10:21:37Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=5ba5619303902ff796c1568cf3b8ad65de288bb5'/>
<id>urn:sha1:5ba5619303902ff796c1568cf3b8ad65de288bb5</id>
<content type='text'>
Place DW_VR_MII_DIG_CTRL1_2G5_EN with the other DW_VR_MII_DIG_CTRL1
definitions rather than in the middle of a register list.

Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: pcs: xpcs: use dev_*() to print messages</title>
<updated>2024-10-09T11:13:11Z</updated>
<author>
<name>Russell King (Oracle)</name>
<email>rmk+kernel@armlinux.org.uk</email>
</author>
<published>2024-10-04T10:21:32Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=acb5fb5a42cff09eb073582ef7e15273fe318a25'/>
<id>urn:sha1:acb5fb5a42cff09eb073582ef7e15273fe318a25</id>
<content type='text'>
Use the dev_*() family of functions to print all messages from the XPCS
driver so we know which instance issues the messages.

Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
