From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.175.65.19 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796388485; b=KOAs3SYxKMuODeUcyH9NecVdw/nwxX8N3VFnhmx653ULSFoyPry00cmRGT2lscZysC6v 200h26vjvItUZjyadnxsdX/1ydtYGz2asACMmB3GcwEkNdQTAEptxA2Qj33JaeQ70w3KT /5PvVJvHkNuVTofYJ49qtBhqIxFkNMTz0Q5GpOUEl8ErOtcep43oauN1D9AUSJc+ljBMo yG8YUs/4/A0rqyGN5ttonklrJsx1bfYVOrB43Ud6HAOKdfb9nggCNPrZvZjQe1SAessrf gvUDMgfVOuciKyk316IsgGKXs2Jo41mh5yXOJjxMvdfWpcPlQOdlls+fvfwQ3EC8J/Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388485; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Date:From:To: Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To; bh=Z2c3+UHn8bwKCxfj5BnB6VF26dvu5f+hJWzRWEeoVYs=; b=fGupm3NP/pZM/hjf7YmF1C6TfUI6HwEgW0JwF4vBlqtRKpteho6liEgBHGGYR/p4+9cd rz0CznzUTmWPhmCb7Y6uuYZrgIucF/rfrWFDHeMgWT3U7GAF52UiZAvJLHZAY8OQLbq5f FKMHBjVnyIikk9vCQ69tmUSLyITcQ9Lnlfh4ZAfqLXZ/EBuaZRlk3p1jLjKGKuc/D8k+X NcgIebaJ2MaDHok6gDWGFL2tZQEh7l1Cb4uRLzyGPXKJhvCzfcFVclKKDwV1F5hufz0XQ cE3j9TfAcSVmw3iXtLxghBnciX+SkbsAbHHuVqpRvCJlyPK7UEtU6JpgaJ0YaeL5X9Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=QiltyJR3; arc=none smtp.remote-ip=198.175.65.19 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0892B606A322; Fri, 4 Dec 2026 12:48:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0892B606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass 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.a=rsa-sha256 header.s=Intel header.b=QiltyJR3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796388485; x=1827924485; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=Z2c3+UHn8bwKCxfj5BnB6VF26dvu5f+hJWzRWEeoVYs=; b=QiltyJR31IGdxB84aJ40kVr21Wub7Vlj1ca5rscPnAvsNgpU6uz8DW7c oKkje4wIOPyQHUnhFR+XplTdKlZYqy1lWH0gg3N1F/6zY/TdigUn5YgEV HHzvV6q1bgN+OHFAitnF7BCahiDQM94wyMYgYvd4tmNRNXaufqdLdE/Vh ktTb+18hKNgQJ/Z5MPEbhXc1yH613ONm4UzmvaVcAQSN2OTFMO0e+mfhG O3zlzHqr+v+AouReOJtbHGHAGBH/k/7vl+AOvBTEc5P7lBGDqrPbqQk3o IMU+hEebm/EmdQJO8+OBAGc0wlHcTOsICyQKG9/YI4MqLiuEh1xOvInFm g==; X-CSE-ConnectionGUID: oCjeJuViRTe4lNI/8v0FRA== X-CSE-MsgGUID: tAvjk3PCQJ6nO5oUjlbXvw== X-IronPort-AV: E=McAfee;i="6800,10657,11986"; a="5445679" X-IronPort-AV: E=Sophos;i="6.29,78,1794902400"; d="scan'208";a="5445679" Received: from fmviesa012.fm.intel.com ([10.60.135.152]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2026 04:48:04 -0800 X-CSE-ConnectionGUID: GqnivU4NS5GWSuf3+0+iVA== X-CSE-MsgGUID: 3OzuktRmTgmJQl/zahT73Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,78,1794902400"; d="scan'208";a="15723780" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa012.fm.intel.com with ESMTP; 04 Dec 2026 04:48:02 -0800 Received: by black.igk.intel.com (Postfix, from userid 1008) id 9B4BE98; Fri, 04 Dec 2026 13:48:01 +0100 (CET) Date: Fri, 4 Dec 2026 13:48:01 +0100 From: Heikki Krogerus To: Paul Menzel Cc: Greg Kroah-Hartman , Saranya Gopal , Rajaram Regupathy , Dell.Client.Kernel@dell.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: typec: ucsi: Ignore PD capabilities not starting with vSafe5V Message-ID: References: <20261201210400.229743-2-pmenzel@molgen.mpg.de> X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20261201210400.229743-2-pmenzel@molgen.mpg.de> On Tue, Dec 01, 2026 at 10:04:00PM +0100, Paul Menzel wrote: > On the Dell XPS 13 9310 (system firmware/BIOS 3.17.0, 3.37.0) and the Dell > XPS 9315 (BIOS 1.26.0), the PPM answers GET_PDOS for the connectors’ own > Source Capabilities on both ports with a single, invalid PDO 0x912c2aa8, > independent of whether a partner is attached. It decodes as a Variable > Supply with a minimum voltage above its maximum, which is exported > unchanged: > > $ grep -r . /sys/class/usb_power_delivery/pd0/source-capabilities/1:variable_supply/ > …/maximum_current:6800mA > …/maximum_voltage:13700mV > …/minimum_voltage:38900mV > > The ports actually offer 5 V at 3 A. A Samsung Galaxy Tab A requested > 3 A from PDO 1 (RDO 0x1304b12c in GET_CONNECTOR_STATUS), and the PDO’s > upper half 0x912c equals the lower half of a 5 V/3 A Fixed Supply PDO. > The ACPI _DSM only copies the EC’s message bytes 0x90–0x9f, so the > value comes from the embedded controller firmware. > > The USB PD specification requires the first PDO of Source and Sink > Capabilities to be a vSafe5V Fixed Supply PDO, which tcpm also checks > in tcpm_caps_err(). Apply that check in ucsi_get_pd_caps(), and report > the firmware bug instead of registering such capabilities. All-zero > responses are left alone, as before. > > With the change, on the Dell XPS 13 9310: > > ucsi_acpi USBC000:00: [Firmware Bug]: con1: port source PDO 1 is not vSafe5V (0x912c2aa8), ignoring > ucsi_acpi USBC000:00: [Firmware Bug]: con2: port source PDO 1 is not vSafe5V (0x912c2aa8), ignoring > > The port’s sink capabilities and the partner capabilities of the > attached 45 W Dell adapter are registered as before. > > Fixes: b04e1747fbcc ("usb: typec: ucsi: Register USB Power Delivery Capabilities") > Signed-off-by: Paul Menzel LGTM, but please Cc stable. Thanks, > --- > > Notes: > > Detected by and analyzed with claude-opus-5.5. > > drivers/usb/typec/ucsi/ucsi.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c > index 9e453d216c169..def62cd981624 100644 > --- a/drivers/usb/typec/ucsi/ucsi.c > +++ b/drivers/usb/typec/ucsi/ucsi.c > @@ -937,6 +937,20 @@ static struct usb_power_delivery_capabilities *ucsi_get_pd_caps(struct ucsi_conn > if (ret <= 0) > return ERR_PTR(ret); > > + /* > + * USB PD requires Source and Sink Capabilities to start with a vSafe5V > + * Fixed Supply PDO. Do not expose a list that does not. > + */ > + if (pd_caps.pdo[0] && > + (pdo_type(pd_caps.pdo[0]) != PDO_TYPE_FIXED || > + pdo_fixed_voltage(pd_caps.pdo[0]) != VSAFE5V)) { > + dev_warn(con->ucsi->dev, > + FW_BUG "con%d: %s %s PDO 1 is not vSafe5V (0x%08x), ignoring\n", > + con->num, is_partner ? "partner" : "port", > + is_source(role) ? "source" : "sink", pd_caps.pdo[0]); > + return NULL; > + } > + > if (ret < PDO_MAX_OBJECTS) > pd_caps.pdo[ret] = 0; > > -- > 2.54.0 > -- heikki