• Bharat Kumar Gogada's avatar
    PCI: xilinx-nwl: Modify IRQ chip for legacy interrupts · 9a181e10
    Bharat Kumar Gogada authored
    - Add spinlock for protecting legacy mask register
    
    - Few wifi end points which only support legacy interrupts, performs
      hardware reset functionalities after disabling interrupts by invoking
      disable_irq() and then re-enable using enable_irq(), they enable hardware
      interrupts first and then virtual IRQ line later.
    
    - The legacy IRQ line goes low only after DEASSERT_INTx is received.  As
      the legacy IRQ line is high immediately after hardware interrupts are
      enabled but virq of EP is still in disabled state and EP handler is never
      executed resulting no DEASSERT_INTx.  If dummy IRQ chip is used,
      interrupts are not masked and system hangs with CPU stall.
    
    - Add IRQ chip functions instead of dummy IRQ chip for legacy interrupts.
    
    - Legacy interrupts are level sensitive, so using handle_level_irq() is
      more appropriate as it is masks interrupts until Endpoint handles
      interrupts and unmasks interrupts after Endpoint handler is executed.
    
    - Legacy interrupts are level triggered, virtual IRQ line of EndPoint shows
      as edge in /proc/interrupts.
    
    - Set IRQ flags of virtual IRQ line of EP to level triggered at the time of
      mapping.
    Signed-off-by: default avatarBharat Kumar Gogada <bharatku@xilinx.com>
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    9a181e10
pcie-xilinx-nwl.c 24.4 KB