From patchwork Mon Dec 14 14:25:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 343523 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp3035487jai; Mon, 14 Dec 2020 06:19:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpWOGFTv+Xm1ShdRxwlI15cDLUQf0Vrq4qV3H06hgoY2CW6XHtkxL4066HuR2NnnalqOez X-Received: by 2002:a50:ccc3:: with SMTP id b3mr7036521edj.157.1607955569069; Mon, 14 Dec 2020 06:19:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607955569; cv=none; d=google.com; s=arc-20160816; b=gVzOUGGFOF+wQdylc6CX+3kYKH/C043kLSaowKOK9pV40QJCplM/+luJyyVfWERzfY Zj+XnWuRhJMHUBWLIyQm0Z6c8kfwWcuKJ7FWBK3ZSX1gX1hHs7TXE5BEgCNYbX60oKDi KLmV4IQ66qyslBQG6t0waMa6onBQqAtR4cw7mY6AGpwvD9TdPqC0vtt4Z50/ArkiuQnw MZPBqMtgAeFTPon9J7twH6VE3dts/YS0er1aXObV9Sde8aAKGpeqRyLTQXNatQYyfg6t x5SzdXSN05WSPAfjCLP7bRVpRA+n81wQJumX0o+Ehy49R4K3/N8dw61tn4bOkqKLXrV4 fgPg== 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=xavHU57vKOrjMtue7GRYsWoOSdjY1ktr5LIlTj1Z3v4=; b=y6FlQxpjzgBjiGxnMKtYaNMdMfIVjmb6KckfwJtAGZS89jJDPbwnSebQytjfUjhKG+ BlvFkdAb5XpY7QdNx/kpm8yHZjwDy6Qciq8mL7Qb2XwwqAPKWoMcF3AFRBpwwU32WwMR sXE3JA2HJQ1IFITZ1HZT2Z0kAxZOxl9WmEa3R4xX/Bpe29pepqzfuktgVMwkaet6+OaN BSZd8AuxdmYm8JA4wqo5y65bXO1AFnrkTFxAvL/Rgtxs++u/y0JxNvOt5DcEQswv5q40 MoIXT+FZC2SqdtGfLt5b/LNxeGoHvpMzVoLZxiDnXMIPKlQc832nuA3cbzGKKsSHDu5M lhtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LB0J9+8u; 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 j14si10062778ejy.327.2020.12.14.06.19.28; Mon, 14 Dec 2020 06:19:29 -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=LB0J9+8u; 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 S2390284AbgLNOTY (ORCPT + 15 others); Mon, 14 Dec 2020 09:19:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439156AbgLNOTJ (ORCPT ); Mon, 14 Dec 2020 09:19:09 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDEACC0613CF for ; Mon, 14 Dec 2020 06:18:28 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id 91so16571806wrj.7 for ; Mon, 14 Dec 2020 06:18:28 -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=xavHU57vKOrjMtue7GRYsWoOSdjY1ktr5LIlTj1Z3v4=; b=LB0J9+8udi/Fq6GMSeOvMKoPM/q36luQ06uQ/mna5yXGtndPNEEylNCkW0LZCxL9j5 oUHXN6azdWnoYR7YVxKhiZ6yc39AwoH3aPcsC+TV+YgCJNj1fqdfCaUSCBPgeEljdKeK 9BCDTRGY7QEoNmlC+6JTCTXx/eWkZz/9mLr9uM7qsx7tBUZ63LK/Si/JR2PTNG8i9GmP qfhGcSJbke+OZXJ0tM7xE6a8aziz+t4zsnLbDo2KA3H7pmZRgk/lUwShv9c6xJopjWYS odqr5dU9A23Xr2iJx1TiP7wO/dFgrwgGN9b/2uf/XJdNgJnm3aa3qf6hbzwbl4tvBPKK 5JNg== 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=xavHU57vKOrjMtue7GRYsWoOSdjY1ktr5LIlTj1Z3v4=; b=olJsufyRaDLbpyftk5JCXJYa6eBIKN0ZV3RluAiAQE07aczcEber7k9ueAllKcVk77 nlY+PqEBa/PSMrmt3YgBe8aBrHjxmQz4Ib96cTgI1Vefrqlo/Ea97KSTaGjl+ejQ5VlY oul7DL0d2pOwuEWi1/IYuLC4hrhQE4gb4x2/RyfuFDVYUGEz88UmJ//qEQ2aYnVIDgap qOU9bajtr1G/zl+mUoYR7/mwob76kmYwtv91XQBx39g6SPM/mz2bGP3qTiQ1rFsQYguJ 1nqn3SmkG6YOgw30NAxD8b2nKqTyap0ZfSIrRWXRHSh9HeU6o4BqNz1heGyquR2bRcn3 Wi1Q== X-Gm-Message-State: AOAM532h8PUboS7okllZXs24l4iZjh919I6P94hUB9vzEAXiVwzTmCha yp/IRDCoSoSYwozHxEQpV09U2g== X-Received: by 2002:adf:9b91:: with SMTP id d17mr28943453wrc.32.1607955507661; Mon, 14 Dec 2020 06:18:27 -0800 (PST) Received: from localhost.localdomain ([2a01:e0a:490:8730:f2e4:25b3:2b53:52cd]) by smtp.gmail.com with ESMTPSA id h5sm34126285wrp.56.2020.12.14.06.18.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Dec 2020 06:18:27 -0800 (PST) From: Loic Poulain To: manivannan.sadhasivam@linaro.org, hemantk@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, bbhatt@codeaurora.org, Loic Poulain Subject: [PATCH v5 00/10] mhi: pci_generic: Misc improvements Date: Mon, 14 Dec 2020 15:25:27 +0100 Message-Id: <1607955937-26951-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 v5: - Remove useless call to mhi_initialize_controller in alloc_controller (hemant) - Add define for post reset timeout (hemant) - Fix static misses (hemant) 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 | 6 + drivers/bus/mhi/core/main.c | 7 + drivers/bus/mhi/pci_generic.c | 354 +++++++++++++++++++++++++++++++++++++++--- include/linux/mhi.h | 13 ++ 4 files changed, 361 insertions(+), 19 deletions(-) -- 2.7.4