All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Cree <ecree@solarflare.com>
To: <linux-net-drivers@solarflare.com>, <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>
Subject: [PATCH v3 net-next 13/16] sfc_ef100: actually perform resets
Date: Thu, 16 Jul 2020 14:03:42 +0100	[thread overview]
Message-ID: <f38e4e2d-235c-7fba-8991-6d2e76f73bd7@solarflare.com> (raw)
In-Reply-To: <7bb4f1f4-c67f-8c7b-86ba-7bf9f74ffc28@solarflare.com>

In ef100_reset(), make the MCDI call to do the reset.
Also, do a reset at start-of-day during probe, to put the function in
 a clean state.

Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 drivers/net/ethernet/sfc/ef100_nic.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/ethernet/sfc/ef100_nic.c b/drivers/net/ethernet/sfc/ef100_nic.c
index fe7a5c4bc291..f449960e5b02 100644
--- a/drivers/net/ethernet/sfc/ef100_nic.c
+++ b/drivers/net/ethernet/sfc/ef100_nic.c
@@ -335,6 +335,10 @@ static int ef100_reset(struct efx_nic *efx, enum reset_type reset_type)
 		__clear_bit(reset_type, &efx->reset_pending);
 		rc = dev_open(efx->net_dev, NULL);
 	} else if (reset_type == RESET_TYPE_ALL) {
+		rc = efx_mcdi_reset(efx, reset_type);
+		if (rc)
+			return rc;
+
 		netif_device_attach(efx->net_dev);
 
 		rc = dev_open(efx->net_dev, NULL);
@@ -467,6 +471,11 @@ static int ef100_probe_main(struct efx_nic *efx)
 	}
 	if (rc)
 		goto fail;
+	/* Reset (most) configuration for this function */
+	rc = efx_mcdi_reset(efx, RESET_TYPE_ALL);
+	if (rc)
+		goto fail;
+
 	rc = efx_ef100_init_datapath_caps(efx);
 	if (rc < 0)
 		goto fail;


  parent reply	other threads:[~2020-07-16 13:03 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 12:57 [PATCH v3 net-next 00/16] sfc_ef100: driver for EF100 family NICs, part 1 Edward Cree
2020-07-16 12:59 ` [PATCH v3 net-next 01/16] sfc: remove efx_ethtool_nway_reset() Edward Cree
2020-07-16 13:00 ` [PATCH v3 net-next 02/16] sfc_ef100: add EF100 register definitions Edward Cree
2020-07-16 13:00 ` [PATCH v3 net-next 03/16] sfc_ef100: register accesses on EF100 Edward Cree
2020-07-16 13:00 ` [PATCH v3 net-next 04/16] sfc_ef100: skeleton EF100 PF driver Edward Cree
2020-07-16 17:39   ` kernel test robot
2020-07-16 17:39     ` kernel test robot
2020-07-21 14:48     ` Edward Cree
2020-07-21 14:48       ` Edward Cree
2020-07-21 16:45       ` Jakub Kicinski
2020-07-21 16:45         ` Jakub Kicinski
2020-07-21 17:09         ` Edward Cree
2020-07-21 17:09           ` Edward Cree
2020-07-21 17:15           ` Jakub Kicinski
2020-07-21 17:15             ` Jakub Kicinski
2020-07-16 13:01 ` [PATCH v3 net-next 05/16] sfc_ef100: reset-handling stub Edward Cree
2020-07-16 13:01 ` [PATCH v3 net-next 06/16] sfc_ef100: PHY probe stub Edward Cree
2020-07-16 13:01 ` [PATCH v3 net-next 07/16] sfc_ef100: don't call efx_reset_down()/up() on EF100 Edward Cree
2020-07-16 13:01 ` [PATCH v3 net-next 08/16] sfc_ef100: implement MCDI transport Edward Cree
2020-07-16 13:02 ` [PATCH v3 net-next 09/16] sfc_ef100: implement ndo_open/close and EVQ probing Edward Cree
2020-07-16 13:02 ` [PATCH v3 net-next 10/16] sfc_ef100: process events for MCDI completions Edward Cree
2020-07-16 13:02 ` [PATCH v3 net-next 11/16] sfc_ef100: read datapath caps, implement check_caps Edward Cree
2020-07-16 13:03 ` [PATCH v3 net-next 12/16] sfc_ef100: extend ef100_check_caps to cover datapath_caps3 Edward Cree
2020-07-16 13:03 ` Edward Cree [this message]
2020-07-16 13:03 ` [PATCH v3 net-next 14/16] sfc_ef100: probe the PHY and configure the MAC Edward Cree
2020-07-16 13:04 ` [PATCH v3 net-next 15/16] sfc_ef100: read device MAC address at probe time Edward Cree
2020-07-16 13:04 ` [PATCH v3 net-next 16/16] sfc_ef100: implement ndo_get_phys_port_{id,name} Edward Cree

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=f38e4e2d-235c-7fba-8991-6d2e76f73bd7@solarflare.com \
    --to=ecree@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=linux-net-drivers@solarflare.com \
    --cc=netdev@vger.kernel.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.