Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp358322pxp; Wed, 16 Mar 2022 07:14:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjJ1vpISMyMn33T/1qoiutj0Cwuok4m2kvmZuFysKbsG9jllzcv7V91GGW6ytfSJROgcSY X-Received: by 2002:a63:4e:0:b0:37f:f3f0:2d24 with SMTP id 75-20020a63004e000000b0037ff3f02d24mr28315844pga.526.1647440085240; Wed, 16 Mar 2022 07:14:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647440085; cv=none; d=google.com; s=arc-20160816; b=nIu5t0peO1sAV+3gFmGU4BUcK20C1mRfEBOfTeV5nyof2HvzaIL+Gfmm0HLzKWEFF0 RuoWOUVWu+bcI6N/ZVI7fFwdRma2Bk85Q4iknJTuDX2d0QkCC2y4Eryx637jCEOGKsE6 QchyX4ZzpJfCfI+FDGc/5Q75D5aFetH05/fIS3a1tiaikJCAn/IMjvgn+Ikb/1lwlZFE UY44apxyiHTNYQyeDqfZ/XXKb/zaQYeG+62amOg/dcF+mMIvvN9L6F9IwvCsMY6GDx32 j+ryU8Uwrp1LhscmBSUYhAC4KAVhxwQTPi2i+uzehBiHFwZIjrsa/E/qH/2GoeE6aILl 5lFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7BvNj1pVFCZwAzEDp4VCdr0Wlk/tATdGieAZI5wuluw=; b=GDGhCHwTG2DueFCJBpvEyvWJNUUITBzCJY0NRyCIQuSZNVkYHBwR9lgmbcCD82sUNZ gMaAATMTdoV6gQ7V32Etr5ahsYm8PigUqYvXDoqm/091dvQoQHoDuh+02VSCg/7bOymd fXquXmGgpUCb+SYDp7ZgWzHusxGz8egbXnjqx2c8FT5B8lABo2GvdEL6fIFuEq9xLj6A SL9XY/Uk82Efnf6loXPqeB28Rv4G51m/xmNxhHntYKF+UVQtezbRr8JAPKOw7tMbidT8 F3o46E8b1hAgJYv70DB2SrE98Bfn5UyB91EYaNTksxWRtdFz7ukZb34pFEvoYLwb/ml6 6cUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XkF5+SiC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y14-20020a63b50e000000b00378faa5382esi2169190pge.665.2022.03.16.07.14.31; Wed, 16 Mar 2022 07:14:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XkF5+SiC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348562AbiCONOU (ORCPT + 99 others); Tue, 15 Mar 2022 09:14:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348563AbiCONOH (ORCPT ); Tue, 15 Mar 2022 09:14:07 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FBBD21BD for ; Tue, 15 Mar 2022 06:12:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647349975; x=1678885975; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bw9X21ncjxkGpypbqQM5Z7Pm+qsQfuMYlU0yKF9tJPE=; b=XkF5+SiCKrvMarZvrK8eNIi2aiwmVOEJT/jTwpDiEwBvLHxthNZghIKB 9jeUDTYPjLuzLtxrXer/D1fzvK26ddc4gMnYpz2w4JoJgJcg1h0Jd0rQm 6GF0Y9Ss6vxCMD5h9y3SCBO430MLRN4+PcE3msz7j4LbsshS8JCnhYnYv oBhRx8Q8ciqafS4249Lb13j5wm4FlL4S+zuCWEw8WtMrDe5cUMSs3JBu7 3FrNXWYwW02w/uJNbS8UkQ/0avdlLQaKhZdnjCalWYzWIUu/IK+sy3iir TJZOBKJAsP7WeyaNmtWlaKj5SBjygsRZrRov2ClrltMwfAMJCY1GH4yF2 g==; X-IronPort-AV: E=McAfee;i="6200,9189,10286"; a="253853043" X-IronPort-AV: E=Sophos;i="5.90,183,1643702400"; d="scan'208";a="253853043" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2022 06:12:55 -0700 X-IronPort-AV: E=Sophos;i="5.90,183,1643702400"; d="scan'208";a="556920066" Received: from sannilnx.jer.intel.com ([10.12.231.73]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2022 06:12:51 -0700 From: Alexander Usyskin To: Greg Kroah-Hartman , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Tvrtko Ursulin Cc: Tomas Winkler , Alexander Usyskin , Vitaly Lubart , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, Daniele Ceraolo Spurio Subject: [PATCH v11 3/5] mei: gsc: setup char driver alive in spite of firmware handshake failure Date: Tue, 15 Mar 2022 15:11:55 +0200 Message-Id: <20220315131157.3972238-4-alexander.usyskin@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220315131157.3972238-1-alexander.usyskin@intel.com> References: <20220315131157.3972238-1-alexander.usyskin@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- V5: Rebase V6: Rebase V7: add Greg KH Reviewed-by V8: Rebase V9: Rebase V11: Rebase --- 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 64b02adf3149..58e39c00f150 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: -- 2.32.0