From patchwork Tue Dec 12 23:58:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 121684 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4784282qgn; Tue, 12 Dec 2017 15:59:14 -0800 (PST) X-Google-Smtp-Source: ACJfBovKPDGz0fSAsMSgGlMpjrWAfq3g8JxEIJ27J1L6tg7OknJc1FZXKCnoVR1kjh9NEmuB3//1 X-Received: by 10.101.87.196 with SMTP id q4mr3538940pgr.97.1513123154544; Tue, 12 Dec 2017 15:59:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513123154; cv=none; d=google.com; s=arc-20160816; b=i9Lvyw1R2UHlrJSx0Xj9t7u7hI3SSP88sQisAHvn2ZNv6GTXwrf+Q7IPtvTrwHf1oJ 6a96J5WYqgp0ykWnx7M90jnGnKODY1nl7BeFXpZGc4RnjoHtLZOcHn+eFspeyJIZ1wij YHMW3ppZv6xG1x+JKs7axjXBhTn5TtJzaCkYxtVaHnuTionIp6SwNxFtqsNUo4lDDVYt HSF9BtwKvJkiP8khfXpXWc3PE+83b9f+mYgvDjovc7kdxb4MtwXiNYCywWVBZjaK84V1 wlbDZ4mH3kzQ/+5E/XR2NbgdVk0ZM1j2ctx/D5F2dvvKDtUA3udBjexG7XFAAVHuxGE2 MVxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=Ws7Tm2fA9PsyubP+rHSWsFC9zySk3ypJJbP9VCdWR6Y=; b=hoeOGKbuKWEVn1PtDFWc2ftqmDmKYBS0cqBhJWwp3Dwzh4jMsFMBRRpO9tDUGyZZMn 9UH3xqCjIxUAIQQPoJVsVBMTs4YupTXoYI6lsIVyqoAwPUo52JTfyRa9b6ppSQowUvxy Wj3F3YYMOoXYvsGjEl/hmb5Y03omY4jtuJ+b3Vybtj/NiKKrwT+fu1d/+uguBU+5dYft eKpp5KgEoxV75dl5z5rY0f2viA1siIfGbg05Hg+wYfZi70IKGssimRLkIXMGxWJCKgsj 0CnPYws+kYT45AEAjiZ64lU/VtyuIeT0RSgG59aBOrvN9/MF4AAhoLIdfE+8OfKRoOV2 9bBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ll3rRIn8; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7si250703plt.807.2017.12.12.15.59.14; Tue, 12 Dec 2017 15:59:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ll3rRIn8; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752928AbdLLX7N (ORCPT + 10 others); Tue, 12 Dec 2017 18:59:13 -0500 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8bJKWS73bc4REiX8W8V3Riejuy9weI3MHLqmkG8C3Cw=; b=Ll3rRIn8pclpSSS+F3086KSMqlzaaJx/WBxgeGifu92TcTNz975M6BOfG9WcJ96H+E Bj77+pUaPOJkwqZPI+7ljWdkrRXoKloPqd+NumTdxGY8UJjSHcq8af8Hi7bpRgm073MB Avu5DZB3nF7AozPWOfxgoKf5FBe7EvPNtOgME= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8bJKWS73bc4REiX8W8V3Riejuy9weI3MHLqmkG8C3Cw=; b=cdk6p4rki8g5wy9VS/GLRm3K/jskHevP0ZFvjq/tX6Ral6RwrgdO2gdSZfBlW6XJCq VdO5D8tgLx1JTpeW698jTCxufgFqh4mHBLnOGqEqOTu6XigJgvl+gqJa97nOaQFOeNdg /TsOwR8HEF+ZsJHZ0qUXjtk3YkLfjm2mISVwDgAc5tvrAh7qwuE0kWqxntDrX3LH5Yg+ xMrAmWguQhd5yFq7Kqax8dMYyGcCLP+nlconc/1VPLGn0x+Hcksku2XiX5wIoqfO+op3 0OqIASRlRPCqqCOKsCNqHaf9bkV/m4zUZJwKN49r4WYNeGmBVsr8LifX3Xcpl+cPkqV6 rf8A== X-Gm-Message-State: AKGB3mJxpkL8VpZlS4wIY16ZSIYyOHfnu4bR6+zOf+be7RVpw2pSC2ns t6/LfKmVMq0BmZYVq5Idz5gjZQ== X-Received: by 10.101.80.133 with SMTP id r5mr3634559pgp.314.1513123143314; Tue, 12 Dec 2017 15:59:03 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id t202sm270317pgb.75.2017.12.12.15.59.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Dec 2017 15:59:02 -0800 (PST) From: Bjorn Andersson 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 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> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171212235857.10432-1-bjorn.andersson@linaro.org> References: <20171212235857.10432-1-bjorn.andersson@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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(-) -- 2.15.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;