From patchwork Mon Oct 24 11:29:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9940 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp600356wru; Mon, 24 Oct 2022 11:48:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM76TsMF5aqkw4E7E8tbVRJPolwGYZxPGCOG1up0Z2IVvgFpcL360/VoT/vaFb2XnS5+3smD X-Received: by 2002:a17:90b:1e11:b0:20d:90b3:45a0 with SMTP id pg17-20020a17090b1e1100b0020d90b345a0mr72355853pjb.29.1666637304180; Mon, 24 Oct 2022 11:48:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666637304; cv=none; d=google.com; s=arc-20160816; b=nWT7NJJ3XXnLfdgy/M+3x0S1sO1SfKslSy6Sf5NnDNmPAN2+AGhy0c8rrn8dOyeTOz 74V980+iFqIYMGFpNKzw6PBOW3ZU7IwOsIZx8pRu4R1pCr1nkulvCHlLSUPOmhbnWdlj kdF/O2c/EH9bOJEdvadaOPjQIeKotcVUnjH2bTtzNcaNahtws08/VZlWq3NwKdjl8ec+ swQ2S8q79aIeS1Fze2mIV5XwkdGSUxP8a+BlKP1ocsG73jV8g31qlYriNNV9ZXkgSzXl Kw0nXMH7lzufXhuy4O+kBGKq8cq9lgbcb/yk3dM81PGbKrxXtHduAdLbowxUi6w2mb5u koBQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=U/kVfgIjMeaY0muEemF3PlZaohPnXv4yP1l4nmWDlDc=; b=EL8BCwOYmx5X6zfshmH9gAWuRkLsF6xLYVCP4EP4ejUOQEzVxh7hTsGS4Ub3zxU7B2 ChA7QX61f2eULNSvCkbxfyaMnDOWHFS39rvB4R0UDOSIaOXL6bY6NrVKaaTP0BjJhFAm K3BxIlMZpl2Ppnu4MiWaafc3yrjbt3ZUl63RwAl4vEWEhEHRbIKbCSptUALg3/9ZSRX6 CGcvJMc5eKjXBokp6E6ajuclZq4PZehmxiMfCNBmYi3tSMYErBxUTSgVmcXQnk8zQ2t4 DwnuPXaZebPK3YncSYOrSktSDsBZv1iXDTZ16XjtbNkLV8e9Ms2MMNEemHU9QvKd+d75 O3ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CaHHPtxM; 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=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mq10-20020a17090b380a00b0020daab63f66si951433pjb.31.2022.10.24.11.48.11; Mon, 24 Oct 2022 11:48:24 -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=@linuxfoundation.org header.s=korg header.b=CaHHPtxM; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231479AbiJXSrr (ORCPT + 99 others); Mon, 24 Oct 2022 14:47:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232406AbiJXSrY (ORCPT ); Mon, 24 Oct 2022 14:47:24 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB6051DC4DD; Mon, 24 Oct 2022 10:28:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 68BCBCE1323; Mon, 24 Oct 2022 12:25:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56E56C433C1; Mon, 24 Oct 2022 12:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614339; bh=rkOgUST3oSkHxg+7+g1K8kfa2X5eSH4vqsowIX0lsq0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CaHHPtxMkow0plNrDOa9kbQdNYnqhHU5gNWLbacFZUk6ukPNtMpcHyfKqlBo7tjUM Hbbp/rkD2Yw5nLSTf98ixAprQBeOsL5d5Btg+MR7h0khMEl4C3aEJT2QoR7QImBbpR phTKQz0RfruawhUQ1A9h6m15Oi2idPeWiSFTt9s8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thinh Nguyen , Sasha Levin Subject: [PATCH 5.10 191/390] usb: ch9: Add USB 3.2 SSP attributes Date: Mon, 24 Oct 2022 13:29:48 +0200 Message-Id: <20221024113030.893275259@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.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_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747595877606739969?= X-GMAIL-MSGID: =?utf-8?q?1747595877606739969?= From: Thinh Nguyen [ Upstream commit f2fc9ff28d1c9bef7760516feadd38164044caae ] In preparation for USB 3.2 dual-lane support, add sublink speed attribute macros and enum usb_ssp_rate. A USB device that operates in SuperSpeed Plus may operate at different speed and lane count. These additional macros and enum values help specifying that. Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/ae9293ebd63a29f2a2035054753534d9eb123d74.1610592135.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman Stable-dep-of: b6155eaf6b05 ("usb: common: debug: Check non-standard control requests") Signed-off-by: Sasha Levin --- include/linux/usb/ch9.h | 9 +++++++++ include/uapi/linux/usb/ch9.h | 13 +++++++++++++ 2 files changed, 22 insertions(+) diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 604c6c514a50..86c50907634e 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h @@ -36,6 +36,15 @@ #include #include +/* USB 3.2 SuperSpeed Plus phy signaling rate generation and lane count */ + +enum usb_ssp_rate { + USB_SSP_GEN_UNKNOWN = 0, + USB_SSP_GEN_2x1, + USB_SSP_GEN_1x2, + USB_SSP_GEN_2x2, +}; + /** * usb_ep_type_string() - Returns human readable-name of the endpoint type. * @ep_type: The endpoint type to return human-readable name for. If it's not diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h index 0f865ae4ba89..17ce56198c9a 100644 --- a/include/uapi/linux/usb/ch9.h +++ b/include/uapi/linux/usb/ch9.h @@ -968,9 +968,22 @@ struct usb_ssp_cap_descriptor { __le32 bmSublinkSpeedAttr[1]; /* list of sublink speed attrib entries */ #define USB_SSP_SUBLINK_SPEED_SSID (0xf) /* sublink speed ID */ #define USB_SSP_SUBLINK_SPEED_LSE (0x3 << 4) /* Lanespeed exponent */ +#define USB_SSP_SUBLINK_SPEED_LSE_BPS 0 +#define USB_SSP_SUBLINK_SPEED_LSE_KBPS 1 +#define USB_SSP_SUBLINK_SPEED_LSE_MBPS 2 +#define USB_SSP_SUBLINK_SPEED_LSE_GBPS 3 + #define USB_SSP_SUBLINK_SPEED_ST (0x3 << 6) /* Sublink type */ +#define USB_SSP_SUBLINK_SPEED_ST_SYM_RX 0 +#define USB_SSP_SUBLINK_SPEED_ST_ASYM_RX 1 +#define USB_SSP_SUBLINK_SPEED_ST_SYM_TX 2 +#define USB_SSP_SUBLINK_SPEED_ST_ASYM_TX 3 + #define USB_SSP_SUBLINK_SPEED_RSVD (0x3f << 8) /* Reserved */ #define USB_SSP_SUBLINK_SPEED_LP (0x3 << 14) /* Link protocol */ +#define USB_SSP_SUBLINK_SPEED_LP_SS 0 +#define USB_SSP_SUBLINK_SPEED_LP_SSP 1 + #define USB_SSP_SUBLINK_SPEED_LSM (0xff << 16) /* Lanespeed mantissa */ } __attribute__((packed));