From patchwork Mon Jul 27 09:06:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Forest Crossman X-Patchwork-Id: 11686629 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 01734138C for ; Mon, 27 Jul 2020 09:07:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DB06B2078E for ; Mon, 27 Jul 2020 09:07:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CGeGy4Cf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728027AbgG0JHP (ORCPT ); Mon, 27 Jul 2020 05:07:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727046AbgG0JHO (ORCPT ); Mon, 27 Jul 2020 05:07:14 -0400 Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA47DC061794; Mon, 27 Jul 2020 02:07:14 -0700 (PDT) Received: by mail-ot1-x344.google.com with SMTP id 93so1622823otx.2; Mon, 27 Jul 2020 02:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QIv3y28LLdjd0Z0UuZjwNSM39Rdl4ANvEBYBL0v3aMo=; b=CGeGy4Cfy/3OPffDWYm7sHz9JDo3QRf+dAxR5QcGA2Fn/B2QJa2O2dE7RmDF6PF7Dv SL0oPn40lN1g83ry/0nd9a+B78KpM2xemZvYY/eTAqafD91Ey7rAi/P5btrcIjtQEYLv j6vbbz/kpQ/ITmNyQruNut3zmeAIUzei3gMmJwnH0nb8IuCq//5g0lSVd5RMkLOk1L8K 6njffm2G4WDJ98al11bPxAB9BRYHzNBW7a9yovYtpUFzoY6TPpzMGgbUJqBkRssq3sEb Yk19VhHbsUsPlcZaRZRKzxbB/HTo7htsYt01seDSi3Mzd8lRe54YhXEBAbgMRDWhh4kh 0+CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QIv3y28LLdjd0Z0UuZjwNSM39Rdl4ANvEBYBL0v3aMo=; b=IIjNXOEuivyY6IEN54XDCRK1z7NzEYOqVDRgYknfDwbfXrMqR/9YAMepuM1yj4quoG n1oJscJp27+cloJe1+ehJYr7oichPBxQuf9qP4TJYOQmcbUFuXdGRJH8t8gH1dlFv3sV KFESVsqcx/uEUd0h+YxA4mrTexyL1NIUyQ/9tjR7GQUPCrclmljKyK9h/4mwK66LSCjO TqDzxrA5IKYCaDr1yfRJDZ8a0Ibt4CIvxxhd3TN/MFQjI4tbWpfFMck7CktL2vsBrg8G vgGf6+oyqh5Rw7ZK49WNYDs/HCa+mo0vY/uZGuNqoCZmg3L+uOjQhB6M/MCa78BR1ZXX 2E7A== X-Gm-Message-State: AOAM5335WmrxHU09xrzkcUqpNRYWvl0p8A+DVl2mJxE+5qyd2EiqTpHi oDGyyB4P2StpJceOdvd8YupnQ4k0CN8= X-Google-Smtp-Source: ABdhPJxINd9H/ErycRLQVrDETbDdJFOiXd95fnOzBtdeAkCKdRgvMN2fpMwhycNulqC19RvxMfI87Q== X-Received: by 2002:a05:6830:19d9:: with SMTP id p25mr1823695otp.151.1595840833941; Mon, 27 Jul 2020 02:07:13 -0700 (PDT) Received: from localhost.localdomain ([170.130.31.90]) by smtp.gmail.com with ESMTPSA id q189sm1471297oic.15.2020.07.27.02.07.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 02:07:13 -0700 (PDT) From: Forest Crossman To: linux-usb@vger.kernel.org Cc: Forest Crossman , mathias.nyman@intel.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] usb: xhci: define IDs for various ASMedia host controllers Date: Mon, 27 Jul 2020 04:06:28 -0500 Message-Id: <20200727090629.169701-2-cyrozap@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727090629.169701-1-cyrozap@gmail.com> References: <20200727090629.169701-1-cyrozap@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Signed-off-by: Forest Crossman --- drivers/usb/host/xhci-pci.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 9234c82e70e4..baa5af88ca67 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -57,7 +57,9 @@ #define PCI_DEVICE_ID_AMD_PROMONTORYA_3 0x43ba #define PCI_DEVICE_ID_AMD_PROMONTORYA_2 0x43bb #define PCI_DEVICE_ID_AMD_PROMONTORYA_1 0x43bc +#define PCI_DEVICE_ID_ASMEDIA_1042_XHCI 0x1042 #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142 +#define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142 static const char hcd_name[] = "xhci_hcd"; @@ -260,13 +262,13 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) xhci->quirks |= XHCI_LPM_SUPPORT; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && - pdev->device == 0x1042) + pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI) xhci->quirks |= XHCI_BROKEN_STREAMS; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && - pdev->device == 0x1142) + pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI) xhci->quirks |= XHCI_TRUST_TX_LENGTH; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && - pdev->device == 0x2142) + pdev->device == PCI_DEVICE_ID_ASMEDIA_2142_XHCI) xhci->quirks |= XHCI_NO_64BIT_SUPPORT; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && From patchwork Mon Jul 27 09:06:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Forest Crossman X-Patchwork-Id: 11686631 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8BA966C1 for ; Mon, 27 Jul 2020 09:07:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 730122075D for ; Mon, 27 Jul 2020 09:07:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HOSDwWY6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728053AbgG0JH0 (ORCPT ); Mon, 27 Jul 2020 05:07:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728022AbgG0JHY (ORCPT ); Mon, 27 Jul 2020 05:07:24 -0400 Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8D9DC061794; Mon, 27 Jul 2020 02:07:24 -0700 (PDT) Received: by mail-oi1-x242.google.com with SMTP id k22so13763102oib.0; Mon, 27 Jul 2020 02:07:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/acPY9VLlTRiHv9DA9lq/Q62CiWAa35NOoQ1vhCiUdY=; b=HOSDwWY6psSHAf/sxyIYNVWjM3iNUdh85IqFhWbqX5Ao9PyrG1IRT1ul6oaBSGiUos evcBLqvHIjxyc55ARGzkF4GwZXjwYkgN3viW9kDZb4UCUy3maE0cib9Imm6d6s/TXUTZ hYb6deEToFfEHwTBsAPZWdH6cce9w+pFImzoqSTMKpDHnovgRXeI1NSA1bV8AoobxR62 sBNDCponYBD1D4FNHxk6g0wViEm1IlB4uMWutVJ3YVVRhAipWj49RAofWAeT/2zLMk7w 2hLvY0kH+PfrCV9eVEp+pvhv8ayiZLKwPvfEBUYkQmfa8s2KcPlCVxY2JyD6i1Z10h6o 0d5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/acPY9VLlTRiHv9DA9lq/Q62CiWAa35NOoQ1vhCiUdY=; b=e34jOrPlNOcIiQL+fhff707QBSK7668Ga2pOusTFNaJwd86Jtq6z2ytSALM6YVQObR 3kLpX8SHDVRKhHhRgmXAGRKI5SVvqB1bkYb2OGI7dmcfZogk4Lev0Cj3YCnTjpmazIu9 SHWUYQF6b/nULQZSdzJHlU0BibTbYTr65XRYZs1Pl3o7FsRZbdeJocQ21eD3CwHI4/vg x7G8w3It3JmrZPsy7lNXWeVVPx+6Kb7A2Z7rvFzJbfNdKyAARQzGB3nuYagOa/ccUVKN RRuDML21zpnGKDrYK8WQpKxMgrBLBJwh3WKnsNMZ98FW3HIuLXRAQ4M11qY7lGw0DvCF wYOw== X-Gm-Message-State: AOAM533tarvK56k1FM/A3bd4MBX4tg6qCNklD8rq8DqE0hCGYrCTdRDu O9er+2SM1rS59jgpAvXELT02pyBGhBk= X-Google-Smtp-Source: ABdhPJzOIsNkWrL5WqLHCj62fTSUlSegmCNnGQFl/mJG2tooJTSgdFQDYY0OYQXZ8+zYuXtKxWqgYA== X-Received: by 2002:aca:3102:: with SMTP id x2mr6431919oix.57.1595840843892; Mon, 27 Jul 2020 02:07:23 -0700 (PDT) Received: from localhost.localdomain ([170.130.31.90]) by smtp.gmail.com with ESMTPSA id q189sm1471297oic.15.2020.07.27.02.07.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 02:07:23 -0700 (PDT) From: Forest Crossman To: linux-usb@vger.kernel.org Cc: Forest Crossman , mathias.nyman@intel.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] usb: xhci: Fix ASMedia ASM1142 DMA addressing Date: Mon, 27 Jul 2020 04:06:29 -0500 Message-Id: <20200727090629.169701-3-cyrozap@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727090629.169701-1-cyrozap@gmail.com> References: <20200727090629.169701-1-cyrozap@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org I've confirmed that the ASMedia ASM1142 has the same problem as the ASM2142/ASM3142, in that it too reports that it supports 64-bit DMA addresses when in fact it does not. As with the ASM2142/ASM3142, this can cause problems on systems where the upper bits matter, and adding the XHCI_NO_64BIT_SUPPORT quirk completely fixes the issue. Signed-off-by: Forest Crossman --- drivers/usb/host/xhci-pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index baa5af88ca67..3feaafebfe58 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -59,6 +59,7 @@ #define PCI_DEVICE_ID_AMD_PROMONTORYA_1 0x43bc #define PCI_DEVICE_ID_ASMEDIA_1042_XHCI 0x1042 #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142 +#define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242 #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142 static const char hcd_name[] = "xhci_hcd"; @@ -268,7 +269,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI) xhci->quirks |= XHCI_TRUST_TX_LENGTH; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && - pdev->device == PCI_DEVICE_ID_ASMEDIA_2142_XHCI) + (pdev->device == PCI_DEVICE_ID_ASMEDIA_1142_XHCI || + pdev->device == PCI_DEVICE_ID_ASMEDIA_2142_XHCI)) xhci->quirks |= XHCI_NO_64BIT_SUPPORT; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&