Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4977528pxb; Sun, 7 Nov 2021 02:35:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7vr4Ep7i+BW+x4+BEOwJLzNQJtab/NnzfHS60zTubCJrhp193D89ff/IzNAC4I03QYnPX X-Received: by 2002:a05:6402:274c:: with SMTP id z12mr64471308edd.151.1636281331400; Sun, 07 Nov 2021 02:35:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636281331; cv=none; d=google.com; s=arc-20160816; b=bcLlzF0CWshuzJW3qZm34u4TjLgG0rZ2uhtOKKKdJJQiXRElKu2/Kg7ARGORT6HzHg WsA9FrwvcOOatkqEknNEjZ04E7kIuxxQGrVCsCORtqvgBCDPd3iUo7ait/IpLKefDZOL 96Z4SOPf21djX3A8+z4N8Wl/uiMTanSrXuzqDukWqkTSFGyuFXuFwhYEijy+UplfJC7D fi1ZYxrOP5fYdY1FXpnxQrrHrj1PAy3/uwLVmVXMb2Ek4mrHVNj7tfm/t90OQMvhqVgO MgaajOyGGdnIU5ojx1YI25uO2amnXcdVFPWZ3lOkuFsZcxQ0YQnNU9bwBB/DmClY69+9 6FBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8a21a1UDUs4xgD2nOzuGhtwgyBsxJwSyd8q/wMIwgPI=; b=W2zh9dZs6mbLynC5IiY9IJWlCN3v+OU2wqbEyyjfE9/KKyShJ2nwa/lQI0DZTU1eWu Y1vBeexcD2YZFe73L4m2TNSfZY2MaCS+2UPe6f3pUn1Jt5SIAoyQv5rvdZZpHxG8bb6k AlEUbm7gtZPFpJmDA1v9RStTvucJcvjakQkZSk4pdUOv2YFbH2dATk4k3ZCZyvTz5fYX tfXDP6r3Rhtc4x2k0IYfX+tA2YVHIK3rddsBM1jP1Ho7UDNkNYDJ25EwwOVnOa2Mzefw /m3hID5F031sxAl0eOtoFpB/zMG3fY/MwRR9gmnTkfZPOZ0od42pzFIAkbzP6py4iiI2 rncQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Ca/CGLHk"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ap15si18514058ejc.676.2021.11.07.02.34.52; Sun, 07 Nov 2021 02:35:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Ca/CGLHk"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235034AbhKFU2r (ORCPT + 99 others); Sat, 6 Nov 2021 16:28:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:32804 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233034AbhKFU2r (ORCPT ); Sat, 6 Nov 2021 16:28:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 19A716108C; Sat, 6 Nov 2021 20:26:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636230365; bh=9+4pWBCa4o/Zt0vecwPOWJ5pWwX4t+2QOGacgqTun/8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ca/CGLHk0tJtRiRWmKRus4hTo1nm3Aw9LfrI+z3s0qIoycF8Bt1GZBPuCX5FluK1V MOl5yH2S8/cXwjniUmQGDf23OFqi11/y7HRRvgsMSDRqnXpqs8ryMekGvVI4JLVMYU uwMpypb1/FIeFYJ20mU7iW95EZOoTkpkNvcDG2AB5pge8aaPJBeQ3gFNjDjtb83lSo eI0hO6j51AGgV6aDTeaPSH4Xg/fnzbSvUqDCspMFQB1yGCA/hqQg23eaxm5VjuoIdO q642948vKnenoMT2K4q+T5JyHM43ZtMZxOz6kgVF937pQKVy5kCMIHGYzEaayBHuG/ MSJs0KjO8TEdg== Date: Sat, 6 Nov 2021 13:26:00 -0700 From: Nathan Chancellor To: Andy Shevchenko Cc: kernel test robot , Christophe JAILLET , Daniel Borkmann , llvm@lists.linux.dev, kbuild-all@lists.01.org, Linux Kernel Mailing List Subject: Re: [dborkman-bpf:pr/bpf-tstamp 3/3] drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2482:44: warning: shift count >= width of type Message-ID: References: <202111060804.OP5qAfyw-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 06, 2021 at 08:42:12PM +0200, Andy Shevchenko wrote: > +Cc Christophe (can you look into this? It seems your code is involved) I think this report can just be ignored. As far as I am aware, this warning only shows up when there is a previous error in the file. The warning is a false positive anyways because the macro checks for the overflow case and this has been a known problem for a while: https://github.com/ClangBuiltLinux/linux/issues/92 Cheers, Nathan > On Sat, Nov 6, 2021 at 3:52 AM kernel test robot wrote: > > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git pr/bpf-tstamp > > head: f7d619a946e981177777983af26e9e31163ffb38 > > commit: f7d619a946e981177777983af26e9e31163ffb38 [3/3] net: skb clock bases > > config: i386-randconfig-a005-20210928 (attached as .config) > > compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498) > > 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://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git/commit/?id=f7d619a946e981177777983af26e9e31163ffb38 > > git remote add dborkman-bpf https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/bpf.git > > git fetch --no-tags dborkman-bpf pr/bpf-tstamp > > git checkout f7d619a946e981177777983af26e9e31163ffb38 > > # save the attached .config to linux build tree > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot > > > > All warnings (new ones prefixed by >>): > > > > In file included from drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:9: > > In file included from drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h:22: > > include/net/tcp.h:812:27: error: no member named 'skb_mstamp_ns' in 'struct sk_buff' > > return tcp_ns_to_ts(skb->skb_mstamp_ns); > > ~~~ ^ > > include/net/tcp.h:818:22: error: no member named 'skb_mstamp_ns' in 'struct sk_buff' > > return div_u64(skb->skb_mstamp_ns, NSEC_PER_USEC); > > ~~~ ^ > > include/net/tcp.h:2367:8: error: no member named 'skb_mstamp_ns' in 'struct sk_buff' > > skb->skb_mstamp_ns += (u64)tp->tcp_tx_delay * NSEC_PER_USEC; > > ~~~ ^ > > >> drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2482:44: warning: shift count >= width of type [-Wshift-count-overflow] > > if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) { > > ^~~~~~~~~~~~~~~~ > > include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK' > > #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) > > ^ ~~~ > > 1 warning and 3 errors generated. > > -- > > In file included from drivers/net/ethernet/emulex/benet/be_main.c:16: > > In file included from drivers/net/ethernet/emulex/benet/be.h:20: > > include/net/tcp.h:812:27: error: no member named 'skb_mstamp_ns' in 'struct sk_buff' > > return tcp_ns_to_ts(skb->skb_mstamp_ns); > > ~~~ ^ > > include/net/tcp.h:818:22: error: no member named 'skb_mstamp_ns' in 'struct sk_buff' > > return div_u64(skb->skb_mstamp_ns, NSEC_PER_USEC); > > ~~~ ^ > > include/net/tcp.h:2367:8: error: no member named 'skb_mstamp_ns' in 'struct sk_buff' > > skb->skb_mstamp_ns += (u64)tp->tcp_tx_delay * NSEC_PER_USEC; > > ~~~ ^ > > >> drivers/net/ethernet/emulex/benet/be_main.c:5843:49: warning: shift count >= width of type [-Wshift-count-overflow] > > status = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); > > ^~~~~~~~~~~~~~~~ > > include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK' > > #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) > > ^ ~~~ > > 1 warning and 3 errors generated. > > > > > > vim +2482 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c > > > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2470 > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2471 static int pch_gbe_probe(struct pci_dev *pdev, > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2472 const struct pci_device_id *pci_id) > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2473 { > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2474 struct net_device *netdev; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2475 struct pch_gbe_adapter *adapter; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2476 int ret; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2477 > > 29cc436cb90da4c drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Andy Shevchenko 2013-06-28 2478 ret = pcim_enable_device(pdev); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2479 if (ret) > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2480 return ret; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2481 > > 8ff39301efd9d21 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Christophe JAILLET 2020-11-21 @2482 if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) { > > 8ff39301efd9d21 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Christophe JAILLET 2020-11-21 2483 ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2484 if (ret) { > > 8ff39301efd9d21 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Christophe JAILLET 2020-11-21 2485 dev_err(&pdev->dev, "ERR: No usable DMA configuration, aborting\n"); > > 29cc436cb90da4c drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Andy Shevchenko 2013-06-28 2486 return ret; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2487 } > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2488 } > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2489 > > 29cc436cb90da4c drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Andy Shevchenko 2013-06-28 2490 ret = pcim_iomap_regions(pdev, 1 << PCH_GBE_PCI_BAR, pci_name(pdev)); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2491 if (ret) { > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2492 dev_err(&pdev->dev, > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2493 "ERR: Can't reserve PCI I/O and memory resources\n"); > > 29cc436cb90da4c drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Andy Shevchenko 2013-06-28 2494 return ret; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2495 } > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2496 pci_set_master(pdev); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2497 > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2498 netdev = alloc_etherdev((int)sizeof(struct pch_gbe_adapter)); > > 29cc436cb90da4c drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Andy Shevchenko 2013-06-28 2499 if (!netdev) > > 29cc436cb90da4c drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Andy Shevchenko 2013-06-28 2500 return -ENOMEM; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2501 SET_NETDEV_DEV(netdev, &pdev->dev); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2502 > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2503 pci_set_drvdata(pdev, netdev); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2504 adapter = netdev_priv(netdev); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2505 adapter->netdev = netdev; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2506 adapter->pdev = pdev; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2507 adapter->hw.back = adapter; > > 29cc436cb90da4c drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Andy Shevchenko 2013-06-28 2508 adapter->hw.reg = pcim_iomap_table(pdev)[PCH_GBE_PCI_BAR]; > > 9e3617a7b84512b drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Andy Shevchenko 2021-05-10 2509 > > f1a26fdf5944ff9 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Darren Hart 2013-05-18 2510 adapter->pdata = (struct pch_gbe_privdata *)pci_id->driver_data; > > 9e3617a7b84512b drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Andy Shevchenko 2021-05-10 2511 if (adapter->pdata && adapter->pdata->platform_init) { > > 9e3617a7b84512b drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Andy Shevchenko 2021-05-10 2512 ret = adapter->pdata->platform_init(pdev); > > 9e3617a7b84512b drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Andy Shevchenko 2021-05-10 2513 if (ret) > > 9e3617a7b84512b drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Andy Shevchenko 2021-05-10 2514 goto err_free_netdev; > > 9e3617a7b84512b drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Andy Shevchenko 2021-05-10 2515 } > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2516 > > 2e1c8725bb834f1 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Sinan Kaya 2017-12-19 2517 adapter->ptp_pdev = > > 2e1c8725bb834f1 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Sinan Kaya 2017-12-19 2518 pci_get_domain_bus_and_slot(pci_domain_nr(adapter->pdev->bus), > > 2e1c8725bb834f1 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Sinan Kaya 2017-12-19 2519 adapter->pdev->bus->number, > > 1a0bdadb4e36aba drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Takahiroi Shimizu 2012-03-07 2520 PCI_DEVFN(12, 4)); > > 1a0bdadb4e36aba drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Takahiroi Shimizu 2012-03-07 2521 > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2522 netdev->netdev_ops = &pch_gbe_netdev_ops; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2523 netdev->watchdog_timeo = PCH_GBE_WATCHDOG_PERIOD; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2524 netif_napi_add(netdev, &adapter->napi, > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2525 pch_gbe_napi_poll, PCH_GBE_RX_WEIGHT); > > 756a6b03da98903 drivers/net/pch_gbe/pch_gbe_main.c Michał Mirosław 2011-04-19 2526 netdev->hw_features = NETIF_F_RXCSUM | > > 756a6b03da98903 drivers/net/pch_gbe/pch_gbe_main.c Michał Mirosław 2011-04-19 2527 NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM; > > 756a6b03da98903 drivers/net/pch_gbe/pch_gbe_main.c Michał Mirosław 2011-04-19 2528 netdev->features = netdev->hw_features; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2529 pch_gbe_set_ethtool_ops(netdev); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2530 > > 44770e1180decf9 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Jarod Wilson 2016-10-17 2531 /* MTU range: 46 - 10300 */ > > 44770e1180decf9 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Jarod Wilson 2016-10-17 2532 netdev->min_mtu = ETH_ZLEN - ETH_HLEN; > > 44770e1180decf9 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Jarod Wilson 2016-10-17 2533 netdev->max_mtu = PCH_GBE_MAX_JUMBO_FRAME_SIZE - > > 44770e1180decf9 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Jarod Wilson 2016-10-17 2534 (ETH_HLEN + ETH_FCS_LEN); > > 44770e1180decf9 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Jarod Wilson 2016-10-17 2535 > > 98200ec28a66c8d drivers/net/pch_gbe/pch_gbe_main.c Toshiharu Okada 2011-02-13 2536 pch_gbe_mac_load_mac_addr(&adapter->hw); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2537 pch_gbe_mac_reset_hw(&adapter->hw); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2538 > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2539 /* setup the private structure */ > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2540 ret = pch_gbe_sw_init(adapter); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2541 if (ret) > > 29cc436cb90da4c drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Andy Shevchenko 2013-06-28 2542 goto err_free_netdev; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2543 > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2544 /* Initialize PHY */ > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2545 ret = pch_gbe_init_phy(adapter); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2546 if (ret) { > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2547 dev_err(&pdev->dev, "PHY initialize error\n"); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2548 goto err_free_adapter; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2549 } > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2550 > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2551 /* Read the MAC address. and store to the private data */ > > 9c020d7b0525d3b drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Paul Burton 2018-06-22 2552 ret = pch_gbe_mac_read_mac_addr(&adapter->hw); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2553 if (ret) { > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2554 dev_err(&pdev->dev, "MAC address Read Error\n"); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2555 goto err_free_adapter; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2556 } > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2557 > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2558 memcpy(netdev->dev_addr, adapter->hw.mac.addr, netdev->addr_len); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2559 if (!is_valid_ether_addr(netdev->dev_addr)) { > > 2b53d07891630de drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Darren Hart 2012-01-16 2560 /* > > 2b53d07891630de drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Darren Hart 2012-01-16 2561 * If the MAC is invalid (or just missing), display a warning > > 2b53d07891630de drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Darren Hart 2012-01-16 2562 * but do not abort setting up the device. pch_gbe_up will > > 2b53d07891630de drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Darren Hart 2012-01-16 2563 * prevent the interface from being brought up until a valid MAC > > 2b53d07891630de drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Darren Hart 2012-01-16 2564 * is set. > > 2b53d07891630de drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Darren Hart 2012-01-16 2565 */ > > 2b53d07891630de drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Darren Hart 2012-01-16 2566 dev_err(&pdev->dev, "Invalid MAC address, " > > 2b53d07891630de drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Darren Hart 2012-01-16 2567 "interface disabled.\n"); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2568 } > > e99e88a9d2b0674 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Kees Cook 2017-10-16 2569 timer_setup(&adapter->watchdog_timer, pch_gbe_watchdog, 0); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2570 > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2571 INIT_WORK(&adapter->reset_task, pch_gbe_reset_task); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2572 > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2573 pch_gbe_check_options(adapter); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2574 > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2575 /* initialize the wol settings based on the eeprom settings */ > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2576 adapter->wake_up_evt = PCH_GBE_WL_INIT_SETTING; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2577 dev_info(&pdev->dev, "MAC address : %pM\n", netdev->dev_addr); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2578 > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2579 /* reset the hardware with the new settings */ > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2580 pch_gbe_reset(adapter); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2581 > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2582 ret = register_netdev(netdev); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2583 if (ret) > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2584 goto err_free_adapter; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2585 /* tell the stack to leave us alone until pch_gbe_open() is called */ > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2586 netif_carrier_off(netdev); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2587 netif_stop_queue(netdev); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2588 > > 1a0bdadb4e36aba drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Takahiroi Shimizu 2012-03-07 2589 dev_dbg(&pdev->dev, "PCH Network Connection\n"); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2590 > > f1a26fdf5944ff9 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Darren Hart 2013-05-18 2591 /* Disable hibernation on certain platforms */ > > f1a26fdf5944ff9 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Darren Hart 2013-05-18 2592 if (adapter->pdata && adapter->pdata->phy_disable_hibernate) > > f1a26fdf5944ff9 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Darren Hart 2013-05-18 2593 pch_gbe_phy_disable_hibernate(&adapter->hw); > > f1a26fdf5944ff9 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Darren Hart 2013-05-18 2594 > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2595 device_set_wakeup_enable(&pdev->dev, 1); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2596 return 0; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2597 > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2598 err_free_adapter: > > 7dbe38aed0ba01e drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c Paul Burton 2018-06-22 2599 pch_gbe_phy_hw_reset(&adapter->hw); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2600 err_free_netdev: > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2601 free_netdev(netdev); > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2602 return ret; > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2603 } > > 77555ee72282342 drivers/net/pch_gbe/pch_gbe_main.c Masayuki Ohtake 2010-09-21 2604 > > > > :::::: The code at line 2482 was first introduced by commit > > :::::: 8ff39301efd9d21cd62caad3504aa8d6e35d8304 net: pch_gbe: Use dma_set_mask_and_coherent to simplify code > > > > :::::: TO: Christophe JAILLET > > :::::: CC: Jakub Kicinski > > > > --- > > 0-DAY CI Kernel Test Service, Intel Corporation > > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org > > > > -- > With Best Regards, > Andy Shevchenko >