Merge "slim_msm: Gracefully handle QMI timeout failures"

This commit is contained in:
Linux Build Service Account 2015-12-22 04:46:51 -08:00 committed by Gerrit - the friendly Code Review server
commit fbb534c5f4
3 changed files with 9 additions and 6 deletions

View file

@ -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);

View file

@ -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,

View file

@ -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))