[SRU,Cosmic,Bionic] ][PATCH 1/1] s390/qeth: report 25Gbit link speed
diff mbox series

Message ID 1552936068-22906-2-git-send-email-frank.heimes@canonical.com
State New
Headers show
Series
  • [SRU,Cosmic,Bionic] ][PATCH 1/1] s390/qeth: report 25Gbit link speed
Related show

Commit Message

Frank Heimes March 18, 2019, 7:07 p.m. UTC
From: Julian Wiedmann <jwi@linux.ibm.com>

BugLink: https://bugs.launchpad.net/bugs/1814892

s390/qeth: report 25Gbit link speed

This adds the various identifiers for 25Gbit cards, and wires them up
into sysfs and ethtool.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 54e049c227d9968ff6a7d80aae5fec27b54d39da)
Signed-off-by: Frank Heimes <frank.heimes@canonical.com>
---
 drivers/s390/net/qeth_core_main.c | 20 ++++++++++++++++++--
 drivers/s390/net/qeth_core_mpc.h  |  2 ++
 2 files changed, 20 insertions(+), 2 deletions(-)

Comments

Stefan Bader March 27, 2019, 10:22 a.m. UTC | #1
On 18.03.19 20:07, frank.heimes@canonical.com wrote:
> From: Julian Wiedmann <jwi@linux.ibm.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1814892
> 
> s390/qeth: report 25Gbit link speed
> 
> This adds the various identifiers for 25Gbit cards, and wires them up
> into sysfs and ethtool.
> 
> Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> (cherry picked from commit 54e049c227d9968ff6a7d80aae5fec27b54d39da)
> Signed-off-by: Frank Heimes <frank.heimes@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
> ---

My stance to feature backports is known. At least its rather small and falls
into the add some IDs bucket. Just a note that in some cases of adding new link
speeds ethtool needed some adjustments, too.

-Stefan

