From patchwork Thu Apr 19 16:05:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Nyman X-Patchwork-Id: 10351155 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 0F8D9602B7 for ; Thu, 19 Apr 2018 16:04:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01D5428AB0 for ; Thu, 19 Apr 2018 16:04:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB0B528AB2; Thu, 19 Apr 2018 16:04:01 +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 9FE3828AB1 for ; Thu, 19 Apr 2018 16:04:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753588AbeDSQEA (ORCPT ); Thu, 19 Apr 2018 12:04:00 -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 S1753077AbeDSQD7 (ORCPT ); Thu, 19 Apr 2018 12:03:59 -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:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,469,1517904000"; d="scan'208";a="48274617" Received: from mattu-haswell.fi.intel.com ([10.237.72.164]) by fmsmga001.fm.intel.com with ESMTP; 19 Apr 2018 09:03:57 -0700 From: Mathias Nyman To: Cc: , , oneukum@suse.com, Mathias Nyman Subject: [PATCH v2 3/6] usb: set root hub lane counts Date: Thu, 19 Apr 2018 19:05:52 +0300 Message-Id: <1524153955-7905-4-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 Set the the rx_lane and tx_lane count to "2" for USB 3.2 hosts. For all other older hosts set the default lane counts to 1 Signed-off-by: Mathias Nyman --- drivers/usb/core/hcd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index b1463aa..09a6774 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -2814,6 +2814,9 @@ int usb_add_hcd(struct usb_hcd *hcd, hcd->self.root_hub = rhdev; mutex_unlock(&usb_port_peer_mutex); + rhdev->rx_lanes = 1; + rhdev->tx_lanes = 1; + switch (hcd->speed) { case HCD_USB11: rhdev->speed = USB_SPEED_FULL; @@ -2828,6 +2831,8 @@ int usb_add_hcd(struct usb_hcd *hcd, rhdev->speed = USB_SPEED_SUPER; break; case HCD_USB32: + rhdev->rx_lanes = 2; + rhdev->tx_lanes = 2; case HCD_USB31: rhdev->speed = USB_SPEED_SUPER_PLUS; break;