Commit bf5b5104 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'net-stmmac-further-cleanups'

Russell King says:

====================
net: stmmac: further cleanups

This small series does further cleanups to the stmmac driver:

1. Name priv->pause to indicate that it's a timeout and clarify the
   units of the "pause" module parameter
2. Remove useless priv->flow_ctrl member and deprecate the useless
  "flow_ctrl" module parameter
3. Fix long-standing signed-ness issue with "speed" passed around the
   driver from the mac_link_up method.
====================

Link: https://patch.msgid.link/Z7Rf2daOaf778TOg@shell.armlinux.org.uk


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 47dfd7a7 ac9a8587
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -141,7 +141,7 @@ static int dwc_qos_probe(struct platform_device *pdev,
#define AUTO_CAL_STATUS 0x880c
#define  AUTO_CAL_STATUS_ACTIVE BIT(31)

static void tegra_eqos_fix_speed(void *priv, unsigned int speed, unsigned int mode)
static void tegra_eqos_fix_speed(void *priv, int speed, unsigned int mode)
{
	struct tegra_eqos *eqos = priv;
	bool needs_calibration = false;
@@ -160,7 +160,7 @@ static void tegra_eqos_fix_speed(void *priv, unsigned int speed, unsigned int mo
		break;

	default:
		dev_err(eqos->dev, "invalid speed %u\n", speed);
		dev_err(eqos->dev, "invalid speed %d\n", speed);
		break;
	}

+4 −4
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ struct imx_dwmac_ops {

	int (*fix_soc_reset)(void *priv, void __iomem *ioaddr);
	int (*set_intf_mode)(struct plat_stmmacenet_data *plat_dat);
	void (*fix_mac_speed)(void *priv, unsigned int speed, unsigned int mode);
	void (*fix_mac_speed)(void *priv, int speed, unsigned int mode);
};

struct imx_priv_data {
@@ -192,7 +192,7 @@ static void imx_dwmac_exit(struct platform_device *pdev, void *priv)
	/* nothing to do now */
}

static void imx_dwmac_fix_speed(void *priv, unsigned int speed, unsigned int mode)
static void imx_dwmac_fix_speed(void *priv, int speed, unsigned int mode)
{
	struct plat_stmmacenet_data *plat_dat;
	struct imx_priv_data *dwmac = priv;
@@ -208,7 +208,7 @@ static void imx_dwmac_fix_speed(void *priv, unsigned int speed, unsigned int mod

	rate = rgmii_clock(speed);
	if (rate < 0) {
		dev_err(dwmac->dev, "invalid speed %u\n", speed);
		dev_err(dwmac->dev, "invalid speed %d\n", speed);
		return;
	}

@@ -217,7 +217,7 @@ static void imx_dwmac_fix_speed(void *priv, unsigned int speed, unsigned int mod
		dev_err(dwmac->dev, "failed to set tx rate %lu\n", rate);
}

static void imx93_dwmac_fix_speed(void *priv, unsigned int speed, unsigned int mode)
static void imx93_dwmac_fix_speed(void *priv, int speed, unsigned int mode)
{
	struct imx_priv_data *dwmac = priv;
	unsigned int iface;
+2 −2
Original line number Diff line number Diff line
@@ -22,13 +22,13 @@ struct intel_dwmac {
};

struct intel_dwmac_data {
	void (*fix_mac_speed)(void *priv, unsigned int speed, unsigned int mode);
	void (*fix_mac_speed)(void *priv, int speed, unsigned int mode);
	unsigned long ptp_ref_clk_rate;
	unsigned long tx_clk_rate;
	bool tx_clk_en;
};

static void kmb_eth_fix_mac_speed(void *priv, unsigned int speed, unsigned int mode)
static void kmb_eth_fix_mac_speed(void *priv, int speed, unsigned int mode)
{
	struct intel_dwmac *dwmac = priv;
	long rate;
+4 −4
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ struct ipq806x_gmac {
	phy_interface_t phy_mode;
};

static int get_clk_div_sgmii(struct ipq806x_gmac *gmac, unsigned int speed)
static int get_clk_div_sgmii(struct ipq806x_gmac *gmac, int speed)
{
	struct device *dev = &gmac->pdev->dev;
	int div;
@@ -138,7 +138,7 @@ static int get_clk_div_sgmii(struct ipq806x_gmac *gmac, unsigned int speed)
	return div;
}

static int get_clk_div_rgmii(struct ipq806x_gmac *gmac, unsigned int speed)
static int get_clk_div_rgmii(struct ipq806x_gmac *gmac, int speed)
{
	struct device *dev = &gmac->pdev->dev;
	int div;
@@ -164,7 +164,7 @@ static int get_clk_div_rgmii(struct ipq806x_gmac *gmac, unsigned int speed)
	return div;
}

static int ipq806x_gmac_set_speed(struct ipq806x_gmac *gmac, unsigned int speed)
static int ipq806x_gmac_set_speed(struct ipq806x_gmac *gmac, int speed)
{
	uint32_t clk_bits, val;
	int div;
@@ -260,7 +260,7 @@ static int ipq806x_gmac_of_parse(struct ipq806x_gmac *gmac)
	return PTR_ERR_OR_ZERO(gmac->qsgmii_csr);
}

static void ipq806x_gmac_fix_mac_speed(void *priv, unsigned int speed, unsigned int mode)
static void ipq806x_gmac_fix_mac_speed(void *priv, int speed, unsigned int mode)
{
	struct ipq806x_gmac *gmac = priv;

+1 −2
Original line number Diff line number Diff line
@@ -149,8 +149,7 @@ static struct stmmac_pci_info loongson_gmac_pci_info = {
	.setup = loongson_gmac_data,
};

static void loongson_gnet_fix_speed(void *priv, unsigned int speed,
				    unsigned int mode)
static void loongson_gnet_fix_speed(void *priv, int speed, unsigned int mode)
{
	struct loongson_data *ld = (struct loongson_data *)priv;
	struct net_device *ndev = dev_get_drvdata(ld->dev);
Loading