Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp436850img; Tue, 26 Feb 2019 02:46:05 -0800 (PST) X-Google-Smtp-Source: AHgI3IYt3lHKWvnN6pkyjmyvaGpzklh6gvgQyoMP6iguObDNIPX6JWNm82/tTpjzjwRl/vzVUgjc X-Received: by 2002:a65:6091:: with SMTP id t17mr24095927pgu.416.1551177965870; Tue, 26 Feb 2019 02:46:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551177965; cv=none; d=google.com; s=arc-20160816; b=e2QUupymz0Mb2Rr+jUWq4QihJape5Q49gozOGSk2GtBhkCnf6V/+I10LkcAxB5Gmnl 0JtGeMH8A6RmiTImHLdGdCGNWAN65RWc4hVvXYyjVfDa8e5crswVSNP0u24cYW7W5k8Y ly5UWXme1hoSlZDykiPj2T+HFrkmJAojE9g7cUFqubvZtzP2eGKw3xcEXw97bbl4oXaF G6rdgGrqy0n3k1AHmPILjtRWp703ns8G9u9Lw/SliUZ0ZVqT32M86Ys4M61A25VYlSuV 1KhGJcBRC5ObanzF8Wa5y1A4CWiSbnVJRWIG0PwdIRtoZvfkDSj046X99+2WNY3/v56t d9LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=13eYm3/Sb0MD1ipMnrDr3PF8J0TdrBnC7/vTkvBPVU0=; b=m+1m7RzDcSiCPvQaQCZc7IxpstOieM4Nkfab04Nz/VPpzjDOhkSW2B15hIDb3ITsoy wCB1MomkVW+l2tqJ5E1DR6zjJvTGmFgzsAH3CbmJip9x8rn9K6nl9sPU4UsXBZequPKm LTOll1ogmcyYsuQwSeUFblIYW/uvia0Fq+KjdYHlSVgshQh9kct9ORN+vMyHaFZlbOpX zsKdXHPA7jVXEthn5QIONQ+zM+80KkZbf2kdgjc6AMc0DLcAMx8s/+6vEBmu50A/yABe DQNBdcUIjsCf5oNSpAV9bCtJ2YsvqLYKwDhh5DsKvYxdWOIN2313tEjbmPxUQSIGG/mR laww== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si239368plv.228.2019.02.26.02.45.50; Tue, 26 Feb 2019 02:46:05 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727570AbfBZKoR (ORCPT + 99 others); Tue, 26 Feb 2019 05:44:17 -0500 Received: from 8bytes.org ([81.169.241.247]:41412 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725954AbfBZKoQ (ORCPT ); Tue, 26 Feb 2019 05:44:16 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id B3D6841A; Tue, 26 Feb 2019 11:44:14 +0100 (CET) Date: Tue, 26 Feb 2019 11:44:13 +0100 From: Joerg Roedel To: Stanislaw Gruszka Cc: Lorenzo Bianconi , Rosen Penev , linux-wireless , Samuel Sieb , Alexander Duyck , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: MT76x2U crashes XHCI driver on AMD Ryzen system Message-ID: <20190226104413.GH20740@8bytes.org> References: <1547404075.1582.0@smtp.gmail.com> <20190114091841.GA23045@localhost.localdomain> <20190115090400.GA2267@localhost.localdomain> <20190218143742.GA11872@redhat.com> <20190226100535.GA20740@8bytes.org> <20190226103450.GA2989@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190226103450.GA2989@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 26, 2019 at 11:34:51AM +0100, Stanislaw Gruszka wrote: > On Tue, Feb 26, 2019 at 11:05:36AM +0100, Joerg Roedel wrote: > If sg->offset > PAGE_SIZE is fine then most likely we have problem with > alignment. The map_sg implementation in the AMD IOMMU driver uses sg_phys() which handles the sg->page + sg->offset calculation fine. > Note hat issue is with dma_map_sg(), switching to dma_map_single() > by using urb->transfer_buffer instead of urb->sg make things work > on AMD IOMMU. On the other hand this points to a bug in the driver, I'll look further if I can spot something there. Regards, Joerg