[arm:net-queue 70/72] drivers/net/phy/phylink.c:1190:49: error: use of undeclared identifier 'state'
kernel test robot
lkp at intel.com
Fri Mar 1 14:15:31 PST 2024
tree: git://git.armlinux.org.uk/~rmk/linux-arm.git net-queue
head: ccd059cded5d2b8ed8f784a837b02a578fa927ff
commit: c62df466ec00e3b18bc49d91acd19b8ceb3abb63 [70/72] net: phylink: add pcs_query_inband()
config: arm-defconfig (https://download.01.org/0day-ci/archive/20240302/202403020610.dZd9Kzcc-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240302/202403020610.dZd9Kzcc-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403020610.dZd9Kzcc-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/net/phy/phylink.c:1190:49: error: use of undeclared identifier 'state'
pcs_link_mode = phylink_pcs_query_inband(pcs, state->interface);
^
>> drivers/net/phy/phylink.c:1192:47: error: too few arguments to function call, expected 2, have 1
phy_link_mode = phy_query_inband(pl->phydev);
~~~~~~~~~~~~~~~~ ^
include/linux/phy.h:1785:14: note: 'phy_query_inband' declared here
unsigned int phy_query_inband(struct phy_device *phydev,
^
2 errors generated.
vim +/state +1190 drivers/net/phy/phylink.c
1157
1158 /**
1159 * phylink_pcs_neg_mode() - helper to determine PCS inband mode
1160 * @pl:
1161 * @pcs:
1162 * @mode: one of %MLO_AN_FIXED, %MLO_AN_PHY, %MLO_AN_INBAND.
1163 * @interface: interface mode to be used
1164 * @advertising: adertisement ethtool link mode mask
1165 *
1166 * Determines the negotiation mode to be used by the PCS, and returns
1167 * one of:
1168 *
1169 * - %PHYLINK_PCS_NEG_NONE: interface mode does not support inband
1170 * - %PHYLINK_PCS_NEG_OUTBAND: an out of band mode (e.g. reading the PHY)
1171 * will be used.
1172 * - %PHYLINK_PCS_NEG_INBAND_DISABLED: inband mode selected but autoneg
1173 * disabled
1174 * - %PHYLINK_PCS_NEG_INBAND_ENABLED: inband mode selected and autoneg enabled
1175 *
1176 * Note: this is for cases where the PCS itself is involved in negotiation
1177 * (e.g. Clause 37, SGMII and similar) not Clause 73.
1178 */
1179 static unsigned int phylink_pcs_neg_mode(struct phylink *pl,
1180 struct phylink_pcs *pcs,
1181 unsigned int mode,
1182 phy_interface_t interface,
1183 const unsigned long *advertising)
1184 {
1185 unsigned int pcs_link_mode = 0;
1186 unsigned int phy_link_mode = 0;
1187 unsigned int neg_mode;
1188
1189 if (phylink_autoneg_inband(mode)) {
> 1190 pcs_link_mode = phylink_pcs_query_inband(pcs, state->interface);
1191 if (pl->phydev)
> 1192 phy_link_mode = phy_query_inband(pl->phydev);
1193 }
1194
1195 switch (interface) {
1196 case PHY_INTERFACE_MODE_SGMII:
1197 case PHY_INTERFACE_MODE_QSGMII:
1198 case PHY_INTERFACE_MODE_QUSGMII:
1199 case PHY_INTERFACE_MODE_USXGMII:
1200 /* These protocols are designed for use with a PHY which
1201 * communicates its negotiation result back to the MAC via
1202 * inband communication. Note: there exist PHYs that run
1203 * with SGMII but do not send the inband data.
1204 */
1205 if (!phylink_autoneg_inband(mode))
1206 neg_mode = PHYLINK_PCS_NEG_OUTBAND;
1207 else
1208 neg_mode = PHYLINK_PCS_NEG_INBAND_ENABLED;
1209 break;
1210
1211 case PHY_INTERFACE_MODE_1000BASEX:
1212 case PHY_INTERFACE_MODE_2500BASEX:
1213 /* 1000base-X is designed for use media-side for Fibre
1214 * connections, and thus the Autoneg bit needs to be
1215 * taken into account. We also do this for 2500base-X
1216 * as well, but drivers may not support this, so may
1217 * need to override this.
1218 */
1219 if (!phylink_autoneg_inband(mode))
1220 neg_mode = PHYLINK_PCS_NEG_OUTBAND;
1221 else if (linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
1222 advertising))
1223 neg_mode = PHYLINK_PCS_NEG_INBAND_ENABLED;
1224 else
1225 neg_mode = PHYLINK_PCS_NEG_INBAND_DISABLED;
1226 break;
1227
1228 default:
1229 neg_mode = PHYLINK_PCS_NEG_NONE;
1230 break;
1231 }
1232
1233 return neg_mode;
1234 }
1235
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the linux-arm-kernel
mailing list