• Jinjian Song's avatar
    net: wwan: t7xx: PCIe reset rescan · d785ed94
    Jinjian Song authored
    WWAN device is programmed to boot in normal mode or fastboot mode,
    when triggering a device reset through ACPI call or fastboot switch
    command. Maintain state machine synchronization and reprobe logic
    after a device reset.
    
    The PCIe device reset triggered by several ways.
    E.g.:
     - fastboot: echo "fastboot_switching" > /sys/bus/pci/devices/${bdf}/t7xx_mode.
     - reset: echo "reset" > /sys/bus/pci/devices/${bdf}/t7xx_mode.
     - IRQ: PCIe device request driver to reset itself by an interrupt request.
    
    Use pci_reset_function() as a generic way to reset device, save and
    restore the PCIe configuration before and after reset device to ensure
    the reprobe process.
    
    Suggestion from Bjorn:
    Link: https://lore.kernel.org/all/20230127133034.GA1364550@bhelgaas/Signed-off-by: default avatarJinjian Song <jinjian.song@fibocom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    d785ed94
t7xx_state_monitor.c 16.4 KB