Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CA83CC433F5 for ; Fri, 26 Nov 2021 10:08:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2AA3480642; Fri, 26 Nov 2021 11:08:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="YiUjjwXc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 410A583738; Fri, 26 Nov 2021 11:08:33 +0100 (CET) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9406980303 for ; Fri, 26 Nov 2021 11:08:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id CC65661038; Fri, 26 Nov 2021 10:08:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637921307; bh=krh/mzvFkQyFa2OTv911BeDxGLM/2+P30U+EcXhMxcY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YiUjjwXcuBVfjYqq0oxGeAR7Ku4nvfLRfKGmAd4+HpKr6P/gXvnUX9d9fEiirySQI WxM6kyzRpv4py210xT84YV+h540nwk+pqbKUzwmyqKuSgWJLmIA3RoMB5CG+PGECI/ FBHp1DcXI0KquBpwIFU57Rj72aSg/ok+17ZLS1SVZ/WIgue98/IdT6MteU5KwzRwif lDFxGEu8zEl3hshkUpymxhzzdRZPq7hickBVl6jGnBHbiF1LfnwvUUaHCl69Q0amE0 FpOouxmFwLIFjuBgacLciBTYwNpJfZ/gNxwHB6i9xxvLzNwM/74c35hPLTbQl9w4Kh /lBocqCR4LprQ== Received: by pali.im (Postfix) id 6C4E55B2; Fri, 26 Nov 2021 11:08:25 +0100 (CET) Date: Fri, 26 Nov 2021 11:08:25 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Loic Poulain Cc: marex@denx.de, u-boot@lists.denx.de Subject: Re: [PATCH v3 2/2] usb: gadget: Add CDC ACM function Message-ID: <20211126100825.fjd7242trdbj5ioe@pali> References: <1637860575-19237-1-git-send-email-loic.poulain@linaro.org> <1637860575-19237-2-git-send-email-loic.poulain@linaro.org> <20211125181012.3vjlvuv2jvj5bodb@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Friday 26 November 2021 09:39:18 Loic Poulain wrote: > Hi Pali, > > On Thu, 25 Nov 2021 at 19:10, Pali Rohár wrote: > > > > On Thursday 25 November 2021 18:16:15 Loic Poulain wrote: > > > Add support for CDC ACM using the new UDC and gadget API. This protocol > > > can be used for serial over USB data transfer and is widely supported > > > by various OS (GNU/Linux, MS-Windows, OSX...). The usual purpose of > > > such link is to access device debug console and can be useful for > > > products not exposing regular UART to the user. > > > > > > A default stdio device named 'usbacm' is created, and can be used > > > to redirect console to USB link over CDC ACM: > > > > > > > setenv stdin usbacm; setenv stdout usbacm > > > > > > Signed-off-by: Loic Poulain > > > --- > > > v2: - remove possible infinite recursipe print loop > > > - Remove acmconsole command, start function along the stdio device > > > v3: - Use __constant_cpu_to_le16() when possible > > > - Rename stdio dev to 'usbacm' > > > - Rename init function to drv_usbacm_init > > > > Hello! Just one question: is in this v3 patch fixed stdout-only > > configuration, or it still has a bug which you described in email? > > https://lore.kernel.org/u-boot/CAMZdPi8185pAiO4w2QYMtWGAFJiX=eJ_BJW1CusRE990Wr7b_w@mail.gmail.com/ > > > > Because neither in above change long nor in driver help description nor > > in driver source code is any comment related to stdout-only device. > > No, actually it ended not being an issue, we can have it stdout/stdin > independently. The driver loops on 'irq'-handling to ensure the USB > controller has completely flushed TX before returning. This is probably suboptimal, but important is that there is no such issue. So it means that this new code can be replacement for old usbtty, which is really nice!! > > > > Note that stdout-only does not have to be too uncommon. For example > > Nokia N900 has enabled UART, keyboard+lcd and usbtty by default and > > sometimes I enabled input only from keyboard and looked at usbtty > > terminal (as stdout-only) if everything is working fine (that every > > pressed key on keyboard was echoed correctly back to usbtty). > > Yes, checked this case on a imx7d based board and stdout-only works as > you describe. > > Regards, > Loic