From: kernel test robot <lkp@intel.com>
To: Christian Marangi <ansuelsmth@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Yang Yingliang <yangyingliang@huawei.com>,
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
Atin Bainada <hi@atinb.me>,
linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
netdev@vger.kernel.org
Subject: Re: [net-next PATCH v2 5/5] net: dsa: qca8k: use dsa_for_each macro instead of for loop
Date: Sun, 30 Jul 2023 00:24:50 +0800 [thread overview]
Message-ID: <202307300000.UBj7WovP-lkp@intel.com> (raw)
In-Reply-To: <20230729115509.32601-5-ansuelsmth@gmail.com>
Hi Christian,
kernel test robot noticed the following build errors:
[auto build test ERROR on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Christian-Marangi/net-dsa-qca8k-make-learning-configurable-and-keep-off-if-standalone/20230729-195747
base: net-next/main
patch link: https://lore.kernel.org/r/20230729115509.32601-5-ansuelsmth%40gmail.com
patch subject: [net-next PATCH v2 5/5] net: dsa: qca8k: use dsa_for_each macro instead of for loop
config: i386-randconfig-i006-20230729 (https://download.01.org/0day-ci/archive/20230730/202307300000.UBj7WovP-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20230730/202307300000.UBj7WovP-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307300000.UBj7WovP-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/net/dsa/qca/qca8k-8xxx.c:1869:28: error: use of undeclared identifier 'i'
if (dsa_is_user_port(ds, i))
^
1 error generated.
vim +/i +1869 drivers/net/dsa/qca/qca8k-8xxx.c
1798
1799 static int
1800 qca8k_setup(struct dsa_switch *ds)
1801 {
1802 struct qca8k_priv *priv = ds->priv;
1803 int cpu_port, ret, port;
1804 struct dsa_port *dp;
1805 u32 mask;
1806
1807 cpu_port = qca8k_find_cpu_port(ds);
1808 if (cpu_port < 0) {
1809 dev_err(priv->dev, "No cpu port configured in both cpu port0 and port6");
1810 return cpu_port;
1811 }
1812
1813 /* Parse CPU port config to be later used in phy_link mac_config */
1814 ret = qca8k_parse_port_config(priv);
1815 if (ret)
1816 return ret;
1817
1818 ret = qca8k_setup_mdio_bus(priv);
1819 if (ret)
1820 return ret;
1821
1822 ret = qca8k_setup_of_pws_reg(priv);
1823 if (ret)
1824 return ret;
1825
1826 ret = qca8k_setup_mac_pwr_sel(priv);
1827 if (ret)
1828 return ret;
1829
1830 ret = qca8k_setup_led_ctrl(priv);
1831 if (ret)
1832 return ret;
1833
1834 qca8k_setup_pcs(priv, &priv->pcs_port_0, 0);
1835 qca8k_setup_pcs(priv, &priv->pcs_port_6, 6);
1836
1837 /* Make sure MAC06 is disabled */
1838 ret = regmap_clear_bits(priv->regmap, QCA8K_REG_PORT0_PAD_CTRL,
1839 QCA8K_PORT0_PAD_MAC06_EXCHANGE_EN);
1840 if (ret) {
1841 dev_err(priv->dev, "failed disabling MAC06 exchange");
1842 return ret;
1843 }
1844
1845 /* Enable CPU Port */
1846 ret = regmap_set_bits(priv->regmap, QCA8K_REG_GLOBAL_FW_CTRL0,
1847 QCA8K_GLOBAL_FW_CTRL0_CPU_PORT_EN);
1848 if (ret) {
1849 dev_err(priv->dev, "failed enabling CPU port");
1850 return ret;
1851 }
1852
1853 /* Enable MIB counters */
1854 ret = qca8k_mib_init(priv);
1855 if (ret)
1856 dev_warn(priv->dev, "mib init failed");
1857
1858 /* Initial setup of all ports */
1859 dsa_switch_for_each_port(dp, ds) {
1860 port = dp->index;
1861
1862 /* Disable forwarding by default on all ports */
1863 ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(port),
1864 QCA8K_PORT_LOOKUP_MEMBER, 0);
1865 if (ret)
1866 return ret;
1867
1868 /* Disable MAC by default on all user ports */
> 1869 if (dsa_is_user_port(ds, i))
1870 qca8k_port_set_status(priv, port, 0);
1871 }
1872
1873 /* Enable QCA header mode on all cpu ports */
1874 dsa_switch_for_each_cpu_port(dp, ds) {
1875 port = dp->index;
1876
1877 ret = qca8k_write(priv, QCA8K_REG_PORT_HDR_CTRL(port),
1878 FIELD_PREP(QCA8K_PORT_HDR_CTRL_TX_MASK, QCA8K_PORT_HDR_CTRL_ALL) |
1879 FIELD_PREP(QCA8K_PORT_HDR_CTRL_RX_MASK, QCA8K_PORT_HDR_CTRL_ALL));
1880 if (ret) {
1881 dev_err(priv->dev, "failed enabling QCA header mode on port %d", port);
1882 return ret;
1883 }
1884 }
1885
1886 /* Forward all unknown frames to CPU port for Linux processing
1887 * Notice that in multi-cpu config only one port should be set
1888 * for igmp, unknown, multicast and broadcast packet
1889 */
1890 ret = qca8k_write(priv, QCA8K_REG_GLOBAL_FW_CTRL1,
1891 FIELD_PREP(QCA8K_GLOBAL_FW_CTRL1_IGMP_DP_MASK, BIT(cpu_port)) |
1892 FIELD_PREP(QCA8K_GLOBAL_FW_CTRL1_BC_DP_MASK, BIT(cpu_port)) |
1893 FIELD_PREP(QCA8K_GLOBAL_FW_CTRL1_MC_DP_MASK, BIT(cpu_port)) |
1894 FIELD_PREP(QCA8K_GLOBAL_FW_CTRL1_UC_DP_MASK, BIT(cpu_port)));
1895 if (ret)
1896 return ret;
1897
1898 /* CPU port gets connected to all user ports of the switch */
1899 ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(cpu_port),
1900 QCA8K_PORT_LOOKUP_MEMBER, dsa_user_ports(ds));
1901 if (ret)
1902 return ret;
1903
1904 /* Setup connection between CPU port & user ports
1905 * Individual user ports get connected to CPU port only
1906 */
1907 dsa_switch_for_each_user_port(dp, ds) {
1908 port = dp->index;
1909
1910 ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(port),
1911 QCA8K_PORT_LOOKUP_MEMBER,
1912 BIT(cpu_port));
1913 if (ret)
1914 return ret;
1915
1916 ret = regmap_clear_bits(priv->regmap, QCA8K_PORT_LOOKUP_CTRL(port),
1917 QCA8K_PORT_LOOKUP_LEARN);
1918 if (ret)
1919 return ret;
1920
1921 /* For port based vlans to work we need to set the
1922 * default egress vid
1923 */
1924 ret = qca8k_rmw(priv, QCA8K_EGRESS_VLAN(port),
1925 QCA8K_EGREES_VLAN_PORT_MASK(port),
1926 QCA8K_EGREES_VLAN_PORT(port, QCA8K_PORT_VID_DEF));
1927 if (ret)
1928 return ret;
1929
1930 ret = qca8k_write(priv, QCA8K_REG_PORT_VLAN_CTRL0(port),
1931 QCA8K_PORT_VLAN_CVID(QCA8K_PORT_VID_DEF) |
1932 QCA8K_PORT_VLAN_SVID(QCA8K_PORT_VID_DEF));
1933 if (ret)
1934 return ret;
1935 }
1936
1937 /* The port 5 of the qca8337 have some problem in flood condition. The
1938 * original legacy driver had some specific buffer and priority settings
1939 * for the different port suggested by the QCA switch team. Add this
1940 * missing settings to improve switch stability under load condition.
1941 * This problem is limited to qca8337 and other qca8k switch are not affected.
1942 */
1943 if (priv->switch_id == QCA8K_ID_QCA8337)
1944 dsa_switch_for_each_available_port(dp, ds)
1945 qca8k_setup_hol_fixup(priv, dp->index);
1946
1947 /* Special GLOBAL_FC_THRESH value are needed for ar8327 switch */
1948 if (priv->switch_id == QCA8K_ID_QCA8327) {
1949 mask = QCA8K_GLOBAL_FC_GOL_XON_THRES(288) |
1950 QCA8K_GLOBAL_FC_GOL_XOFF_THRES(496);
1951 qca8k_rmw(priv, QCA8K_REG_GLOBAL_FC_THRESH,
1952 QCA8K_GLOBAL_FC_GOL_XON_THRES_MASK |
1953 QCA8K_GLOBAL_FC_GOL_XOFF_THRES_MASK,
1954 mask);
1955 }
1956
1957 /* Setup our port MTUs to match power on defaults */
1958 ret = qca8k_write(priv, QCA8K_MAX_FRAME_SIZE, ETH_FRAME_LEN + ETH_FCS_LEN);
1959 if (ret)
1960 dev_warn(priv->dev, "failed setting MTU settings");
1961
1962 /* Flush the FDB table */
1963 qca8k_fdb_flush(priv);
1964
1965 /* Set min a max ageing value supported */
1966 ds->ageing_time_min = 7000;
1967 ds->ageing_time_max = 458745000;
1968
1969 /* Set max number of LAGs supported */
1970 ds->num_lag_ids = QCA8K_NUM_LAGS;
1971
1972 return 0;
1973 }
1974
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-07-29 16:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-29 11:55 [net-next PATCH v2 1/5] net: dsa: tag_qca: return early if dev is not found Christian Marangi
2023-07-29 11:55 ` [net-next PATCH v2 2/5] net: dsa: qca8k: make learning configurable and keep off if standalone Christian Marangi
2023-07-29 11:55 ` [net-next PATCH v2 3/5] net: dsa: qca8k: limit user ports access to the first CPU port on setup Christian Marangi
2023-07-29 11:55 ` [net-next PATCH v2 4/5] net: dsa: qca8k: move qca8xxx hol fixup to separate function Christian Marangi
2023-07-30 19:52 ` Simon Horman
2023-07-29 11:55 ` [net-next PATCH v2 5/5] net: dsa: qca8k: use dsa_for_each macro instead of for loop Christian Marangi
2023-07-29 16:24 ` kernel test robot [this message]
2023-07-29 19:50 ` kernel test robot
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=202307300000.UBj7WovP-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hi@atinb.me \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=yangyingliang@huawei.com \
/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.