* [PATCH v1] ixgbe: fix link issue in loopback mode @ 2015-02-05 8:45 Cunming Liang [not found] ` <1423125918-31757-1-git-send-email-cunming.liang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Cunming Liang @ 2015-02-05 8:45 UTC (permalink / raw) To: dev-VfR2kkLFssw In loopback mode, it's expected force link up even when there's no cable connect. But in codes, setup_sfp() rewrites the related register. It causes in the case 'multispeed_fiber', it can't link up without cable connect. Signed-off-by: Cunming Liang <cunming.liang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> --- lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c index b341dd0..d6d408e 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c @@ -1501,6 +1501,11 @@ ixgbe_dev_start(struct rte_eth_dev *dev) goto error; } + /* Skip link setup if loopback mode is enabled for 82599. */ + if (hw->mac.type == ixgbe_mac_82599EB && + dev->data->dev_conf.lpbk_mode == IXGBE_LPBK_82599_TX_RX) + goto skip_link_setup; + if (ixgbe_is_sfp(hw) && hw->phy.multispeed_fiber) { err = hw->mac.ops.setup_sfp(hw); if (err) @@ -1510,11 +1515,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev) /* Turn on the laser */ ixgbe_enable_tx_laser(hw); - /* Skip link setup if loopback mode is enabled for 82599. */ - if (hw->mac.type == ixgbe_mac_82599EB && - dev->data->dev_conf.lpbk_mode == IXGBE_LPBK_82599_TX_RX) - goto skip_link_setup; - err = ixgbe_check_link(hw, &speed, &link_up, 0); if (err) goto error; -- 1.8.1.4 ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <1423125918-31757-1-git-send-email-cunming.liang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH v1] ixgbe: fix link issue in loopback mode [not found] ` <1423125918-31757-1-git-send-email-cunming.liang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> @ 2015-02-09 15:52 ` Patrick Lu [not found] ` <20150209155225.GB18872-GQGeBJRQ6etbn3E1eTv7vNh3ngVCH38I@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Patrick Lu @ 2015-02-09 15:52 UTC (permalink / raw) To: Cunming Liang; +Cc: dev-VfR2kkLFssw On Thu, Feb 05, 2015 at 04:45:18PM +0800, Cunming Liang wrote: > In loopback mode, it's expected force link up even when there's no cable connect. > But in codes, setup_sfp() rewrites the related register. > It causes in the case 'multispeed_fiber', it can't link up without cable connect. > > Signed-off-by: Cunming Liang <cunming.liang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > --- > lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c > index b341dd0..d6d408e 100644 > --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c > +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c > @@ -1501,6 +1501,11 @@ ixgbe_dev_start(struct rte_eth_dev *dev) > goto error; > } > > + /* Skip link setup if loopback mode is enabled for 82599. */ > + if (hw->mac.type == ixgbe_mac_82599EB && > + dev->data->dev_conf.lpbk_mode == IXGBE_LPBK_82599_TX_RX) > + goto skip_link_setup; > + > if (ixgbe_is_sfp(hw) && hw->phy.multispeed_fiber) { > err = hw->mac.ops.setup_sfp(hw); > if (err) > @@ -1510,11 +1515,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev) > /* Turn on the laser */ > ixgbe_enable_tx_laser(hw); > > - /* Skip link setup if loopback mode is enabled for 82599. */ > - if (hw->mac.type == ixgbe_mac_82599EB && > - dev->data->dev_conf.lpbk_mode == IXGBE_LPBK_82599_TX_RX) > - goto skip_link_setup; > - > err = ixgbe_check_link(hw, &speed, &link_up, 0); > if (err) > goto error; > -- > 1.8.1.4 > Acked-by: Patrick Lu <patrick.lu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <20150209155225.GB18872-GQGeBJRQ6etbn3E1eTv7vNh3ngVCH38I@public.gmane.org>]
* Re: [PATCH v1] ixgbe: fix link issue in loopback mode [not found] ` <20150209155225.GB18872-GQGeBJRQ6etbn3E1eTv7vNh3ngVCH38I@public.gmane.org> @ 2015-02-15 16:10 ` Thomas Monjalon 0 siblings, 0 replies; 3+ messages in thread From: Thomas Monjalon @ 2015-02-15 16:10 UTC (permalink / raw) To: Cunming Liang; +Cc: dev-VfR2kkLFssw > > In loopback mode, it's expected force link up even when there's no cable connect. > > But in codes, setup_sfp() rewrites the related register. > > It causes in the case 'multispeed_fiber', it can't link up without cable connect. > > > > Signed-off-by: Cunming Liang <cunming.liang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > Acked-by: Patrick Lu <patrick.lu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Applied, thanks ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-15 16:10 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-02-05 8:45 [PATCH v1] ixgbe: fix link issue in loopback mode Cunming Liang [not found] ` <1423125918-31757-1-git-send-email-cunming.liang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 2015-02-09 15:52 ` Patrick Lu [not found] ` <20150209155225.GB18872-GQGeBJRQ6etbn3E1eTv7vNh3ngVCH38I@public.gmane.org> 2015-02-15 16:10 ` Thomas Monjalon
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).