Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp455003pxf; Thu, 8 Apr 2021 06:37:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEnHu3cD33dEPppoeZj5zZ8jT1l77vkkGmPeXlm40eZzay/feCJ+QIOJSnLIgJEctn9UAD X-Received: by 2002:a05:6402:2070:: with SMTP id bd16mr11321577edb.133.1617889036054; Thu, 08 Apr 2021 06:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617889036; cv=none; d=google.com; s=arc-20160816; b=0eOeEaE/Zr8K5fVBqUTV9P8PmR1bBwUUvXEIauGLerHH4Ryep8kvCS2rbdAxe2qpsn mK9W9DZPYxYQ0MkXuqbOFapYZCqaNSkvFb0lrTiPKlLLdRf0MDXgiDqUQnCvmODcL1G9 EzRRZ0GEeZV60oEUrOtEK1PYNR6AMwrjt9iOT5AcQgBXDmOBML4MYHiZdJJBrkl9f4qY 0TulkznfUq8+SZXtMdAfkJ+3kXHqCl5AxewsPA1cSAgMTFwKpixk3Duzy6JBrn7fmfs+ XkQTFk2fFG9JiEu0shyg/Q0C/rUwXq53sUAB1KoqrZmuNUxtOjeXMto4Mwib7TPDLKTA NPXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=oZCAAR5PzGD8iNhpsXMNf9MkZCpNGlBNFs3tk/riVX8=; b=m0GQ6IelBzNsNqBf3Pi8Isv29JGbaE36oCrNhr8ylZuvSpKGuUV8F5ihuApMbvyfcm LTXR7fScPocxP3eppeAgjK3A6Q8BdWoJcSRsaRbdebEX4lqdFtnlMX5/Lrt7GYIhwWCv uI/8Qudc3lLyh0CY26/oraz73wM9UZv09ijRQj0LuBoRlOhmFsp+rizAvwocvVZtUvmb 1lPbPxpS0iRILG5TkB3dVNWYvc0eKUJEokRUTI9D4VeP8CaPt+erVvX9W5xqzabORMD9 IceWOBbrlhKsUG6uqWuvX07z1hx8w/4wIxR9QQp8oSq5jKQb+ma8LAs54vlN0kzWZK6f S29A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=bGysl1+D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m1si22777618edc.349.2021.04.08.06.36.51; Thu, 08 Apr 2021 06:37:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=bGysl1+D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231638AbhDHNd3 (ORCPT + 99 others); Thu, 8 Apr 2021 09:33:29 -0400 Received: from mx2.suse.de ([195.135.220.15]:48796 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231641AbhDHNd2 (ORCPT ); Thu, 8 Apr 2021 09:33:28 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1617888796; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oZCAAR5PzGD8iNhpsXMNf9MkZCpNGlBNFs3tk/riVX8=; b=bGysl1+D8zmpjXP6dw65BiFbX710NADXn+3OsqfjJSvPFm1b2IXCVmz7P8Rm+fHii6qyRn OvjXvFjfFyuE3c3tQmt8L7hleIWbHNwb6mp1FMxbH559fPzPoDinMJGYN9in3hTkJtHjW9 62/JV4KF2A7hVdm2+YhOqArEwj31+Lw= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 678B0B10B; Thu, 8 Apr 2021 13:33:16 +0000 (UTC) Message-ID: <9e770cd03b69e06349f1b606317335cf49fe8fd6.camel@suse.com> Subject: Re: [PATCH v2 3/3] USB: cdc-acm: fix TIOCGSERIAL implementation From: Oliver Neukum To: Johan Hovold , Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 08 Apr 2021 15:33:04 +0200 In-Reply-To: <20210408131602.27956-4-johan@kernel.org> References: <20210408131602.27956-1-johan@kernel.org> <20210408131602.27956-4-johan@kernel.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Donnerstag, den 08.04.2021, 15:16 +0200 schrieb Johan Hovold: > TIOCSSERIAL is a horrid, underspecified, legacy interface which for most > serial devices is only useful for setting the close_delay and > closing_wait parameters. > > The xmit_fifo_size parameter could be used to set the hardware transmit > fifo size of a legacy UART when it could not be detected, but the > interface is limited to eight bits and should be left unset when it is > not used. > > Similarly, baud_base could be used to set the UART base clock when it > could not be detected, but might as well be left unset when it is not > known (which is the case for CDC). > > Fix the cdc-acm TIOCGSERIAL implementation by dropping its custom > interpretation of the unused xmit_fifo_size and baud_base fields, which > overflowed the former with the URB buffer size and set the latter to the > current line speed. Also return the port line number, which is the only > other value used besides the close parameters. > > Note that the current line speed can still be retrieved through the > standard termios interfaces. > > Fixes: 18c75720e667 ("USB: allow users to run setserial with cdc-acm") > Signed-off-by: Johan Hovold Acked-by: Oliver Neukum