1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00

升级测试

This commit is contained in:
suyuan 2020-10-12 22:00:26 +08:00
parent 2353e2efe0
commit 509a4255ba
2 changed files with 2 additions and 35 deletions

View file

@ -14,7 +14,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
--- a/drivers/mmc/host/sdhci-msm.c --- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c
@@ -1746,7 +1746,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat @@ -1730,7 +1730,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat
static const struct sdhci_ops sdhci_msm_ops = { static const struct sdhci_ops sdhci_msm_ops = {
.reset = sdhci_reset, .reset = sdhci_reset,

View file

@ -26,7 +26,7 @@
obj-$(CONFIG_BCM63XX_PHY) += bcm63xx.o obj-$(CONFIG_BCM63XX_PHY) += bcm63xx.o
--- /dev/null --- /dev/null
+++ b/drivers/net/phy/ar40xx.c +++ b/drivers/net/phy/ar40xx.c
@@ -0,0 +1,2151 @@ @@ -0,0 +1,2118 @@
+/* +/*
+ * Copyright (c) 2016, The Linux Foundation. All rights reserved. + * Copyright (c) 2016, The Linux Foundation. All rights reserved.
+ * + *
@ -799,37 +799,6 @@
+ return 0; + return 0;
+} +}
+ +
+static int
+ar40xx_sw_get_port_stats(struct switch_dev *dev, int port,
+ struct switch_port_stats *stats)
+{
+ struct ar40xx_priv *priv = swdev_to_ar40xx(dev);
+ u32 num_mibs = ARRAY_SIZE(ar40xx_mibs);
+ u64 *mib_stats;
+ int ret = 0;
+ static int last_port = AR40XX_NUM_PORTS - 1;
+
+ mutex_lock(&priv->mib_lock);
+
+ /* Avoid unnecessary capture */
+ if (last_port >= port) {
+ ret = ar40xx_mib_capture(priv);
+ if (ret)
+ goto unlock;
+ }
+ last_port = port;
+
+ ar40xx_mib_fetch_port_stat(priv, port, false);
+
+ mib_stats = &priv->mib_stats[port * num_mibs];
+ /* 15: TXBYTE, 31: RXGOODBYTE */
+ stats->tx_bytes = mib_stats[15];
+ stats->rx_bytes = mib_stats[31];
+unlock:
+ mutex_unlock(&priv->mib_lock);
+ return ret;
+}
+
+static const struct switch_attr ar40xx_sw_attr_globals[] = { +static const struct switch_attr ar40xx_sw_attr_globals[] = {
+ { + {
+ .type = SWITCH_TYPE_INT, + .type = SWITCH_TYPE_INT,
@ -1208,7 +1177,6 @@
+ /* disable phy internal loopback */ + /* disable phy internal loopback */
+ mdiobus_write(bus, 0x1f, 0x10, 0x6860); + mdiobus_write(bus, 0x1f, 0x10, 0x6860);
+ mdiobus_write(bus, 0x1f, 0x0, 0x9040); + mdiobus_write(bus, 0x1f, 0x0, 0x9040);
+ ar40xx_phy_mmd_write(priv, 0x1f, 7, 0x8076, 0x0670); /* 1000_LED_n */
+ +
+ for (phy = 0; phy < AR40XX_NUM_PORTS - 1; phy++) { + for (phy = 0; phy < AR40XX_NUM_PORTS - 1; phy++) {
+ /* disable mac loop back */ + /* disable mac loop back */
@ -1841,7 +1809,6 @@
+ .apply_config = ar40xx_sw_hw_apply, + .apply_config = ar40xx_sw_hw_apply,
+ .reset_switch = ar40xx_sw_reset_switch, + .reset_switch = ar40xx_sw_reset_switch,
+ .get_port_link = ar40xx_sw_get_port_link, + .get_port_link = ar40xx_sw_get_port_link,
+ .get_port_stats = ar40xx_sw_get_port_stats,
+}; +};
+ +
+/* Start of phy driver support */ +/* Start of phy driver support */