Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1144549yba; Thu, 9 May 2019 11:27:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwewJgm4KwAOPP6Tnl9ET/s+X+e4PhnU4LjyJ/hjk4z6BuxodFJscIewXEzB57GU3krstWW X-Received: by 2002:a63:5057:: with SMTP id q23mr7754408pgl.30.1557426470916; Thu, 09 May 2019 11:27:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557426470; cv=none; d=google.com; s=arc-20160816; b=mnr0M9Z770am2XU9nYcZIJgn7zbr63kWnU46tzppENWcyBELwRJt/qZxq9YAaJpx5m tZ+ge7/CBUnHMOTUMAJKBSaTVm2BmHH63tUeYqV0pcLx13cebp453T6RtOKORLhbdt1X 7SIVWpupXVdk6HAcGx7A432Z4h95YexqCIZ39OLA3zvMLSDHuj52FJmqwJy/YKvGwqo4 vLjQ4gicx9fy3Y2COu7/FbhVZ0+ur9S7wKLYvVmVojY49oHw4RhXNqQmPIlNVyRgB198 Ki5kj5M8vdPVpT9hnMCAvSqxdSOvsPsDLOIqHaFRnj7cWVR/n4jFXRRvy7Mg04XMenUt Dwjw== 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=q8AxXyua6skxc3/3kJBuCD7WeH5GL35ISvW5fGGS1Eo=; b=BFAnGz4WL67aj/7JU6hN4AuKTZ3IugU3N6Y3hog1AqzvEeJKQq3cxX1WvYdCPfs0To cXZVrkji1E5c8BK49Gxc+W4a+nbYyAAXCdmXMYSZH5lF5mUf5oTgRCRHTZuLqUI8eCNa p/rITdgLmvpBTs72KlEGSHq1azrxm7JohESnwanSMgCaeYRitLwNYTIg48ek6z26j61w kpms+N5z5MNl1/PN0XTv5An+me9xzQ54CEfjJA37LOBFIGbb7LDW7Cn3GLx6MHNU6+oF OOhVhb3RFnW8qR9zEtRzBUrbfxIdc907XAhUA02mHTLXpagX8JcNdqZWlKvNKcwKwk7E /7vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hQYjAcZ5; 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 31si4008079plz.198.2019.05.09.11.27.34; Thu, 09 May 2019 11:27:50 -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=hQYjAcZ5; 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 S1726787AbfEISZ2 (ORCPT + 99 others); Thu, 9 May 2019 14:25:28 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:43072 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726632AbfEISZ1 (ORCPT ); Thu, 9 May 2019 14:25:27 -0400 Received: by mail-wr1-f67.google.com with SMTP id r4so4336618wro.10 for ; Thu, 09 May 2019 11:25:26 -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=q8AxXyua6skxc3/3kJBuCD7WeH5GL35ISvW5fGGS1Eo=; b=hQYjAcZ5MDNPj6PBJB0Dlxy5j1K6Is+95GIDcnqeKNHP3o5YhX/VdojpxEE+Y8PIn9 /fDqo/k1ReiQClt2rA6ccdDUYxCsVG5oAVrjjlu6UDUp0NgJdXlLBtInln8PnklrzfJV DLBNO3BMDsOIOvsVEp5acBBy+sPABhK1y8hIi+9SFc1WnnI4jGuCynFeEUq09y2GbZkT k9gYjETJovJMIg+ZmPP2KKnznNs9QABQ9BODXKGEIN/RKwa/pm6KQaODoACb0hHV9uCC iD+570gPRIgSdGmIfM80s57JZgIk28wGy9tEBilYPQkkjxA1C0bLtfFmSOagtNiUZCUk rieg== 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=q8AxXyua6skxc3/3kJBuCD7WeH5GL35ISvW5fGGS1Eo=; b=kMKNR/zNGYJgWTCqDT+WfzpD5kibWQqNAqcfWqXaUwi7j4Ei7rpgP1r+RG5NyvgC+C nW8RBaPmyzpQit7ipG6/ILz2XmykIQrYdZPm5DufcxuAQ/EnqjWrZPKxjwzYpP1xHObZ NaneQpPD9IM1G9OKd8km+Jg6sxQxWo1d+rQl4Y4XLNlREHWMkXbDW4jOTQaJQXxEqyjt Kr3pAmIGUto9Zv3wfQ9yNs189IfHFZA3iezKM4q98Hbf2pz18uSJTDG0UZuZzdhv3gXc Fb7YyNclSFwzV7ksDqG+nT+f03EAXiAOycRRdEYKSbUGV5ufW2jrXGPiBLLCK1yYoeX1 SiPA== X-Gm-Message-State: APjAAAWnaHBf+rTgdGnrGKnM/rb2buQQBAp4oKxF39nuBBCksEu/407h G4mJppaPECyPK6r1rrj79fYEr4ywJbwcauOApdy3ow== X-Received: by 2002:a5d:50c2:: with SMTP id f2mr4344469wrt.253.1557426325552; Thu, 09 May 2019 11:25:25 -0700 (PDT) MIME-Version: 1.0 References: <7caebeb2-ea96-2276-3078-1e53f09ce227@collabora.com> In-Reply-To: <7caebeb2-ea96-2276-3078-1e53f09ce227@collabora.com> From: John Stultz Date: Thu, 9 May 2019 11:25:14 -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 Thu, May 9, 2019 at 7:02 AM Andrzej Pietrasiewicz wrote: > > Hi John, > W dniu 08.05.2019 o 04:18, John Stultz pisze: > > Since commit 772a7a724f69 ("usb: gadget: f_fs: Allow scatter-gather > > buffers"), I've been seeing trouble with adb transfers in Android on > > HiKey960, HiKey and now Dragonboard 845c. > > > > Sometimes things crash, but often the transfers just stop w/o any > > obvious error messages. > > > > Initially I thought it was an issue with the HiKey960 dwc3 usb patches > > being upstreamed, and was using the following hack workaround: > > https://git.linaro.org/people/john.stultz/android-dev.git/commit/?h=dev/hikey960-5.1&id=dcdadaaec9db7a7b78ea9b838dd1453359a2f388 > > > > Then dwc2 added sg support, and I ended up having to revert it to get > > by on HiKey: > > https://git.linaro.org/people/john.stultz/android-dev.git/commit/?h=dev/hikey-5.1&id=6e91b4c7bd1e94bdd835263403c53e85a677b848 > > > > (See thread here: https://lkml.org/lkml/2019/3/8/765) > > So the thread says there are problems at boot, but here you mention about > adb transfers, which must obviously be happening after the board has booted. > Do you experience problems at boot or not? > > If a crash happens, what is in the log? So, yes. Sorry, I am maybe muddling two issues (though they both seem to be tied to f_fs sg). On dwc2, with the current code, we often (but not always) crash as soon as adb starts up in the boot process. Thus I'm running with a revert of "usb: dwc2: gadget: Add scatter-gather mode" to get by. As for example crashes, there is a crash in the thread linked above (https://lkml.org/lkml/2019/3/8/765) and also the one I sent yesterday when testing with your zlp patch. Let me know if you're looking for something more specific. One thing I didn't do, but I should is run w/ the zlp + your memset/kzalloc patch. See if that helps get dwc2 further along at least. I'll test that shortly here and get back to you. thanks -john