lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 6 Oct 2022 07:13:11 +0800
From:   kernel test robot <lkp@...el.com>
To:     David Yang <mmyangfl@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        0day robot <lkp@...el.com>
Subject: drivers/net/ethernet/marvell/mv643xx_eth.c:1251:21: error: invalid
 type argument of '->' (have 'struct device')

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:   5 days ago
config: parisc-allmodconfig
compiler: hppa-linux-gcc (GCC) 12.1.0
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=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash drivers/gpio/ drivers/net/ethernet/marvell/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   drivers/net/ethernet/marvell/mv643xx_eth.c: In function 'mv643xx_eth_adjust_link':
>> drivers/net/ethernet/marvell/mv643xx_eth.c:1251:21: error: invalid type argument of '->' (have 'struct device')
    1251 |         if (dev->dev->of_node &&
         |                     ^~
   drivers/net/ethernet/marvell/mv643xx_eth.c:1252:45: error: invalid type argument of '->' (have 'struct device')
    1252 |             of_device_is_compatible(dev->dev->of_node,
         |                                             ^~


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

View attachment "config" of type "text/plain" (306326 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