From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Dave Ertman <david.m.ertman@intel.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
jogreene@redhat.com,
Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 4/9] ice: Check for actual link state of port after reset
Date: Tue, 2 Oct 2018 08:24:42 -0700 [thread overview]
Message-ID: <20181002152447.11175-5-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20181002152447.11175-1-jeffrey.t.kirsher@intel.com>
From: Dave Ertman <david.m.ertman@intel.com>
We are currently replaying the link state of a port after a reset, but
it is possible that the link state of a port can change during the reset
process. So check for the current link state of a port during the rebuild
process of a reset.
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ice/ice_common.c | 3 +--
drivers/net/ethernet/intel/ice/ice_common.h | 1 +
drivers/net/ethernet/intel/ice/ice_main.c | 4 ++++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index 4e0ed2364a6b..9ff291375869 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -1740,8 +1740,7 @@ ice_aq_set_phy_cfg(struct ice_hw *hw, u8 lport,
* ice_update_link_info - update status of the HW network link
* @pi: port info structure of the interested logical port
*/
-static enum ice_status
-ice_update_link_info(struct ice_port_info *pi)
+enum ice_status ice_update_link_info(struct ice_port_info *pi)
{
struct ice_aqc_get_phy_caps_data *pcaps;
struct ice_phy_info *phy_info;
diff --git a/drivers/net/ethernet/intel/ice/ice_common.h b/drivers/net/ethernet/intel/ice/ice_common.h
index 5493266d4204..7b2a5bb2e550 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.h
+++ b/drivers/net/ethernet/intel/ice/ice_common.h
@@ -21,6 +21,7 @@ ice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q_info *cq,
struct ice_rq_event_info *e, u16 *pending);
enum ice_status
ice_get_link_status(struct ice_port_info *pi, bool *link_up);
+enum ice_status ice_update_link_info(struct ice_port_info *pi);
enum ice_status
ice_acquire_res(struct ice_hw *hw, enum ice_aq_res_ids res,
enum ice_aq_res_access_type access, u32 timeout);
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 8a9301d2a685..bb42ee643b77 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -3219,6 +3219,10 @@ static void ice_rebuild(struct ice_pf *pf)
goto err_vsi_rebuild;
}
+ err = ice_update_link_info(hw->port_info);
+ if (err)
+ dev_err(&pf->pdev->dev, "Get link status error %d\n", err);
+
/* Replay all VSIs Configuration, including filters after reset */
if (ice_vsi_replay_all(pf)) {
dev_err(&pf->pdev->dev,
--
2.17.1
next prev parent reply other threads:[~2018-10-02 22:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-02 15:24 [net-next 0/9][pull request] 100GbE Intel Wired LAN Driver Updates 2018-10-02 Jeff Kirsher
2018-10-02 15:24 ` [net-next 1/9] ice: Expand use of VSI handles part 1/2 Jeff Kirsher
2018-10-02 15:24 ` [net-next 2/9] ice: Expand use of VSI handles part 2/2 Jeff Kirsher
2018-10-02 15:24 ` [net-next 3/9] ice: Implement VSI replay framework Jeff Kirsher
2018-10-02 15:24 ` Jeff Kirsher [this message]
2018-10-02 15:24 ` [net-next 5/9] ice: Split irq_tracker into sw_irq_tracker and hw_irq_tracker Jeff Kirsher
2018-10-02 15:24 ` [net-next 6/9] ice: Implement ethtool hook for RSS switch Jeff Kirsher
2018-10-02 15:24 ` [net-next 7/9] ice: Align ice_reset_req enum values to hardware reset values Jeff Kirsher
2018-10-02 15:24 ` [net-next 8/9] ice: Add support for dynamic interrupt moderation Jeff Kirsher
2018-10-02 15:24 ` [net-next 9/9] ice: Fix error on driver remove Jeff Kirsher
2018-10-02 18:41 ` [net-next 0/9][pull request] 100GbE Intel Wired LAN Driver Updates 2018-10-02 David Miller
2018-10-02 19:47 ` Jeff Kirsher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181002152447.11175-5-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=anirudh.venkataramanan@intel.com \
--cc=davem@davemloft.net \
--cc=david.m.ertman@intel.com \
--cc=jogreene@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@redhat.com \
--cc=sassmann@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox