#24 e1000e fails to build if CONFIG_PM is set but CONFIG_PM_SLEEP is not

open
nobody
None
e1000e
1
2014-11-17
2013-08-29
András Korn
No
/usr/local/src/e1000e-2.4.14/src/netdev.c:7907:13: error: ‘e1000e_pm_suspend’ undeclared here (not in a function)
/usr/local/src/e1000e-2.4.14/src/netdev.c:7908:13: error: e1000e_pm_resume undeclared here (not in a function)

Apparent fix:

--- netdev.c.orig       2013-06-12 21:58:26.000000000 +0200
+++ netdev.c    2013-08-29 13:46:23.736416571 +0200
@@ -6863,7 +6863,7 @@
        return 0;
 }

-#ifdef CONFIG_PM_SLEEP
+#ifdef CONFIG_PM
 #ifndef USE_LEGACY_PM_SUPPORT
 static int e1000e_pm_suspend(struct device *dev)
 #else

Related

Patches: #24

Discussion

  • dertman
    dertman
    2013-08-29

    Could you provide the kernel version and .config file that you are experiencing this problem with?

    I assume that since CONFIG_PM_SLEEP is not set, that you have CONFIG_PM_RUNTIME set [CONFIG_PM depends on (CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME)].

     
  • András Korn
    András Korn
    2013-10-01

    Sorry about the delay; I got no notification of the your reply.

    Kernel version was 3.4.59, patched with linux-vserver 2.3.3.9 from http://vserver.13thfloor.at/Experimental/patch-3.4.48-vs2.3.3.9.diff. The relevant part of the config is (but I can attach it in its entirety if necessary):

    CONFIG_PM_RUNTIME=y
    CONFIG_PM=y
    # CONFIG_PM_DEBUG is not set
    CONFIG_PMBUS=m
    CONFIG_PM_DEVFREQ=y
    
     
  • dertman
    dertman
    2013-10-07

    I am not able to create a situation in an unpatched kernel that allows CONFIG_PM to be defined without CONFIG_PM_SLEEP also being defined (the make command is re-adding this flag when they are removed). I tried your config below, and the CONFIG_PM_SLEEP is still being set. Can you fill me in a little in what situation you were able to get this to happen? Is it an artifact from the patch you applied?

    I am leaning towards ACKING your patch (as it does make sense, due to the fact that e1000e_pm_resume() and e1000e_pm_suspend() are used in the general CONFIG_PM context and defined in a CONFIG_PM_SLEEP context) but I would just like to understand a little better the situation that lead to your config file.

    Thanks,

    Dave Ertman.

    From: "András Korn" [mailto:akorn@users.sf.net]
    Sent: Tuesday, October 01, 2013 12:21 PM
    To: [e1000:patches]
    Subject: [e1000:patches] #24 e1000e fails to build if CONFIG_PM is set but CONFIG_PM_SLEEP is not

    Sorry about the delay; I got no notification of the your reply.

    Kernel version was 3.4.59, patched with linux-vserver 2.3.3.9 from http://vserver.13thfloor.at/Experimental/patch-3.4.48-vs2.3.3.9.diff. The relevant part of the config is (but I can attach it in its entirety if necessary):

    CONFIG_PM_RUNTIME=y

    CONFIG_PM=y

    CONFIG_PM_DEBUG is not set

    CONFIG_PMBUS=m

    CONFIG_PM_DEVFREQ=y


    [patches:#24]http://sourceforge.net/p/e1000/patches/24/ e1000e fails to build if CONFIG_PM is set but CONFIG_PM_SLEEP is not

    Status: open
    Created: Thu Aug 29, 2013 12:47 PM UTC by András Korn
    Last Updated: Thu Aug 29, 2013 05:06 PM UTC
    Owner: nobody

    /usr/local/src/e1000e-2.4.14/src/netdev.c:7907:13: error: ‘e1000e_pm_suspend’ undeclared here (not in a function)

    /usr/local/src/e1000e-2.4.14/src/netdev.c:7908:13: error: ‘e1000e_pm_resume’ undeclared here (not in a function)

    Apparent fix:

    --- netdev.c.orig 2013-06-12 21:58:26.000000000 +0200

    +++ netdev.c 2013-08-29 13:46:23.736416571 +0200

    @@ -6863,7 +6863,7 @@

        return 0;
    

    }

    -#ifdef CONFIG_PM_SLEEP

    +#ifdef CONFIG_PM

    #ifndef USE_LEGACY_PM_SUPPORT

    static int e1000e_pm_suspend(struct device *dev)

    #else


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/e1000/patches/24/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Patches: #24

  • András Korn
    András Korn
    2013-10-20

    I'm sorry, but there's not much more I can tell you. I downloaded the vanilla kernel from kernel.org, applied the vserver patch from 13thfloor.at, configured it and ended up with the configuration that prevented me from building the e1000e module (other Intel NIC drivers might also be affected, fwiw).

    This is not an isolated occurrence. I've been using the vserver patch for many years and on many boxes, with many different configurations, so I have many kernel configs I can check. Most of them have CONFIG_PM but not CONFIG_PM_SLEEP.

    I'm attaching an example.

     
  • András Korn
    András Korn
    2013-10-20

    This kernelconfig has CONFIG_PM but not CONFIG_PM_SLEEP. It's for 3.10.16-vs2.3.6.6.

     
    Attachments
  • dertman
    dertman
    2013-10-21

    Andras,

    Are you able to create a valid kernel config that has this condition from an unpatched kernel (net or net-next)?

    From: "András Korn" [mailto:akorn@users.sf.net]
    Sent: Sunday, October 20, 2013 12:33 PM
    To: [e1000:patches]
    Subject: [e1000:patches] #24 e1000e fails to build if CONFIG_PM is set but CONFIG_PM_SLEEP is not

    This kernelconfig has CONFIG_PM but not CONFIG_PM_SLEEP. It's for 3.10.16-vs2.3.6.6.

    Attachment: superguppy (88.0 kB; application/octet-stream)


    [patches:#24]http://sourceforge.net/p/e1000/patches/24/ e1000e fails to build if CONFIG_PM is set but CONFIG_PM_SLEEP is not

    Status: open
    Created: Thu Aug 29, 2013 12:47 PM UTC by András Korn
    Last Updated: Sun Oct 20, 2013 07:30 PM UTC
    Owner: nobody

    /usr/local/src/e1000e-2.4.14/src/netdev.c:7907:13: error: ‘e1000e_pm_suspend’ undeclared here (not in a function)

    /usr/local/src/e1000e-2.4.14/src/netdev.c:7908:13: error: ‘e1000e_pm_resume’ undeclared here (not in a function)

    Apparent fix:

    --- netdev.c.orig 2013-06-12 21:58:26.000000000 +0200

    +++ netdev.c 2013-08-29 13:46:23.736416571 +0200

    @@ -6863,7 +6863,7 @@

        return 0;
    

    }

    -#ifdef CONFIG_PM_SLEEP

    +#ifdef CONFIG_PM

    #ifndef USE_LEGACY_PM_SUPPORT

    static int e1000e_pm_suspend(struct device *dev)

    #else


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/e1000/patches/24/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Patches: #24

  • András Korn
    András Korn
    2013-11-13

    Yes. Attaching config for plain 3.11.1 with CONFIG_PM but not CONFIG_PM_SLEEP.

     
    Attachments