mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 11:53:01 +00:00
Merge "slim_msm: Gracefully handle QMI timeout failures"
This commit is contained in:
commit
fbb534c5f4
|
@ -395,7 +395,7 @@ static int ngd_xfer_msg(struct slim_controller *ctrl, struct slim_msg_txn *txn)
|
|||
* It also makes HW status cosistent with what SW has it here
|
||||
*/
|
||||
if ((pm_runtime_enabled(dev->dev) && ret < 0) ||
|
||||
dev->state == MSM_CTRL_DOWN) {
|
||||
dev->state >= MSM_CTRL_ASLEEP) {
|
||||
SLIM_ERR(dev, "slim ctrl vote failed ret:%d, state:%d",
|
||||
ret, dev->state);
|
||||
pm_runtime_set_suspended(dev->dev);
|
||||
|
@ -716,7 +716,7 @@ static int ngd_bulk_wr(struct slim_controller *ctrl, u8 la, u8 mt, u8 mc,
|
|||
mutex_lock(&dev->tx_lock);
|
||||
|
||||
if ((pm_runtime_enabled(dev->dev) && ret < 0) ||
|
||||
dev->state == MSM_CTRL_DOWN) {
|
||||
dev->state >= MSM_CTRL_ASLEEP) {
|
||||
SLIM_WARN(dev, "vote failed/SSR in-progress ret:%d, state:%d",
|
||||
ret, dev->state);
|
||||
pm_runtime_set_suspended(dev->dev);
|
||||
|
|
|
@ -1405,9 +1405,12 @@ static void msm_slim_qmi_recv_msg(struct kthread_work *work)
|
|||
struct msm_slim_qmi *qmi =
|
||||
container_of(work, struct msm_slim_qmi, kwork);
|
||||
|
||||
rc = qmi_recv_msg(qmi->handle);
|
||||
if (rc < 0)
|
||||
pr_err("%s: Error receiving QMI message\n", __func__);
|
||||
/* Drain all packets received */
|
||||
do {
|
||||
rc = qmi_recv_msg(qmi->handle);
|
||||
} while (rc == 0);
|
||||
if (rc != -ENOMSG)
|
||||
pr_err("%s: Error receiving QMI message:%d\n", __func__, rc);
|
||||
}
|
||||
|
||||
static void msm_slim_qmi_notify(struct qmi_handle *handle,
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
#define SLIMBUS_QMI_INS_ID 0
|
||||
|
||||
/* QMI response timeout of 500ms */
|
||||
#define SLIM_QMI_RESP_TOUT 500
|
||||
#define SLIM_QMI_RESP_TOUT 1000
|
||||
|
||||
#define PGD_THIS_EE(r, v) ((v) ? PGD_THIS_EE_V2(r) : PGD_THIS_EE_V1(r))
|
||||
#define PGD_PORT(r, p, v) ((v) ? PGD_PORT_V2(r, p) : PGD_PORT_V1(r, p))
|
||||
|
|
Loading…
Reference in a new issue