Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5222500yba; Mon, 13 May 2019 07:23:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlPS21n5QuxJ7gySLPwuFE2pGhcKKH5lfoX5Tw/2KbdY9z2xCPDG3xnlf3wrvbSdkGARg5 X-Received: by 2002:a63:6dca:: with SMTP id i193mr30293636pgc.353.1557757411697; Mon, 13 May 2019 07:23:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557757411; cv=none; d=google.com; s=arc-20160816; b=GTy2ZbdGjNxQQvPz+3+2tzzNA0joqS/TI6pHv2ovj8yk2gLUbHURKBGMgsyaxZQUTr h8HS6yRDtgrB8g/y3MTquA04rb9FnCWPnkPvRg3mtWdlWDD7SuApyvRF0BinEHvz3FSF KXid+Ts26Tl2po631wrgJ6OM5N9WHXhcV+JKEz18vpPrzJlyZ0L/PfyolusWwK2G9hN5 G8rYv3UYf4AGC8w7lbyhTzbvTjoYcmJqjSVYi639VPH59NKPZez+tulhV4NPRL3wO3am /zRl9AA74cgETPT0Q2l97kzfRE24Dih+n0X/1YbbkA4EVBrl9HXUWUeIpLXDWFrvQabp xXfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=He3aIqV9UMTwtAPqowBiDBPnkpwfR1HvDJv1+6iMxrU=; b=hP3zL6ZYs3sxwwRpf0pMuXSaD3IxKWZfS4PIIQlAXf9I+zGBtx2CUd+8hPXlael9By mFFNM8b3dwrIaj5QtdKbohI8NBcbSJoQLWNYxPcuJPZTuKolZSe+wgm3dAtcA8yXToUU w2fqFU9p1Ly8nzbfyExKRi8mruu5I2LGvTmz5ZgawF+Af3akp5zIDsJESoej2daxV9kZ Rpq6aIohPqM+hAvCxJ82XaKoXTkXmXsFzsvI6VA/uNpvXc3Xb4OO+VK8z4zqmhtvYAd5 oQCBZ34JGfJYs5VL/KY6kc10vjVN9gHa467uyHpwTziOeuSXdU9O3Ctmwz2P1wqORNDx 2Rmw== 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=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w20si14476573pgc.501.2019.05.13.07.23.15; Mon, 13 May 2019 07:23:31 -0700 (PDT) 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729491AbfEMOIq (ORCPT + 99 others); Mon, 13 May 2019 10:08:46 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:45350 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727202AbfEMOIp (ORCPT ); Mon, 13 May 2019 10:08:45 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: andrzej.p) with ESMTPSA id 9B26A28395B Subject: Re: [REGRESSION] usb: gadget: f_fs: Allow scatter-gather buffers To: John Stultz Cc: Felipe Balbi , "Yang, Fei" , Bjorn Andersson , Chen Yu , lkml , Linux USB List , Amit Pundir , Marek Szyprowski , "kernel@collabora.com" References: <7caebeb2-ea96-2276-3078-1e53f09ce227@collabora.com> From: Andrzej Pietrasiewicz Message-ID: <7ec57c29-d1ab-dc4c-755d-a6009b9132b5@collabora.com> Date: Mon, 13 May 2019 16:08:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi John, W dniu 09.05.2019 o 23:23, John Stultz pisze: > On Thu, May 9, 2019 at 11:25 AM John Stultz wrote: >> >> On Thu, May 9, 2019 at 7:02 AM Andrzej Pietrasiewicz >> wrote: >>> > > Ok. Apologies for earlier confusion. > > So the kzalloc/memset fix you sent for f_fs.c does seem to avoid the > crash on bootup I was seeing w/ HiKey/dwc2 (previously I had only > tested it on HiKey960/dwc3). > > However with that patch, I still see tranfer problems with adb, unless > I comment out setting sg_supported in dwc2/gadget.c (in the same > fashion I have to with HiKey960/dwc3). > > The dwc2 zlp patch doesn't seem to affect things much either way in my > testing. But maybe I'm just not tripping on that issue yet. > > So yes, the kzalloc/memset patch is a clear improvement, as it avoids > the bootup crash on dwc2, and seems like it should go in. > > However, there is still the outstanding issue w/ functionfs sg > support stalling on larger transfers. Do you get "functionfs read size 512 > requested size 24, splitting request into multiple reads" message when problems happen? Is there anything in the kernel log? I'm unable to reproduce your problems. I thought I was able, but it was another problem, which is fixed with: 5acb4b970184d189d901192d075997c933b82260 dwc2: gadget: Fix completed transfer size calculation in DDMA (or you can simply take upstream drivers/usb/dwc2). Do your problems happen on dwc2 or dwc3? Is there a way to try your adb without building and running the whole Android? Andrzej