Commit 4d49e5cd authored by Martin Habets's avatar Martin Habets Committed by Jakub Kicinski
Browse files

sfc/siena: Rename functions in mcdi headers to avoid conflicts with sfc



For siena use efx_siena_ as the function prefix.
Several functions are not used in Siena, so they are removed.

Signed-off-by: default avatarMartin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 95e96f77
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -153,7 +153,7 @@ static int efx_init_port(struct efx_nic *efx)
	efx->port_initialized = true;

	/* Ensure the PHY advertises the correct flow control settings */
	rc = efx_mcdi_port_reconfigure(efx);
	rc = efx_siena_mcdi_port_reconfigure(efx);
	if (rc && rc != -EPERM)
		goto fail;

@@ -526,7 +526,7 @@ static int efx_net_open(struct net_device *net_dev)
		return rc;
	if (efx->phy_mode & PHY_MODE_SPECIAL)
		return -EBUSY;
	if (efx_mcdi_poll_reboot(efx) && efx_siena_reset(efx, RESET_TYPE_ALL))
	if (efx_siena_mcdi_poll_reboot(efx) && efx_siena_reset(efx, RESET_TYPE_ALL))
		return -EIO;

	/* Notify the kernel of the link state polled during driver load,
@@ -1158,7 +1158,7 @@ static int efx_pm_thaw(struct device *dev)
			goto fail;

		mutex_lock(&efx->mac_lock);
		efx_mcdi_port_reconfigure(efx);
		efx_siena_mcdi_port_reconfigure(efx);
		mutex_unlock(&efx->mac_lock);

		efx_siena_start_all(efx);
+3 −3
Original line number Diff line number Diff line
@@ -1022,7 +1022,7 @@ static int efx_soft_enable_interrupts(struct efx_nic *efx)
		efx_siena_start_eventq(channel);
	}

	efx_mcdi_mode_event(efx);
	efx_siena_mcdi_mode_event(efx);

	return 0;
fail:
@@ -1045,7 +1045,7 @@ static void efx_soft_disable_interrupts(struct efx_nic *efx)
	if (efx->state == STATE_DISABLED)
		return;

	efx_mcdi_mode_poll(efx);
	efx_siena_mcdi_mode_poll(efx);

	efx->irq_soft_enabled = false;
	smp_wmb();
@@ -1063,7 +1063,7 @@ static void efx_soft_disable_interrupts(struct efx_nic *efx)
	}

	/* Flush the asynchronous MCDI request queue */
	efx_mcdi_flush_async(efx);
	efx_siena_mcdi_flush_async(efx);
}

int efx_siena_enable_interrupts(struct efx_nic *efx)
+5 −5
Original line number Diff line number Diff line
@@ -456,7 +456,7 @@ static void efx_stop_datapath(struct efx_nic *efx)
 *
 **************************************************************************/

/* Equivalent to efx_link_set_advertising with all-zeroes, except does not
/* Equivalent to efx_siena_link_set_advertising with all-zeroes, except does not
 * force the Autoneg bit on.
 */
void efx_siena_link_clear_advertising(struct efx_nic *efx)
@@ -547,7 +547,7 @@ void efx_siena_start_all(struct efx_nic *efx)
	 * to poll now because we could have missed a change
	 */
	mutex_lock(&efx->mac_lock);
	if (efx_mcdi_phy_poll(efx))
	if (efx_siena_mcdi_phy_poll(efx))
		efx_siena_link_status_changed(efx);
	mutex_unlock(&efx->mac_lock);

@@ -665,7 +665,7 @@ static void efx_wait_for_bist_end(struct efx_nic *efx)
	int i;

	for (i = 0; i < BIST_WAIT_DELAY_COUNT; ++i) {
		if (efx_mcdi_poll_reboot(efx))
		if (efx_siena_mcdi_poll_reboot(efx))
			goto out;
		msleep(BIST_WAIT_DELAY_MS);
	}
@@ -760,7 +760,7 @@ int efx_siena_reset_up(struct efx_nic *efx, enum reset_type method, bool ok)

	if (efx->port_initialized && method != RESET_TYPE_INVISIBLE &&
	    method != RESET_TYPE_DATAPATH) {
		rc = efx_mcdi_port_reconfigure(efx);
		rc = efx_siena_mcdi_port_reconfigure(efx);
		if (rc && rc != -EPERM)
			netif_err(efx, drv, efx->net_dev,
				  "could not restore PHY settings\n");
@@ -950,7 +950,7 @@ void efx_siena_schedule_reset(struct efx_nic *efx, enum reset_type type)
	/* efx_process_channel() will no longer read events once a
	 * reset is scheduled. So switch back to poll'd MCDI completions.
	 */
	efx_mcdi_mode_poll(efx);
	efx_siena_mcdi_mode_poll(efx);

	efx_siena_queue_reset_work(efx);
}
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ static int efx_ethtool_phys_id(struct net_device *net_dev,
		return 1;	/* cycle on/off once per second */
	}

	return efx_mcdi_set_id_led(efx, mode);
	return efx_siena_mcdi_set_id_led(efx, mode);
}

