• Alex Elder's avatar
    net: ipa: disable GSI interrupts while suspended · 45a42a3c
    Alex Elder authored
    Introduce new functions gsi_suspend() and gsi_resume(), which will
    disable the GSI interrupt handler after all endpoints are suspended
    and re-enable it before endpoints are resumed.  This will ensure no
    GSI interrupt handler will fire when the hardware is suspended.
    
    Here's a little further explanation.  There are seven GSI interrupt
    types, and most are disabled except when needed.
      - These two are not used (never enabled):
          GSI_INTER_EE_CH_CTRL
          GSI_INTER_EE_EV_CTRL
      - These two are only used to implement channel and event ring
        commands, and are only enabled while a command is underway:
          GSI_CH_CTRL
          GSI_EV_CTRL
      - The IEOB interrupt signals I/O completion.  It will not fire
        when a channel is stopped (or "suspended").
          GSI_IEOB
      - This interrupt is used to allocate or halt modem channels,
        and is only enabled while such a command is underway.
          GSI_GLOB_EE
        However it also is used to signal certain errors, and this could
        occur at any time.
      - The general interrupt signals general errors, and could occur at
        any time.
          GSI_GENERAL
    
    The purpose for this change is to ensure no global or general
    interrupts fire due to errors while the hardware is suspended.
    We enable the clock on resume, and at that time we can "handle"
    (at least report) these error conditions.
    Signed-off-by: default avatarAlex Elder <elder@linaro.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    45a42a3c
gsi.h 8.86 KB