Commit 8b39db19 authored by Jonathan Cooper's avatar Jonathan Cooper Committed by David S. Miller
Browse files

sfc: Add a PROBED state for EF100 VDPA use.



For VDPA we need to tear down the driver to the point where it
has various control channels like MCDI, but it no longer has
a network device. This adds a state corresponding to
that mode that will be used when VDPA support is added.

Signed-off-by: default avatarJonathan Cooper <jonathan.s.cooper@amd.com>
Co-developed-by: default avatarMartin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: default avatarMartin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 813cf9d1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -291,7 +291,7 @@ void ef100_unregister_netdev(struct efx_nic *efx)
{
	if (efx_dev_registered(efx)) {
		efx_fini_mcdi_logging(efx);
		efx->state = STATE_UNINIT;
		efx->state = STATE_PROBED;
		unregister_netdev(efx->net_dev);
	}
}
+4 −2
Original line number Diff line number Diff line
@@ -1222,8 +1222,10 @@ static pci_ers_result_t efx_io_error_detected(struct pci_dev *pdev,

		efx_device_detach_sync(efx);

		if (efx_net_active(efx->state)) {
			efx_stop_all(efx);
			efx_disable_interrupts(efx);
		}

		status = PCI_ERS_RESULT_NEED_RESET;
	} else {
+5 −4
Original line number Diff line number Diff line
@@ -45,7 +45,8 @@ int efx_reconfigure_port(struct efx_nic *efx);

#define EFX_ASSERT_RESET_SERIALISED(efx)				\
	do {								\
		if (efx->state != STATE_UNINIT)		\
		if ((efx)->state != STATE_UNINIT &&			\
		    (efx)->state != STATE_PROBED)			\
			ASSERT_RTNL();					\
	} while (0)

+2 −1
Original line number Diff line number Diff line
@@ -623,7 +623,8 @@ enum efx_int_mode {

enum nic_state {
	STATE_UNINIT = 0,	/* device being probed/removed */
	STATE_NET_DOWN,		/* hardware probed and netdev registered */
	STATE_PROBED,		/* hardware probed */
	STATE_NET_DOWN,		/* netdev registered */
	STATE_NET_UP,		/* ready for traffic */
	STATE_DISABLED,		/* device disabled due to hardware errors */