Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1303034ybz; Fri, 1 May 2020 19:37:00 -0700 (PDT) X-Google-Smtp-Source: APiQypIlMn0vX6VQp8gI3EcAZMyc5XqR98ERLn8iFAz38VaGsUZ6RzKVYdqfpz861a6OnaaLKGfU X-Received: by 2002:a17:906:f1d2:: with SMTP id gx18mr6324221ejb.24.1588387020027; Fri, 01 May 2020 19:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588387020; cv=none; d=google.com; s=arc-20160816; b=EzcoRqRn8kT6qhZTYdmTBe433QHzP9DJqhQwLw3YE+6cJJ+eTovVsEPYUuw10wKxys Na9yLpneLXepUGy5txiYiNaNzlXt1FDYUaeuMSYAS+yX7KLoAjF7CrDOVPyVILHDZjNx D/0iS8PXqoPhMPmHrUbd4so34rtoQ8z2ZegItDDZPy1RdCcPbE45GsiGRE8EQgSFnF5/ y7VLLwp0nygghXR4uG34Nl3sQnwBPhBHojtl/58bGmi2PCsSS0wguNcVDIUrZUKeDfC1 Sek9n5nVO3l61QSa8EF9GuCHq7Yxh9U3Zzi48Je+jhqhReWGuy3BBcBVA0Za4YIp2ccj OglQ== 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=UvCDBWrEGKkmtWr5qBaiBlnFRBajtHqWTVX6zTNReEU=; b=Ql9molvcgu7hkDdTyHwSAbUUAfzcXAc+z6FTaiSMWCPtBFW7wvn9czUcPi4nN/BsWX YbLAW5WpsTxBAaAeV1PE5kaiX1A+wQpul6kWDF5dfI1Sfhqrrd3vRUNMzQQZwP7mP0o+ vjvawOsaEdUhoVs1DWLfNBEq087/SUTz4d72z2rWLV02FujDvhFa60E8tDnd1QyUvrHf lBMAHCxPIEBtml89GO7SKeDuVBgD+fTSFHZI5NBvLrgew+/Ty6r0sLsBkLa/VgH0lLOY bbsR04VwarWxWyPZ9LEnFB9kcuolGK9QbgQpk6QpGGPKYzJkX7NVB+kQRUTReaRnIZ9r eZCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=Wa6k9CBz; 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 dm27si2616677edb.49.2020.05.01.19.36.37; Fri, 01 May 2020 19:37:00 -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=Wa6k9CBz; 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 S1727919AbgEBCcq (ORCPT + 99 others); Fri, 1 May 2020 22:32:46 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:20702 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727776AbgEBCcc (ORCPT ); Fri, 1 May 2020 22:32:32 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1588386752; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=UvCDBWrEGKkmtWr5qBaiBlnFRBajtHqWTVX6zTNReEU=; b=Wa6k9CBzmLytOQt2o1vxJNbdrTA+yPV4O8Tzwk1IjvCa5A2okUaiGnB5wzSkKbZBe+6uv0z6 Kn/rhfCVjogRFmxaQI+4gJcsmxS8zwfM2ztfW8tUVDeVG77LZIZ3cRaBiSUNIAY+v+T+dsDC E2f0Zi0ePFONlOPPxh2HZ4p95jQ= 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 5eacdbae.7f0f9416b490-smtp-out-n01; Sat, 02 May 2020 02:32:14 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 63FA9C433BA; Sat, 2 May 2020 02:32:13 +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 8DA25C433CB; Sat, 2 May 2020 02:32:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8DA25C433CB 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: mani@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, hemantk@codeaurora.org, jhugo@codeaurora.org, Bhaumik Bhatt Subject: [PATCH v4 0/8] Bug fixes and improved logging in MHI Date: Fri, 1 May 2020 19:31:57 -0700 Message-Id: <1588386725-1165-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. 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 | 124 ++++++++++++++++++++-------------------- drivers/bus/mhi/core/pm.c | 6 +- include/linux/mhi.h | 2 - 6 files changed, 108 insertions(+), 109 deletions(-) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project