From patchwork Tue Apr 19 19:33:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniele Ceraolo Spurio X-Patchwork-Id: 12819378 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2C5BFC433EF for ; Tue, 19 Apr 2022 19:33:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ED89989EBD; Tue, 19 Apr 2022 19:33:27 +0000 (UTC) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1832A89E14 for ; Tue, 19 Apr 2022 19:33:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650396806; x=1681932806; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/eA2Hq8gaBzihrjKW3Q/ugns6g9z8xmQu53CxGfgGV8=; b=Pb0d/QW49tXOtb5K5JIyEwgmAvASQZhNvqS4Z+z/Qt7lI3aPmPpY3etk wicIU/Ah6jA8nc4BOVB/WKgvcn0rfBXypXM4VcNuP1G4HgwtXwKy7pvev V9bZ3+AlwEqouez3Wn6rM8CofHsbkt5P4XUlIFqMNPDVKERmISbmvncIJ ZKW2keI2Z3Dxdv/O/k2y/5rOd69kgYsHmePO+TpOKlpumv1H9K4GmP0h1 1Y46L7KQlPUZe6vcO9UeoU9fgDtgFXZhx0MSeJp0mxYvHma3plgI+Ucpc eBtA8rCRg51JSD00eczaRNwYAIQEfTZkXVFsjoFUzDapiN0PNOknEcprU g==; X-IronPort-AV: E=McAfee;i="6400,9594,10322"; a="244437969" X-IronPort-AV: E=Sophos;i="5.90,273,1643702400"; d="scan'208";a="244437969" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2022 12:33:25 -0700 X-IronPort-AV: E=Sophos;i="5.90,273,1643702400"; d="scan'208";a="554868586" Received: from valcore-skull-1.fm.intel.com ([10.1.27.19]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2022 12:33:25 -0700 From: Daniele Ceraolo Spurio To: intel-gfx@lists.freedesktop.org Date: Tue, 19 Apr 2022 12:33:10 -0700 Message-Id: <20220419193314.526966-4-daniele.ceraolospurio@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220419193314.526966-1-daniele.ceraolospurio@intel.com> References: <20220419193314.526966-1-daniele.ceraolospurio@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH v3 3/7] mei: gsc: setup char driver alive in spite of firmware handshake failure X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexander.usyskin@intel.com, rodrigo.vivi@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Alexander Usyskin Setup char device in spite of firmware handshake failure. In order to provide host access to the firmware status registers and other information required for the manufacturing process. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Reviewed-by: Daniele Ceraolo Spurio --- drivers/misc/mei/gsc-me.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/misc/mei/gsc-me.c b/drivers/misc/mei/gsc-me.c index c474094645a0a..c91bf440ea266 100644 --- a/drivers/misc/mei/gsc-me.c +++ b/drivers/misc/mei/gsc-me.c @@ -79,11 +79,12 @@ static int mei_gsc_probe(struct auxiliary_device *aux_dev, pm_runtime_set_active(device); pm_runtime_enable(device); - if (mei_start(dev)) { - dev_err(device, "init hw failure.\n"); - ret = -ENODEV; - goto irq_err; - } + /* Continue to char device setup in spite of firmware handshake failure. + * In order to provide access to the firmware status registers to the user + * space via sysfs. + */ + if (mei_start(dev)) + dev_warn(device, "init hw failure.\n"); pm_runtime_set_autosuspend_delay(device, MEI_GSC_RPM_TIMEOUT); pm_runtime_use_autosuspend(device); @@ -97,7 +98,6 @@ static int mei_gsc_probe(struct auxiliary_device *aux_dev, register_err: mei_stop(dev); -irq_err: devm_free_irq(device, hw->irq, dev); err: