From patchwork Thu Mar 15 18:12:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 131838 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp1442151ljb; Thu, 15 Mar 2018 11:12:50 -0700 (PDT) X-Google-Smtp-Source: AG47ELsA7wAyHp1SbL1cRGDNYPHnY2EB374f6LqAgLZUtYbaCOT9nxz3qs5ziDB+CJ4zZKuPuxa0 X-Received: by 2002:a17:902:3283:: with SMTP id z3-v6mr9005075plb.118.1521137570783; Thu, 15 Mar 2018 11:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521137570; cv=none; d=google.com; s=arc-20160816; b=jOau1HWtMtfAQnbovTDjAi2ORtVzt+LrWcO7Jun1HIEARwnUxlmY5Zej9BfXsNaC1M VH2ul3BqB5OlnFCVVnkcw+Cw2YGLxMPxsINSznAQFvLda41agr52TvqOvXEzOLC8rq9N MqaUsRQ5tZZ8LfZDshoWr/CCC6wRM/qJxvRKvVXm9Ja5kdyNOkPJ7TVMKzt8AuK0JOOh RtHkcWn/8oUTIRQoXBUV6p+hhvKlknBt8lP6XGZGR73f/LIyjG4LdiohnrtYTKQJqVGU ePemsT0oiZ3YQnlMC+TIr4r/vToTB5nBTsdjHZqeJkTAlNtHcPb44RnqQpui2D7V/Z+c WCEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=1rRo5sSiFCEac+4GWX/piL+YPjpidSCtM4pteeBDMuE=; b=ItNYmzVgw3P1ZxWKzu072NRlatTr+sja32zkz/7vVefWs7+SN1ky8unpxiBsr5Ok0H XUsqUbgLZ6kcwgZKkH5M2y2lDOWDxYtTOkORA4oP69eNNjdTjgD5MBsB/5lqSYbFTvth vTUG/WbHyAVAkRB/gf8ZNfP1IRG2gA8wunisTpSnYCPf8yBqznJmuucX1z9X0WNLSAjf OpMnCYpXXaeBWBwzmep0iB8G3xuhqnjWoCpNO3mlJUgds7PRlaAJslZ5eif6kElpoOu8 +fZ/jXnFfVl9WmN6fTU6UAV53L+SRBE88Jtd68XcjyhmTrOk1ZUZL8MXzFhRITb6kmOL wbrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=SDa7Fa5o; 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 x75si1496302pfa.74.2018.03.15.11.12.50; Thu, 15 Mar 2018 11:12:50 -0700 (PDT) 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=SDa7Fa5o; 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 S1752332AbeCOSMt (ORCPT + 10 others); Thu, 15 Mar 2018 14:12:49 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:41772 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752565AbeCOSMs (ORCPT ); Thu, 15 Mar 2018 14:12:48 -0400 Received: by mail-pf0-f196.google.com with SMTP id f80so3126112pfa.8 for ; Thu, 15 Mar 2018 11:12:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=KqsmZZbyHrCrx5nUuFJllsDzDNI0rTF2swChHm0yANY=; b=SDa7Fa5og+CRiQkRBBIVxqBhPIBGma9Bp6DPHLRlcPPaJCBMJekwAvN+ypKEVJh/Hj KPXnyE/hHZC7Zp+XEY/A0tfu7QGgUEdkWcK7VuzbUU0E24JW3od3l2MIDRgRdlPEH1gm prr8Iwp/b13517Wt7sibZV0PShr1WTm6LhKd4= 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; bh=KqsmZZbyHrCrx5nUuFJllsDzDNI0rTF2swChHm0yANY=; b=ehk6YPsNWI1A1VRBNjqp45en4Ew88cYkO+Lj65L4FMt/TVu0QXUQ7eA4SXcRRNcLxM LjJ8+Km42phO1/VWiD4fwJP6nO1vHFROzA3YaqM1x3lYYN3JxvX3kMg8iiDBwH0de0h3 BRGmCe0DG/1RW2eaitmgwtERBdMjGbs6wM7vhOkr8Yop7tGUZsmNGODfetpSa+05vpvX jpoFUG4YTjDhBt+od1J276jny7a0BoB4xNRNfscy4DBwmMg4gCi2ijC/sTzJxWhOeLSx LPZNz2RCO8DHyjviP/WmcKZgHsZsKoRJZIyu+RuOF1qhh8lAlDK5nQDTFOBoe+GV+QfN qvKA== X-Gm-Message-State: AElRT7FC14WVd0R3UTYhoPKeo/vJeTgCR2BTceySX1zOd5MQe3gbdf2/ J/gQPrr9YzQC3yG4jv8iRdeZ/A== X-Received: by 10.99.123.23 with SMTP id w23mr7383663pgc.10.1521137567548; Thu, 15 Mar 2018 11:12:47 -0700 (PDT) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id c4sm10820963pgt.24.2018.03.15.11.12.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Mar 2018 11:12:46 -0700 (PDT) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson , Srinivas Kandagatla Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH] Revert "rpmsg: smd: Create device for all channels" Date: Thu, 15 Mar 2018 11:12:44 -0700 Message-Id: <20180315181244.8859-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.16.2 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org In an effort to pick up channels that are in a funky state we optimistically tried to open all channels that we found, with the addition that we failed if the other side did not handshake the opening. But as we're starting the modem a second time all channels are found - in a "funky" state - and we try to open them. But the modem firmware requires the IPCRTR to be up in order to initialize. So any channels we try to open before that will fail and will not be opened again. This takes care of the regression, at the cost of reintroducing the previous behavior of handling of channels with "funky" states. Reverts commit c12fc4519f60 ("rpmsg: smd: Create device for all channels") Reported-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson --- drivers/rpmsg/qcom_smd.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.16.2 -- 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 92d0c6a7a837..1bca889bbea5 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -1234,6 +1234,11 @@ 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;