Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp84125ybk; Fri, 8 May 2020 19:28:39 -0700 (PDT) X-Google-Smtp-Source: APiQypIJnrkQcxWEpif/55ZtslfiolKtAwNnXJcW2+RFT+Y7ZyLfX8i1s3JLXlx5rIVvtYJ/bRY+ X-Received: by 2002:aa7:c453:: with SMTP id n19mr4704178edr.218.1588991319096; Fri, 08 May 2020 19:28:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588991319; cv=none; d=google.com; s=arc-20160816; b=ZcUXjBsDjgDMjB7EX3N91TCqLO72Ap5L54rdlby+TXxdi1/2X9dJ8wdXSk8ASB4c1q AdG8XopYGNLiwSpDvwpj6Qkz3uEuhLynYFveJ09xR91Q0DmSmWKsImUUtk20yZJ2Kvxd 6XVfiVzjNQ0OKEA4FoEVFkL4mKlPPPOvoqs9TaHxsBsKVHDNYtP0BoZvUlqlUgpd46qn bzRia54SZLjjP83hlY++YTNIgZbanoO/o6Qwc+pXiqLqbjtZKnvkOBW01XGf4MbtYKfZ OehMWyzrwfBEOCA8fRIIkgcAYEtlGI44jXJEO9GaGF3K39g64TZNtIXgK4XVmcpaisHJ +bcw== 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 :dmarc-filter:dkim-signature; bh=YtPxi5kfb+cESe9JYSmogjGyixblplgPG0hQEsBH8Jw=; b=ECSZKH4dbC9YeV4NWlfHpPTE6yJIbiVMCtNlRoH2oyKPzU1AoYih3Eax47EacI6Kym CJ7lwxUacjLE9Y0J6Dqc0FwGRiBSh81rGtr7Z8xLEmXcecmlxWMAZVgHLez0tp6lkq94 n27w7+N7XCxv+9V8G6Qnrofo9xuLVTKrH9tlcOcGnyvSe1CA8Aq/VpVWNXbslwZDG87n hnM93DxdMhA1ZPvSjmwdUNyd/T73owWPkAc+0U6B/M1X4k2XGZdEdhTtn+AIgLqEVULS 6y21JgwZ0NytgqOO8htBwielvr8kZWUhWT69fhQhKgvgQX+dcz/4lAbGwy8PMQm5LOTm 894A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=C42SvG0b; 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 p6si1974809eja.77.2020.05.08.19.28.16; Fri, 08 May 2020 19:28:39 -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=fail header.i=@mg.codeaurora.org header.s=smtp header.b=C42SvG0b; 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 S1728540AbgEIC05 (ORCPT + 99 others); Fri, 8 May 2020 22:26:57 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:51667 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728158AbgEIC05 (ORCPT ); Fri, 8 May 2020 22:26:57 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1588991217; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=YtPxi5kfb+cESe9JYSmogjGyixblplgPG0hQEsBH8Jw=; b=C42SvG0bIU+85i2ZZH3W81M7knwxgyjXlEvS8a+ipPoJQiJ8YrdkW6o/p80vOUauyNRtraje PSKxz2gQtmTY8mTHKMXPA06yaQYIpzZjPRgbclYQjpBlv01Dzbvhw17REnQS+0kCVd9DjWB5 0Ln5m3wDT0RHzwATK1sr5yijNKA= X-Mailgun-Sending-Ip: 104.130.122.27 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 mxa.mailgun.org with ESMTP id 5eb614f0.7f4f9b90d6f8-smtp-out-n05; Sat, 09 May 2020 02:26:56 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id A1B9AC43636; Sat, 9 May 2020 02:26:55 +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=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from bbhatt-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 C0BBBC433F2; Sat, 9 May 2020 02:26:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C0BBBC433F2 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=none smtp.mailfrom=bbhatt@codeaurora.org From: Bhaumik Bhatt To: manivannan.sadhasivam@linaro.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, hemantk@codeaurora.org, jhugo@codeaurora.org, Bhaumik Bhatt Subject: [PATCH v7 0/8] Bug fixes and improved logging in MHI Date: Fri, 8 May 2020 19:26:40 -0700 Message-Id: <1588991208-26928-1-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A set of patches for bug fixes and improved logging in mhi/core/boot.c. Verified on x86 and arm64 platforms. v7: -Updated commit text for macro inclusion -Updated channel ID bound checks -Fixed non-uniform placement of function parameters to be within 80 characters -Sent to correct Maintainer email ID v6: -Updated the MHI_RANDOM_U32_NONZERO to only give a random number upto the supplied bitmask v5: -Updated the macro MHI_RANDOM_U32_NONZERO to take a bitmask as the input parameter and output a non-zero value between 1 and U32_MAX v4: -Dropped the change: bus: mhi: core: WARN_ON for malformed vector table -Updated bus: mhi: core: Read transfer length from an event properly to include parse rsc events -Use prandom_u32_max() instead of prandom_u32 to avoid if check in bus: mhi: core: Ensure non-zero session or sequence ID values are used v3: -Fixed signed-off-by tags -Add a refactor patch for MHI queue APIs -Commit text fix in bus: mhi: core: Read transfer length from an event properly -Fix channel ID range check for ctrl and data event rings processing v2: -Fix channel ID range check potential infinite loop -Add appropriate signed-off-by tags Bhaumik Bhatt (4): bus: mhi: core: Handle firmware load using state worker bus: mhi: core: Return appropriate error codes for AMSS load failure bus: mhi: core: Improve debug logs for loading firmware bus: mhi: core: Ensure non-zero session or sequence ID values are used Hemant Kumar (4): bus: mhi: core: Refactor mhi queue APIs bus: mhi: core: Cache intmod from mhi event to mhi channel bus: mhi: core: Add range check for channel id received in event ring bus: mhi: core: Read transfer length from an event properly drivers/bus/mhi/core/boot.c | 75 +++++++++---------- drivers/bus/mhi/core/init.c | 5 +- drivers/bus/mhi/core/internal.h | 5 +- drivers/bus/mhi/core/main.c | 156 +++++++++++++++++++++------------------- drivers/bus/mhi/core/pm.c | 6 +- include/linux/mhi.h | 2 - 6 files changed, 129 insertions(+), 120 deletions(-) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project