qcacld-3.0: Call icnss API to check if WLAN FW is down
If modem crashed during wlan driver unloading, icnss driver will call driver uevent callback to set FW down status in driver side when it receives BEFORE_SHUTDOWN notification. If wlan driver is de-initialized just before the callback is called, kernel will panic as driver's context is freed. This can be avoid by not setting FW status in host driver. Instead, icnss driver provides an API to host driver to check FW status and host driver calls this API before any timeout assert or accessing HW registers. CRs-Fixed: 2161431 Change-Id: I8331367dd41dd0cedfa65c63f1bb3ffcb535e1c9
Šī revīzija ir iekļauta:

revīziju iesūtīja
nshrivas

vecāks
c816a9515d
revīzija
e470977e9f
@@ -1473,6 +1473,35 @@ int pld_is_qmi_disable(struct device *dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_is_fw_down() - Check WLAN fw is down or not
|
||||
*
|
||||
* @dev: device
|
||||
*
|
||||
* This API will be called to check if WLAN FW is down or not.
|
||||
*
|
||||
* Return: 1 FW is down
|
||||
* 0 FW is not down
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_is_fw_down(struct device *dev)
|
||||
{
|
||||
int ret = 0;
|
||||
enum pld_bus_type type = pld_get_bus_type(dev);
|
||||
|
||||
switch (type) {
|
||||
case PLD_BUS_TYPE_SNOC:
|
||||
ret = pld_snoc_is_fw_down(dev);
|
||||
break;
|
||||
default:
|
||||
pr_err("Invalid device type %d\n", type);
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_force_assert_target() - Send a force assert to FW.
|
||||
* This can use various sideband requests available at platform to
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -113,6 +113,11 @@ static inline int pld_snoc_is_qmi_disable(struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int pld_snoc_is_fw_down(struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int pld_snoc_set_fw_log_mode(struct device *dev, u8 fw_log_mode)
|
||||
{
|
||||
return 0;
|
||||
@@ -251,6 +256,11 @@ unsigned int pld_snoc_socinfo_get_serial_number(struct device *dev)
|
||||
return icnss_socinfo_get_serial_number(dev);
|
||||
}
|
||||
|
||||
static inline int pld_snoc_is_fw_down(struct device *dev)
|
||||
{
|
||||
return icnss_is_fw_down();
|
||||
}
|
||||
|
||||
#ifdef ICNSS_API_WITH_DEV
|
||||
static inline int pld_snoc_is_qmi_disable(struct device *dev)
|
||||
{
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user