From patchwork Thu Feb 28 22:33:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 10834089 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AF6401399 for ; Thu, 28 Feb 2019 22:33:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A5842FCFD for ; Thu, 28 Feb 2019 22:33:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DDF52FCFC; Thu, 28 Feb 2019 22:33:50 +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=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1575B2FCFC for ; Thu, 28 Feb 2019 22:33:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=NcyozBY/tpQomZoif4+aLE+TKo/VfgQhZYv988i380c=; b=CqOY8Hm+hDjfJ+ kNCL4IKlQnPTrQUKz3bRF1PCOQVz/YnKujI70fYunodAPV+VPo8eszXziCjdDdwMWbYQdCk2PVXXt heEcc0IQIifX1SqC/gcz1l3Ooz7PWSXJz2rX3nrJyMkKEoepqxUpuCIB1MdD4kjlyK/qvpn2lmJ/v YXocps0QLUOi15rru8K4I4xnM/zf1xDbanyW3BePdJx1v1FQp2d1hfQ1v7Ydzl4lP8jAU4AS8+B3G f+vvBLwC32K6KMiP4PMD16F8XxFdhbn4xdmhmi1DUT+YZ9lB8cVdPpuXcYgNnALy2YWntESeJNSPh MAhPsHXGmiZyHJD3WrMA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzUFO-00059K-OD; Thu, 28 Feb 2019 22:33:46 +0000 Received: from esa4.hgst.iphmx.com ([216.71.154.42]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzUFM-00058g-BW for linux-riscv@lists.infradead.org; Thu, 28 Feb 2019 22:33:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1551393224; x=1582929224; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=bXpyXhM1VPuRHSexgylDEMjcyOv6HeY7jkwJ4oVaicY=; b=lRN1W1jcEnoYO14iTaIgxEILxQPK6Tu2FQZ9mmnpRwrzS0O/sZ0t+W1e mzCP+2HOKIJ/8lPqTEq6CCHxBuerkUwqg2K1Gg4ejkH9VpwyHqsCdb2aw zeASv3wjQ0frIDF93rQoqlURBZaanVjbocATmkanoeAfP33cnQaHk24hd nBkBbJnDPsyz///XMPz922PpM2t2rE7i32w9uvwmMyahT4veeJ/nOH2Lw iaWTdTXPBS3YHqSS4ViImB1ekyGXRDF0K4/zp7eEE4bjDh4H+tiYu/BX8 /EHGCe9fCVLCLll/gdxavkqTj8hWlUaLlv2KvRmyWHSdWc7csNYAWFH60 g==; X-IronPort-AV: E=Sophos;i="5.58,424,1544457600"; d="scan'208";a="102407957" Received: from mail-bn3nam04lp2056.outbound.protection.outlook.com (HELO NAM04-BN3-obe.outbound.protection.outlook.com) ([104.47.46.56]) by ob1.hgst.iphmx.com with ESMTP; 01 Mar 2019 06:33:38 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xIES9tNj1tIvCcdZ5Go0OTE34muBCYmtLiuUTWVFeNQ=; b=PEADqODBdGEsNibd3PcsXRhrjfVi1wsvTlj0iaob4ECMsYeNMfNL+rea2EP7AFAPlU1tYZu4vKv4r7BzVPAM8yiVfNUI/fk5HAlHnEFXEGEuQf6A0d0fVXk/c7sSKvhrjPldXojhwEY6bEhhP3LIATSU9UE+gAtrs4KFq/swBsA= Received: from MWHPR04MB0401.namprd04.prod.outlook.com (10.173.48.18) by MWHPR04MB0240.namprd04.prod.outlook.com (10.169.202.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.21; Thu, 28 Feb 2019 22:33:36 +0000 Received: from MWHPR04MB0401.namprd04.prod.outlook.com ([fe80::f55c:272b:6401:1b8c]) by MWHPR04MB0401.namprd04.prod.outlook.com ([fe80::f55c:272b:6401:1b8c%10]) with mapi id 15.20.1643.022; Thu, 28 Feb 2019 22:33:36 +0000 From: Alistair Francis To: "linux-riscv@lists.infradead.org" , "robh@kernel.org" , "robin.murphy@arm.com" Subject: [PATCH] Revert "of/device: Really only set bus DMA mask when appropriate" Thread-Topic: [PATCH] Revert "of/device: Really only set bus DMA mask when appropriate" Thread-Index: AQHUz7Wk3BuHftC4ukm45CM/91p02w== Date: Thu, 28 Feb 2019 22:33:36 +0000 Message-ID: <20190228223257.6189-1-alistair.francis@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.20.1 x-clientproxiedby: BYAPR02CA0012.namprd02.prod.outlook.com (2603:10b6:a02:ee::25) To MWHPR04MB0401.namprd04.prod.outlook.com (2603:10b6:300:70::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alistair.Francis@wdc.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [199.255.45.64] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4b7e9b99-2d32-4015-e389-08d69dccc732 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:MWHPR04MB0240; x-ms-traffictypediagnostic: MWHPR04MB0240: wdcipoutbound: EOP-TRUE x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; MWHPR04MB0240; 23:WHr7pfR2xHwZpYAYID3p9iglvCElOyW4odlRbwo?= =?iso-8859-1?q?4Lv79vjICqm7ZE1?= =?iso-8859-1?q?34SfptRFF8ucw0fTuU7oVfkkcsBzuIFtIXcZAn23IZ/lvqz1h+cRvD3pv0u1?= =?iso-8859-1?q?Z66LcM0IpGtt6xK3/WYGB/2VKEF9/P6NxERw3KkbOBKOrZgJKsN3w7waJqDX?= =?iso-8859-1?q?MzwI8bxXEf8ezm8TOCYTIU9OWvqDmQb2spdpMiEZNvAUeyAW6iUXdDC0Wxfp?= =?iso-8859-1?q?UBT27HZdR8Tg23XOp56YYV3AVHj3/W/Ejn8ZMY9LDmJqhntUN+z7fh1HpUJE?= =?iso-8859-1?q?O4GnTGGLFlMw+tLLwLdf83lRB5rWKlJIgatTzLpT0fvlVsTLEj6J+oabESWq?= =?iso-8859-1?q?CnDv6fTsYzS2AnoUmUe9odN6szAtvucLF/FMdMZs9yTj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?q?2cIQxcJKEr4Z8SxfdPQnk9poID?= x-microsoft-antispam-prvs: x-forefront-prvs: 0962D394D2 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(136003)(376002)(396003)(366004)(39860400002)(189003)(199004)(26005)(97736004)(2906002)(2501003)(71190400001)(71200400001)(53936002)(6512007)(36756003)(14454004)(3846002)(6116002)(86362001)(2201001)(14444005)(256004)(5024004)(4326008)(66066001)(305945005)(7736002)(102836004)(52116002)(486006)(2616005)(81166006)(81156014)(6506007)(8936002)(68736007)(8676002)(105586002)(106356001)(99286004)(1076003)(50226002)(186003)(6436002)(386003)(476003)(316002)(478600001)(54906003)(5660300002)(72206003)(6486002)(44832011)(25786009)(110136005); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR04MB0240; H:MWHPR04MB0401.namprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: yOHWkxqf9+/XEcuTGSSfZH7d59NfqL8itD4MFAk6nru5gLdnBiSODnWd0zqjCvhLRbjgVmgdOx2espTbBu0JvUjAUT/h/M5h+e7sX9hzZkBKh1vH8+eCDYVGh6pCecnbMtDzVQKzUC3KRn5y4iPTCM3e798hYmNW6CDi0i2fYBEiRR7KCSJecIodXf7Sws4cBuSokuNOw7sf0QuLVtFe4jk1GgSfKQ+BQ4fDY1vznt87AusRCABA0UqCGvjyveMlNdDyzUp7XqYvnds8rGfOhSAmOJHaFznny1bX4B/Ib7kTrpwA3dbvH2dYY+6D8uKEcOdf2C6kPbzDq7KnBfy5tNWqVoco8a3uK0pN+BX2GkvzmqVq+SRT7AZZ2W4T1PzUhyQJOUZciaiCDZjWguTwPakFIR1xPCbJurA4hekQzfE= MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b7e9b99-2d32-4015-e389-08d69dccc732 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Feb 2019 22:33:35.5810 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR04MB0240 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190228_143344_449257_0402600D X-CRM114-Status: GOOD ( 15.07 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "alistair23@gmail.com" , Alistair Francis , "linux-kernel@vger.kernel.org" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit 6778be4e520959659b27a441c06a84c9cb009085. Reverting the commit fixes these error messages and an non-functioning USB bus when attaching a USB to PCIe card to a RISC-V board: xhci_hcd 0000:03:00.0: Host took too long to start, waited 16000 microseconds. xhci_hcd 0000:03:00.0: startup error -19 xhci_hcd 0000:03:00.0: USB bus 2 deregistered xhci_hcd 0000:03:00.0: WARNING: Host System Error xhci_hcd 0000:03:00.0: remove, state 1 Signed-off-by: Alistair Francis --- I'm not sure if this is the correct fix, it's possible something else is wrong, but I wanted to get some feedback. drivers/of/device.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/of/device.c b/drivers/of/device.c index 3717f2a20d0d..8299f8055da7 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c @@ -149,11 +149,9 @@ int of_dma_configure(struct device *dev, struct device_node *np, bool force_dma) * set by the driver. */ mask = DMA_BIT_MASK(ilog2(dma_addr + size - 1) + 1); + dev->bus_dma_mask = mask; dev->coherent_dma_mask &= mask; *dev->dma_mask &= mask; - /* ...but only set bus mask if we found valid dma-ranges earlier */ - if (!ret) - dev->bus_dma_mask = mask; coherent = of_dma_is_coherent(np); dev_dbg(dev, "device is%sdma coherent\n",