Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1242710

Re: [PATCH 2/2] PM / sleep: prohibit devices probing during suspend/hibernation

From Alan Stern <stern@rowland.harvard.edu>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] PM / sleep: prohibit devices probing during suspend/hibernation
Date 2015-10-08 22:10 +0200
Message-ID <qhpFM-5mR-11@gated-at.bofh.it> (permalink)
References <qhpmq-4KO-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 8 Oct 2015, Grygorii Strashko wrote:

> >>>> @@ -277,9 +304,15 @@ static DECLARE_WAIT_QUEUE_HEAD(probe_waitqueue);
> >>>>    
> >>>>    static int really_probe(struct device *dev, struct device_driver *drv)
> >>>>    {
> >>>> -	int ret = 0;
> >>>> +	int ret = -EPROBE_DEFER;
> >>>>    	int local_trigger_count = atomic_read(&deferred_trigger_count);
> >>>>    
> >>>> +	if (defer_all_probes) {
> 
> Will it be ok If I add below comment here?
> 		/*
> 		 * Value of defer_all_probes can be set only by
> 		 * device_defer_all_probes_enable() which, in turn, will call
> 		 * wait_for_device_probe() right after that to avoid any races.
> 		 */

That will help.  You could also add a comment where
wait_for_device_probe is called before device_defer_all_probes_enable,
explaining that is needed.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] PM / sleep: prohibit devices probing during suspend/hibernation Grygorii Strashko <grygorii.strashko@ti.com> - 2015-10-08 19:00 +0200
  Re: [PATCH 2/2] PM / sleep: prohibit devices probing during  suspend/hibernation Alan Stern <stern@rowland.harvard.edu> - 2015-10-08 19:30 +0200
    Re: [PATCH 2/2] PM / sleep: prohibit devices probing during  suspend/hibernation Grygorii Strashko <grygorii.strashko@ti.com> - 2015-10-08 21:00 +0200
      Re: [PATCH 2/2] PM / sleep: prohibit devices probing during  suspend/hibernation Alan Stern <stern@rowland.harvard.edu> - 2015-10-08 21:30 +0200
        Re: [PATCH 2/2] PM / sleep: prohibit devices probing during  suspend/hibernation Grygorii Strashko <grygorii.strashko@ti.com> - 2015-10-08 21:50 +0200
          Re: [PATCH 2/2] PM / sleep: prohibit devices probing during  suspend/hibernation Alan Stern <stern@rowland.harvard.edu> - 2015-10-08 22:10 +0200
        Re: [PATCH 2/2] PM / sleep: prohibit devices probing during suspend/hibernation "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-08 22:20 +0200
          Re: [PATCH 2/2] PM / sleep: prohibit devices probing during  suspend/hibernation Grygorii Strashko <grygorii.strashko@ti.com> - 2015-10-09 16:40 +0200

csiph-web