From patchwork Thu Apr 19 16:05:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Nyman X-Patchwork-Id: 10351149 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 674A86053C for ; Thu, 19 Apr 2018 16:03:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5826928AAE for ; Thu, 19 Apr 2018 16:03:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4CBF628AB1; Thu, 19 Apr 2018 16:03:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDEE528AB2 for ; Thu, 19 Apr 2018 16:03:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753524AbeDSQD4 (ORCPT ); Thu, 19 Apr 2018 12:03:56 -0400 Received: from mga04.intel.com ([192.55.52.120]:17164 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753077AbeDSQDz (ORCPT ); Thu, 19 Apr 2018 12:03:55 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2018 09:03:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,469,1517904000"; d="scan'208";a="48274595" Received: from mattu-haswell.fi.intel.com ([10.237.72.164]) by fmsmga001.fm.intel.com with ESMTP; 19 Apr 2018 09:03:53 -0700 From: Mathias Nyman To: Cc: , , oneukum@suse.com, Mathias Nyman Subject: [PATCH v2 1/6] usb: define HCD_USB32 speed option for hosts that support USB 3.2 dual-lane Date: Thu, 19 Apr 2018 19:05:50 +0300 Message-Id: <1524153955-7905-2-git-send-email-mathias.nyman@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524153955-7905-1-git-send-email-mathias.nyman@linux.intel.com> References: <1524153955-7905-1-git-send-email-mathias.nyman@linux.intel.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hosts that support USB 3.2 Enhaned SuperSpeed can set their hcd speed to HCD_USB32 to let usb core and host drivers know that the controller supports new USB 3.2 dual-lane features. make sure usb core handle HCD_USB32 hosts correctly, for now similar to HCD_USB32. Signed-off-by: Mathias Nyman --- drivers/usb/core/hcd.c | 3 +++ include/linux/usb/hcd.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 777036a..b1463aa 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -568,6 +568,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) switch (wValue & 0xff00) { case USB_DT_DEVICE << 8: switch (hcd->speed) { + case HCD_USB32: case HCD_USB31: bufp = usb31_rh_dev_descriptor; break; @@ -592,6 +593,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) break; case USB_DT_CONFIG << 8: switch (hcd->speed) { + case HCD_USB32: case HCD_USB31: case HCD_USB3: bufp = ss_rh_config_descriptor; @@ -2825,6 +2827,7 @@ int usb_add_hcd(struct usb_hcd *hcd, case HCD_USB3: rhdev->speed = USB_SPEED_SUPER; break; + case HCD_USB32: case HCD_USB31: rhdev->speed = USB_SPEED_SUPER_PLUS; break; diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index aef50cb..cb9b76b 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h @@ -261,6 +261,7 @@ struct hc_driver { #define HCD_USB25 0x0030 /* Wireless USB 1.0 (USB 2.5)*/ #define HCD_USB3 0x0040 /* USB 3.0 */ #define HCD_USB31 0x0050 /* USB 3.1 */ +#define HCD_USB32 0x0060 /* USB 3.2 */ #define HCD_MASK 0x0070 #define HCD_BH 0x0100 /* URB complete in BH context */