[xlnx:master 93/407] drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:108:4: error: 'struct axienet_local' has no member named 'ptp_rx_irq'

kernel test robot lkp at intel.com
Thu Apr 29 14:24:54 BST 2021


tree:   https://github.com/Xilinx/linux-xlnx master
head:   959c29b000f2d8576c7b56b53e559db140ee3952
commit: b4a6c96f858b3c2598343a5764add8a683dff7ef [93/407] net: xilinx: Refactor TSN functions into xilinx_tsn_ip.c
config: parisc-randconfig-r023-20210429 (attached as .config)
compiler: hppa-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/Xilinx/linux-xlnx/commit/b4a6c96f858b3c2598343a5764add8a683dff7ef
        git remote add xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xlnx master
        git checkout b4a6c96f858b3c2598343a5764add8a683dff7ef
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=parisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/mm.h:99,
                    from include/linux/bvec.h:13,
                    from include/linux/skbuff.h:17,
                    from include/linux/if_ether.h:19,
                    from include/uapi/linux/ethtool.h:19,
                    from include/linux/ethtool.h:18,
                    from include/linux/netdevice.h:37,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:21:
   include/asm-generic/pgtable.h: In function 'pte_clear_not_present_full':
   arch/parisc/include/asm/pgtable.h:91:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
      91 |   pte_t old_pte;     \
         |         ^~~~~~~
   arch/parisc/include/asm/pgtable.h:316:34: note: in expansion of macro 'set_pte_at'
     316 | #define pte_clear(mm, addr, xp)  set_pte_at(mm, addr, xp, __pte(0))
         |                                  ^~~~~~~~~~
   include/asm-generic/pgtable.h:201:2: note: in expansion of macro 'pte_clear'
     201 |  pte_clear(mm, address, ptep);
         |  ^~~~~~~~~
   include/asm-generic/pgtable.h: In function '__ptep_modify_prot_commit':
   arch/parisc/include/asm/pgtable.h:91:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
      91 |   pte_t old_pte;     \
         |         ^~~~~~~
   include/asm-generic/pgtable.h:629:2: note: in expansion of macro 'set_pte_at'
     629 |  set_pte_at(vma->vm_mm, addr, ptep, pte);
         |  ^~~~~~~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c: In function 'axienet_tsn_probe':
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:108:4: error: 'struct axienet_local' has no member named 'ptp_rx_irq'
     108 |  lp->ptp_rx_irq = platform_get_irq_byname(pdev, irq_name);
         |    ^~
   In file included from include/linux/kernel.h:15,
                    from include/linux/list.h:9,
                    from include/linux/module.h:9,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:19:
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:110:35: error: 'struct axienet_local' has no member named 'ptp_rx_irq'
     110 |  pr_info("ptp RX irq: %d %s\n", lp->ptp_rx_irq, irq_name);
         |                                   ^~
   include/linux/printk.h:311:34: note: in definition of macro 'pr_info'
     311 |  printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |                                  ^~~~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:112:4: error: 'struct axienet_local' has no member named 'ptp_tx_irq'
     112 |  lp->ptp_tx_irq = platform_get_irq_byname(pdev, irq_name);
         |    ^~
   In file included from include/linux/kernel.h:15,
                    from include/linux/list.h:9,
                    from include/linux/module.h:9,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:19:
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:113:35: error: 'struct axienet_local' has no member named 'ptp_tx_irq'
     113 |  pr_info("ptp TX irq: %d %s\n", lp->ptp_tx_irq, irq_name);
         |                                   ^~
   include/linux/printk.h:311:34: note: in definition of macro 'pr_info'
     311 |  printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |                                  ^~~~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:116:4: error: 'struct axienet_local' has no member named 'qbv_irq'
     116 |  lp->qbv_irq = platform_get_irq_byname(pdev, irq_name);
         |    ^~
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:119:8: error: 'struct axienet_local' has no member named 'qbv_irq'
     119 |  if (lp->qbv_irq > 0)
         |        ^~
   In file included from include/linux/kernel.h:15,
                    from include/linux/list.h:9,
                    from include/linux/module.h:9,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:19:
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:120:33: error: 'struct axienet_local' has no member named 'qbv_irq'
     120 |   pr_info("qbv_irq: %d %s\n", lp->qbv_irq, irq_name);
         |                                 ^~
   include/linux/printk.h:311:34: note: in definition of macro 'pr_info'
     311 |  printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |                                  ^~~~~~~~~~~
   In file included from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:19:
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:122:20: error: 'struct axienet_local' has no member named 'ptp_tx_lock'
     122 |  spin_lock_init(&lp->ptp_tx_lock);
         |                    ^~
   include/linux/spinlock.h:332:17: note: in definition of macro 'spin_lock_init'
     332 |  spinlock_check(_lock);    \
         |                 ^~~~~
   In file included from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:19:
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:122:20: error: 'struct axienet_local' has no member named 'ptp_tx_lock'
     122 |  spin_lock_init(&lp->ptp_tx_lock);
         |                    ^~
   include/linux/spinlock.h:106:9: note: in definition of macro 'raw_spin_lock_init'
     106 |  do { *(lock) = __RAW_SPIN_LOCK_UNLOCKED(lock); } while (0)
         |         ^~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:122:2: note: in expansion of macro 'spin_lock_init'
     122 |  spin_lock_init(&lp->ptp_tx_lock);
         |  ^~~~~~~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:125:3: error: implicit declaration of function 'axienet_ptp_timer_probe'; did you mean 'axienet_tsn_probe'? [-Werror=implicit-function-declaration]
     125 |   axienet_ptp_timer_probe((lp->regs + XAE_RTC_OFFSET), pdev);
         |   ^~~~~~~~~~~~~~~~~~~~~~~
         |   axienet_tsn_probe
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:125:39: error: 'XAE_RTC_OFFSET' undeclared (first use in this function); did you mean 'XAE_TC_OFFSET'?
     125 |   axienet_ptp_timer_probe((lp->regs + XAE_RTC_OFFSET), pdev);
         |                                       ^~~~~~~~~~~~~~
         |                                       XAE_TC_OFFSET
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:125:39: note: each undeclared identifier is reported only once for each function it appears in
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:93:6: warning: unused variable 'ret' [-Wunused-variable]
      93 |  int ret = 0;
         |      ^~~
   In file included from include/linux/mm_types.h:16,
                    from include/linux/mmzone.h:21,
                    from include/linux/gfp.h:6,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:13,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:19:
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c: In function 'axienet_tsn_open':
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:15: error: 'struct axienet_local' has no member named 'tx_tstamp_work'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |               ^~
   include/linux/workqueue.h:242:16: note: in definition of macro '__INIT_WORK'
     242 |   __init_work((_work), _onstack);    \
         |                ^~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:2: note: in expansion of macro 'INIT_WORK'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |  ^~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:15: error: 'struct axienet_local' has no member named 'tx_tstamp_work'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |               ^~
   include/linux/workqueue.h:243:4: note: in definition of macro '__INIT_WORK'
     243 |   (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \
         |    ^~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:2: note: in expansion of macro 'INIT_WORK'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |  ^~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:15: error: 'struct axienet_local' has no member named 'tx_tstamp_work'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |               ^~
   include/linux/workqueue.h:244:20: note: in definition of macro '__INIT_WORK'
     244 |   INIT_LIST_HEAD(&(_work)->entry);   \
         |                    ^~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:2: note: in expansion of macro 'INIT_WORK'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |  ^~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:15: error: 'struct axienet_local' has no member named 'tx_tstamp_work'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |               ^~
   include/linux/workqueue.h:245:4: note: in definition of macro '__INIT_WORK'
     245 |   (_work)->func = (_func);    \
         |    ^~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:2: note: in expansion of macro 'INIT_WORK'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |  ^~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:33: error: 'axienet_tx_tstamp' undeclared (first use in this function); did you mean 'axienet_tx_hwtstamp'?
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |                                 ^~~~~~~~~~~~~~~~~
   include/linux/workqueue.h:245:20: note: in definition of macro '__INIT_WORK'
     245 |   (_work)->func = (_func);    \
         |                    ^~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:2: note: in expansion of macro 'INIT_WORK'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |  ^~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:280:25: error: 'struct axienet_local' has no member named 'ptp_txq'
     280 |  skb_queue_head_init(&lp->ptp_txq);
         |                         ^~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:282:4: error: 'struct axienet_local' has no member named 'ptp_rx_hw_pointer'
     282 |  lp->ptp_rx_hw_pointer = 0;
         |    ^~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:283:4: error: 'struct axienet_local' has no member named 'ptp_rx_sw_pointer'
     283 |  lp->ptp_rx_sw_pointer = 0xff;
         |    ^~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:285:18: error: 'PTP_RX_CONTROL_OFFSET' undeclared (first use in this function)
     285 |  axienet_iow(lp, PTP_RX_CONTROL_OFFSET, PTP_RX_PACKET_CLEAR);
         |                  ^~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:285:41: error: 'PTP_RX_PACKET_CLEAR' undeclared (first use in this function); did you mean 'PTR_TO_PACKET_END'?
     285 |  axienet_iow(lp, PTP_RX_CONTROL_OFFSET, PTP_RX_PACKET_CLEAR);
         |                                         ^~~~~~~~~~~~~~~~~~~
         |                                         PTR_TO_PACKET_END
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:287:22: error: 'struct axienet_local' has no member named 'ptp_rx_irq'
     287 |  ret = request_irq(lp->ptp_rx_irq, axienet_ptp_rx_irq,
         |                      ^~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:287:36: error: 'axienet_ptp_rx_irq' undeclared (first use in this function); did you mean 'axienet_rx_irq'?
     287 |  ret = request_irq(lp->ptp_rx_irq, axienet_ptp_rx_irq,
         |                                    ^~~~~~~~~~~~~~~~~~
         |                                    axienet_rx_irq
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:292:22: error: 'struct axienet_local' has no member named 'ptp_tx_irq'
     292 |  ret = request_irq(lp->ptp_tx_irq, axienet_ptp_tx_irq,
         |                      ^~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:292:36: error: 'axienet_ptp_tx_irq' undeclared (first use in this function); did you mean 'axienet_tx_irq'?
     292 |  ret = request_irq(lp->ptp_tx_irq, axienet_ptp_tx_irq,
         |                                    ^~~~~~~~~~~~~~~~~~
         |                                    axienet_tx_irq
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:302:13: error: 'struct axienet_local' has no member named 'ptp_rx_irq'
     302 |  free_irq(lp->ptp_rx_irq, ndev);
         |             ^~
   cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for PTP_1588_CLOCK
   Depends on NET && POSIX_TIMERS
   Selected by
   - XILINX_AXI_EMAC_HWTSTAMP && NETDEVICES && ETHERNET && NET_VENDOR_XILINX && XILINX_AXI_EMAC


vim +108 drivers/net/ethernet/xilinx/xilinx_tsn_ip.c

    77	
    78	/**
    79	 * axienet_tsn_probe - TSN mac probe function.
    80	 * @pdev:	Pointer to platform device structure.
    81	 * @lp:		Pointer to axienet local structure
    82	 * @ndev:	Pointer to net_device structure.
    83	 *
    84	 * Return: 0, on success
    85	 *	    Non-zero error value on failure.
    86	 *
    87	 * This is the probe for TSN mac nodes.
    88	 */
    89	int axienet_tsn_probe(struct platform_device *pdev,
    90			      struct axienet_local *lp,
    91			      struct net_device *ndev)
    92	{
    93		int ret = 0;
    94		char irq_name[32];
    95		bool slave = false;
    96		u8     temac_no;
    97		struct device_node *ep_node;
    98		struct axienet_local *ep_lp;
    99	
   100		slave = of_property_read_bool(pdev->dev.of_node,
   101					      "xlnx,tsn-slave");
   102		if (slave)
   103			temac_no = XAE_TEMAC2;
   104		else
   105			temac_no = XAE_TEMAC1;
   106	
   107		sprintf(irq_name, "interrupt_ptp_rx_%d", temac_no + 1);
 > 108		lp->ptp_rx_irq = platform_get_irq_byname(pdev, irq_name);
   109	
   110		pr_info("ptp RX irq: %d %s\n", lp->ptp_rx_irq, irq_name);
   111		sprintf(irq_name, "interrupt_ptp_tx_%d", temac_no + 1);
 > 112		lp->ptp_tx_irq = platform_get_irq_byname(pdev, irq_name);
   113		pr_info("ptp TX irq: %d %s\n", lp->ptp_tx_irq, irq_name);
   114	
   115		sprintf(irq_name, "tsn_switch_scheduler_irq_%d", temac_no + 1);
 > 116		lp->qbv_irq = platform_get_irq_byname(pdev, irq_name);
   117	
   118		/*Ignoring if the qbv_irq is not exist*/
   119		if (lp->qbv_irq > 0)
   120			pr_info("qbv_irq: %d %s\n", lp->qbv_irq, irq_name);
   121	
   122		spin_lock_init(&lp->ptp_tx_lock);
   123	
   124		if (temac_no == XAE_TEMAC1)
 > 125			axienet_ptp_timer_probe((lp->regs + XAE_RTC_OFFSET), pdev);
   126	
   127		/* enable VLAN */
   128		lp->options |= XAE_OPTION_VLAN;
   129		axienet_setoptions(lp->ndev, lp->options);
   130	
   131		/* get the ep device */
   132		ep_node = of_parse_phandle(pdev->dev.of_node, "tsn,endpoint", 0);
   133	
   134		lp->master = of_find_net_device_by_node(ep_node);
   135	#ifdef CONFIG_XILINX_TSN_QBV
   136		ret = axienet_qbv_init(ndev);
   137	#endif
   138		/* EP+Switch */
   139		/* store the slaves to master(ep) */
   140		ep_lp = netdev_priv(lp->master);
   141		ep_lp->slaves[temac_no] = ndev;
   142	
   143		return 0;
   144	}
   145	
   146	/**
   147	 * axienet_device_reset - Reset and initialize the Axi Ethernet hardware.
   148	 * @ndev:	Pointer to the net_device structure
   149	 *
   150	 * This function is called to reset and initialize the Axi Ethernet core. This
   151	 * is typically called during initialization. It does a reset of the Axi DMA
   152	 * Rx/Tx channels and initializes the Axi DMA BDs. Since Axi DMA reset lines
   153	 * areconnected to Axi Ethernet reset lines, this in turn resets the Axi
   154	 * Ethernet core. No separate hardware reset is done for the Axi Ethernet
   155	 * core.
   156	 */
   157	static void axienet_device_reset(struct net_device *ndev)
   158	{
   159		u32 axienet_status;
   160		struct axienet_local *lp = netdev_priv(ndev);
   161	
   162		lp->max_frm_size = XAE_MAX_VLAN_FRAME_SIZE;
   163	
   164		lp->options |= XAE_OPTION_VLAN;
   165		lp->options &= (~XAE_OPTION_JUMBO);
   166	
   167		if (ndev->mtu > XAE_MTU && ndev->mtu <= XAE_JUMBO_MTU) {
   168			lp->max_frm_size = ndev->mtu + VLAN_ETH_HLEN +
   169						XAE_TRL_SIZE;
   170			if (lp->max_frm_size <= lp->rxmem)
   171				lp->options |= XAE_OPTION_JUMBO;
   172		}
   173	
   174		axienet_status = axienet_ior(lp, XAE_RCW1_OFFSET);
   175		axienet_status &= ~XAE_RCW1_RX_MASK;
   176		axienet_iow(lp, XAE_RCW1_OFFSET, axienet_status);
   177	
   178		if (lp->axienet_config->mactype == XAXIENET_1G &&
   179		    !lp->eth_hasnobuf) {
   180			axienet_status = axienet_ior(lp, XAE_IP_OFFSET);
   181			if (axienet_status & XAE_INT_RXRJECT_MASK)
   182				axienet_iow(lp, XAE_IS_OFFSET, XAE_INT_RXRJECT_MASK);
   183	
   184			/* Enable Receive errors */
   185			axienet_iow(lp, XAE_IE_OFFSET, XAE_INT_RECV_ERROR_MASK);
   186		}
   187	
   188		axienet_iow(lp, XAE_FCC_OFFSET, XAE_FCC_FCRX_MASK);
   189		lp->axienet_config->setoptions(ndev, lp->options &
   190					       ~(XAE_OPTION_TXEN | XAE_OPTION_RXEN));
   191	
   192		axienet_set_mac_address(ndev, NULL);
   193		axienet_set_multicast_list(ndev);
   194		lp->axienet_config->setoptions(ndev, lp->options);
   195	
   196		netif_trans_update(ndev);
   197	}
   198	
   199	/**
   200	 * axienet_mii_init - MII init routine
   201	 * @ndev:	Pointer to net_device structure.
   202	 *
   203	 * Return: 0, on success
   204	 *	    Non-zero error value on failure.
   205	 *
   206	 * This routine initializes MII.
   207	 */
   208	static int axienet_mii_init(struct net_device *ndev)
   209	{
   210		struct axienet_local *lp = netdev_priv(ndev);
   211		int ret, mdio_mcreg;
   212	
   213		mdio_mcreg = axienet_ior(lp, XAE_MDIO_MC_OFFSET);
   214		ret = axienet_mdio_wait_until_ready(lp);
   215		if (ret < 0)
   216			return ret;
   217	
   218		/* Disable the MDIO interface till Axi Ethernet Reset is completed.
   219		 * When we do an Axi Ethernet reset, it resets the complete core
   220		 * Including the MDIO. If MDIO is not disabled when the reset process is
   221		 * Started, MDIO will be broken afterwards.
   222		 */
   223		axienet_iow(lp, XAE_MDIO_MC_OFFSET,
   224			    (mdio_mcreg & (~XAE_MDIO_MC_MDIOEN_MASK)));
   225		axienet_device_reset(ndev);
   226		/* Enable the MDIO */
   227		axienet_iow(lp, XAE_MDIO_MC_OFFSET, mdio_mcreg);
   228		ret = axienet_mdio_wait_until_ready(lp);
   229		if (ret < 0)
   230			return ret;
   231	
   232		return 0;
   233	}
   234	
   235	/**
   236	 * axienet_tsn_open - TSN driver open routine.
   237	 * @ndev:	Pointer to net_device structure
   238	 *
   239	 * Return: 0, on success.
   240	 *	    non-zero error value on failure
   241	 *
   242	 * This is the driver open routine. It calls phy_start to start the PHY device.
   243	 * It also allocates interrupt service routines, enables the interrupt lines
   244	 * and ISR handling. Axi Ethernet core is reset through Axi DMA core.
   245	 */
   246	int axienet_tsn_open(struct net_device *ndev)
   247	{
   248		int ret;
   249		struct axienet_local *lp = netdev_priv(ndev);
   250		struct phy_device *phydev = NULL;
   251	
   252		ret = axienet_mii_init(ndev);
   253		if (ret < 0)
   254			return ret;
   255	
   256		if (lp->phy_node) {
   257			if (lp->phy_mode == XAE_PHY_TYPE_GMII) {
   258				phydev = of_phy_connect(lp->ndev, lp->phy_node,
   259							axienet_adjust_link, 0,
   260							PHY_INTERFACE_MODE_GMII);
   261			} else if (lp->phy_mode == XAE_PHY_TYPE_RGMII_2_0) {
   262				phydev = of_phy_connect(lp->ndev, lp->phy_node,
   263							axienet_adjust_link, 0,
   264							PHY_INTERFACE_MODE_RGMII_ID);
   265			} else if ((lp->axienet_config->mactype == XAXIENET_1G) ||
   266				     (lp->axienet_config->mactype == XAXIENET_2_5G)) {
   267				phydev = of_phy_connect(lp->ndev, lp->phy_node,
   268							axienet_adjust_link,
   269							lp->phy_flags,
   270							lp->phy_interface);
   271			}
   272	
   273			if (!phydev)
   274				dev_err(lp->dev, "of_phy_connect() failed\n");
   275			else
   276				phy_start(phydev);
   277		}
   278	
 > 279		INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
 > 280		skb_queue_head_init(&lp->ptp_txq);
   281	
 > 282		lp->ptp_rx_hw_pointer = 0;
 > 283		lp->ptp_rx_sw_pointer = 0xff;
   284	
 > 285		axienet_iow(lp, PTP_RX_CONTROL_OFFSET, PTP_RX_PACKET_CLEAR);
   286	
 > 287		ret = request_irq(lp->ptp_rx_irq, axienet_ptp_rx_irq,
   288				  0, "ptp_rx", ndev);
   289		if (ret)
   290			goto err_ptp_rx_irq;
   291	
 > 292		ret = request_irq(lp->ptp_tx_irq, axienet_ptp_tx_irq,
   293				  0, "ptp_tx", ndev);
   294		if (ret)
   295			goto err_ptp_tx_irq;
   296	
   297		netif_tx_start_all_queues(ndev);
   298	
   299		return 0;
   300	
   301	err_ptp_tx_irq:
   302		free_irq(lp->ptp_rx_irq, ndev);
   303	err_ptp_rx_irq:
   304		return ret;
   305	}
   306	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 21534 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210429/9c1675ec/attachment-0001.gz>


More information about the linux-arm-kernel mailing list