From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Brett Creeley <brett.creeley@intel.com>,
netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>,
Andrew Bowers <andrewx.bowers@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 09/16] ice: only use the VF for ICE_VSI_VF in ice_vsi_release
Date: Mon, 25 Feb 2019 10:42:59 -0800 [thread overview]
Message-ID: <20190225184306.13505-10-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20190225184306.13505-1-jeffrey.t.kirsher@intel.com>
From: Brett Creeley <brett.creeley@intel.com>
In ice_vsi_release we are always assigning a value to the local VF
variable. Change this to only be assigned if the VSI is a VF VSI.
Signed-off-by: Brett Creeley <brett.creeley@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_lib.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index d93a0d5a783c..fa61203bee26 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -2518,13 +2518,15 @@ void ice_vsi_dis_irq(struct ice_vsi *vsi)
*/
int ice_vsi_release(struct ice_vsi *vsi)
{
+ struct ice_vf *vf = NULL;
struct ice_pf *pf;
- struct ice_vf *vf;
if (!vsi->back)
return -ENODEV;
pf = vsi->back;
- vf = &pf->vf[vsi->vf_id];
+
+ if (vsi->type == ICE_VSI_VF)
+ vf = &pf->vf[vsi->vf_id];
/* do not unregister and free netdevs while driver is in the reset
* recovery pending state. Since reset/rebuild happens through PF
* service task workqueue, its not a good idea to unregister netdev
--
2.20.1
next prev parent reply other threads:[~2019-02-25 18:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-25 18:42 [net-next 00/16][pull request] 100GbE Intel Wired LAN Driver Updates 2019-02-22 Jeff Kirsher
2019-02-25 18:42 ` [net-next 01/16] ice: Mark extack argument as __always_unused Jeff Kirsher
2019-02-26 0:36 ` Stephen Hemminger
2019-02-25 18:42 ` [net-next 02/16] ice: Fix the calculation of ICE_MAX_MTU Jeff Kirsher
2019-02-25 18:42 ` [net-next 03/16] ice: Fix added in VSI supported nodes calc Jeff Kirsher
2019-02-25 18:42 ` [net-next 04/16] ice: sizeof(<type>) should be avoided Jeff Kirsher
2019-02-25 18:42 ` [net-next 05/16] ice: fix stack hogs from struct ice_vsi_ctx structures Jeff Kirsher
2019-02-25 18:42 ` [net-next 06/16] ice: fix ice_remove_rule_internal vsi_list handling Jeff Kirsher
2019-02-25 18:42 ` [net-next 07/16] ice: fix issue where host reboots on unload when iommu=on Jeff Kirsher
2019-02-25 18:42 ` [net-next 08/16] ice: fix numeric overflow warning Jeff Kirsher
2019-02-25 18:42 ` Jeff Kirsher [this message]
2019-02-25 18:43 ` [net-next 10/16] ice: don't spam VFs with link messages Jeff Kirsher
2019-02-25 18:43 ` [net-next 11/16] ice: clear VF ARQLEN register on reset Jeff Kirsher
2019-02-25 18:43 ` [net-next 12/16] ice: flush Tx pipe on disable queue timeout Jeff Kirsher
2019-02-25 18:43 ` [net-next 13/16] ice: check for a leaf node presence Jeff Kirsher
2019-02-25 18:43 ` [net-next 14/16] ice: use absolute vector ID for VFs Jeff Kirsher
2019-02-25 18:43 ` [net-next 15/16] ice: Fix for FC get rx/tx pause params Jeff Kirsher
2019-02-25 18:43 ` [net-next 16/16] ice: fix overlong string, update stats output Jeff Kirsher
2019-02-25 22:14 ` [net-next 00/16][pull request] 100GbE Intel Wired LAN Driver Updates 2019-02-22 David Miller
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=20190225184306.13505-10-jeffrey.t.kirsher@intel.com \
--to=jeffrey.t.kirsher@intel.com \
--cc=andrewx.bowers@intel.com \
--cc=anirudh.venkataramanan@intel.com \
--cc=brett.creeley@intel.com \
--cc=davem@davemloft.net \
--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