Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2027454ybp; Thu, 10 Oct 2019 00:51:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOdXgDmaC+I1zOfJLsQnoTgINXiAeroue9nvitsD6AA8NtyDWjZXvOoUsUp3J0HhaUTqWY X-Received: by 2002:a17:906:35d6:: with SMTP id p22mr6797262ejb.274.1570693892472; Thu, 10 Oct 2019 00:51:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570693892; cv=none; d=google.com; s=arc-20160816; b=lMoc37MmcrB5kKRsddpQkpdx97ZJxU7hMvQ0y/iq4dgQ1+aQlWka1waB3/YErj+EZb C07ztNWbEWjgRbt30xZH2t/u3XkBa7lvNuOicoG/o+a28Nqze8cM2xiZJ9ZHnpK1D9i4 ARBAOUSZN91T9RmATT64si4Ez7gaSmLyNu0JiVkK+R4e4fp1e48+swSmWfyQ6Ze0UkGp FHITHZVpVJafeFVGE0LaCiSw9yuC2u/aSU/D1gSxHFcFcYfkK70u7AbKtKOEuEC4Qmhq u4PgibNnkW3bR/YUxH1K7p+2jpicLmkycI3JuamXhRiFv8yqRzHdiJSXNJNdMqp/ncn6 Ybuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=BMwVxKJ5pjT6AAme6CzPathy+GO4sDWlKBre4oI24yA=; b=FYdWZvyTqZUWZ9MwBAja99BLujzjDJbDM/oXyG+pirOmNKhEvJo97fnXFSOJifV/2/ QR9MhBs9I59/ML0Z3V5nVrO46XfZ2eo4pqJttdp2N16sj6RSbZbjO3hp/clyVNlp6xkg t+wYfkE5n/8d1fl265KGLLFNrscGvR9dfaGGMVITjCsLQLM0y4tKYA+DIiNNg8sMMz4Q igyuJ2kmtMGt8kudGrRIggX7uhVlS0n8RuVFYkW4DMRJrigLz/Wuw7YMzK3V9bF59DRT Y0ItDNhatJVEjIDq0Ef2tGniajH0XjAUyCymknzNe8T83kQf+zEDf48U7dOZtGM7jQx8 y9ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RFG6HwCY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z7si2586377ejr.99.2019.10.10.00.51.08; Thu, 10 Oct 2019 00:51:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RFG6HwCY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733074AbfJJHuN (ORCPT + 99 others); Thu, 10 Oct 2019 03:50:13 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44361 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726864AbfJJHuN (ORCPT ); Thu, 10 Oct 2019 03:50:13 -0400 Received: by mail-pf1-f193.google.com with SMTP id q21so3334454pfn.11 for ; Thu, 10 Oct 2019 00:50:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BMwVxKJ5pjT6AAme6CzPathy+GO4sDWlKBre4oI24yA=; b=RFG6HwCYSDramAhQi1uVRJXiRCVoJbWbPFfqpgOBrr+ONoYndjuqcaaKVXq5mGam8b NZtTefp9ssgMDcOeS44tvnd/S01DBUC/puqu1Pc1WrhMLPuHRw/wlomndD3BsbpSaPGb gHUbAX/+u3EKiwTIyQl/RS16LhLTepVBNK6XM= 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:mime-version :content-transfer-encoding; bh=BMwVxKJ5pjT6AAme6CzPathy+GO4sDWlKBre4oI24yA=; b=jEr4iE5fXv/PiDcBaN31m/dfAxLYCKTMIaLOlTQAkof7YBLH8SWKlAWvvcQ081FIDO VExmZfP4ORwawSdHSuo8hMQlsS1eiCilpJ+wikah88SZHyp2XXk+ZjkLWYnmkljkVMTR /cWm55uS0sTLoKz/tFNTgsBzInUKa6hlcI2DA5a4g5pzoZxk1AU9f7BoKmVMx48DAc4f Sm/e921B7kcZu6U1petgXa/rN+lXWFIEyPp/dvXCaj7i7Q1329HGfKm6RHmhwO80G1Lv Ga+++CGEexwoJK7V3wff1mJV0Ze9CbsRqfs7wjuVjKe+oAwePe2WgSbF3fd/VIxD54kZ o4Zw== X-Gm-Message-State: APjAAAVg+S2q14I3xZnzm3FjmbbBced4oRjyB3k0HPjL6X1ml7QkSl4z c0PuRuWqS4Qfvj9T5mcnBuSPvw== X-Received: by 2002:a63:4e09:: with SMTP id c9mr9163082pgb.98.1570693812256; Thu, 10 Oct 2019 00:50:12 -0700 (PDT) Received: from tfiga.tok.corp.google.com ([2401:fa00:8f:203:f5fe:2a5e:f953:c0ed]) by smtp.gmail.com with ESMTPSA id 22sm4812489pfj.139.2019.10.10.00.50.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 00:50:11 -0700 (PDT) From: Tomasz Figa To: linux-usb@vger.kernel.org Cc: Mathias Nyman , Greg Kroah-Hartman , Matthias Brugger , linux-arm-kernel@lists.infradead.org (moderated list:ARM/Mediatek SoC support), linux-mediatek@lists.infradead.org (moderated list:ARM/Mediatek SoC support), linux-kernel@vger.kernel.org (open list), Chunfeng Yun , Changqi Hu , Nicolas Boichat , Shik Chen , Tomasz Figa Subject: [PATCH] usb: mtk-xhci: Set the XHCI_NO_64BIT_SUPPORT quirk Date: Thu, 10 Oct 2019 16:50:04 +0900 Message-Id: <20191010075004.192818-1-tfiga@chromium.org> X-Mailer: git-send-email 2.23.0.581.g78d2f28ef7-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org MediaTek XHCI host controller does not support 64-bit addressing despite the AC64 bit of HCCPARAMS1 register being set. The platform-specific glue sets the DMA mask to 32 bits on its own, but it has no effect, because xhci_gen_setup() overrides it according to hardware capabilities. Use the XHCI_NO_64BIT_SUPPORT quirk to tell the XHCI core to force 32-bit DMA mask instead. Signed-off-by: Tomasz Figa --- drivers/usb/host/xhci-mtk.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c index b18a6baef204a..4d101d52cc11b 100644 --- a/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c @@ -395,6 +395,11 @@ static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci) xhci->quirks |= XHCI_SPURIOUS_SUCCESS; if (mtk->lpm_support) xhci->quirks |= XHCI_LPM_SUPPORT; + /* + * MTK host controller does not support 64-bit addressing, despite + * having the AC64 bit of the HCCPARAMS1 register set. + */ + xhci->quirks |= XHCI_NO_64BIT_SUPPORT; } /* called during probe() after chip reset completes */ @@ -488,11 +493,6 @@ static int xhci_mtk_probe(struct platform_device *pdev) goto disable_clk; } - /* Initialize dma_mask and coherent_dma_mask to 32-bits */ - ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)); - if (ret) - goto disable_clk; - hcd = usb_create_hcd(driver, dev, dev_name(dev)); if (!hcd) { ret = -ENOMEM; -- 2.23.0.581.g78d2f28ef7-goog