Skip to content
Snippets Groups Projects
  1. May 25, 2020
  2. May 22, 2020
  3. May 20, 2020
    • Linux Build Service Account's avatar
    • Chandana Kishori Chiluveru's avatar
      serial: msm_geni_serial: Fix geni_wait_for_cmd_done timeouts · 4257de13
      Chandana Kishori Chiluveru authored
      
      geni_wait_for_cmd_done API is using msm_geni_spinlocked API
      to check uport->lock(spinlock) status. If lock is available,
      driver relies on interrupt otherwise driver decides
      to go for polling mode.
      
      In case of oops_in_progress when msm_geni_serial_console_write
      checks if lock is not available or taken by the other core then
      console_write disabling the interrupt and calling geni_wait_for_cmd_done().
      After that spin_lock acquired by other core has been released and
      waiting for interrupt to be fired with interrupt disabled.
      
      As interrupts are already disabled, wait_for_completion is getting timeout
      due to race condition.
      
      To fix this issue added interrupt_disabled flag in msm_geni_serial_port
      to know the interrupt status and using this in geni_wait_for_cmd_done API
      to decide wait for interrupt or need to poll.
      
      Also fix spin_unlock_irqrestore flags handling in handle_rx_console
      function.
      
      Change-Id: Ia1eeaadadd9dd8090bef89e32654000b144e348b
      Signed-off-by: default avatarChandana Kishori Chiluveru <cchiluve@codeaurora.org>
      4257de13
    • Chandana Kishori Chiluveru's avatar
      serial: msm_geni_serial: Enable IRQ from port startup · ca55c588
      Chandana Kishori Chiluveru authored
      
      uport->lock was first initialized in msm_geni_serial_probe() with IRQ
      enabled and calling uart_add_one_port() API. Same uport->lock will
      be re-initialized again from uart_add_one_port() context.
      
      In issue case IRQ is getting fired in one core and acquiring uport-> lock,
      at the same time uport->lock is getting re-initialized by serial_core.c
      driver on other core and changing the lock owner value to initial value.
      When msm_geni_serial_isr() trying unlock uport->lock it is checking for
      owner value with initialized value and reporting kernel crash.
      
      Fix this by setting NO_AUTO_ENABLE flag while IRQ registration in probe
      and enable and disable the IRQ form port_open and port_close.
      
      Also added changes in this patch to do not stop RX engine from
      msm_geni_serial_poll_tx_done API. Currently driver sending
      S_GENI_CMD_CANCEL instead of M_GENI_CMD_CANCEL to cancel TX.
      
      Change-Id: I4077f07335f572f190f2f17eb6ee1bf99fe5f189
      Signed-off-by: default avatarChandana Kishori Chiluveru <cchiluve@codeaurora.org>
      ca55c588
  4. May 18, 2020
  5. May 17, 2020
  6. May 16, 2020
  7. May 15, 2020
  8. May 14, 2020
Loading