Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp1249222lqo; Thu, 9 May 2024 08:36:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXT2YiYdDmHcCprSL1GW2o37KC5+dAg+WSRk6qOKE/5plZBpZdXmw3U7tFUypk7R60oPSmWSsBuu3B4y6BYIe/3J3ABMne/4C4fwTdL0w== X-Google-Smtp-Source: AGHT+IF8rbnt3kYAbDqJclxyF5FU+MMN19JNtCkFar3VPZFZBWkNa7FySME4g/n4eqjJ1H7exwv1 X-Received: by 2002:a05:6a20:daaa:b0:1af:dc83:75b6 with SMTP id adf61e73a8af0-1afde085a6bmr132221637.6.1715268969239; Thu, 09 May 2024 08:36:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715268969; cv=pass; d=google.com; s=arc-20160816; b=fDE0A8uc1ryWs/vHCvYyxx9LR/tt0p12U2gpQ7p7z8dV4PLJxDHC6tq0u+KO6V5Jw8 gjqTFhvJN1PN+M57/MVhmRci4oV/V3pgeFsHdGiQs1FBFcFgagG/busHWuzUxtjg2fk9 AwD7MvNwH3JOlhkNXq7NMRyF7h3gqR2tQ0vQMwc6RlgHJysvr2jdIj+b3ZTRnWnDkLLY uZ7e28+ba3RtRnw7gtnkPKcMHMDcVusyd6o3LHSIkwL7PUaCJZfYMyHZK+OOd5SsJ48e 0wpPn0V4XCT+Z3AFdXD/v1inl3BLyd1hzQz3W3YSCYQm4S7iRxBKwxn4OgHx2pmUqGLr y9pQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:to :from:date:dkim-signature; bh=xOzTJIUOd/eGZ7Rkf6Lh1ZnSkkcXA6C+E/1fEogp20w=; fh=7KnCNdNB8cR+PTlO05cIcnkN19QmYWr6xvEn+FGNMRw=; b=tYKhFnPcSuTZbVSqqp20qgMCfKTEgx4O6geRJmlI+wt3/RZuHIY0W/rOECHu+KpXBp ID559eeYdkGXMgPR5+TGh97Njm/5yRqW2boqINAiRphtSo16LBDoNAT6DKb2R36eakEK EJK4sTcbaMACkJ5KFrrsBm3rJlq7Rm0JcAyX+fjIGsNYmU3EwJkqjDEPASBOUV3OJPJs Xn0AAchMC/LfSqln4CJ5lkYcv28UlZLseaHc3JxQJGnzAgmZps9/eJ6cWHlLytbaRN2q fOAB5KIx+FSuQT25nGIfmqPry3LY94XMoTnN+H1FiFqfiPY9xUFbJWdOmiKa9nUU7Bjw 2awg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tecnico.ulisboa.pt header.s=mail header.b=CU2NyNob; arc=pass (i=1 spf=pass spfdomain=tecnico.ulisboa.pt dkim=pass dkdomain=tecnico.ulisboa.pt dmarc=pass fromdomain=tecnico.ulisboa.pt); spf=pass (google.com: domain of linux-kernel+bounces-174641-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174641-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=tecnico.ulisboa.pt Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2a728ffsi1713247b3a.51.2024.05.09.08.36.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 08:36:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174641-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tecnico.ulisboa.pt header.s=mail header.b=CU2NyNob; arc=pass (i=1 spf=pass spfdomain=tecnico.ulisboa.pt dkim=pass dkdomain=tecnico.ulisboa.pt dmarc=pass fromdomain=tecnico.ulisboa.pt); spf=pass (google.com: domain of linux-kernel+bounces-174641-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174641-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=tecnico.ulisboa.pt Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 48FE8282A95 for ; Thu, 9 May 2024 15:36:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A332716F27B; Thu, 9 May 2024 15:35:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=tecnico.ulisboa.pt header.i=@tecnico.ulisboa.pt header.b="CU2NyNob" Received: from smtp2.tecnico.ulisboa.pt (smtp2.tecnico.ulisboa.pt [193.136.128.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F1E315E811; Thu, 9 May 2024 15:35:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.136.128.22 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715268958; cv=none; b=VXnLRVfl7c+8cfYr2QxLNkkiefSkP9ILBi+yAQdBhnN4dCpG9yMtgoPf94o0I8Guwnxut9BXaAgUOCUUWqm++hjZoO7vR16lwU+J7vlfhO2c3zc/o5gL5zOCbX4vPSPLnMshznLPBMlwruGC6D6uUe2OTJBP1t22W9yGfdiQTpQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715268958; c=relaxed/simple; bh=0IwlJOke6CGpKn6GzMdc7ZgMSv9NEztsvyiYpNUTvoY=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RvrE3rj/y7OHn2Vs5qvcN1BQ22Aa15Mz9LoGLe4wAjt/+t5hvgr5b3XHCoEV4dXXxA/gjtLlK9Lu98MtfhwIxKEQzA+KxgnNaXXO2suESxhqe6VpdgYehNfPbgV90D+GL5CtRuzao1Dg87kSHL34cRTyS6MpgE1yxFo2dfk743I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tecnico.ulisboa.pt; spf=pass smtp.mailfrom=tecnico.ulisboa.pt; dkim=pass (1024-bit key) header.d=tecnico.ulisboa.pt header.i=@tecnico.ulisboa.pt header.b=CU2NyNob; arc=none smtp.client-ip=193.136.128.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tecnico.ulisboa.pt Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tecnico.ulisboa.pt Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp2.tecnico.ulisboa.pt (Postfix) with ESMTP id 7245B24543D; Thu, 9 May 2024 16:27:50 +0100 (WEST) X-Virus-Scanned: by amavis-2.13.0 (20230106) (Debian) at tecnico.ulisboa.pt Received: from smtp2.tecnico.ulisboa.pt ([127.0.0.1]) by localhost (smtp2.tecnico.ulisboa.pt [127.0.0.1]) (amavis, port 10025) with LMTP id 7CMGq9N0DNpK; Thu, 9 May 2024 16:27:48 +0100 (WEST) Received: from mail1.tecnico.ulisboa.pt (mail1.ist.utl.pt [IPv6:2001:690:2100:1::b3dd:b9ac]) by smtp2.tecnico.ulisboa.pt (Postfix) with ESMTPS id DBA242453F5; Thu, 9 May 2024 16:27:47 +0100 (WEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tecnico.ulisboa.pt; s=mail; t=1715268468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xOzTJIUOd/eGZ7Rkf6Lh1ZnSkkcXA6C+E/1fEogp20w=; b=CU2NyNob9VPf66D1AeOFrHBj6evmHMz4ShGTDidF7nPR0S6wHJ0CSbhlKQ9xZEVMOZtnnR Cq+1n+6remb86TsNHtIguzauh4Ild9wmhtJ8FFydY3pdx5PDMlyPvTHEOF7zGeCjMNhLHY 1aCF2W4DbL1edcRa5086fFSJucJG1H8= Received: from diogo-gram.home (unknown [IPv6:2a01:14:8070:dc60:4589:2164:1bc5:2670]) (Authenticated sender: ist187313) by mail1.tecnico.ulisboa.pt (Postfix) with ESMTPSA id 4CBAC3600AE; Thu, 9 May 2024 16:27:47 +0100 (WEST) Date: Thu, 9 May 2024 16:27:41 +0100 From: Diogo Ivo To: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, lk@c--e.de, u.kleine-koenig@pengutronix.de, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] usb: typec: ucsi_acpi: Add LG Gram quirk Message-ID: <5fh2v2dcjjcgg3qgvbhlsf24kfigzzbv3sq5ykjuwyjodbqzsa@kf7crcyswm5y> References: <5qc55gruhn4pmutiukohauki5dehba6n2k22jgvpt7i3hafkon@v2ng2a33o7vv> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5qc55gruhn4pmutiukohauki5dehba6n2k22jgvpt7i3hafkon@v2ng2a33o7vv> On Thu, May 09, 2024 at 12:50:36PM GMT, Diogo Ivo wrote: > Some LG Gram laptops report a bogus connector change event after a > GET_PDOS command for the partner's source PDOs, which disappears from > the CCI after acknowledging the command. However, the subsequent > GET_CONNECTOR_STATUS in ucsi_handle_connector_change() still reports > this bogus change in bits 5 and 6, leading to the UCSI core re-checking > the partner's source PDOs and thus to an infinite loop. > > Fix this by adding a quirk that signals when a potentially buggy GET_PDOS > command is used, checks the status change report and clears it if it is a > bogus event before sending it to the UCSI core. > > [Sending as RFC both to see if this is a good idea and so that more > users can test it to gather all the models affected by this bug.] > > Signed-off-by: Diogo Ivo > --- I just realized that I should be using the {set, test, clear}_bit() functions in the patch I sent, sorry for that. With this in mind it would still be good to hear what you think about it. Best regards, Diogo