From: kbuild test robot <lkp@intel.com>
To: Bryan Whitehead <Bryan.Whitehead@microchip.com>
Cc: kbuild-all@01.org, davem@davemloft.net, netdev@vger.kernel.org,
UNGLinuxDriver@microchip.com
Subject: Re: [PATCH v1 net-next 6/9] lan743x: Add power management support
Date: Fri, 6 Jul 2018 21:57:53 +0800 [thread overview]
Message-ID: <201807062025.hIs8ua2f%fengguang.wu@intel.com> (raw)
In-Reply-To: <1530808766-13973-7-git-send-email-Bryan.Whitehead@microchip.com>
[-- Attachment #1: Type: text/plain, Size: 6182 bytes --]
Hi Bryan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Bryan-Whitehead/lan743x-Add-features-to-lan743x-driver/20180706-051812
config: alpha-allmodconfig (attached as .config)
compiler: alpha-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=alpha
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/microchip/lan743x_main.c:2787:5: warning: "CONFIG_PM" is not defined, evaluates to 0 [-Wundef]
#if CONFIG_PM
^~~~~~~~~
drivers/net/ethernet/microchip/lan743x_main.c:2894:5: warning: "CONFIG_PM" is not defined, evaluates to 0 [-Wundef]
#if CONFIG_PM
^~~~~~~~~
drivers/net/ethernet/microchip/lan743x_main.c:2926:5: warning: "CONFIG_PM" is not defined, evaluates to 0 [-Wundef]
#if CONFIG_PM
^~~~~~~~~
drivers/net/ethernet/microchip/lan743x_main.c:2957:5: warning: "CONFIG_PM" is not defined, evaluates to 0 [-Wundef]
#if CONFIG_PM
^~~~~~~~~
--
>> drivers/net/ethernet/microchip/lan743x_ethtool.c:436:5: warning: "CONFIG_PM" is not defined, evaluates to 0 [-Wundef]
#if CONFIG_PM
^~~~~~~~~
vim +/CONFIG_PM +2787 drivers/net/ethernet/microchip/lan743x_main.c
2786
> 2787 #if CONFIG_PM
2788 static void lan743x_pm_set_wol(struct lan743x_adapter *adapter)
2789 {
2790 const u8 ipv4_multicast[3] = { 0x01, 0x00, 0x5E };
2791 const u8 ipv6_multicast[3] = { 0x33, 0x33 };
2792 const u8 arp_type[2] = { 0x08, 0x06 };
2793 int mask_index;
2794 u32 pmtctl;
2795 u32 wucsr;
2796 u32 macrx;
2797 u16 crc;
2798
2799 for (mask_index = 0; mask_index < MAC_NUM_OF_WUF_CFG; mask_index++)
2800 lan743x_csr_write(adapter, MAC_WUF_CFG(mask_index), 0);
2801
2802 /* clear wake settings */
2803 pmtctl = lan743x_csr_read(adapter, PMT_CTL);
2804 pmtctl |= PMT_CTL_WUPS_MASK_;
2805 pmtctl &= ~(PMT_CTL_GPIO_WAKEUP_EN_ | PMT_CTL_EEE_WAKEUP_EN_ |
2806 PMT_CTL_WOL_EN_ | PMT_CTL_MAC_D3_RX_CLK_OVR_ |
2807 PMT_CTL_RX_FCT_RFE_D3_CLK_OVR_ | PMT_CTL_ETH_PHY_WAKE_EN_);
2808
2809 macrx = lan743x_csr_read(adapter, MAC_RX);
2810
2811 wucsr = 0;
2812 mask_index = 0;
2813
2814 pmtctl |= PMT_CTL_ETH_PHY_D3_COLD_OVR_ | PMT_CTL_ETH_PHY_D3_OVR_;
2815
2816 if (adapter->wolopts & WAKE_PHY) {
2817 pmtctl |= PMT_CTL_ETH_PHY_EDPD_PLL_CTL_;
2818 pmtctl |= PMT_CTL_ETH_PHY_WAKE_EN_;
2819 }
2820 if (adapter->wolopts & WAKE_MAGIC) {
2821 wucsr |= MAC_WUCSR_MPEN_;
2822 macrx |= MAC_RX_RXEN_;
2823 pmtctl |= PMT_CTL_WOL_EN_ | PMT_CTL_MAC_D3_RX_CLK_OVR_;
2824 }
2825 if (adapter->wolopts & WAKE_UCAST) {
2826 wucsr |= MAC_WUCSR_RFE_WAKE_EN_ | MAC_WUCSR_PFDA_EN_;
2827 macrx |= MAC_RX_RXEN_;
2828 pmtctl |= PMT_CTL_WOL_EN_ | PMT_CTL_MAC_D3_RX_CLK_OVR_;
2829 pmtctl |= PMT_CTL_RX_FCT_RFE_D3_CLK_OVR_;
2830 }
2831 if (adapter->wolopts & WAKE_BCAST) {
2832 wucsr |= MAC_WUCSR_RFE_WAKE_EN_ | MAC_WUCSR_BCST_EN_;
2833 macrx |= MAC_RX_RXEN_;
2834 pmtctl |= PMT_CTL_WOL_EN_ | PMT_CTL_MAC_D3_RX_CLK_OVR_;
2835 pmtctl |= PMT_CTL_RX_FCT_RFE_D3_CLK_OVR_;
2836 }
2837 if (adapter->wolopts & WAKE_MCAST) {
2838 /* IPv4 multicast */
2839 crc = lan743x_pm_wakeframe_crc16(ipv4_multicast, 3);
2840 lan743x_csr_write(adapter, MAC_WUF_CFG(mask_index),
2841 MAC_WUF_CFG_EN_ | MAC_WUF_CFG_TYPE_MCAST_ |
2842 (0 << MAC_WUF_CFG_OFFSET_SHIFT_) |
2843 (crc & MAC_WUF_CFG_CRC16_MASK_));
2844 lan743x_csr_write(adapter, MAC_WUF_MASK0(mask_index), 7);
2845 lan743x_csr_write(adapter, MAC_WUF_MASK1(mask_index), 0);
2846 lan743x_csr_write(adapter, MAC_WUF_MASK2(mask_index), 0);
2847 lan743x_csr_write(adapter, MAC_WUF_MASK3(mask_index), 0);
2848 mask_index++;
2849
2850 /* IPv6 multicast */
2851 crc = lan743x_pm_wakeframe_crc16(ipv6_multicast, 2);
2852 lan743x_csr_write(adapter, MAC_WUF_CFG(mask_index),
2853 MAC_WUF_CFG_EN_ | MAC_WUF_CFG_TYPE_MCAST_ |
2854 (0 << MAC_WUF_CFG_OFFSET_SHIFT_) |
2855 (crc & MAC_WUF_CFG_CRC16_MASK_));
2856 lan743x_csr_write(adapter, MAC_WUF_MASK0(mask_index), 3);
2857 lan743x_csr_write(adapter, MAC_WUF_MASK1(mask_index), 0);
2858 lan743x_csr_write(adapter, MAC_WUF_MASK2(mask_index), 0);
2859 lan743x_csr_write(adapter, MAC_WUF_MASK3(mask_index), 0);
2860 mask_index++;
2861
2862 wucsr |= MAC_WUCSR_RFE_WAKE_EN_ | MAC_WUCSR_WAKE_EN_;
2863 macrx |= MAC_RX_RXEN_;
2864 pmtctl |= PMT_CTL_WOL_EN_ | PMT_CTL_MAC_D3_RX_CLK_OVR_;
2865 pmtctl |= PMT_CTL_RX_FCT_RFE_D3_CLK_OVR_;
2866 }
2867 if (adapter->wolopts & WAKE_ARP) {
2868 /* set MAC_WUF_CFG & WUF_MASK
2869 * for packettype (offset 12,13) = ARP (0x0806)
2870 */
2871 crc = lan743x_pm_wakeframe_crc16(arp_type, 2);
2872 lan743x_csr_write(adapter, MAC_WUF_CFG(mask_index),
2873 MAC_WUF_CFG_EN_ | MAC_WUF_CFG_TYPE_ALL_ |
2874 (0 << MAC_WUF_CFG_OFFSET_SHIFT_) |
2875 (crc & MAC_WUF_CFG_CRC16_MASK_));
2876 lan743x_csr_write(adapter, MAC_WUF_MASK0(mask_index), 0x3000);
2877 lan743x_csr_write(adapter, MAC_WUF_MASK1(mask_index), 0);
2878 lan743x_csr_write(adapter, MAC_WUF_MASK2(mask_index), 0);
2879 lan743x_csr_write(adapter, MAC_WUF_MASK3(mask_index), 0);
2880 mask_index++;
2881
2882 wucsr |= MAC_WUCSR_RFE_WAKE_EN_ | MAC_WUCSR_WAKE_EN_;
2883 macrx |= MAC_RX_RXEN_;
2884 pmtctl |= PMT_CTL_WOL_EN_ | PMT_CTL_MAC_D3_RX_CLK_OVR_;
2885 pmtctl |= PMT_CTL_RX_FCT_RFE_D3_CLK_OVR_;
2886 }
2887
2888 lan743x_csr_write(adapter, MAC_WUCSR, wucsr);
2889 lan743x_csr_write(adapter, PMT_CTL, pmtctl);
2890 lan743x_csr_write(adapter, MAC_RX, macrx);
2891 }
2892 #endif /* CONFIG_PM */
2893
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 53394 bytes --]
next prev parent reply other threads:[~2018-07-06 13:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-05 16:39 [PATCH v1 net-next 0/9] lan743x: Add features to lan743x driver Bryan Whitehead
2018-07-05 16:39 ` [PATCH v1 net-next 1/9] lan743x: Add support for ethtool get_drvinfo Bryan Whitehead
2018-07-05 17:12 ` Andrew Lunn
2018-07-05 19:07 ` Bryan.Whitehead
2018-07-05 16:39 ` [PATCH v1 net-next 2/9] lan743x: Add support for ethtool link settings Bryan Whitehead
2018-07-05 16:39 ` [PATCH v1 net-next 3/9] lan743x: Add support for ethtool statistics Bryan Whitehead
2018-07-05 17:20 ` Andrew Lunn
2018-07-05 19:09 ` Bryan.Whitehead
2018-07-05 16:39 ` [PATCH v1 net-next 4/9] lan743x: Add support for ethtool message level Bryan Whitehead
2018-07-05 16:39 ` [PATCH v1 net-next 5/9] lan743x: Add support for ethtool eeprom access Bryan Whitehead
2018-07-05 17:28 ` Andrew Lunn
2018-07-05 19:11 ` Bryan.Whitehead
2018-07-05 16:39 ` [PATCH v1 net-next 6/9] lan743x: Add power management support Bryan Whitehead
2018-07-05 17:37 ` Andrew Lunn
2018-07-05 19:29 ` Bryan.Whitehead
2018-07-06 13:57 ` kbuild test robot [this message]
2018-07-05 16:39 ` [PATCH v1 net-next 7/9] lan743x: Add EEE support Bryan Whitehead
2018-07-05 16:39 ` [PATCH v1 net-next 8/9] lan743x: Add RSS support Bryan Whitehead
2018-07-05 16:39 ` [PATCH v1 net-next 9/9] lan743x: Add PTP support Bryan Whitehead
2018-07-06 21:07 ` kbuild test robot
2018-07-06 21:24 ` Richard Cochran
2018-07-09 20:35 ` Bryan.Whitehead
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201807062025.hIs8ua2f%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=Bryan.Whitehead@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=davem@davemloft.net \
--cc=kbuild-all@01.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).