lkml.org 
[lkml]   [2014]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 5/5] usb: dwc3: dwc3-omap: Disable/Enable core interrupts in Suspend/Resume
    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
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2014-05-13 18:41    [W:3.063 / U:0.372 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site