Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 116F5C43387 for ; Wed, 16 Jan 2019 12:21:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D4A7520657 for ; Wed, 16 Jan 2019 12:21:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391914AbfAPMVv (ORCPT ); Wed, 16 Jan 2019 07:21:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45462 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732856AbfAPMVu (ORCPT ); Wed, 16 Jan 2019 07:21:50 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8D25D89AD1; Wed, 16 Jan 2019 12:21:50 +0000 (UTC) Received: from localhost (unknown [10.40.205.207]) by smtp.corp.redhat.com (Postfix) with ESMTP id 222AD60923; Wed, 16 Jan 2019 12:21:46 +0000 (UTC) Date: Wed, 16 Jan 2019 13:21:46 +0100 From: Stanislaw Gruszka To: Lorenzo Bianconi Cc: nbd@nbd.name, linux-wireless@vger.kernel.org, rosenp@gmail.com Subject: Re: [RFC 0/4] do not use sg if not properly supported by usb controller Message-ID: <20190116122145.GA7472@redhat.com> References: <20190115153546.GA8387@redhat.com> <20190115154746.GA30564@localhost.localdomain> <20190116111946.GB5234@redhat.com> <20190116114432.GA2454@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190116114432.GA2454@localhost.localdomain> User-Agent: Mutt/1.8.3 (2017-05-23) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 16 Jan 2019 12:21:50 +0000 (UTC) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, Jan 16, 2019 at 12:44:33PM +0100, Lorenzo Bianconi wrote: > > On Tue, Jan 15, 2019 at 04:47:47PM +0100, Lorenzo Bianconi wrote: > > > Hi Stanislaw, > > > > Hi :-) > > > > > > Not sure what is the problem , but this patch set look like a workaround > > > > not fix. If this an issue with IOMMU and sg, seems there is something wrong > > > > in sg page mappings eigher on mt76 dirver or IOMMU driver. > > > > > > The main point here I guess is we do not need sg if fragment number is one (e.g > > > usb2.0). Moreover this can fix IOMMU reported issues. > > > > So there if diffrence for USB host driver when we have one usb->sg > > sengment and if we just pass the buffer via urb->transfer_buf . I think > > most USB host drivers behave the same in such cases. For what USB > > hardware/driver this is needed ? Perhaps simpler fix could be done > > in USB host driver? > > According to https://github.com/torvalds/linux/blob/master/drivers/usb/core/hcd.c#L1557 > single sg urb and urb with a configured transfer_buf are managed in a different way. But this should not make any difference for underlying low level USB host driver, since we map 1 buffer of the same size, just by using different routines for that. > Please not I have not received any confirm that this series fixes the reported issue > yet :) What is reported issue ? Thanks Stanislaw