From patchwork Thu Dec 10 10:02:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 340982 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp5381980jai; Thu, 10 Dec 2020 01:57:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxG8uRaQ84fjgIVMqLWAWIQv9p8REpxfz0T5csRTs4/Tkopk4FAemI4szrGhLGHz7mpeEcS X-Received: by 2002:a17:907:2131:: with SMTP id qo17mr5623137ejb.546.1607594255799; Thu, 10 Dec 2020 01:57:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607594255; cv=none; d=google.com; s=arc-20160816; b=UHdhBv7QxID1QvYSkSOJraPyYCHA8EX3HDkSoljaQ3kFrN+oaCjzQf6i7opWoZ22Ce jGgfKWT4Pz6QD5UuyTPcr1KUMSSWU2BrCfghcihDCVjdy+Oy1Mvmv063NzqDT1aJld1C gaWt8rvgZy7vfGRb8vd4RvYecpzYNa/JxsIpo1s5Hq8tdHrQl+P8NpEts7hEptVfpp2d VWopoidM9AyrAscuUpBAS44yvT+GkBgeEJmxziUy3hsZu6URzNlpKFPqtF5r/Ap2DRQP c+FzousF7APNTAUjskZqGPpCjPqALHWj6sYWMLUfoF3Sqto0VFhV+VHR+xOyronrYkjy poZA== 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 :dkim-signature; bh=bvOimCXCbY9GIqlTFGMFXTMO/fLjRn23SZPPHyck9vw=; b=pcpTcKw6AfTUlw1oCpw/D6eTk5lKKLp3SocgxXNgnQ3/HnN+nApTeB0ZMMZHZET7y3 Y0UFVumTt5+4KoNj1+nTeZYCag7QFeBBbEgzULHsseLoqwNJqezEn3J0UELkyMI+NTGB CRGretrmyzCqhEFEZBAQPJVgqSojb1NhT/ClhuRXkxbcR47rS/Ra7onJfVUPhdSr815A SrNP9iUBaN52oZGTqChI3CleZ/arDqA+NANmtwxF4tbfMCPH1D5nofgIvDINHzq31ZrM ipJ07tps3oYGgq+9r4wBXChCkP02GxjO7lXPm+uC4gzKmsSKA5qp1qKjGsA5R9UsQLmu IloA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="HaJi6/0e"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 11si2499658edv.53.2020.12.10.01.57.35; Thu, 10 Dec 2020 01:57:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-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=@linaro.org header.s=google header.b="HaJi6/0e"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728497AbgLJJ4q (ORCPT + 15 others); Thu, 10 Dec 2020 04:56:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729296AbgLJJ4p (ORCPT ); Thu, 10 Dec 2020 04:56:45 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA924C0613D6 for ; Thu, 10 Dec 2020 01:55:56 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id a3so4624671wmb.5 for ; Thu, 10 Dec 2020 01:55:56 -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; bh=bvOimCXCbY9GIqlTFGMFXTMO/fLjRn23SZPPHyck9vw=; b=HaJi6/0eDFXC1nryWI93xGyBGYtDcZmibP4WuBCUaO2GfHroieDuD0DzbhZc3QrBAL zaT2YfoueEB03O2pfGOJSxcqicLqQE7G5h7yX59Bk/HKH/R7Xp1Ho02/Rq/v1WpUVBre vhrHo7vOrBcP8k9AhdIMVT+b5TARfhskTITtLHm4j7tyBl33fQiOa9rUlM/T1tZecvUD gigrj2G75QnU30DIgp7qopIU387CO8gpYrie3hV+NJs70SgBqwdV2JXTCdOSV7ZCAunT C0ffnHaUI+y3e5Lvg9lgMz8YZe52FsZAneEmlf9q2eHcSt4EFuz2UVMwoq6uqbsyKXBQ xRxw== 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=bvOimCXCbY9GIqlTFGMFXTMO/fLjRn23SZPPHyck9vw=; b=HLotNqMm+JKVZEKNtvYiicNAKQalMI73otF00m26i8OefkGMqC5zF5jGMsMVbOpVAZ yL3ltIqDUEshOIkmOQvBKNV+YrRoJ3+0tc1kBN6sAcNwbnmJwGbSwb2JSIt/8J91TDvT ox1nMarDNbXHB4lUDWKYNXBWZQZ/cBPNzBUivAXXq5mDWdQGZeV9+Oxw4yNFnQfqbubf +Ue6joKcso1YIxtefqx3PuTwEjInalfB2enzq9nGJvBAbEUZXMN2BSvW46IKMx3nwi4l MQYDiMnPgYqxL5/pXeXF5gc7r9fzd2JOr4curbJSzzYSF9GcvDETRMXWuYO0gwBCN2nL IVwQ== X-Gm-Message-State: AOAM530w/Zpqf2YM5S3dtZPK6aXDIwmsP5zTwrax3qjKTcGiE3K0an4h GAwi+yOVnFlTpZj2YgYcYqK5YQ== X-Received: by 2002:a1c:2e16:: with SMTP id u22mr7336086wmu.149.1607594154812; Thu, 10 Dec 2020 01:55:54 -0800 (PST) Received: from localhost.localdomain ([2a01:e0a:490:8730:4468:1cc2:be0c:233f]) by smtp.gmail.com with ESMTPSA id l16sm9043721wrx.5.2020.12.10.01.55.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Dec 2020 01:55:54 -0800 (PST) From: Loic Poulain To: manivannan.sadhasivam@linaro.org, hemantk@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, jhugo@codeaurora.org, bbhatt@codeaurora.org, Loic Poulain Subject: [PATCH v4 00/10] mhi: pci_generic: Misc improvements Date: Thu, 10 Dec 2020 11:02:45 +0100 Message-Id: <1607594575-31590-1-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This series adjust some configuration values to ensure stability and robustness of mhi pci devices (timeout, number of events, burst mode). It also includes support for system sleep as well as a recovery procedure that can be triggered when a PCI error is reported, either by PCI AER or by the new health-check mechanism. All these changes have been tested with Telit FN980m module v2: - Cancel recovery work on suspend v3: - enable doorbell_mode_switch for burst channel (HW) - Add mhi_initialize_controller helper patch v4: - Delete hard reset on module unload, MHI reset is enough (Jeffrey) - Move soc reset support in MHI core (Jeffrey) - burst mode: enable doorbell_mode_switch for HW channels (Bhaumik) - Add diag channels Loic Poulain (10): mhi: Add mhi_controller_initialize helper bus: mhi: core: Add device hardware reset support mhi: pci-generic: Increase number of hardware events mhi: pci_generic: Enable burst mode for hardware channels mhi: pci_generic: Add support for reset mhi: pci_generic: Add suspend/resume/recovery procedure mhi: pci_generic: Add PCI error handlers mhi: pci_generic: Add health-check mhi: pci_generic: Increase controller timeout value mhi: pci_generic: Add diag channels drivers/bus/mhi/core/init.c | 7 + drivers/bus/mhi/core/main.c | 7 + drivers/bus/mhi/pci_generic.c | 352 +++++++++++++++++++++++++++++++++++++++--- include/linux/mhi.h | 13 ++ 4 files changed, 360 insertions(+), 19 deletions(-) -- 2.7.4