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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED 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 4494AC46470 for ; Mon, 13 May 2019 14:08:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1775620862 for ; Mon, 13 May 2019 14:08:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729513AbfEMOIq (ORCPT ); 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