Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp696850img; Thu, 28 Feb 2019 06:30:15 -0800 (PST) X-Google-Smtp-Source: AHgI3IYg5Q6PEEmtXjK1JOvV8AkHlgiVoclGDUUCMY88ahBSl87mX0SknFiegW6uC8Q82yvNj891 X-Received: by 2002:a63:40c1:: with SMTP id n184mr8335053pga.225.1551364215585; Thu, 28 Feb 2019 06:30:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551364215; cv=none; d=google.com; s=arc-20160816; b=OUnSJoF145ieFKjl8/EzTuMKUAdsvLmxfcUEt7kfKZ8X7MOjMx3NOywVKv/qqfpeBy p3TC5ORioBxlqOu5pwH4oEqlBUhB6Za/BBS5ox0OuHztIsswl3XWJ/afDww3iWsirQFH /rz0B6r/Tk2ZFXyKb54QwezCPfFdpEoTaxwQnXPWq87HHqfFo+8MvhVJZsUIKSuyFBhw C1FXmqwHXqS3lx881JxT5F9BQtnMkyBP/v88JzGCpcMBcmHOKABsZ2luQkZSx7KPTeRG Q0zLI3P+KOhrtQEozl+3gD+Q6/6xly6lk3xcjTLAc2OMiWZs/rjlUDcN/GEo7Wk1Ks9D /IPg== 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=cRbVfouh0sAadYjQ9DgxkUkXFkFONSmc5VX/wargMec=; b=hkRMVZURGhReg4m/2KWdh6zDWkCFnqsRkePBGs8CPciM0SYmby+7qh9XRs2VRhu6+R 4sn/fGC4fCD1VpJ6tHGYl/iZf1CNIDpWuIxwCX4Up1LDVIAMLuprqWFJSUsZpeR1pGxH Zw4E6bQWezoDJle0mIHtCBrBsrXXflVmEK8Vq2Izy+VyuLx6hxVY2nbqiLP6QJ71kE4E oXGzuCBkE08WegXo1SH7/hYhBjoRc6tJhwEUQfbjBtHYXrog8Hk98lvou1L9u5GN3Ntp bPxRCp5vK5p7iiM7e7KtEQ5EX5ImfSFe7KloCGdH8b4hrJQ0DRIfnPL1MPGNnM61q6UB xP9w== 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 r63si19343810plb.303.2019.02.28.06.30.00; Thu, 28 Feb 2019 06:30:15 -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 S1731013AbfB1Nkc (ORCPT + 99 others); Thu, 28 Feb 2019 08:40:32 -0500 Received: from 8bytes.org ([81.169.241.247]:55958 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726806AbfB1Nkc (ORCPT ); Thu, 28 Feb 2019 08:40:32 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id DE3524A3; Thu, 28 Feb 2019 14:40:29 +0100 (CET) Date: Thu, 28 Feb 2019 14:40:29 +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: <20190228134029.GC1594@8bytes.org> References: <20190115090400.GA2267@localhost.localdomain> <20190218143742.GA11872@redhat.com> <20190226100535.GA20740@8bytes.org> <20190226103450.GA2989@redhat.com> <20190226104413.GH20740@8bytes.org> <20190226112407.GB2989@redhat.com> <20190228090411.GA24938@redhat.com> <20190228104223.GA2749@redhat.com> <20190228121948.GD6072@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190228121948.GD6072@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 28, 2019 at 01:19:48PM +0100, Stanislaw Gruszka wrote: > Nevermind, the patch is wrong, s->dma_address is initalized in sg_num_pages(). Yes, it is. In sg_num_pages() the offset into the IOMMU mapping is stored in s->dma_address, taking also the segment boundary mask into account. map_sg() later only adds the base-address to that. Regards, Joerg