tree: https://github.com/intel-lab-lkp/linux/commits/UPDATE-20221001-062814/David-Yang/net-mv643xx_eth-support-MII-GMII-RGMII-modes/20221001-035040 head: 5c389a7caf94de4bd6957bbb2280570240f27319 commit: 5c389a7caf94de4bd6957bbb2280570240f27319 net: mv643xx_eth: support MII/GMII/RGMII modes for Kirkwood date: 6 days ago config: hexagon-allyesconfig compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920) 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/5c389a7caf94de4bd6957bbb2280570240f27319 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review UPDATE-20221001-062814/David-Yang/net-mv643xx_eth-support-MII-GMII-RGMII-modes/20221001-035040 git checkout 5c389a7caf94de4bd6957bbb2280570240f27319 # 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=hexagon SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/net/ethernet/marvell/mv643xx_eth.c:1251:14: error: member reference type 'struct device' is not a pointer; did you mean to use '.'? if (dev->dev->of_node && ~~~~~~~~^~ . drivers/net/ethernet/marvell/mv643xx_eth.c:1252:38: error: member reference type 'struct device' is not a pointer; did you mean to use '.'? of_device_is_compatible(dev->dev->of_node, ~~~~~~~~^~ . 2 errors generated. vim +1251 drivers/net/ethernet/marvell/mv643xx_eth.c 1208 1209 1210 /* mii management interface *************************************************/ 1211 static void mv643xx_eth_adjust_link(struct net_device *dev) 1212 { 1213 struct mv643xx_eth_private *mp = netdev_priv(dev); 1214 u32 pscr = rdlp(mp, PORT_SERIAL_CONTROL); 1215 u32 autoneg_disable = FORCE_LINK_PASS | 1216 DISABLE_AUTO_NEG_SPEED_GMII | 1217 DISABLE_AUTO_NEG_FOR_FLOW_CTRL | 1218 DISABLE_AUTO_NEG_FOR_DUPLEX; 1219 u32 psc1r; 1220 1221 if (dev->phydev->autoneg == AUTONEG_ENABLE) { 1222 /* enable auto negotiation */ 1223 pscr &= ~autoneg_disable; 1224 goto out_write; 1225 } 1226 1227 pscr |= autoneg_disable; 1228 1229 if (dev->phydev->speed == SPEED_1000) { 1230 /* force gigabit, half duplex not supported */ 1231 pscr |= SET_GMII_SPEED_TO_1000; 1232 pscr |= SET_FULL_DUPLEX_MODE; 1233 goto out_write; 1234 } 1235 1236 pscr &= ~SET_GMII_SPEED_TO_1000; 1237 1238 if (dev->phydev->speed == SPEED_100) 1239 pscr |= SET_MII_SPEED_TO_100; 1240 else 1241 pscr &= ~SET_MII_SPEED_TO_100; 1242 1243 if (dev->phydev->duplex == DUPLEX_FULL) 1244 pscr |= SET_FULL_DUPLEX_MODE; 1245 else 1246 pscr &= ~SET_FULL_DUPLEX_MODE; 1247 1248 out_write: 1249 wrlp(mp, PORT_SERIAL_CONTROL, pscr); 1250 > 1251 if (dev->dev->of_node && 1252 of_device_is_compatible(dev->dev->of_node, 1253 "marvell,kirkwood-eth-port")) { 1254 psc1r = rdlp(mp, PORT_SERIAL_CONTROL1); 1255 /* On Kirkwood with two Ethernet controllers, if both of them 1256 * have RGMII_EN disabled, the first controller will be in GMII 1257 * mode and the second one is effectively disabled, instead of 1258 * two MII interfaces. 1259 * 1260 * To enable GMII in the first controller, the second one must 1261 * also be configured (and may be enabled) with RGMII_EN 1262 * disabled too, even though it cannot be used at all. 1263 */ 1264 switch (dev->phydev->interface) { 1265 case PHY_INTERFACE_MODE_MII: 1266 case PHY_INTERFACE_MODE_GMII: 1267 psc1r &= ~RGMII_EN; 1268 break; 1269 case PHY_INTERFACE_MODE_RGMII: 1270 case PHY_INTERFACE_MODE_RGMII_ID: 1271 case PHY_INTERFACE_MODE_RGMII_RXID: 1272 case PHY_INTERFACE_MODE_RGMII_TXID: 1273 psc1r |= RGMII_EN; 1274 break; 1275 default: 1276 /* Unknown; don't touch */ 1277 break; 1278 } 1279 1280 wrlp(mp, PORT_SERIAL_CONTROL1, psc1r); 1281 } 1282 } 1283 -- 0-DAY CI Kernel Test Service https://01.org/lkp