All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH 3/5] fm10k: Cleanup exception handling for changing queues
Date: Tue, 10 Nov 2015 09:30:31 -0800	[thread overview]
Message-ID: <1447176631.3150.2.camel@intel.com> (raw)
In-Reply-To: <563275D8.60909@gmail.com>

On Thu, 2015-10-29 at 12:39 -0700, Alexander Duyck wrote:
> On 10/29/2015 12:12 PM, Allan, Bruce W wrote:
> >> -----Original Message-----
> >> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl
> .org] On
> >> Behalf Of Alexander Duyck
> >> Sent: Tuesday, October 27, 2015 4:59 PM
> >> To: intel-wired-lan at lists.osuosl.org
> >> Subject: [Intel-wired-lan] [next PATCH 3/5] fm10k: Cleanup
> exception
> >> handling for changing queues
> >>
> >> This patch is meant to cleanup the exception handling for the
> paths where
> >> we reset the interrupts and then reconfigure them.? In all of
> these paths
> >> we had very different levels of exception handling.? I have
> updated the
> >> driver so that all of the paths should result in a similar state
> if we
> >> fail.
> >>
> >> Specifically the driver will now unload the mailbox interrupt,
> free the
> >> queue vectors and MSI-X, and then detach the interface.
> >>
> >> In addition for any of the PCIe related resets I have added a
> check with
> >> the hw_ready function to just make sure the registers are in a
> readable
> >> state prior to reopening the interface.
> >>
> >> Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
> >> ---
> >>?? drivers/net/ethernet/intel/fm10k/fm10k_netdev.c |?? 17 +++++--
> >>?? drivers/net/ethernet/intel/fm10k/fm10k_pci.c??? |?? 55
> >> ++++++++++++++++++-----
> >>?? 2 files changed, 55 insertions(+), 17 deletions(-)
> >>
> >> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
> >> b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
> >> index 38fe2d8c8388..4855686d2b4e 100644
> >> --- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
> >> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
> >> @@ -1176,19 +1176,28 @@ int fm10k_setup_tc(struct net_device *dev,
> u8
> >> tc)
> >>
> >>??????err = fm10k_init_queueing_scheme(interface);
> >>??????if (err)
> >> -????????????return err;
> >> +????????????goto err_queueing_scheme;
> >>
> >>??????err = fm10k_mbx_request_irq(interface);
> >>??????if (err)
> >> -????????????return err;
> >> +????????????goto err_mbx_irq;
> >>
> >> -????if (netif_running(dev))
> >> -????????????fm10k_open(dev);
> >> +????err = netif_running(dev) ? fm10k_open(dev) : 0;
> >> +????if (err)
> >> +????????????goto err_open;
> >>
> >>??????/* flag to indicate SWPRI has yet to be updated */
> >>??????interface->flags |= FM10K_FLAG_SWPRI_CONFIG;
> >>
> >>??????return 0;
> >> +err_open:
> >> +????fm10k_mbx_free_irq(interface);
> >> +err_mbx_irq:
> >> +????fm10k_clear_queueing_scheme(interface);
> >> +err_queueing_scheme:
> >> +????netif_device_detach(dev);
> >> +
> >> +????return err;
> >>?? }
> >>
> >>?? static int fm10k_ioctl(struct net_device *netdev, struct ifreq
> *ifr, int cmd)
> >> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> >> b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> >> index 15327d274d72..7b33cddfc6be 100644
> >> --- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> >> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> >> @@ -185,7 +185,13 @@ static void fm10k_reinit(struct fm10k_intfc
> >> *interface)
> >>??????}
> >>
> >>??????/* reassociate interrupts */
> >> -????fm10k_mbx_request_irq(interface);
> >> +????err = fm10k_mbx_request_irq(interface);
> >> +????if (err)
> >> +????????????goto err_mbx_irq;
> >> +
> >> +????err = fm10k_hw_ready(interface);
> >> +????if (err)
> >> +????????????goto err_open;
> >>
> >>??????/* update hardware address for VFs if perm_addr has changed
> */
> >>??????if (hw->mac.type == fm10k_mac_vf) {
> >> @@ -205,14 +211,23 @@ static void fm10k_reinit(struct fm10k_intfc
> >> *interface)
> >>??????/* reset clock */
> >>??????fm10k_ts_reset(interface);
> >>
> >> -????if (netif_running(netdev))
> >> -????????????fm10k_open(netdev);
> >> -
> >> +????err = netif_running(netdev) ? fm10k_open(netdev) : 0;
> >> +????if (err)
> >> +????????????goto err_open;
> >> +
> > Jeff, the above blank-line separator line in Alex' original
> submission looks fine here but
> > in your next-queue tree dev-queue branch there is additional
> whitespace (2 tabs).
> > How did that happen?
> 
> I just went back and checked and it looks like I had included some 
> trailing white space in my original patch.? Jeff do you need me to 
> resubmit this patch or can you clean up the two spots where it added 
> trailing white space in the blank lines?

I can fix it. ?I saw it when I applied it, and purposely did not fix it
to see if validation would catch it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20151110/6cd93d05/attachment.asc>

  parent reply	other threads:[~2015-11-10 17:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-27 23:59 [Intel-wired-lan] [next PATCH 0/5] Misc Intel driver cleanups Alexander Duyck
2015-10-27 23:59 ` [Intel-wired-lan] [next PATCH 1/5] fm10k: Cleanup MSI-X interrupts in case of failure Alexander Duyck
2015-10-28 16:11   ` Allan, Bruce W
2015-11-03 20:45     ` Singh, Krishneil K
2015-10-27 23:59 ` [Intel-wired-lan] [next PATCH 2/5] fm10k: Cleanup exception handling for mailbox interrupt Alexander Duyck
2015-10-28 16:11   ` Allan, Bruce W
2015-11-03 20:47   ` Singh, Krishneil K
2015-10-27 23:59 ` [Intel-wired-lan] [next PATCH 3/5] fm10k: Cleanup exception handling for changing queues Alexander Duyck
2015-10-28 16:11   ` Allan, Bruce W
2015-10-29 19:12   ` Allan, Bruce W
2015-10-29 19:39     ` Alexander Duyck
2015-11-03 23:20       ` Allan, Bruce W
2015-11-10 16:46         ` Allan, Bruce W
2015-11-10 17:30       ` Jeff Kirsher [this message]
2015-11-03 20:48   ` Singh, Krishneil K
2015-10-27 23:59 ` [Intel-wired-lan] [next PATCH 4/5] e1000e: Switch e1000e_up to void, drop code checking for error result Alexander Duyck
2015-11-20  4:48   ` Brown, Aaron F
2015-10-27 23:59 ` [Intel-wired-lan] [next PATCH 5/5] igb: Fix unused variable warning Alexander Duyck
2015-11-20  4:50   ` Brown, Aaron F

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=1447176631.3150.2.camel@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.