From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3612600858322193483==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [RFC PATCH 3/4] r8169: support CMAC Date: Mon, 29 Nov 2021 23:47:44 +0800 Message-ID: <202111292307.PquauVvv-lkp@intel.com> In-Reply-To: <20211129101315.16372-384-nic_swsd@realtek.com> List-Id: --===============3612600858322193483== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Hayes, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on horms-ipvs/master] [also build test WARNING on linus/master v5.16-rc3 next-20211129] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Hayes-Wang/r8169-support-d= ash/20211129-181721 base: https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs.git mast= er config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20211= 129/202111292307.PquauVvv-lkp(a)intel.com/config) compiler: powerpc-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 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/813fd268861808bfcf2eb07e8= 4aca80e45c35d2f git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Hayes-Wang/r8169-support-dash/2021= 1129-181721 git checkout 813fd268861808bfcf2eb07e84aca80e45c35d2f # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dpowerpc SHELL=3D/bin/bash drivers/net/ethernet/realte= k/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/net/ethernet/realtek/r8169_dash.c: In function 'rtl_cmac_enable': >> drivers/net/ethernet/realtek/r8169_dash.c:459:45: warning: right shift c= ount >=3D width of type [-Wshift-count-overflow] 459 | dash->rx_desc_dma >> 32); | ^~ drivers/net/ethernet/realtek/r8169_dash.c:463:45: warning: right shift c= ount >=3D width of type [-Wshift-count-overflow] 463 | dash->tx_desc_dma >> 32); | ^~ vim +459 drivers/net/ethernet/realtek/r8169_dash.c 395 = 396 static int rtl_cmac_enable(struct rtl_dash *dash) 397 { 398 u32 desc_addr; 399 int i; 400 = 401 for (i =3D 0; i < CMAC_DESC_NUM; i++) { 402 struct dash_tx_info *info =3D dash->tx_info + i; 403 struct cmac_desc *rx_desc =3D dash->rx_desc + i; 404 struct cmac_desc *tx_desc =3D dash->tx_desc + i; 405 struct device *d =3D &dash->pdev_cmac->dev; 406 dma_addr_t mapping; 407 u8 *addr; 408 u16 ops_rx, ops_tx; 409 = 410 info->buf =3D page_address(dash->tx_buf) + i * CMAC_BUF_SIZE; 411 info->len =3D 0; 412 info->ack =3D false; 413 = 414 addr =3D page_address(dash->rx_buf) + i * CMAC_BUF_SIZE; 415 mapping =3D dma_map_single(d, addr, CMAC_BUF_SIZE, 416 DMA_FROM_DEVICE); 417 if (unlikely(dma_mapping_error(d, mapping))) { 418 dev_err(d, "Failed to map RX DMA!\n"); 419 rtl_dash_change_cmac_state(dash, OOB_CMD_CMAC_STOP); 420 return -ENOMEM; 421 } 422 = 423 rx_desc->dma_addr =3D cpu_to_le64(mapping); 424 rx_desc->length =3D CMAC_BUF_SIZE; 425 rx_desc->resv =3D 0; 426 = 427 if (i =3D=3D (CMAC_DESC_NUM - 1)) { 428 ops_rx =3D RTXS_OWN | RTXS_EOR; 429 ops_tx =3D RTXS_FS | RTXS_LS | RTXS_EOR; 430 } else { 431 ops_rx =3D RTXS_OWN; 432 ops_tx =3D RTXS_FS | RTXS_LS; 433 } 434 = 435 rx_desc->status =3D cpu_to_le16(ops_rx); 436 tx_desc->status =3D cpu_to_le16(ops_tx); 437 } 438 = 439 dash->tx_free =3D 0; 440 dash->tx_used =3D 0; 441 dash->rx_cur =3D 0; 442 = 443 switch (dash->hw_dash_ver) { 444 case RTL_DASH_EP: 445 desc_addr =3D 0x890; 446 break; 447 case RTL_DASH_FP: 448 desc_addr =3D 0xf20090; 449 break; 450 default: 451 desc_addr =3D 0xf20090; 452 WARN_ON_ONCE(1); 453 break; 454 } 455 = 456 r8168_type2_write(dash->tp, 0xf, desc_addr, 457 dash->rx_desc_dma & DMA_BIT_MASK(32)); 458 r8168_type2_write(dash->tp, 0xf, desc_addr + 4, > 459 dash->rx_desc_dma >> 32); 460 r8168_type2_write(dash->tp, 0xf, desc_addr + 8, 461 dash->tx_desc_dma & DMA_BIT_MASK(32)); 462 r8168_type2_write(dash->tp, 0xf, desc_addr + 12, 463 dash->tx_desc_dma >> 32); 464 = 465 RTL_CMAC_W8(dash, IBCR2, RTL_CMAC_R8(dash, IBCR2) | 0x01); 466 RTL_CMAC_W8(dash, IBCR0, RTL_CMAC_R8(dash, IBCR0) | 0x01); 467 = 468 tasklet_enable(&dash->tl); 469 dash->cmac_state =3D CMAC_STATE_RUNNING; 470 = 471 rtl_dash_intr_en(dash); 472 = 473 return 0; 474 } 475 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============3612600858322193483==--