Re: [PATCH v2 net-next 3/4] net: phy: Add Qualcomm QCA807x driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Robert,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Robert-Marko/Add-support-for-Qualcomm-QCA807x-PHYs/20210210-210217
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git de1db4a6ed6241e34cab0e5059d4b56f6bae39b9
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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/0day-ci/linux/commit/bf3f094b38fe42c313ba63d67c21b64cffb7f7b1
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Robert-Marko/Add-support-for-Qualcomm-QCA807x-PHYs/20210210-210217
        git checkout bf3f094b38fe42c313ba63d67c21b64cffb7f7b1
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/net/phy/qca807x.c: In function 'qca807x_read_copper_status':
>> drivers/net/phy/qca807x.c:404:12: error: 'struct phy_device' has no member named 'port'
     404 |  if (phydev->port != PORT_TP)
         |            ^~
   drivers/net/phy/qca807x.c:405:9: error: 'struct phy_device' has no member named 'port'
     405 |   phydev->port = PORT_TP;
         |         ^~
   drivers/net/phy/qca807x.c: In function 'qca807x_read_fiber_status':
   drivers/net/phy/qca807x.c:494:12: error: 'struct phy_device' has no member named 'port'
     494 |  if (phydev->port != PORT_FIBRE)
         |            ^~
   drivers/net/phy/qca807x.c:495:9: error: 'struct phy_device' has no member named 'port'
     495 |   phydev->port = PORT_FIBRE;
         |         ^~


vim +404 drivers/net/phy/qca807x.c

   399	
   400	static int qca807x_read_copper_status(struct phy_device *phydev, bool combo_port)
   401	{
   402		int ss, err, page, old_link = phydev->link;
   403	
 > 404		if (phydev->port != PORT_TP)
   405			phydev->port = PORT_TP;
   406	
   407		/* Only combo port has dual pages */
   408		if (combo_port) {
   409			/* Check whether copper page is set and set if needed */
   410			page = phy_read(phydev, QCA807X_CHIP_CONFIGURATION);
   411			if (!(page & QCA807X_BT_BX_REG_SEL)) {
   412				page |= QCA807X_BT_BX_REG_SEL;
   413				phy_write(phydev, QCA807X_CHIP_CONFIGURATION, page);
   414			}
   415		}
   416	
   417		/* Update the link, but return if there was an error */
   418		err = genphy_update_link(phydev);
   419		if (err)
   420			return err;
   421	
   422		/* why bother the PHY if nothing can have changed */
   423		if (phydev->autoneg == AUTONEG_ENABLE && old_link && phydev->link)
   424			return 0;
   425	
   426		phydev->speed = SPEED_UNKNOWN;
   427		phydev->duplex = DUPLEX_UNKNOWN;
   428		phydev->pause = 0;
   429		phydev->asym_pause = 0;
   430	
   431		err = genphy_read_lpa(phydev);
   432		if (err < 0)
   433			return err;
   434	
   435		/* Read the QCA807x PHY-Specific Status register copper page,
   436		 * which indicates the speed and duplex that the PHY is actually
   437		 * using, irrespective of whether we are in autoneg mode or not.
   438		 */
   439		ss = phy_read(phydev, QCA807X_PHY_SPECIFIC_STATUS);
   440		if (ss < 0)
   441			return ss;
   442	
   443		if (ss & QCA807X_SS_SPEED_AND_DUPLEX_RESOLVED) {
   444			int sfc;
   445	
   446			sfc = phy_read(phydev, QCA807X_FUNCTION_CONTROL);
   447			if (sfc < 0)
   448				return sfc;
   449	
   450			switch (FIELD_GET(QCA807X_SS_SPEED_MASK, ss)) {
   451			case QCA807X_SS_SPEED_10:
   452				phydev->speed = SPEED_10;
   453				break;
   454			case QCA807X_SS_SPEED_100:
   455				phydev->speed = SPEED_100;
   456				break;
   457			case QCA807X_SS_SPEED_1000:
   458				phydev->speed = SPEED_1000;
   459				break;
   460			}
   461			if (ss & QCA807X_SS_DUPLEX)
   462				phydev->duplex = DUPLEX_FULL;
   463			else
   464				phydev->duplex = DUPLEX_HALF;
   465	
   466			if (ss & QCA807X_SS_MDIX)
   467				phydev->mdix = ETH_TP_MDI_X;
   468			else
   469				phydev->mdix = ETH_TP_MDI;
   470	
   471			switch (FIELD_GET(QCA807X_FC_MDI_CROSSOVER_MODE_MASK, sfc)) {
   472			case QCA807X_FC_MDI_CROSSOVER_MANUAL_MDI:
   473				phydev->mdix_ctrl = ETH_TP_MDI;
   474				break;
   475			case QCA807X_FC_MDI_CROSSOVER_MANUAL_MDIX:
   476				phydev->mdix_ctrl = ETH_TP_MDI_X;
   477				break;
   478			case QCA807X_FC_MDI_CROSSOVER_AUTO:
   479				phydev->mdix_ctrl = ETH_TP_MDI_AUTO;
   480				break;
   481			}
   482		}
   483	
   484		if (phydev->autoneg == AUTONEG_ENABLE && phydev->autoneg_complete)
   485			phy_resolve_aneg_pause(phydev);
   486	
   487		return 0;
   488	}
   489	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux