linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
To: George Cherian <george.cherian-l0cyMroinI0@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	balbi-l0cyMroinI0@public.gmane.org,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	rogerq-l0cyMroinI0@public.gmane.org,
	kishon-l0cyMroinI0@public.gmane.org
Subject: Re: [PATCH 5/5] usb: dwc3: dwc3-omap: Disable/Enable core interrupts in Suspend/Resume
Date: Tue, 13 May 2014 10:50:19 -0500	[thread overview]
Message-ID: <20140513155019.GN1151@saruman.home> (raw)
In-Reply-To: <1399541587-14067-6-git-send-email-george.cherian-l0cyMroinI0@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1447 bytes --]

Hi,

On Thu, May 08, 2014 at 03:03:07PM +0530, George Cherian wrote:
> Enabling the core interrupts in complete is too late for XHCI, and stops
> xhci from proper operation. So remove prepare and complete and disable/enable

isn't this a bug in xhci ? I mean the driver should make no assumption
as to when IRQs are enabled, why do we need to enable IRQs earlier when
the device is only considered "ready for use" after ->complete()
finishes executing ?

From documentation we have:

107  * @complete: Undo the changes made by @prepare().  This method is executed for
108  *      all kinds of resume transitions, following one of the resume callbacks:
109  *      @resume(), @thaw(), @restore().  Also called if the state transition
110  *      fails before the driver's suspend callback: @suspend(), @freeze() or
111  *      @poweroff(), can be executed (e.g. if the suspend callback fails for one
112  *      of the other devices that the PM core has unsuccessfully attempted to
113  *      suspend earlier).
114  *      The PM core executes subsystem-level @complete() after it has executed
115  *      the appropriate resume callbacks for all devices.

which tells me that using ->complete() to reenable IRQs is ok here.
Specially when you consider that the role of ->prepare() is to prevent
new children from being created and, for a USB host, that means we
should prevent hub port changes.

cheers

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2014-05-13 15:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08  9:33 [PATCH 0/5] Cleanup and fixes for dwc3-omap George Cherian
2014-05-08  9:33 ` [PATCH 1/5] usb: dwc3: dwc3-omap: Add dwc3_omap_map_offset function George Cherian
     [not found]   ` <1399541587-14067-2-git-send-email-george.cherian-l0cyMroinI0@public.gmane.org>
2014-05-13 16:02     ` Felipe Balbi
2014-05-14  5:41       ` George Cherian
2014-05-08  9:33 ` [PATCH 2/5] usb: dwc3: dwc3-omap: Add dwc3_omap_set_utmi_mode() function George Cherian
2014-05-08  9:33 ` [PATCH 3/5] usb: dwc3: dwc3-omap: Add dwc3_omap_extcon_register function George Cherian
2014-05-08  9:33 ` [PATCH 4/5] usb: dwc3: dwc3-omap: Fix the crash on module removal George Cherian
2014-05-08  9:33 ` [PATCH 5/5] usb: dwc3: dwc3-omap: Disable/Enable core interrupts in Suspend/Resume George Cherian
     [not found]   ` <1399541587-14067-6-git-send-email-george.cherian-l0cyMroinI0@public.gmane.org>
2014-05-13 15:50     ` Felipe Balbi [this message]
2014-05-14  5:59       ` George Cherian

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=20140513155019.GN1151@saruman.home \
    --to=balbi-l0cymroini0@public.gmane.org \
    --cc=george.cherian-l0cyMroinI0@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=kishon-l0cyMroinI0@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rogerq-l0cyMroinI0@public.gmane.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).