From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757353AbbIUQiz (ORCPT ); Mon, 21 Sep 2015 12:38:55 -0400 Received: from foss.arm.com ([217.140.101.70]:54331 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752148AbbIUQiy (ORCPT ); Mon, 21 Sep 2015 12:38:54 -0400 Subject: Re: [PATCH 13/17] net: gianfar: remove misuse of IRQF_NO_SUSPEND flag To: Manoil Claudiu , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <1442850433-5903-1-git-send-email-sudeep.holla@arm.com> <1442850433-5903-14-git-send-email-sudeep.holla@arm.com> Cc: Sudeep Holla , Thomas Gleixner , "Rafael J. Wysocki" , "David S. Miller" , Kevin Hao , "netdev@vger.kernel.org" From: Sudeep Holla Message-ID: <56003298.2010404@arm.com> Date: Mon, 21 Sep 2015 17:38:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/09/15 17:24, Manoil Claudiu wrote: >> -----Original Message----- >> From: Sudeep Holla [mailto:sudeep.holla@arm.com] >> Sent: Monday, September 21, 2015 6:47 PM >> To: linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org >> Cc: Sudeep Holla ; Thomas Gleixner >> ; Rafael J. Wysocki ; David S. Miller >> ; Manoil Claudiu-B08782 >> ; Kevin Hao ; >> netdev@vger.kernel.org >> Subject: [PATCH 13/17] net: gianfar: remove misuse of IRQF_NO_SUSPEND >> flag >> >> The device is set as wakeup capable using proper wakeup API but the >> driver misuses IRQF_NO_SUSPEND to set the interrupt as wakeup source >> which is incorrect. >> >> This patch removes the use of IRQF_NO_SUSPEND flags replacing it with >> enable_irq_wake instead. >> > > What would be the purpose of IRQF_NO_SUSPEND flag then? If you look at the section "IRQF_NO_SUSPEND Flag" in Documentation/power/suspend-and-interrupts.txt, it states it doesn't guarantee that the interrupt will wake the system from a suspended state -- for such cases it is necessary to use enable_irq_wake(). > The flag is a friendlier API compared to calling enable_irq_wake(). In what sense ? > For older kernels, on PPC architectures, the flag did the job. Agreed, it does the job even now, just that it's not designed for that. One can change that anytime internally as the APIs for configuring wakeups as in place now. I am just making use of right APIs. > When did this change? Since when using IRQF_NO_SUSPEND is a "misuse"? > Sorry if the term "misuse" is not appropriate here, since the intention of the flag usage doesn't meet the requirements, I mentioned it as misuse. Regards, Sudeep