>  drivers/s390/net/qeth_core_main.c | 20 ++++++++++++++++++--
>  drivers/s390/net/qeth_core_mpc.h  |  2 ++
>  2 files changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
> index 0a7500b..c4ccf7b 100644
> --- a/drivers/s390/net/qeth_core_main.c
> +++ b/drivers/s390/net/qeth_core_main.c
> @@ -167,6 +167,8 @@ const char *qeth_get_cardname_short(struct qeth_card *card)
>  				return "OSD_1000";
>  			case QETH_LINK_TYPE_10GBIT_ETH:
>  				return "OSD_10GIG";
> +			case QETH_LINK_TYPE_25GBIT_ETH:
> +				return "OSD_25GIG";
>  			case QETH_LINK_TYPE_LANE_ETH100:
>  				return "OSD_FE_LANE";
>  			case QETH_LINK_TYPE_LANE_TR:
> @@ -4471,7 +4473,8 @@ static int qeth_mdio_read(struct net_device *dev, int phy_id, int regnum)
>  		rc = BMCR_FULLDPLX;
>  		if ((card->info.link_type != QETH_LINK_TYPE_GBIT_ETH) &&
>  		    (card->info.link_type != QETH_LINK_TYPE_OSN) &&
> -		    (card->info.link_type != QETH_LINK_TYPE_10GBIT_ETH))
> +		    (card->info.link_type != QETH_LINK_TYPE_10GBIT_ETH) &&
> +		    (card->info.link_type != QETH_LINK_TYPE_25GBIT_ETH))
>  			rc |= BMCR_SPEED100;
>  		break;
>  	case MII_BMSR: /* Basic mode status register */
> @@ -6138,8 +6141,14 @@ static void qeth_set_cmd_adv_sup(struct ethtool_link_ksettings *cmd,
>  		WARN_ON_ONCE(1);
>  	}
>  
> -	/* fallthrough from high to low, to select all legal speeds: */
> +	/* partially does fall through, to also select lower speeds */
>  	switch (maxspeed) {
> +	case SPEED_25000:
> +		ethtool_link_ksettings_add_link_mode(cmd, supported,
> +						     25000baseSR_Full);
> +		ethtool_link_ksettings_add_link_mode(cmd, advertising,
> +						     25000baseSR_Full);
> +		break;
>  	case SPEED_10000:
>  		ethtool_link_ksettings_add_link_mode(cmd, supported,
>  						     10000baseT_Full);
> @@ -6222,6 +6231,10 @@ int qeth_core_ethtool_get_link_ksettings(struct net_device *netdev,
>  		cmd->base.speed = SPEED_10000;
>  		cmd->base.port = PORT_FIBRE;
>  		break;
> +	case QETH_LINK_TYPE_25GBIT_ETH:
> +		cmd->base.speed = SPEED_25000;
> +		cmd->base.port = PORT_FIBRE;
> +		break;
>  	default:
>  		cmd->base.speed = SPEED_10;
>  		cmd->base.port = PORT_TP;
> @@ -6288,6 +6301,9 @@ int qeth_core_ethtool_get_link_ksettings(struct net_device *netdev,
>  	case CARD_INFO_PORTS_10G:
>  		cmd->base.speed = SPEED_10000;
>  		break;
> +	case CARD_INFO_PORTS_25G:
> +		cmd->base.speed = SPEED_25000;
> +		break;
>  	}
>  
>  	return 0;
> diff --git a/drivers/s390/net/qeth_core_mpc.h b/drivers/s390/net/qeth_core_mpc.h
> index 96d566a..c1f1003 100644
> --- a/drivers/s390/net/qeth_core_mpc.h
> +++ b/drivers/s390/net/qeth_core_mpc.h
> @@ -72,6 +72,7 @@ enum qeth_link_types {
>  	QETH_LINK_TYPE_GBIT_ETH     = 0x03,
>  	QETH_LINK_TYPE_OSN          = 0x04,
>  	QETH_LINK_TYPE_10GBIT_ETH   = 0x10,
> +	QETH_LINK_TYPE_25GBIT_ETH   = 0x12,
>  	QETH_LINK_TYPE_LANE_ETH100  = 0x81,
>  	QETH_LINK_TYPE_LANE_TR      = 0x82,
>  	QETH_LINK_TYPE_LANE_ETH1000 = 0x83,
> @@ -329,6 +330,7 @@ enum qeth_card_info_port_speed {
>  	CARD_INFO_PORTS_100M		= 0x00000006,
>  	CARD_INFO_PORTS_1G		= 0x00000007,
>  	CARD_INFO_PORTS_10G		= 0x00000008,
> +	CARD_INFO_PORTS_25G		= 0x0000000A,
>  };
>  
>  /* (SET)DELIP(M) IPA stuff ***************************************************/
>
Kleber Souza March 29, 2019, 11:08 a.m. UTC | #2
On 3/18/19 8:07 PM, frank.heimes@canonical.com wrote:
> From: Julian Wiedmann <jwi@linux.ibm.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1814892
> 
> s390/qeth: report 25Gbit link speed

Hi Frank,

The above line with the duplicated subject is also not needed.

I will amend the commit in our repo to fix it.


Thanks,
Kleber

> 
> This adds the various identifiers for 25Gbit cards, and wires them up
> into sysfs and ethtool.
> 
> Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> (cherry picked from commit 54e049c227d9968ff6a7d80aae5fec27b54d39da)
> Signed-off-by: Frank Heimes <frank.heimes@canonical.com>
> ---
>  drivers/s390/net/qeth_core_main.c | 20 ++++++++++++++++++--
>  drivers/s390/net/qeth_core_mpc.h  |  2 ++
>  2 files changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
> index 0a7500b..c4ccf7b 100644
> --- a/drivers/s390/net/qeth_core_main.c
> +++ b/drivers/s390/net/qeth_core_main.c
> @@ -167,6 +167,8 @@ const char *qeth_get_cardname_short(struct qeth_card *card)
>  				return "OSD_1000";
>  			case QETH_LINK_TYPE_10GBIT_ETH:
>  				return "OSD_10GIG";
> +			case QETH_LINK_TYPE_25GBIT_ETH:
> +				return "OSD_25GIG";
>  			case QETH_LINK_TYPE_LANE_ETH100:
>  				return "OSD_FE_LANE";
>  			case QETH_LINK_TYPE_LANE_TR:
> @@ -4471,7 +4473,8 @@ static int qeth_mdio_read(struct net_device *dev, int phy_id, int regnum)
>  		rc = BMCR_FULLDPLX;
>  		if ((card->info.link_type != QETH_LINK_TYPE_GBIT_ETH) &&
>  		    (card->info.link_type != QETH_LINK_TYPE_OSN) &&
> -		    (card->info.link_type != QETH_LINK_TYPE_10GBIT_ETH))
> +		    (card->info.link_type != QETH_LINK_TYPE_10GBIT_ETH) &&
> +		    (card->info.link_type != QETH_LINK_TYPE_25GBIT_ETH))
>  			rc |= BMCR_SPEED100;
>  		break;
>  	case MII_BMSR: /* Basic mode status register */
> @@ -6138,8 +6141,14 @@ static void qeth_set_cmd_adv_sup(struct ethtool_link_ksettings *cmd,
>  		WARN_ON_ONCE(1);
>  	}
>  
> -	/* fallthrough from high to low, to select all legal speeds: */
> +	/* partially does fall through, to also select lower speeds */
>  	switch (maxspeed) {
> +	case SPEED_25000:
> +		ethtool_link_ksettings_add_link_mode(cmd, supported,
> +						     25000baseSR_Full);
> +		ethtool_link_ksettings_add_link_mode(cmd, advertising,
> +						     25000baseSR_Full);
> +		break;
>  	case SPEED_10000:
>  		ethtool_link_ksettings_add_link_mode(cmd, supported,
>  						     10000baseT_Full);
> @@ -6222,6 +6231,10 @@ int qeth_core_ethtool_get_link_ksettings(struct net_device *netdev,
>  		cmd->base.speed = SPEED_10000;
>  		cmd->base.port = PORT_FIBRE;
>  		break;
> +	case QETH_LINK_TYPE_25GBIT_ETH:
> +		cmd->base.speed = SPEED_25000;
> +		cmd->base.port = PORT_FIBRE;
> +		break;
>  	default:
>  		cmd->base.speed = SPEED_10;
>  		cmd->base.port = PORT_TP;
> @@ -6288,6 +6301,9 @@ int qeth_core_ethtool_get_link_ksettings(struct net_device *netdev,
>  	case CARD_INFO_PORTS_10G:
>  		cmd->base.speed = SPEED_10000;
>  		break;
> +	case CARD_INFO_PORTS_25G:
> +		cmd->base.speed = SPEED_25000;
> +		break;
>  	}
>  
>  	return 0;
> diff --git a/drivers/s390/net/qeth_core_mpc.h b/drivers/s390/net/qeth_core_mpc.h
> index 96d566a..c1f1003 100644
> --- a/drivers/s390/net/qeth_core_mpc.h
> +++ b/drivers/s390/net/qeth_core_mpc.h
> @@ -72,6 +72,7 @@ enum qeth_link_types {
>  	QETH_LINK_TYPE_GBIT_ETH     = 0x03,
>  	QETH_LINK_TYPE_OSN          = 0x04,
>  	QETH_LINK_TYPE_10GBIT_ETH   = 0x10,
> +	QETH_LINK_TYPE_25GBIT_ETH   = 0x12,
>  	QETH_LINK_TYPE_LANE_ETH100  = 0x81,
>  	QETH_LINK_TYPE_LANE_TR      = 0x82,
>  	QETH_LINK_TYPE_LANE_ETH1000 = 0x83,
> @@ -329,6 +330,7 @@ enum qeth_card_info_port_speed {
>  	CARD_INFO_PORTS_100M		= 0x00000006,
>  	CARD_INFO_PORTS_1G		= 0x00000007,
>  	CARD_INFO_PORTS_10G		= 0x00000008,
> +	CARD_INFO_PORTS_25G		= 0x0000000A,
>  };
>  
>  /* (SET)DELIP(M) IPA stuff ***************************************************/
>
Frank Heimes March 29, 2019, 11:39 a.m. UTC | #3
Hi Kleber,
since I'm only submitting kernel SRU requests once in a while I usually do
a terminal log (and maintain a cheat sheet) and found that I once had the
"From:" line in (like I had here as well:
https://lists.ubuntu.com/archives/kernel-team/2019-March/099330.html).
Guess I messed it up when doing the git send-email (with several option) -
I made a note in my kernel SRU cheat sheet on that to not miss it anymore.

Regarding the patch/commit headline "s390/qeth: report 25Gbit link speed"
in the body - iirc it was automatically added to the body and I just
thought it wouldn't harm to leave it there.
Now understanding that it really harms the kernel SRU flow it won't be
there next time (adding another note to my cheat sheet).

Sorry for the inconvenience and thx for adjusting the requests and
supporting me to improve them next time ...

Thx, Frank


On Fri, Mar 29, 2019 at 12:08 PM Kleber Souza <kleber.souza@canonical.com>
wrote:

> On 3/18/19 8:07 PM, frank.heimes@canonical.com wrote:
> > From: Julian Wiedmann <jwi@linux.ibm.com>
> >
> > BugLink: https://bugs.launchpad.net/bugs/1814892
> >
> > s390/qeth: report 25Gbit link speed
>
> Hi Frank,
>
> The above line with the duplicated subject is also not needed.
>
> I will amend the commit in our repo to fix it.
>
>
> Thanks,
> Kleber
>
> >
> > This adds the various identifiers for 25Gbit cards, and wires them up
> > into sysfs and ethtool.
> >
> > Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
> > Signed-off-by: David S. Miller <davem@davemloft.net>
> > (cherry picked from commit 54e049c227d9968ff6a7d80aae5fec27b54d39da)
> > Signed-off-by: Frank Heimes <frank.heimes@canonical.com>
> > ---
> >  drivers/s390/net/qeth_core_main.c | 20 ++++++++++++++++++--
> >  drivers/s390/net/qeth_core_mpc.h  |  2 ++
> >  2 files changed, 20 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/s390/net/qeth_core_main.c
> b/drivers/s390/net/qeth_core_main.c
> > index 0a7500b..c4ccf7b 100644
> > --- a/drivers/s390/net/qeth_core_main.c
> > +++ b/drivers/s390/net/qeth_core_main.c
> > @@ -167,6 +167,8 @@ const char *qeth_get_cardname_short(struct qeth_card
> *card)
> >                               return "OSD_1000";
> >                       case QETH_LINK_TYPE_10GBIT_ETH:
> >                               return "OSD_10GIG";
> > +                     case QETH_LINK_TYPE_25GBIT_ETH:
> > +                             return "OSD_25GIG";
> >                       case QETH_LINK_TYPE_LANE_ETH100:
> >                               return "OSD_FE_LANE";
> >                       case QETH_LINK_TYPE_LANE_TR:
> > @@ -4471,7 +4473,8 @@ static int qeth_mdio_read(struct net_device *dev,
> int phy_id, int regnum)
> >               rc = BMCR_FULLDPLX;
> >               if ((card->info.link_type != QETH_LINK_TYPE_GBIT_ETH) &&
> >                   (card->info.link_type != QETH_LINK_TYPE_OSN) &&
> > -                 (card->info.link_type != QETH_LINK_TYPE_10GBIT_ETH))
> > +                 (card->info.link_type != QETH_LINK_TYPE_10GBIT_ETH) &&
> > +                 (card->info.link_type != QETH_LINK_TYPE_25GBIT_ETH))
> >                       rc |= BMCR_SPEED100;
> >               break;
> >       case MII_BMSR: /* Basic mode status register */
> > @@ -6138,8 +6141,14 @@ static void qeth_set_cmd_adv_sup(struct
> ethtool_link_ksettings *cmd,
> >               WARN_ON_ONCE(1);
> >       }
> >
> > -     /* fallthrough from high to low, to select all legal speeds: */
> > +     /* partially does fall through, to also select lower speeds */
> >       switch (maxspeed) {
> > +     case SPEED_25000:
> > +             ethtool_link_ksettings_add_link_mode(cmd, supported,
> > +                                                  25000baseSR_Full);
> > +             ethtool_link_ksettings_add_link_mode(cmd, advertising,
> > +                                                  25000baseSR_Full);
> > +             break;
> >       case SPEED_10000:
> >               ethtool_link_ksettings_add_link_mode(cmd, supported,
> >                                                    10000baseT_Full);
> > @@ -6222,6 +6231,10 @@ int qeth_core_ethtool_get_link_ksettings(struct
> net_device *netdev,
> >               cmd->base.speed = SPEED_10000;
> >               cmd->base.port = PORT_FIBRE;
> >               break;
> > +     case QETH_LINK_TYPE_25GBIT_ETH:
> > +             cmd->base.speed = SPEED_25000;
> > +             cmd->base.port = PORT_FIBRE;
> > +             break;
> >       default:
> >               cmd->base.speed = SPEED_10;
> >               cmd->base.port = PORT_TP;
> > @@ -6288,6 +6301,9 @@ int qeth_core_ethtool_get_link_ksettings(struct
> net_device *netdev,
> >       case CARD_INFO_PORTS_10G:
> >               cmd->base.speed = SPEED_10000;
> >               break;
> > +     case CARD_INFO_PORTS_25G:
> > +             cmd->base.speed = SPEED_25000;
> > +             break;
> >       }
> >
> >       return 0;
> > diff --git a/drivers/s390/net/qeth_core_mpc.h
> b/drivers/s390/net/qeth_core_mpc.h
> > index 96d566a..c1f1003 100644
> > --- a/drivers/s390/net/qeth_core_mpc.h
> > +++ b/drivers/s390/net/qeth_core_mpc.h
> > @@ -72,6 +72,7 @@ enum qeth_link_types {
> >       QETH_LINK_TYPE_GBIT_ETH     = 0x03,
> >       QETH_LINK_TYPE_OSN          = 0x04,
> >       QETH_LINK_TYPE_10GBIT_ETH   = 0x10,
> > +     QETH_LINK_TYPE_25GBIT_ETH   = 0x12,
> >       QETH_LINK_TYPE_LANE_ETH100  = 0x81,
> >       QETH_LINK_TYPE_LANE_TR      = 0x82,
> >       QETH_LINK_TYPE_LANE_ETH1000 = 0x83,
> > @@ -329,6 +330,7 @@ enum qeth_card_info_port_speed {
> >       CARD_INFO_PORTS_100M            = 0x00000006,
> >       CARD_INFO_PORTS_1G              = 0x00000007,
> >       CARD_INFO_PORTS_10G             = 0x00000008,
> > +     CARD_INFO_PORTS_25G             = 0x0000000A,
> >  };
> >
> >  /* (SET)DELIP(M) IPA stuff
> ***************************************************/
> >
>
>
<div dir="ltr"><div dir="ltr"><div><div dir="ltr" class="m_7250530274998505798gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi Kleber,</div><div>since I&#39;m only submitting kernel SRU requests once in a while I usually do a terminal log (and maintain a cheat sheet) and found that I once had the &quot;From:&quot; line in (like I had here as well: <a href="https://lists.ubuntu.com/archives/kernel-team/2019-March/099330.html" target="_blank">https://lists.ubuntu.com/archives/kernel-team/2019-March/099330.html</a>).</div><div>Guess I messed it up when doing the git send-email (with several option) - I made a note in my kernel SRU cheat sheet on that to not miss it anymore.</div><div><br></div><div>Regarding the patch/commit headline &quot;s390/qeth: report 25Gbit link speed&quot; in the body - iirc it was automatically added to the body and I just thought it wouldn&#39;t harm to leave it there.</div><div>Now understanding that it really harms the kernel SRU flow it won&#39;t be there next time (adding another note to my cheat sheet).</div><div><br></div><div>Sorry for the inconvenience and thx for adjusting the requests and supporting me to improve them next time ...</div><div><br></div><div>Thx, Frank </div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 29, 2019 at 12:08 PM Kleber Souza &lt;<a href="mailto:kleber.souza@canonical.com" target="_blank">kleber.souza@canonical.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 3/18/19 8:07 PM, <a href="mailto:frank.heimes@canonical.com" target="_blank">frank.heimes@canonical.com</a> wrote:<br>
&gt; From: Julian Wiedmann &lt;<a href="mailto:jwi@linux.ibm.com" target="_blank">jwi@linux.ibm.com</a>&gt;<br>
&gt; <br>
&gt; BugLink: <a href="https://bugs.launchpad.net/bugs/1814892" rel="noreferrer" target="_blank">https://bugs.launchpad.net/bugs/1814892</a><br>
&gt; <br>
&gt; s390/qeth: report 25Gbit link speed<br>
<br>
Hi Frank,<br>
<br>
The above line with the duplicated subject is also not needed.<br>
<br>
I will amend the commit in our repo to fix it.<br>
<br>
<br>
Thanks,<br>
Kleber<br>
<br>
&gt; <br>
&gt; This adds the various identifiers for 25Gbit cards, and wires them up<br>
&gt; into sysfs and ethtool.<br>
&gt; <br>
&gt; Signed-off-by: Julian Wiedmann &lt;<a href="mailto:jwi@linux.ibm.com" target="_blank">jwi@linux.ibm.com</a>&gt;<br>
&gt; Signed-off-by: David S. Miller &lt;<a href="mailto:davem@davemloft.net" target="_blank">davem@davemloft.net</a>&gt;<br>
&gt; (cherry picked from commit 54e049c227d9968ff6a7d80aae5fec27b54d39da)<br>
&gt; Signed-off-by: Frank Heimes &lt;<a href="mailto:frank.heimes@canonical.com" target="_blank">frank.heimes@canonical.com</a>&gt;<br>
&gt; ---<br>
&gt;  drivers/s390/net/qeth_core_main.c | 20 ++++++++++++++++++--<br>
&gt;  drivers/s390/net/qeth_core_mpc.h  |  2 ++<br>
&gt;  2 files changed, 20 insertions(+), 2 deletions(-)<br>
&gt; <br>
&gt; diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c<br>
&gt; index 0a7500b..c4ccf7b 100644<br>
&gt; --- a/drivers/s390/net/qeth_core_main.c<br>
&gt; +++ b/drivers/s390/net/qeth_core_main.c<br>
&gt; @@ -167,6 +167,8 @@ const char *qeth_get_cardname_short(struct qeth_card *card)<br>
&gt;                               return &quot;OSD_1000&quot;;<br>
&gt;                       case QETH_LINK_TYPE_10GBIT_ETH:<br>
&gt;                               return &quot;OSD_10GIG&quot;;<br>
&gt; +                     case QETH_LINK_TYPE_25GBIT_ETH:<br>
&gt; +                             return &quot;OSD_25GIG&quot;;<br>
&gt;                       case QETH_LINK_TYPE_LANE_ETH100:<br>
&gt;                               return &quot;OSD_FE_LANE&quot;;<br>
&gt;                       case QETH_LINK_TYPE_LANE_TR:<br>
&gt; @@ -4471,7 +4473,8 @@ static int qeth_mdio_read(struct net_device *dev, int phy_id, int regnum)<br>
&gt;               rc = BMCR_FULLDPLX;<br>
&gt;               if ((card-&gt;info.link_type != QETH_LINK_TYPE_GBIT_ETH) &amp;&amp;<br>
&gt;                   (card-&gt;info.link_type != QETH_LINK_TYPE_OSN) &amp;&amp;<br>
&gt; -                 (card-&gt;info.link_type != QETH_LINK_TYPE_10GBIT_ETH))<br>
&gt; +                 (card-&gt;info.link_type != QETH_LINK_TYPE_10GBIT_ETH) &amp;&amp;<br>
&gt; +                 (card-&gt;info.link_type != QETH_LINK_TYPE_25GBIT_ETH))<br>
&gt;                       rc |= BMCR_SPEED100;<br>
&gt;               break;<br>
&gt;       case MII_BMSR: /* Basic mode status register */<br>
&gt; @@ -6138,8 +6141,14 @@ static void qeth_set_cmd_adv_sup(struct ethtool_link_ksettings *cmd,<br>
&gt;               WARN_ON_ONCE(1);<br>
&gt;       }<br>
&gt;  <br>
&gt; -     /* fallthrough from high to low, to select all legal speeds: */<br>
&gt; +     /* partially does fall through, to also select lower speeds */<br>
&gt;       switch (maxspeed) {<br>
&gt; +     case SPEED_25000:<br>
&gt; +             ethtool_link_ksettings_add_link_mode(cmd, supported,<br>
&gt; +                                                  25000baseSR_Full);<br>
&gt; +             ethtool_link_ksettings_add_link_mode(cmd, advertising,<br>
&gt; +                                                  25000baseSR_Full);<br>
&gt; +             break;<br>
&gt;       case SPEED_10000:<br>
&gt;               ethtool_link_ksettings_add_link_mode(cmd, supported,<br>
&gt;                                                    10000baseT_Full);<br>
&gt; @@ -6222,6 +6231,10 @@ int qeth_core_ethtool_get_link_ksettings(struct net_device *netdev,<br>
&gt;               cmd-&gt;base.speed = SPEED_10000;<br>
&gt;               cmd-&gt;base.port = PORT_FIBRE;<br>
&gt;               break;<br>
&gt; +     case QETH_LINK_TYPE_25GBIT_ETH:<br>
&gt; +             cmd-&gt;base.speed = SPEED_25000;<br>
&gt; +             cmd-&gt;base.port = PORT_FIBRE;<br>
&gt; +             break;<br>
&gt;       default:<br>
&gt;               cmd-&gt;base.speed = SPEED_10;<br>
&gt;               cmd-&gt;base.port = PORT_TP;<br>
&gt; @@ -6288,6 +6301,9 @@ int qeth_core_ethtool_get_link_ksettings(struct net_device *netdev,<br>
&gt;       case CARD_INFO_PORTS_10G:<br>
&gt;               cmd-&gt;base.speed = SPEED_10000;<br>
&gt;               break;<br>
&gt; +     case CARD_INFO_PORTS_25G:<br>
&gt; +             cmd-&gt;base.speed = SPEED_25000;<br>
&gt; +             break;<br>
&gt;       }<br>
&gt;  <br>
&gt;       return 0;<br>
&gt; diff --git a/drivers/s390/net/qeth_core_mpc.h b/drivers/s390/net/qeth_core_mpc.h<br>
&gt; index 96d566a..c1f1003 100644<br>
&gt; --- a/drivers/s390/net/qeth_core_mpc.h<br>
&gt; +++ b/drivers/s390/net/qeth_core_mpc.h<br>
&gt; @@ -72,6 +72,7 @@ enum qeth_link_types {<br>
&gt;       QETH_LINK_TYPE_GBIT_ETH     = 0x03,<br>
&gt;       QETH_LINK_TYPE_OSN          = 0x04,<br>
&gt;       QETH_LINK_TYPE_10GBIT_ETH   = 0x10,<br>
&gt; +     QETH_LINK_TYPE_25GBIT_ETH   = 0x12,<br>
&gt;       QETH_LINK_TYPE_LANE_ETH100  = 0x81,<br>
&gt;       QETH_LINK_TYPE_LANE_TR      = 0x82,<br>
&gt;       QETH_LINK_TYPE_LANE_ETH1000 = 0x83,<br>
&gt; @@ -329,6 +330,7 @@ enum qeth_card_info_port_speed {<br>
&gt;       CARD_INFO_PORTS_100M            = 0x00000006,<br>
&gt;       CARD_INFO_PORTS_1G              = 0x00000007,<br>
&gt;       CARD_INFO_PORTS_10G             = 0x00000008,<br>
&gt; +     CARD_INFO_PORTS_25G             = 0x0000000A,<br>
&gt;  };<br>
&gt;  <br>
&gt;  /* (SET)DELIP(M) IPA stuff ***************************************************/<br>
&gt; <br>
<br>
</blockquote></div>

Patch
diff mbox series

diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 0a7500b..c4ccf7b 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -167,6 +167,8 @@  const char *qeth_get_cardname_short(struct qeth_card *card)
 				return "OSD_1000";
 			case QETH_LINK_TYPE_10GBIT_ETH:
 				return "OSD_10GIG";
+			case QETH_LINK_TYPE_25GBIT_ETH:
+				return "OSD_25GIG";
 			case QETH_LINK_TYPE_LANE_ETH100:
 				return "OSD_FE_LANE";
 			case QETH_LINK_TYPE_LANE_TR:
@@ -4471,7 +4473,8 @@  static int qeth_mdio_read(struct net_device *dev, int phy_id, int regnum)
 		rc = BMCR_FULLDPLX;
 		if ((card->info.link_type != QETH_LINK_TYPE_GBIT_ETH) &&
 		    (card->info.link_type != QETH_LINK_TYPE_OSN) &&
-		    (card->info.link_type != QETH_LINK_TYPE_10GBIT_ETH))
+		    (card->info.link_type != QETH_LINK_TYPE_10GBIT_ETH) &&
+		    (card->info.link_type != QETH_LINK_TYPE_25GBIT_ETH))
 			rc |= BMCR_SPEED100;
 		break;
 	case MII_BMSR: /* Basic mode status register */
@@ -6138,8 +6141,14 @@  static void qeth_set_cmd_adv_sup(struct ethtool_link_ksettings *cmd,
 		WARN_ON_ONCE(1);
 	}
 
-	/* fallthrough from high to low, to select all legal speeds: */
+	/* partially does fall through, to also select lower speeds */
 	switch (maxspeed) {
+	case SPEED_25000:
+		ethtool_link_ksettings_add_link_mode(cmd, supported,
+						     25000baseSR_Full);
+		ethtool_link_ksettings_add_link_mode(cmd, advertising,
+						     25000baseSR_Full);
+		break;
 	case SPEED_10000:
 		ethtool_link_ksettings_add_link_mode(cmd, supported,
 						     10000baseT_Full);
@@ -6222,6 +6231,10 @@  int qeth_core_ethtool_get_link_ksettings(struct net_device *netdev,
 		cmd->base.speed = SPEED_10000;
 		cmd->base.port = PORT_FIBRE;
 		break;
+	case QETH_LINK_TYPE_25GBIT_ETH:
+		cmd->base.speed = SPEED_25000;
+		cmd->base.port = PORT_FIBRE;
+		break;
 	default:
 		cmd->base.speed = SPEED_10;
 		cmd->base.port = PORT_TP;
@@ -6288,6 +6301,9 @@  int qeth_core_ethtool_get_link_ksettings(struct net_device *netdev,
 	case CARD_INFO_PORTS_10G:
 		cmd->base.speed = SPEED_10000;
 		break;
+	case CARD_INFO_PORTS_25G:
+		cmd->base.speed = SPEED_25000;
+		break;
 	}
 
 	return 0;
diff --git a/drivers/s390/net/qeth_core_mpc.h b/drivers/s390/net/qeth_core_mpc.h
index 96d566a..c1f1003 100644
--- a/drivers/s390/net/qeth_core_mpc.h
+++ b/drivers/s390/net/qeth_core_mpc.h
@@ -72,6 +72,7 @@  enum qeth_link_types {
 	QETH_LINK_TYPE_GBIT_ETH     = 0x03,
 	QETH_LINK_TYPE_OSN          = 0x04,
 	QETH_LINK_TYPE_10GBIT_ETH   = 0x10,
+	QETH_LINK_TYPE_25GBIT_ETH   = 0x12,
 	QETH_LINK_TYPE_LANE_ETH100  = 0x81,
 	QETH_LINK_TYPE_LANE_TR      = 0x82,
 	QETH_LINK_TYPE_LANE_ETH1000 = 0x83,
@@ -329,6 +330,7 @@  enum qeth_card_info_port_speed {
 	CARD_INFO_PORTS_100M		= 0x00000006,
 	CARD_INFO_PORTS_1G		= 0x00000007,
 	CARD_INFO_PORTS_10G		= 0x00000008,
+	CARD_INFO_PORTS_25G		= 0x0000000A,
 };
 
 /* (SET)DELIP(M) IPA stuff ***************************************************/