static int efx_ethtool_get_regs_len(struct net_device *net_dev)
+10 −10
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ void efx_siena_ethtool_get_drvinfo(struct net_device *net_dev,
	struct efx_nic *efx = netdev_priv(net_dev);

	strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
	efx_mcdi_print_fwver(efx, info->fw_version,
	efx_siena_mcdi_print_fwver(efx, info->fw_version,
				   sizeof(info->fw_version));
	strlcpy(info->bus_info, pci_name(efx->pci_dev), sizeof(info->bus_info));
}
@@ -173,7 +173,7 @@ int efx_siena_ethtool_set_pauseparam(struct net_device *net_dev,
	efx_siena_link_set_wanted_fc(efx, wanted_fc);
	if (efx->link_advertising[0] != old_adv ||
	    (efx->wanted_fc ^ old_fc) & EFX_FC_AUTO) {
		rc = efx_mcdi_port_reconfigure(efx);
		rc = efx_siena_mcdi_port_reconfigure(efx);
		if (rc) {
			netif_err(efx, drv, efx->net_dev,
				  "Unable to advertise requested flow "
@@ -328,7 +328,7 @@ static int efx_ethtool_fill_self_tests(struct efx_nic *efx,
		const char *name;

		EFX_WARN_ON_PARANOID(i >= EFX_MAX_PHY_TESTS);
		name = efx_mcdi_phy_test_name(efx, i);
		name = efx_siena_mcdi_phy_test_name(efx, i);
		if (name == NULL)
			break;

@@ -565,7 +565,7 @@ int efx_siena_ethtool_get_link_ksettings(struct net_device *net_dev,
	struct efx_link_state *link_state = &efx->link_state;

	mutex_lock(&efx->mac_lock);
	efx_mcdi_phy_get_link_ksettings(efx, cmd);
	efx_siena_mcdi_phy_get_link_ksettings(efx, cmd);
	mutex_unlock(&efx->mac_lock);

	/* Both MACs support pause frames (bidirectional and respond-only) */
@@ -597,7 +597,7 @@ efx_siena_ethtool_set_link_ksettings(struct net_device *net_dev,
	}

	mutex_lock(&efx->mac_lock);
	rc = efx_mcdi_phy_set_link_ksettings(efx, cmd);
	rc = efx_siena_mcdi_phy_set_link_ksettings(efx, cmd);
	mutex_unlock(&efx->mac_lock);
	return rc;
}
@@ -609,7 +609,7 @@ int efx_siena_ethtool_get_fecparam(struct net_device *net_dev,
	int rc;

	mutex_lock(&efx->mac_lock);
	rc = efx_mcdi_phy_get_fecparam(efx, fecparam);
	rc = efx_siena_mcdi_phy_get_fecparam(efx, fecparam);
	mutex_unlock(&efx->mac_lock);

	return rc;
@@ -622,7 +622,7 @@ int efx_siena_ethtool_set_fecparam(struct net_device *net_dev,
	int rc;

	mutex_lock(&efx->mac_lock);
	rc = efx_mcdi_phy_set_fecparam(efx, fecparam);
	rc = efx_siena_mcdi_phy_set_fecparam(efx, fecparam);
	mutex_unlock(&efx->mac_lock);

	return rc;
@@ -1320,7 +1320,7 @@ int efx_siena_ethtool_get_module_eeprom(struct net_device *net_dev,
	int ret;

	mutex_lock(&efx->mac_lock);
	ret = efx_mcdi_phy_get_module_eeprom(efx, ee, data);
	ret = efx_siena_mcdi_phy_get_module_eeprom(efx, ee, data);
	mutex_unlock(&efx->mac_lock);

	return ret;
@@ -1333,7 +1333,7 @@ int efx_siena_ethtool_get_module_info(struct net_device *net_dev,
	int ret;

	mutex_lock(&efx->mac_lock);
	ret = efx_mcdi_phy_get_module_info(efx, modinfo);
	ret = efx_siena_mcdi_phy_get_module_info(efx, modinfo);
	mutex_unlock(&efx->mac_lock);

	return ret;
Loading