cnss: Update SSR crash shutdown API

Update the SSR API in order to support collect target RAM dump even
when host driver or other sub-systems crash.

CRs-Fixed: 609070
Change-Id: I8480f5d9a1a6b357792c7d92981b428cfb25f376
Signed-off-by: Yue Ma <yuem@codeaurora.org>
This commit is contained in:
Yue Ma 2014-02-07 14:38:46 -08:00
parent 219364c550
commit 964731f33f
2 changed files with 16 additions and 6 deletions

View File

@ -795,7 +795,16 @@ static int cnss_ramdump(int enable, const struct subsys_desc *subsys)
static void cnss_crash_shutdown(const struct subsys_desc *subsys)
{
struct cnss_wlan_driver *wdrv;
struct pci_dev *pdev;
if (!penv)
return;
wdrv = penv->driver;
pdev = penv->pdev;
if (pdev && wdrv && wdrv->crash_shutdown)
wdrv->crash_shutdown(pdev);
}
void cnss_device_self_recovery(void)

View File

@ -30,12 +30,13 @@ struct cnss_fw_files {
struct cnss_wlan_driver {
char *name;
int (*probe)(struct pci_dev *, const struct pci_device_id *);
void (*remove)(struct pci_dev *);
int (*reinit)(struct pci_dev *, const struct pci_device_id *);
void (*shutdown)(struct pci_dev *);
int (*suspend)(struct pci_dev *, pm_message_t state);
int (*resume)(struct pci_dev *);
int (*probe)(struct pci_dev *pdev, const struct pci_device_id *id);
void (*remove)(struct pci_dev *pdev);
int (*reinit)(struct pci_dev *pdev, const struct pci_device_id *id);
void (*shutdown)(struct pci_dev *pdev);
void (*crash_shutdown)(struct pci_dev *pdev);
int (*suspend)(struct pci_dev *pdev, pm_message_t state);
int (*resume)(struct pci_dev *pdev);
const struct pci_device_id *id_table;
};