Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5513116yba; Wed, 8 May 2019 14:49:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+cru0f5TWEUug6l4F5vGH1ITAfTee4/zUfqK2q8pl2tbh3oKEZmAW3qo3H8RX91R1vGKx X-Received: by 2002:a63:208:: with SMTP id 8mr671408pgc.14.1557352152030; Wed, 08 May 2019 14:49:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557352152; cv=none; d=google.com; s=arc-20160816; b=XLH5CsO6iyAG6OrP+FdZCnbHiCpPKxVOVUrACvVWq5fJUeOzWrkH7yHJ/erioJh4tV 4sJGdE5fMPTtOpgVkLcVyiswuX3gTkSNXGSlx/5f1IS3Afz7ELrjByzUwVAyNqHPSt17 Cc411qj6v+uwR/yPC5QgxTOOSGfLiLl4TL+HX5zRwRN2l0LCdMx5KK52kjF4gDTjdMOT p/FZyVMq1YPZxKHuVhcheBZzVaAL15qWGSbeIIcB3afglPoy4+07YSReDQBnCHGImklY q+myq6YoIGPCEqdAgT4ZQYKbhmkKDkD0805xBbLxE+ygZ+FVelhwLI7OFPPr9fpPQdYj 1ZgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7D+ymcQFsrZ9j+jO/ay0tfKGA3nxqSGTzzYNIStXbzQ=; b=tFYdPbSmphDOKQKTvMLVBKHV1uhxlky60+97AMMuwj1ll58KBQGOdNDJcMEAtCj6KG QTOaoka0pn89QChScQekqiged3bzgdRIl0twQFH7V1T0FT2v+zT3QzsPPVf0gekMGm9+ tFFPAv/Ji83S79Fe9SC5WSD7tVUz1h7PsiWBbQett1zxh8xisxUKJ1EKip6IE4m4r6Eu 4ej6dLITfiF0gyH7GYi0eDODq3acwdTa7UTjabg/ttj4YSXagrdH2UHWAllVa3OjEQHW tXDbeW1YOjWay7hKEajvHHkD1lON/4Y02tL3b8vfjOlrLJaF7zxp+k0Kfkp+HjqUgknt BEyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="kAuKSd/V"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n2si184897pgp.564.2019.05.08.14.48.55; Wed, 08 May 2019 14:49:12 -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; dkim=pass header.i=@linaro.org header.s=google header.b="kAuKSd/V"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727780AbfEHVpT (ORCPT + 99 others); Wed, 8 May 2019 17:45:19 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43781 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727282AbfEHVpS (ORCPT ); Wed, 8 May 2019 17:45:18 -0400 Received: by mail-wr1-f68.google.com with SMTP id r4so13834900wro.10 for ; Wed, 08 May 2019 14:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7D+ymcQFsrZ9j+jO/ay0tfKGA3nxqSGTzzYNIStXbzQ=; b=kAuKSd/V2ppASosx273j6mDoFHWe4rWhtbFfHE41dqsWfGFqHmoZvFmHnGki//NAG4 K0wuhsGesLSOeFD499Xy4lUu5oGzfgV73AK53meOAhmINDFgtEHam9PqPkfXVI8ZG5vJ r3kXIcJ8zc4AiZyUtIPHYVFMNana60A/OhnlX1iW2MfALdyafIM5npX4keYfqudvGRXf iZIknMFX/dbrTfuS/pcDVPchKuJ2g55KEbtSJ2jYTtdlo5hRXG2iJFF4Qy8u1X7zLe2S YbZ4pXCNETFqW9L+nifPLENUoQ8fhc12kkBDjLCqs/WWjb0mG4SRz/0vuBSdGZCgBBCu H0Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7D+ymcQFsrZ9j+jO/ay0tfKGA3nxqSGTzzYNIStXbzQ=; b=ISYcV6LZdhLOvucD9ONLVt3VNcpGIqrONQDuEsqi8pAuRrZ0HbZgd2fZX3FfdoSX4B o5y50L3cV4g2KelbK3sUYFLhB/bsM4QmDrarzWe60gOOccQE/EPRhK9hHSUOxFdMNoEY DVorj37vkx5cXcjO/sjOePX3z+FPSt0NvweKEZr71PE6gj/35PPKo2S7soMeL5Pfo2f6 8SI+jWPtT+cV/UgDJawxY2prWTuNwWP3FZB0+7TRuxR9/7sFSj1VmDPIuyU8C2zoSxwe lu+H0/nBrojnXxT0y0wcooFqI2DJHi5+2yQihRlwwp4pkuysduHvgDpaOgmrTj/UeBe5 H8/g== X-Gm-Message-State: APjAAAW78Pw/0V81J+mKrOAGdFrCRD0P56wnSpEaH9mnWxg+ObDCtkNB iN93SEXS4XmPqDkODw6PuENGfXKyvtpnpguAEXFrwQ== X-Received: by 2002:a5d:50c2:: with SMTP id f2mr101308wrt.253.1557351915966; Wed, 08 May 2019 14:45:15 -0700 (PDT) MIME-Version: 1.0 References: <3b57eb64-4c25-4582-7b0d-59143060b5a5@collabora.com> In-Reply-To: <3b57eb64-4c25-4582-7b0d-59143060b5a5@collabora.com> From: John Stultz Date: Wed, 8 May 2019 14:45:05 -0700 Message-ID: Subject: Re: [REGRESSION] usb: gadget: f_fs: Allow scatter-gather buffers To: Andrzej Pietrasiewicz Cc: Felipe Balbi , "Yang, Fei" , Bjorn Andersson , Chen Yu , lkml , Linux USB List , Amit Pundir , Marek Szyprowski , "kernel@collabora.com" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 8, 2019 at 5:44 AM Andrzej Pietrasiewicz wrote: > W dniu 08.05.2019 o 04:18, John Stultz pisze: > > Andrzej: Do you have any ideas or suggestions on this? I'm happy to > > test or run any debug patches, if it would help narrow the issue down. > > > > Can you please try the below patch? > > One more thing to consider is "functionfs read size 512 > requested size 24, > splitting request into multiple reads." in your original report, but let's > try this first: > > From f2b8f27cfa42cafe1f56d8abbe2c76fa0072e368 Mon Sep 17 00:00:00 2001 > From: Andrzej Pietrasiewicz > Date: Wed, 8 May 2019 13:52:40 +0200 > Subject: [PATCH] usb: gadget: Zero ffs_io_data > > In some cases the "Allocate & copy" block in ffs_epfile_io() is not > executed. Consequently, in such a case ffs_alloc_buffer() is never called > and struct ffs_io_data is not initialized properly. This in turn leads to > problems when ffs_free_buffer() is called at the end of ffs_epfile_io(). > > This patch uses kzalloc() instead of kmalloc() in the aio case and memset() > in non-aio case to properly initialize struct ffs_io_data. > > Signed-off-by: Andrzej Pietrasiewicz Hey Andrzej, Thanks so much for sending this patch out! I tried it, but on both HiKey960 and Dragonboard 845c (both dwc3 hardware) I'm still seeing the same problem with this change. On db845c "adb logcat" will usually hang mid-way and just sit there. Further adb shell connections don't connect until I unplug and replug the usb cable. On HiKey960 logcat seems to work, but doing something like adb install will stall and never complete. Again, in both cases I'm not getting much in the way of error messages, so there's not much clue as to whats going wrong. Let me know if you have any further ideas to try. thanks -john