* [dpdk-dev] [PATCH] net/sfc: fix speed capabilities reported in device info
@ 2019-03-19 16:36 Andrew Rybchenko
2019-03-19 16:36 ` Andrew Rybchenko
2019-03-21 18:06 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
0 siblings, 2 replies; 4+ messages in thread
From: Andrew Rybchenko @ 2019-03-19 16:36 UTC (permalink / raw)
To: dev; +Cc: stable
Phy capabilities are bit offsets in libefx, but was used as bit masks.
Fixes: d23f3a89ab54 ("net/sfc: support link speed and duplex settings")
Fixes: f82e33afbbb9 ("net/sfc: support link speeds up to 100G")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/sfc/sfc_ethdev.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index e7bfd8917..2675d4a8c 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -96,17 +96,17 @@ sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
/* Autonegotiation may be disabled */
dev_info->speed_capa = ETH_LINK_SPEED_FIXED;
- if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_1000FDX)
+ if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_1000FDX))
dev_info->speed_capa |= ETH_LINK_SPEED_1G;
- if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_10000FDX)
+ if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_10000FDX))
dev_info->speed_capa |= ETH_LINK_SPEED_10G;
- if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_25000FDX)
+ if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_25000FDX))
dev_info->speed_capa |= ETH_LINK_SPEED_25G;
- if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_40000FDX)
+ if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_40000FDX))
dev_info->speed_capa |= ETH_LINK_SPEED_40G;
- if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_50000FDX)
+ if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_50000FDX))
dev_info->speed_capa |= ETH_LINK_SPEED_50G;
- if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_100000FDX)
+ if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_100000FDX))
dev_info->speed_capa |= ETH_LINK_SPEED_100G;
dev_info->max_rx_queues = sa->rxq_max;
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH] net/sfc: fix speed capabilities reported in device info
2019-03-19 16:36 [dpdk-dev] [PATCH] net/sfc: fix speed capabilities reported in device info Andrew Rybchenko
@ 2019-03-19 16:36 ` Andrew Rybchenko
2019-03-21 18:06 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Rybchenko @ 2019-03-19 16:36 UTC (permalink / raw)
To: dev; +Cc: stable
Phy capabilities are bit offsets in libefx, but was used as bit masks.
Fixes: d23f3a89ab54 ("net/sfc: support link speed and duplex settings")
Fixes: f82e33afbbb9 ("net/sfc: support link speeds up to 100G")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/sfc/sfc_ethdev.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index e7bfd8917..2675d4a8c 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -96,17 +96,17 @@ sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
/* Autonegotiation may be disabled */
dev_info->speed_capa = ETH_LINK_SPEED_FIXED;
- if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_1000FDX)
+ if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_1000FDX))
dev_info->speed_capa |= ETH_LINK_SPEED_1G;
- if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_10000FDX)
+ if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_10000FDX))
dev_info->speed_capa |= ETH_LINK_SPEED_10G;
- if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_25000FDX)
+ if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_25000FDX))
dev_info->speed_capa |= ETH_LINK_SPEED_25G;
- if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_40000FDX)
+ if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_40000FDX))
dev_info->speed_capa |= ETH_LINK_SPEED_40G;
- if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_50000FDX)
+ if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_50000FDX))
dev_info->speed_capa |= ETH_LINK_SPEED_50G;
- if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_100000FDX)
+ if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_100000FDX))
dev_info->speed_capa |= ETH_LINK_SPEED_100G;
dev_info->max_rx_queues = sa->rxq_max;
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/sfc: fix speed capabilities reported in device info
2019-03-19 16:36 [dpdk-dev] [PATCH] net/sfc: fix speed capabilities reported in device info Andrew Rybchenko
2019-03-19 16:36 ` Andrew Rybchenko
@ 2019-03-21 18:06 ` Ferruh Yigit
2019-03-21 18:06 ` Ferruh Yigit
1 sibling, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2019-03-21 18:06 UTC (permalink / raw)
To: Andrew Rybchenko, dev; +Cc: stable
On 3/19/2019 4:36 PM, Andrew Rybchenko wrote:
> Phy capabilities are bit offsets in libefx, but was used as bit masks.
>
> Fixes: d23f3a89ab54 ("net/sfc: support link speed and duplex settings")
> Fixes: f82e33afbbb9 ("net/sfc: support link speeds up to 100G")
> Cc: stable@dpdk.org
>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/sfc: fix speed capabilities reported in device info
2019-03-21 18:06 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
@ 2019-03-21 18:06 ` Ferruh Yigit
0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2019-03-21 18:06 UTC (permalink / raw)
To: Andrew Rybchenko, dev; +Cc: stable
On 3/19/2019 4:36 PM, Andrew Rybchenko wrote:
> Phy capabilities are bit offsets in libefx, but was used as bit masks.
>
> Fixes: d23f3a89ab54 ("net/sfc: support link speed and duplex settings")
> Fixes: f82e33afbbb9 ("net/sfc: support link speeds up to 100G")
> Cc: stable@dpdk.org
>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-03-21 18:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-19 16:36 [dpdk-dev] [PATCH] net/sfc: fix speed capabilities reported in device info Andrew Rybchenko
2019-03-19 16:36 ` Andrew Rybchenko
2019-03-21 18:06 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-03-21 18:06 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).