From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjorn Andersson Subject: [PATCH 2/5] rpmsg: smd: Create device for all channels Date: Tue, 12 Dec 2017 15:58:54 -0800 Message-ID: <20171212235857.10432-3-bjorn.andersson@linaro.org> References: <20171212235857.10432-1-bjorn.andersson@linaro.org> Return-path: Received: from mail-pf0-f196.google.com ([209.85.192.196]:45601 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752861AbdLLX7E (ORCPT ); Tue, 12 Dec 2017 18:59:04 -0500 Received: by mail-pf0-f196.google.com with SMTP id u19so477277pfa.12 for ; Tue, 12 Dec 2017 15:59:04 -0800 (PST) In-Reply-To: <20171212235857.10432-1-bjorn.andersson@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Ohad Ben-Cohen , Bjorn Andersson , Jeremy McNicoll , Will Newton Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Chris Lew Rather than selectively creating devices only for the channels that the remote have moved to "opening" state let's create devices for all channels found. The driver model will match drivers to the ones we care about and attempt to open these. The one case where this fails is if the user loads a firmware that lacks a particular channel of the previous firmware that was running, in which case we would find the old channel and attempt to probe it. The channel opening handshake will ensure this will result in a graceful failure. The result of this patch is that we will actively open the RPM channel even though it's left in a state other than "opening" after the boot loader's closing of the channel. Reported-by: Jeremy McNicoll Reported-by: Will Newton Signed-off-by: Bjorn Andersson --- drivers/rpmsg/qcom_smd.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c index 58dd44493420..1beddea6f087 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -1225,11 +1225,6 @@ static void qcom_channel_state_worker(struct work_struct *work) if (channel->state != SMD_CHANNEL_CLOSED) continue; - remote_state = GET_RX_CHANNEL_INFO(channel, state); - if (remote_state != SMD_CHANNEL_OPENING && - remote_state != SMD_CHANNEL_OPENED) - continue; - if (channel->registered) continue; -- 2.15.0