Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp924225pxx; Thu, 29 Oct 2020 18:55:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwL45xEuQZJl1JdcEOoouRfpvX6+orqegVue9Rp+LDx/3FJYSMWRQHor7uT599tpd+zyuH+ X-Received: by 2002:a17:906:400c:: with SMTP id v12mr216996ejj.387.1604022955765; Thu, 29 Oct 2020 18:55:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604022955; cv=none; d=google.com; s=arc-20160816; b=TM111DKdCria8svBxI+J9BjKw432AK2626cJqFNnPJHc/ovVudMakcDlSj5Dll/ZrH oQvOOwWeDR91BOMIrfBA5gFE4jS+GtgibHnq37LdxRxtLuJzfe7SnmyGbnnjVUsIMnXD B/YvaUUX0gAd9dMMmuPONooV8dM3HnMh5eti5RGAbPE0uCK4itDBrnC7iLOI2pzIOuRR rtB2N79XQOhNJUyj7CtTfmOKOan56reWSWQQzRhZdmBM4NImJ4kq0k2TvaOE9BgS/AbE al0EeQJrTqOhhBNCmCBTEf++evbvxaIHrE+XeWvG5C5UvoPTydbNV9BjG8sFzD4OhoWs drDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:dmarc-filter :sender:dkim-signature; bh=AiiVdcj6bYFwhyVGIXgAGlkRkHLNXBDjK0b11X3URuQ=; b=vmuEEHBsNHCFiVTLp7Vk3Paodx23op+Yh7KDNGi1kSWy7v1z4p6QSfkiuSmXZpiJl5 /jBivlZfe3R+IJkOYN1OvF7bPYKvtU99rgXeCdHCVNzhw7snEET3Ds+N8FgKhc2pKt8V v8G7wsAHg6WwfWGD4wrX89vBJhWcygJzjHsqrmMuyh4R135btth+G98Djsm4CBXfwSHt JYsb9j3UZ0p7OIVXJgN8Bzan4WP4tN3PprsfLodNDw2WNu3hk8R1kwEsdxyt8m/Y5Si0 cvAPZ1MbalXdp2UcoPwt0i6AaBvMNWOgtqUqAiSPpSn9c3CdoH/Elo/FC7BsT6t6QGHT zLfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=er063QoJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b10si3312507edz.86.2020.10.29.18.55.33; Thu, 29 Oct 2020 18:55:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=er063QoJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726014AbgJ3BwM (ORCPT + 99 others); Thu, 29 Oct 2020 21:52:12 -0400 Received: from z5.mailgun.us ([104.130.96.5]:59408 "EHLO z5.mailgun.us" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725372AbgJ3BwM (ORCPT ); Thu, 29 Oct 2020 21:52:12 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1604022731; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=AiiVdcj6bYFwhyVGIXgAGlkRkHLNXBDjK0b11X3URuQ=; b=er063QoJeSea4UAjwxx/KRNCEAF2uVmmJ1azvR0GZDxRPQWrQpAQjoaiSUFTIKAfT5wJ4Q/J G+MUq1EwHcTOa1lxBdaDfK+g20QjuQVCYZT3YJrox+eBZkiWRNA8YW6O7jTYVowVy7obWRuZ pJU8Khypvn3narBgQFphWtUVxpU= X-Mailgun-Sending-Ip: 104.130.96.5 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n04.prod.us-east-1.postgun.com with SMTP id 5f9b71cbfc3d7f56d0d0841a (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 30 Oct 2020 01:52:11 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id D09DBC433C6; Fri, 30 Oct 2020 01:52:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from malabar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: bbhatt) by smtp.codeaurora.org (Postfix) with ESMTPSA id EFC22C433C8; Fri, 30 Oct 2020 01:52:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org EFC22C433C8 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=bbhatt@codeaurora.org From: Bhaumik Bhatt To: manivannan.sadhasivam@linaro.org Cc: linux-arm-msm@vger.kernel.org, hemantk@codeaurora.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org, Bhaumik Bhatt Subject: [PATCH v2 00/12] Bug fixes and improvements for MHI power operations Date: Thu, 29 Oct 2020 18:51:51 -0700 Message-Id: <1604022723-34578-1-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v2: -Addressed patches based on review comments and made improvements -Added bus: mhi: core: Check for IRQ availability during registration -Dropped bus: mhi: core: Use the IRQF_ONESHOT flag for the BHI interrupt line -Split bus: mhi: core: Move to an error state on any firmware load failure -Modified the following patches: -bus: mhi: core: Disable IRQs when powering down -bus: mhi: core: Improve shutdown handling after link down detection -bus: mhi: core: Mark device inactive soon after host issues a shutdown -bus: mhi: core: Move to SYS_ERROR regardless of RDDM capability -Addressed the above as follow-up patches with improvements: -bus: mhi: core: Prevent sending multiple RDDM entry callbacks -bus: mhi: core: Separate system error and power down handling -bus: mhi: core: Remove MHI event ring IRQ handlers when powering down Bug fixes and improvements for MHI powerup and shutdown handling. Firmware load function names are updated to accurately reflect their purpose. Closed certain design gaps where the host (MHI bus) would allow clients to operate after a power down or error detection. Move to an error state sooner based on different scenarios. These patches were tested on arm64 and X86_64 architectures. Bhaumik Bhatt (12): bus: mhi: core: Use appropriate names for firmware load functions bus: mhi: core: Move to using high priority workqueue bus: mhi: core: Skip device wake in error or shutdown states bus: mhi: core: Move to SYS_ERROR regardless of RDDM capability bus: mhi: core: Prevent sending multiple RDDM entry callbacks bus: mhi: core: Move to an error state on any firmware load failure bus: mhi: core: Use appropriate label in firmware load handler API bus: mhi: core: Move to an error state on mission mode failure bus: mhi: core: Check for IRQ availability during registration bus: mhi: core: Separate system error and power down handling bus: mhi: core: Mark and maintain device states early on after power down bus: mhi: core: Remove MHI event ring IRQ handlers when powering down drivers/bus/mhi/core/boot.c | 60 ++++++----- drivers/bus/mhi/core/init.c | 10 +- drivers/bus/mhi/core/main.c | 16 +-- drivers/bus/mhi/core/pm.c | 236 ++++++++++++++++++++++++++++++++------------ include/linux/mhi.h | 2 + 5 files changed, 225 insertions(+), 99 deletions(-) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project