From mboxrd@z Thu Jan 1 00:00:00 1970 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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 9DA10C31E47 for ; Wed, 12 Jun 2019 11:46:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 78DFE20866 for ; Wed, 12 Jun 2019 11:46:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726685AbfFLLqr (ORCPT ); Wed, 12 Jun 2019 07:46:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:40730 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726167AbfFLLqr (ORCPT ); Wed, 12 Jun 2019 07:46:47 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 15D42AE5A; Wed, 12 Jun 2019 11:46:46 +0000 (UTC) Message-ID: <1560339966.9728.18.camel@suse.com> Subject: Re: How to resolve an issue in swiotlb environment? From: Oliver Neukum To: Christoph Hellwig , Alan Stern Cc: "iommu@lists.linux-foundation.org" , Yoshihiro Shimoda , "linux-block@vger.kernel.org" , Linux-Renesas , "linux-usb@vger.kernel.org" Date: Wed, 12 Jun 2019 13:46:06 +0200 In-Reply-To: <20190612073059.GA20086@lst.de> References: <20190611064158.GA20601@lst.de> <20190612073059.GA20086@lst.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Am Mittwoch, den 12.06.2019, 09:30 +0200 schrieb Christoph Hellwig: > > So based on the above I'm a little confused about the actual requirement > again. Can you still split the SCSI command into multiple URBs? And Yes. The device sees only a number of packets over the wire. They can come from an arbitrary number of URBs with the two restrictions that - we cannot split a packet among URBs - every packet but the last must be a multiple of maxpacket > is the boundary for that split still the scatterlist entry as in the > description above? If so I don't really see how the virt_boundary > helps you at all. as it only guarnatees that in a bio, each subsequent > segment start as the advertised virt_boundary. It says nothing about > the size of each segment. That is problematic. > Thay is someething the virt_boundary prevents. But could still give > you something like: > > 1536 4096 4096 1024 > > or > 1536 16384 8192 4096 16384 512 That would kill the driver, if maxpacket were 1024. USB has really two kinds of requirements 1. What comes from the protocol 2. What comes from the HCD The protocol wants just multiples of maxpacket. XHCI can satisfy that in arbitrary scatter/gather. Other HCs cannot. Regards Oliver