From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (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 DEFD732C89; Mon, 18 Mar 2024 10:49:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710758990; cv=none; b=hxsYXb2GGcM6+n/+xKPiYeCl0Osb7/DPKktF5FpE2Ep9LP7HdYzTgSLW7pOiZ1rcQempYcdepUaPVBxQKLcirrv2LHHkOpDI9egPoG8hoYuZgg/oqROE+VOysFkuWFDInoKMmyHPChPQRoQtplQYuL7vM5HWdo6PMDRxXNIJpEs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710758990; c=relaxed/simple; bh=HkKXZS+xqewqpC1IUBdyeh/GAjd0JKls/I/Ml9dMl00=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fIUqS0cxxOCs0QT5N8Myc/6JjSDK1q9XJlo8LxcPX0NJOifVIqEQReXW+Beh0SIn2R58Nd8DiTRhlnqgOV5u3WrqeJymLLXIZa5YrlBKlK+c4Z7/YC/IPv+dEVaXbQiqWpuKlwspuESb2FgVDK9wpE+AewPni3plZSGC3QS1g+8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=XIFnSGqf; arc=none smtp.client-ip=198.175.65.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="XIFnSGqf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710758989; x=1742294989; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=HkKXZS+xqewqpC1IUBdyeh/GAjd0JKls/I/Ml9dMl00=; b=XIFnSGqfDfywfMoLnUL6A9YrPwx/x8Tk/vVZZ0kjxQ/MAJrQeQqQ/Bqh eRbzSvDtlF9Wf+4Qvey0G+xusidprAHW34LcOlY8AT7lKgmjO0k7c/8k0 FWVBgJhuxXRMkvKCt2IvbJgp21D8gG6eMH3sSuz7GDMqGD1Ui2a/TtUz8 9rpNaoKTjP0fhgA79mOC57hmnOVuezhjovKYXjstg/aaDlcvFtlNHjUxQ qy2PTrcmCd9BkdC45p0LpVLY8wvaPZTqD18RoQGYc7ICtRKgAiGtQgiqi 7mOCYfnEtZuSMinH8QjfpKmM3jtXNzilB7CoY9YZAKRgcZji9lp7RIWFT A==; X-IronPort-AV: E=McAfee;i="6600,9927,11016"; a="5688831" X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="5688831" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 03:49:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11016"; a="937060147" X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="937060147" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga001.fm.intel.com with SMTP; 18 Mar 2024 03:49:45 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Mon, 18 Mar 2024 12:49:44 +0200 Date: Mon, 18 Mar 2024 12:49:44 +0200 From: Heikki Krogerus To: Dmitry Baryshkov Cc: Greg Kroah-Hartman , Guenter Roeck , Bjorn Andersson , Neil Armstrong , Konrad Dybcio , Johan Hovold , linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH 4/7] usb: typec: ucsi: allow non-partner GET_PDOS for Qualcomm devices Message-ID: References: <20240313-qcom-ucsi-fixes-v1-0-74d90cb48a00@linaro.org> <20240313-qcom-ucsi-fixes-v1-4-74d90cb48a00@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@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: <20240313-qcom-ucsi-fixes-v1-4-74d90cb48a00@linaro.org> On Wed, Mar 13, 2024 at 05:54:14AM +0200, Dmitry Baryshkov wrote: > The name and description of the USB_NO_PARTNER_PDOS quirk specifies that > only retrieving PDOS of the attached device is crashing. Retrieving PDOS > of the UCSI device works. Fix the condition to limit the workaround only > to is_partner cases. > > Fixes: 1d103d6af241 ("usb: typec: ucsi: fix UCSI on buggy Qualcomm devices") > Signed-off-by: Dmitry Baryshkov Reviewed-by: Heikki Krogerus > --- > drivers/usb/typec/ucsi/ucsi.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c > index 05a44e346e85..011d52bf34f6 100644 > --- a/drivers/usb/typec/ucsi/ucsi.c > +++ b/drivers/usb/typec/ucsi/ucsi.c > @@ -641,7 +641,8 @@ static int ucsi_read_pdos(struct ucsi_connector *con, > u64 command; > int ret; > > - if (ucsi->quirks & UCSI_NO_PARTNER_PDOS) > + if (is_partner && > + ucsi->quirks & UCSI_NO_PARTNER_PDOS) > return 0; > > command = UCSI_COMMAND(UCSI_GET_PDOS) | UCSI_CONNECTOR_NUMBER(con->num); > > -- > 2.39.2 -- heikki