From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F22AD290F for ; Fri, 22 Apr 2022 17:35:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650648959; x=1682184959; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ZEpaktPAhBfcH1j+/z/T41kMvD8alIN8R86i3Pz3/1A=; b=IUt1EkBTS6HT0+YhsqxwHzJhGP8PlRNVrlfoFchbqfEi1a3F3yB1QqXR Iaiq/ID6uZrbBunxcFRSiHTl3z3+qb3S2BiNuulP9xJ+IHrCRPh877Xv3 pe8RzzvzKirbnKq+JaA/kdAHm3It1Oo/ujrQuDCCr4mu3WcsSQeGMeeSR pq2AAg2lPH0fF4yxjjQ7FdyOiuIuxiWwRqcKHlhVZ0shZbtqGzOVAC1Fm KZEGr1UdyB1IMYlMKoBXxVY21Y46esJ88MPmGYh6k2B97RX4sVN2w+mbX 5RAszGEbsnP6nMdBzwoJuh3dByWlszZe9Uf1e9XKevYS5nMOK0HhaiMQU w==; X-IronPort-AV: E=McAfee;i="6400,9594,10324"; a="262333611" X-IronPort-AV: E=Sophos;i="5.90,282,1643702400"; d="scan'208";a="262333611" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2022 10:35:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,282,1643702400"; d="scan'208";a="627076900" Received: from lkp-server01.sh.intel.com (HELO 3abc53900bec) ([10.239.97.150]) by fmsmga004.fm.intel.com with ESMTP; 22 Apr 2022 10:35:54 -0700 Received: from kbuild by 3abc53900bec with local (Exim 4.95) (envelope-from ) id 1nhxCD-000APG-LM; Fri, 22 Apr 2022 17:35:53 +0000 Date: Sat, 23 Apr 2022 01:35:32 +0800 From: kernel test robot To: Ong Boon Leong , Alexandre Torgue , Jose Abreu , Andrew Lunn , Heiner Kallweit , Russell King , Paolo Abeni , "David S . Miller" , Jakub Kicinski , Maxime Coquelin , Giuseppe Cavallaro Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ong Boon Leong Subject: Re: [PATCH net-next 1/4] net: pcs: xpcs: add CL37 1000BASE-X AN support Message-ID: <202204230159.Tixm42oR-lkp@intel.com> References: <20220422073505.810084-2-boon.leong.ong@intel.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220422073505.810084-2-boon.leong.ong@intel.com> Hi Ong, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/intel-lab-lkp/linux/commits/Ong-Boon-Leong/pcs-xpcs-stmmac-add-1000BASE-X-AN-for-network-switch/20220422-154446 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 9c8774e629a1950c24b44e3c8fb93d76fb644b49 config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220423/202204230159.Tixm42oR-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5bd87350a5ae429baf8f373cb226a57b62f87280) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/dc88c5b7c183eeaff9db0e88d7b0d1d7f73e830b git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Ong-Boon-Leong/pcs-xpcs-stmmac-add-1000BASE-X-AN-for-network-switch/20220422-154446 git checkout dc88c5b7c183eeaff9db0e88d7b0d1d7f73e830b # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/dsa/sja1105/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/net/dsa/sja1105/sja1105_main.c:2334:52: error: too few arguments to function call, expected 4, have 3 rc = xpcs_do_config(xpcs, priv->phy_mode[i], mode); ~~~~~~~~~~~~~~ ^ include/linux/pcs/pcs-xpcs.h:33:5: note: 'xpcs_do_config' declared here int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface, ^ 1 error generated. vim +2334 drivers/net/dsa/sja1105/sja1105_main.c 2eea1fa82f681b Vladimir Oltean 2019-11-12 2224 6666cebc5e306f Vladimir Oltean 2019-05-02 2225 /* For situations where we need to change a setting at runtime that is only 6666cebc5e306f Vladimir Oltean 2019-05-02 2226 * available through the static configuration, resetting the switch in order 6666cebc5e306f Vladimir Oltean 2019-05-02 2227 * to upload the new static config is unavoidable. Back up the settings we 6666cebc5e306f Vladimir Oltean 2019-05-02 2228 * modify at runtime (currently only MAC) and restore them after uploading, 6666cebc5e306f Vladimir Oltean 2019-05-02 2229 * such that this operation is relatively seamless. 6666cebc5e306f Vladimir Oltean 2019-05-02 2230 */ 2eea1fa82f681b Vladimir Oltean 2019-11-12 2231 int sja1105_static_config_reload(struct sja1105_private *priv, 2eea1fa82f681b Vladimir Oltean 2019-11-12 2232 enum sja1105_reset_reason reason) 6666cebc5e306f Vladimir Oltean 2019-05-02 2233 { 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2234 struct ptp_system_timestamp ptp_sts_before; 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2235 struct ptp_system_timestamp ptp_sts_after; 82760d7f2ea638 Vladimir Oltean 2021-05-24 2236 int speed_mbps[SJA1105_MAX_NUM_PORTS]; 84db00f2c04338 Vladimir Oltean 2021-05-31 2237 u16 bmcr[SJA1105_MAX_NUM_PORTS] = {0}; 6666cebc5e306f Vladimir Oltean 2019-05-02 2238 struct sja1105_mac_config_entry *mac; 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2239 struct dsa_switch *ds = priv->ds; 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2240 s64 t1, t2, t3, t4; 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2241 s64 t12, t34; 6666cebc5e306f Vladimir Oltean 2019-05-02 2242 int rc, i; 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2243 s64 now; 6666cebc5e306f Vladimir Oltean 2019-05-02 2244 af580ae2dcb250 Vladimir Oltean 2019-11-09 2245 mutex_lock(&priv->mgmt_lock); af580ae2dcb250 Vladimir Oltean 2019-11-09 2246 6666cebc5e306f Vladimir Oltean 2019-05-02 2247 mac = priv->static_config.tables[BLK_IDX_MAC_CONFIG].entries; 6666cebc5e306f Vladimir Oltean 2019-05-02 2248 8400cff60b472c Vladimir Oltean 2019-06-08 2249 /* Back up the dynamic link speed changed by sja1105_adjust_port_config 8400cff60b472c Vladimir Oltean 2019-06-08 2250 * in order to temporarily restore it to SJA1105_SPEED_AUTO - which the 8400cff60b472c Vladimir Oltean 2019-06-08 2251 * switch wants to see in the static config in order to allow us to 8400cff60b472c Vladimir Oltean 2019-06-08 2252 * change it through the dynamic interface later. 6666cebc5e306f Vladimir Oltean 2019-05-02 2253 */ 542043e91df452 Vladimir Oltean 2021-05-24 2254 for (i = 0; i < ds->num_ports; i++) { 3ad1d171548e85 Vladimir Oltean 2021-06-11 2255 u32 reg_addr = mdiobus_c45_addr(MDIO_MMD_VEND2, MDIO_CTRL1); 3ad1d171548e85 Vladimir Oltean 2021-06-11 2256 41fed17fdbe531 Vladimir Oltean 2021-05-31 2257 speed_mbps[i] = sja1105_port_speed_to_ethtool(priv, 41fed17fdbe531 Vladimir Oltean 2021-05-31 2258 mac[i].speed); 41fed17fdbe531 Vladimir Oltean 2021-05-31 2259 mac[i].speed = priv->info->port_speed[SJA1105_SPEED_AUTO]; 6666cebc5e306f Vladimir Oltean 2019-05-02 2260 3ad1d171548e85 Vladimir Oltean 2021-06-11 2261 if (priv->xpcs[i]) 3ad1d171548e85 Vladimir Oltean 2021-06-11 2262 bmcr[i] = mdiobus_read(priv->mdio_pcs, i, reg_addr); 84db00f2c04338 Vladimir Oltean 2021-05-31 2263 } ffe10e679cec9a Vladimir Oltean 2020-03-20 2264 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2265 /* No PTP operations can run right now */ 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2266 mutex_lock(&priv->ptp_data.lock); 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2267 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2268 rc = __sja1105_ptp_gettimex(ds, &now, &ptp_sts_before); 61c77533b82ba8 Vladimir Oltean 2021-06-18 2269 if (rc < 0) { 61c77533b82ba8 Vladimir Oltean 2021-06-18 2270 mutex_unlock(&priv->ptp_data.lock); 61c77533b82ba8 Vladimir Oltean 2021-06-18 2271 goto out; 61c77533b82ba8 Vladimir Oltean 2021-06-18 2272 } 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2273 6666cebc5e306f Vladimir Oltean 2019-05-02 2274 /* Reset switch and send updated static configuration */ 6666cebc5e306f Vladimir Oltean 2019-05-02 2275 rc = sja1105_static_config_upload(priv); 61c77533b82ba8 Vladimir Oltean 2021-06-18 2276 if (rc < 0) { 61c77533b82ba8 Vladimir Oltean 2021-06-18 2277 mutex_unlock(&priv->ptp_data.lock); 61c77533b82ba8 Vladimir Oltean 2021-06-18 2278 goto out; 61c77533b82ba8 Vladimir Oltean 2021-06-18 2279 } 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2280 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2281 rc = __sja1105_ptp_settime(ds, 0, &ptp_sts_after); 61c77533b82ba8 Vladimir Oltean 2021-06-18 2282 if (rc < 0) { 61c77533b82ba8 Vladimir Oltean 2021-06-18 2283 mutex_unlock(&priv->ptp_data.lock); 61c77533b82ba8 Vladimir Oltean 2021-06-18 2284 goto out; 61c77533b82ba8 Vladimir Oltean 2021-06-18 2285 } 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2286 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2287 t1 = timespec64_to_ns(&ptp_sts_before.pre_ts); 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2288 t2 = timespec64_to_ns(&ptp_sts_before.post_ts); 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2289 t3 = timespec64_to_ns(&ptp_sts_after.pre_ts); 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2290 t4 = timespec64_to_ns(&ptp_sts_after.post_ts); 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2291 /* Mid point, corresponds to pre-reset PTPCLKVAL */ 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2292 t12 = t1 + (t2 - t1) / 2; 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2293 /* Mid point, corresponds to post-reset PTPCLKVAL, aka 0 */ 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2294 t34 = t3 + (t4 - t3) / 2; 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2295 /* Advance PTPCLKVAL by the time it took since its readout */ 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2296 now += (t34 - t12); 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2297 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2298 __sja1105_ptp_adjtime(ds, now); 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2299 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2300 mutex_unlock(&priv->ptp_data.lock); 6666cebc5e306f Vladimir Oltean 2019-05-02 2301 2eea1fa82f681b Vladimir Oltean 2019-11-12 2302 dev_info(priv->ds->dev, 2eea1fa82f681b Vladimir Oltean 2019-11-12 2303 "Reset switch and programmed static config. Reason: %s\n", 2eea1fa82f681b Vladimir Oltean 2019-11-12 2304 sja1105_reset_reasons[reason]); 2eea1fa82f681b Vladimir Oltean 2019-11-12 2305 6666cebc5e306f Vladimir Oltean 2019-05-02 2306 /* Configure the CGU (PLLs) for MII and RMII PHYs. 6666cebc5e306f Vladimir Oltean 2019-05-02 2307 * For these interfaces there is no dynamic configuration 6666cebc5e306f Vladimir Oltean 2019-05-02 2308 * needed, since PLLs have same settings at all speeds. 6666cebc5e306f Vladimir Oltean 2019-05-02 2309 */ cb5a82d2b9aaca Vladimir Oltean 2021-06-18 2310 if (priv->info->clocking_setup) { c50376783f23ff Vladimir Oltean 2021-05-24 2311 rc = priv->info->clocking_setup(priv); 6666cebc5e306f Vladimir Oltean 2019-05-02 2312 if (rc < 0) 6666cebc5e306f Vladimir Oltean 2019-05-02 2313 goto out; cb5a82d2b9aaca Vladimir Oltean 2021-06-18 2314 } 6666cebc5e306f Vladimir Oltean 2019-05-02 2315 542043e91df452 Vladimir Oltean 2021-05-24 2316 for (i = 0; i < ds->num_ports; i++) { 3ad1d171548e85 Vladimir Oltean 2021-06-11 2317 struct dw_xpcs *xpcs = priv->xpcs[i]; 3ad1d171548e85 Vladimir Oltean 2021-06-11 2318 unsigned int mode; 84db00f2c04338 Vladimir Oltean 2021-05-31 2319 8400cff60b472c Vladimir Oltean 2019-06-08 2320 rc = sja1105_adjust_port_config(priv, i, speed_mbps[i]); 6666cebc5e306f Vladimir Oltean 2019-05-02 2321 if (rc < 0) 6666cebc5e306f Vladimir Oltean 2019-05-02 2322 goto out; ffe10e679cec9a Vladimir Oltean 2020-03-20 2323 3ad1d171548e85 Vladimir Oltean 2021-06-11 2324 if (!xpcs) 84db00f2c04338 Vladimir Oltean 2021-05-31 2325 continue; 84db00f2c04338 Vladimir Oltean 2021-05-31 2326 3ad1d171548e85 Vladimir Oltean 2021-06-11 2327 if (bmcr[i] & BMCR_ANENABLE) 3ad1d171548e85 Vladimir Oltean 2021-06-11 2328 mode = MLO_AN_INBAND; 3ad1d171548e85 Vladimir Oltean 2021-06-11 2329 else if (priv->fixed_link[i]) 3ad1d171548e85 Vladimir Oltean 2021-06-11 2330 mode = MLO_AN_FIXED; 3ad1d171548e85 Vladimir Oltean 2021-06-11 2331 else 3ad1d171548e85 Vladimir Oltean 2021-06-11 2332 mode = MLO_AN_PHY; ffe10e679cec9a Vladimir Oltean 2020-03-20 2333 3ad1d171548e85 Vladimir Oltean 2021-06-11 @2334 rc = xpcs_do_config(xpcs, priv->phy_mode[i], mode); 3ad1d171548e85 Vladimir Oltean 2021-06-11 2335 if (rc < 0) 3ad1d171548e85 Vladimir Oltean 2021-06-11 2336 goto out; ffe10e679cec9a Vladimir Oltean 2020-03-20 2337 3ad1d171548e85 Vladimir Oltean 2021-06-11 2338 if (!phylink_autoneg_inband(mode)) { ffe10e679cec9a Vladimir Oltean 2020-03-20 2339 int speed = SPEED_UNKNOWN; ffe10e679cec9a Vladimir Oltean 2020-03-20 2340 56b63466333b25 Vladimir Oltean 2021-06-11 2341 if (priv->phy_mode[i] == PHY_INTERFACE_MODE_2500BASEX) 56b63466333b25 Vladimir Oltean 2021-06-11 2342 speed = SPEED_2500; 56b63466333b25 Vladimir Oltean 2021-06-11 2343 else if (bmcr[i] & BMCR_SPEED1000) ffe10e679cec9a Vladimir Oltean 2020-03-20 2344 speed = SPEED_1000; 84db00f2c04338 Vladimir Oltean 2021-05-31 2345 else if (bmcr[i] & BMCR_SPEED100) ffe10e679cec9a Vladimir Oltean 2020-03-20 2346 speed = SPEED_100; 053d8ad10d585a Vladimir Oltean 2021-03-04 2347 else ffe10e679cec9a Vladimir Oltean 2020-03-20 2348 speed = SPEED_10; ffe10e679cec9a Vladimir Oltean 2020-03-20 2349 3ad1d171548e85 Vladimir Oltean 2021-06-11 2350 xpcs_link_up(&xpcs->pcs, mode, priv->phy_mode[i], 3ad1d171548e85 Vladimir Oltean 2021-06-11 2351 speed, DUPLEX_FULL); ffe10e679cec9a Vladimir Oltean 2020-03-20 2352 } ffe10e679cec9a Vladimir Oltean 2020-03-20 2353 } 4d7525085a9ba8 Vladimir Oltean 2020-05-28 2354 4d7525085a9ba8 Vladimir Oltean 2020-05-28 2355 rc = sja1105_reload_cbs(priv); 4d7525085a9ba8 Vladimir Oltean 2020-05-28 2356 if (rc < 0) 4d7525085a9ba8 Vladimir Oltean 2020-05-28 2357 goto out; 6666cebc5e306f Vladimir Oltean 2019-05-02 2358 out: af580ae2dcb250 Vladimir Oltean 2019-11-09 2359 mutex_unlock(&priv->mgmt_lock); af580ae2dcb250 Vladimir Oltean 2019-11-09 2360 6666cebc5e306f Vladimir Oltean 2019-05-02 2361 return rc; 6666cebc5e306f Vladimir Oltean 2019-05-02 2362 } 6666cebc5e306f Vladimir Oltean 2019-05-02 2363 -- 0-DAY CI Kernel Test Service https://01.org/lkp From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A4A2DC433EF for ; Fri, 22 Apr 2022 17:37:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=w7xueCyE2kzNuObrjokMfrvwq7Asf1UnX9VUmG2UUEg=; b=fneR6iNud5fcFJ +A+5IPrsdeuTRsZB8MdHUki1jUhRa4YAI7RtEz/oXdJSbp10XfV0HxCEWLCDtDvTVu70VN0Rx6msV C5x5kCRPW/xGaea8d65SMJzjqqB7Nxwgado2R5V7T/2LttZseQGV9ry5rEutZL2LzBGdr71IrcSbP dXDdJchCBGsgw6HeMn3V60l3OpAF55mU3GLzvvb9pbytUDX5802v9idTjBCusRJPpK8gIbj5Ijd0f pc57HiohL6pHjnHQy1FrKLSsCTxRoK//tr/97fnDme0Kvk/1GfO3oxUAVDTvL5mnHyyvhKCRXJCYq FmfhnMjKaJt8Wkbx7FNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhxCY-001ovG-W6; Fri, 22 Apr 2022 17:36:15 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhxCS-001otJ-R9 for linux-arm-kernel@lists.infradead.org; Fri, 22 Apr 2022 17:36:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650648968; x=1682184968; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ZEpaktPAhBfcH1j+/z/T41kMvD8alIN8R86i3Pz3/1A=; b=G9xSo4NeLIptYGzOjrDp/jvkaeDf0y40ki/x4sF3RDmDror7fZNyB1Kv nPid4oe5E0NN/QtjkfMe93hLvOe77IIV1OhLQ6vL3YitEvqftIxoTeuvy OZnnvw+MgFYC7zub/EBDs2pm3FXBoa10u0HYfIJNBpTEEadgBia+JNb7H 7iMPoIuiLcgCC4iJrx4f02yOoh7Q0k1oxfeVHH4L2sIiBtA136renzAzR d/NX/i9EDVkXyUIVkGuA5Y+bkbRq1KQm+bQKB2SrjrQ5AY7uRea+Dawoi IK7j9rZKToJgiDD4YHEW10mbQ6kixIFPuTT7mnGic11WnAQRdQVkpW1f8 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10324"; a="252068663" X-IronPort-AV: E=Sophos;i="5.90,282,1643702400"; d="scan'208";a="252068663" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2022 10:35:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,282,1643702400"; d="scan'208";a="627076900" Received: from lkp-server01.sh.intel.com (HELO 3abc53900bec) ([10.239.97.150]) by fmsmga004.fm.intel.com with ESMTP; 22 Apr 2022 10:35:54 -0700 Received: from kbuild by 3abc53900bec with local (Exim 4.95) (envelope-from ) id 1nhxCD-000APG-LM; Fri, 22 Apr 2022 17:35:53 +0000 Date: Sat, 23 Apr 2022 01:35:32 +0800 From: kernel test robot To: Ong Boon Leong , Alexandre Torgue , Jose Abreu , Andrew Lunn , Heiner Kallweit , Russell King , Paolo Abeni , "David S . Miller" , Jakub Kicinski , Maxime Coquelin , Giuseppe Cavallaro Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ong Boon Leong Subject: Re: [PATCH net-next 1/4] net: pcs: xpcs: add CL37 1000BASE-X AN support Message-ID: <202204230159.Tixm42oR-lkp@intel.com> References: <20220422073505.810084-2-boon.leong.ong@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220422073505.810084-2-boon.leong.ong@intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220422_103609_085635_268460E9 X-CRM114-Status: GOOD ( 19.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Ong, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/intel-lab-lkp/linux/commits/Ong-Boon-Leong/pcs-xpcs-stmmac-add-1000BASE-X-AN-for-network-switch/20220422-154446 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 9c8774e629a1950c24b44e3c8fb93d76fb644b49 config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220423/202204230159.Tixm42oR-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5bd87350a5ae429baf8f373cb226a57b62f87280) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/dc88c5b7c183eeaff9db0e88d7b0d1d7f73e830b git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Ong-Boon-Leong/pcs-xpcs-stmmac-add-1000BASE-X-AN-for-network-switch/20220422-154446 git checkout dc88c5b7c183eeaff9db0e88d7b0d1d7f73e830b # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/dsa/sja1105/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/net/dsa/sja1105/sja1105_main.c:2334:52: error: too few arguments to function call, expected 4, have 3 rc = xpcs_do_config(xpcs, priv->phy_mode[i], mode); ~~~~~~~~~~~~~~ ^ include/linux/pcs/pcs-xpcs.h:33:5: note: 'xpcs_do_config' declared here int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface, ^ 1 error generated. vim +2334 drivers/net/dsa/sja1105/sja1105_main.c 2eea1fa82f681b Vladimir Oltean 2019-11-12 2224 6666cebc5e306f Vladimir Oltean 2019-05-02 2225 /* For situations where we need to change a setting at runtime that is only 6666cebc5e306f Vladimir Oltean 2019-05-02 2226 * available through the static configuration, resetting the switch in order 6666cebc5e306f Vladimir Oltean 2019-05-02 2227 * to upload the new static config is unavoidable. Back up the settings we 6666cebc5e306f Vladimir Oltean 2019-05-02 2228 * modify at runtime (currently only MAC) and restore them after uploading, 6666cebc5e306f Vladimir Oltean 2019-05-02 2229 * such that this operation is relatively seamless. 6666cebc5e306f Vladimir Oltean 2019-05-02 2230 */ 2eea1fa82f681b Vladimir Oltean 2019-11-12 2231 int sja1105_static_config_reload(struct sja1105_private *priv, 2eea1fa82f681b Vladimir Oltean 2019-11-12 2232 enum sja1105_reset_reason reason) 6666cebc5e306f Vladimir Oltean 2019-05-02 2233 { 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2234 struct ptp_system_timestamp ptp_sts_before; 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2235 struct ptp_system_timestamp ptp_sts_after; 82760d7f2ea638 Vladimir Oltean 2021-05-24 2236 int speed_mbps[SJA1105_MAX_NUM_PORTS]; 84db00f2c04338 Vladimir Oltean 2021-05-31 2237 u16 bmcr[SJA1105_MAX_NUM_PORTS] = {0}; 6666cebc5e306f Vladimir Oltean 2019-05-02 2238 struct sja1105_mac_config_entry *mac; 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2239 struct dsa_switch *ds = priv->ds; 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2240 s64 t1, t2, t3, t4; 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2241 s64 t12, t34; 6666cebc5e306f Vladimir Oltean 2019-05-02 2242 int rc, i; 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2243 s64 now; 6666cebc5e306f Vladimir Oltean 2019-05-02 2244 af580ae2dcb250 Vladimir Oltean 2019-11-09 2245 mutex_lock(&priv->mgmt_lock); af580ae2dcb250 Vladimir Oltean 2019-11-09 2246 6666cebc5e306f Vladimir Oltean 2019-05-02 2247 mac = priv->static_config.tables[BLK_IDX_MAC_CONFIG].entries; 6666cebc5e306f Vladimir Oltean 2019-05-02 2248 8400cff60b472c Vladimir Oltean 2019-06-08 2249 /* Back up the dynamic link speed changed by sja1105_adjust_port_config 8400cff60b472c Vladimir Oltean 2019-06-08 2250 * in order to temporarily restore it to SJA1105_SPEED_AUTO - which the 8400cff60b472c Vladimir Oltean 2019-06-08 2251 * switch wants to see in the static config in order to allow us to 8400cff60b472c Vladimir Oltean 2019-06-08 2252 * change it through the dynamic interface later. 6666cebc5e306f Vladimir Oltean 2019-05-02 2253 */ 542043e91df452 Vladimir Oltean 2021-05-24 2254 for (i = 0; i < ds->num_ports; i++) { 3ad1d171548e85 Vladimir Oltean 2021-06-11 2255 u32 reg_addr = mdiobus_c45_addr(MDIO_MMD_VEND2, MDIO_CTRL1); 3ad1d171548e85 Vladimir Oltean 2021-06-11 2256 41fed17fdbe531 Vladimir Oltean 2021-05-31 2257 speed_mbps[i] = sja1105_port_speed_to_ethtool(priv, 41fed17fdbe531 Vladimir Oltean 2021-05-31 2258 mac[i].speed); 41fed17fdbe531 Vladimir Oltean 2021-05-31 2259 mac[i].speed = priv->info->port_speed[SJA1105_SPEED_AUTO]; 6666cebc5e306f Vladimir Oltean 2019-05-02 2260 3ad1d171548e85 Vladimir Oltean 2021-06-11 2261 if (priv->xpcs[i]) 3ad1d171548e85 Vladimir Oltean 2021-06-11 2262 bmcr[i] = mdiobus_read(priv->mdio_pcs, i, reg_addr); 84db00f2c04338 Vladimir Oltean 2021-05-31 2263 } ffe10e679cec9a Vladimir Oltean 2020-03-20 2264 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2265 /* No PTP operations can run right now */ 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2266 mutex_lock(&priv->ptp_data.lock); 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2267 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2268 rc = __sja1105_ptp_gettimex(ds, &now, &ptp_sts_before); 61c77533b82ba8 Vladimir Oltean 2021-06-18 2269 if (rc < 0) { 61c77533b82ba8 Vladimir Oltean 2021-06-18 2270 mutex_unlock(&priv->ptp_data.lock); 61c77533b82ba8 Vladimir Oltean 2021-06-18 2271 goto out; 61c77533b82ba8 Vladimir Oltean 2021-06-18 2272 } 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2273 6666cebc5e306f Vladimir Oltean 2019-05-02 2274 /* Reset switch and send updated static configuration */ 6666cebc5e306f Vladimir Oltean 2019-05-02 2275 rc = sja1105_static_config_upload(priv); 61c77533b82ba8 Vladimir Oltean 2021-06-18 2276 if (rc < 0) { 61c77533b82ba8 Vladimir Oltean 2021-06-18 2277 mutex_unlock(&priv->ptp_data.lock); 61c77533b82ba8 Vladimir Oltean 2021-06-18 2278 goto out; 61c77533b82ba8 Vladimir Oltean 2021-06-18 2279 } 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2280 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2281 rc = __sja1105_ptp_settime(ds, 0, &ptp_sts_after); 61c77533b82ba8 Vladimir Oltean 2021-06-18 2282 if (rc < 0) { 61c77533b82ba8 Vladimir Oltean 2021-06-18 2283 mutex_unlock(&priv->ptp_data.lock); 61c77533b82ba8 Vladimir Oltean 2021-06-18 2284 goto out; 61c77533b82ba8 Vladimir Oltean 2021-06-18 2285 } 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2286 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2287 t1 = timespec64_to_ns(&ptp_sts_before.pre_ts); 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2288 t2 = timespec64_to_ns(&ptp_sts_before.post_ts); 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2289 t3 = timespec64_to_ns(&ptp_sts_after.pre_ts); 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2290 t4 = timespec64_to_ns(&ptp_sts_after.post_ts); 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2291 /* Mid point, corresponds to pre-reset PTPCLKVAL */ 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2292 t12 = t1 + (t2 - t1) / 2; 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2293 /* Mid point, corresponds to post-reset PTPCLKVAL, aka 0 */ 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2294 t34 = t3 + (t4 - t3) / 2; 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2295 /* Advance PTPCLKVAL by the time it took since its readout */ 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2296 now += (t34 - t12); 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2297 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2298 __sja1105_ptp_adjtime(ds, now); 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2299 6cf99c13ea07b5 Vladimir Oltean 2019-11-09 2300 mutex_unlock(&priv->ptp_data.lock); 6666cebc5e306f Vladimir Oltean 2019-05-02 2301 2eea1fa82f681b Vladimir Oltean 2019-11-12 2302 dev_info(priv->ds->dev, 2eea1fa82f681b Vladimir Oltean 2019-11-12 2303 "Reset switch and programmed static config. Reason: %s\n", 2eea1fa82f681b Vladimir Oltean 2019-11-12 2304 sja1105_reset_reasons[reason]); 2eea1fa82f681b Vladimir Oltean 2019-11-12 2305 6666cebc5e306f Vladimir Oltean 2019-05-02 2306 /* Configure the CGU (PLLs) for MII and RMII PHYs. 6666cebc5e306f Vladimir Oltean 2019-05-02 2307 * For these interfaces there is no dynamic configuration 6666cebc5e306f Vladimir Oltean 2019-05-02 2308 * needed, since PLLs have same settings at all speeds. 6666cebc5e306f Vladimir Oltean 2019-05-02 2309 */ cb5a82d2b9aaca Vladimir Oltean 2021-06-18 2310 if (priv->info->clocking_setup) { c50376783f23ff Vladimir Oltean 2021-05-24 2311 rc = priv->info->clocking_setup(priv); 6666cebc5e306f Vladimir Oltean 2019-05-02 2312 if (rc < 0) 6666cebc5e306f Vladimir Oltean 2019-05-02 2313 goto out; cb5a82d2b9aaca Vladimir Oltean 2021-06-18 2314 } 6666cebc5e306f Vladimir Oltean 2019-05-02 2315 542043e91df452 Vladimir Oltean 2021-05-24 2316 for (i = 0; i < ds->num_ports; i++) { 3ad1d171548e85 Vladimir Oltean 2021-06-11 2317 struct dw_xpcs *xpcs = priv->xpcs[i]; 3ad1d171548e85 Vladimir Oltean 2021-06-11 2318 unsigned int mode; 84db00f2c04338 Vladimir Oltean 2021-05-31 2319 8400cff60b472c Vladimir Oltean 2019-06-08 2320 rc = sja1105_adjust_port_config(priv, i, speed_mbps[i]); 6666cebc5e306f Vladimir Oltean 2019-05-02 2321 if (rc < 0) 6666cebc5e306f Vladimir Oltean 2019-05-02 2322 goto out; ffe10e679cec9a Vladimir Oltean 2020-03-20 2323 3ad1d171548e85 Vladimir Oltean 2021-06-11 2324 if (!xpcs) 84db00f2c04338 Vladimir Oltean 2021-05-31 2325 continue; 84db00f2c04338 Vladimir Oltean 2021-05-31 2326 3ad1d171548e85 Vladimir Oltean 2021-06-11 2327 if (bmcr[i] & BMCR_ANENABLE) 3ad1d171548e85 Vladimir Oltean 2021-06-11 2328 mode = MLO_AN_INBAND; 3ad1d171548e85 Vladimir Oltean 2021-06-11 2329 else if (priv->fixed_link[i]) 3ad1d171548e85 Vladimir Oltean 2021-06-11 2330 mode = MLO_AN_FIXED; 3ad1d171548e85 Vladimir Oltean 2021-06-11 2331 else 3ad1d171548e85 Vladimir Oltean 2021-06-11 2332 mode = MLO_AN_PHY; ffe10e679cec9a Vladimir Oltean 2020-03-20 2333 3ad1d171548e85 Vladimir Oltean 2021-06-11 @2334 rc = xpcs_do_config(xpcs, priv->phy_mode[i], mode); 3ad1d171548e85 Vladimir Oltean 2021-06-11 2335 if (rc < 0) 3ad1d171548e85 Vladimir Oltean 2021-06-11 2336 goto out; ffe10e679cec9a Vladimir Oltean 2020-03-20 2337 3ad1d171548e85 Vladimir Oltean 2021-06-11 2338 if (!phylink_autoneg_inband(mode)) { ffe10e679cec9a Vladimir Oltean 2020-03-20 2339 int speed = SPEED_UNKNOWN; ffe10e679cec9a Vladimir Oltean 2020-03-20 2340 56b63466333b25 Vladimir Oltean 2021-06-11 2341 if (priv->phy_mode[i] == PHY_INTERFACE_MODE_2500BASEX) 56b63466333b25 Vladimir Oltean 2021-06-11 2342 speed = SPEED_2500; 56b63466333b25 Vladimir Oltean 2021-06-11 2343 else if (bmcr[i] & BMCR_SPEED1000) ffe10e679cec9a Vladimir Oltean 2020-03-20 2344 speed = SPEED_1000; 84db00f2c04338 Vladimir Oltean 2021-05-31 2345 else if (bmcr[i] & BMCR_SPEED100) ffe10e679cec9a Vladimir Oltean 2020-03-20 2346 speed = SPEED_100; 053d8ad10d585a Vladimir Oltean 2021-03-04 2347 else ffe10e679cec9a Vladimir Oltean 2020-03-20 2348 speed = SPEED_10; ffe10e679cec9a Vladimir Oltean 2020-03-20 2349 3ad1d171548e85 Vladimir Oltean 2021-06-11 2350 xpcs_link_up(&xpcs->pcs, mode, priv->phy_mode[i], 3ad1d171548e85 Vladimir Oltean 2021-06-11 2351 speed, DUPLEX_FULL); ffe10e679cec9a Vladimir Oltean 2020-03-20 2352 } ffe10e679cec9a Vladimir Oltean 2020-03-20 2353 } 4d7525085a9ba8 Vladimir Oltean 2020-05-28 2354 4d7525085a9ba8 Vladimir Oltean 2020-05-28 2355 rc = sja1105_reload_cbs(priv); 4d7525085a9ba8 Vladimir Oltean 2020-05-28 2356 if (rc < 0) 4d7525085a9ba8 Vladimir Oltean 2020-05-28 2357 goto out; 6666cebc5e306f Vladimir Oltean 2019-05-02 2358 out: af580ae2dcb250 Vladimir Oltean 2019-11-09 2359 mutex_unlock(&priv->mgmt_lock); af580ae2dcb250 Vladimir Oltean 2019-11-09 2360 6666cebc5e306f Vladimir Oltean 2019-05-02 2361 return rc; 6666cebc5e306f Vladimir Oltean 2019-05-02 2362 } 6666cebc5e306f Vladimir Oltean 2019-05-02 2363 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel