Message ID | 20230602124642.19076-4-johan@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1018313vqr; Fri, 2 Jun 2023 06:12:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7sol4sLpTst7SqxjTIXlrKnhS0IFPrc/xKWHCW26H3yYLnEML1HupIunfosmq3EtI/Pt57 X-Received: by 2002:a05:6a21:998c:b0:10c:37ed:3e88 with SMTP id ve12-20020a056a21998c00b0010c37ed3e88mr13178044pzb.23.1685711552785; Fri, 02 Jun 2023 06:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685711552; cv=none; d=google.com; s=arc-20160816; b=Wt1gkruaefjOcMbzw9cIiAbhfdOla9u6QfaL5pY2AQxVkSrj3obkzsd+Oce3YI6xUK gahlS29IWBc1LQ5NtRyFwyILuuMim9KJmbTOd9TU9eVjo5D32Xa+XQOZBg5dSDqf1GXQ 4oWAYQMVAS46wr+i69UPR1WUj8AyIz4RROrz4ik87EWUVCLw3OUgHhvjAYYSnoKiV2G9 lIDBNPJgOXEaP5ZFWb2BuwRk3fT4iOXnPL1PHIdbBcbO2n75a1Spv3One+1/kD04R/EQ ZF9tLvASjShgFR0n3hRxQda1uLmiSa/Z2ukrS81+0n3cxq/QtQi3R3jOXlgn27vr8Y74 2hkQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=q1e3yhbPp8iah6GCXC6xGHoCfLClAFzv4caW/lyRaS8=; b=SkjuX9yk5INxHY9HLitCXNPNmDDs/lajt8B/+UTp3Xf5dpvCdL0XjnCyf6sYiiYnDs LvpTP9SLZVb1OWaiNhIEBXA+OEsQyVl8fnbd5WKVrMrX9vWIgjEsKVlI5BxBwIpXjRIQ xIcaTFwWjS2Q+UICHvBK225bCDcthXjLqQAPEkSdecnFkMO0QfZkUINH4i/GdH75oMlX HJGEpbBBXazgGjwtBKKukHLnqxfp1z9nvmISwcxKsYI103/3N0/Oj2qGIsgl/qiat9sZ kYDDrQpVJH3Ug5dZhS3do4RqNHqo8BWNp7LbrQbjN9SWpaEXne2Vm4PvHUPPjVXLhuLt o0/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="X//v7whp"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 67-20020a630246000000b0054201a3f08csi962541pgc.793.2023.06.02.06.12.19; Fri, 02 Jun 2023 06:12:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="X//v7whp"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235706AbjFBMqz (ORCPT <rfc822;limurcpp@gmail.com> + 99 others); Fri, 2 Jun 2023 08:46:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235286AbjFBMqu (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 2 Jun 2023 08:46:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A0E913D; Fri, 2 Jun 2023 05:46:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D2B5D6500B; Fri, 2 Jun 2023 12:46:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42902C433D2; Fri, 2 Jun 2023 12:46:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685710008; bh=uSiepLtWjVhXcCAJfRm0oQIqf205bq5k7/+2TYyI62A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X//v7whp/oQm0/fBEgfGL161IJQ64IbHiJZwCgjVBOwKKkKBtiGEF1VMFICCG5k8A GvitP1GR6to67KLwcXVFtno3OGIP8QGK8gZFgk7CoCZm2vmydovba0aXzVn0UnmvnB d8wTGmSc00WeWPUBw1/gdCiqxjx+ksAG1DI/o188F03GnK/9aTtjLdhxqPaBLIUV0B Cx6H+4VYDNwYivPa2JKfIlU+9mdEq2lf4FHwoUSLpc3AgeNcq2SMUYUAyLv919PpzK H7w1NV8IdzG1WmNhGKKlf6tJZ6r74gWQTi88vD2kMm3d8f5U1H/UuCTvHD6P9TfmKg HdfTme31HEG6w== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from <johan@kernel.org>) id 1q54BG-0004y3-5j; Fri, 02 Jun 2023 14:46:58 +0200 From: Johan Hovold <johan@kernel.org> To: Johan Hovold <johan@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Corey Minyard <minyard@acm.org> Subject: [PATCH 3/3] USB: serial: report unsupported break signalling Date: Fri, 2 Jun 2023 14:46:42 +0200 Message-Id: <20230602124642.19076-4-johan@kernel.org> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20230602124642.19076-1-johan@kernel.org> References: <20230602124642.19076-1-johan@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767596677174549301?= X-GMAIL-MSGID: =?utf-8?q?1767596677174549301?= |
Series |
USB: serial: return errors from break handling
|
|
Commit Message
Johan Hovold
June 2, 2023, 12:46 p.m. UTC
Instead of returning success when a driver does not support break
signalling, return an error to let user space know and to avoid waiting
when break is not supported.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/usb/serial/usb-serial.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 470634444af7..7b4805c1004d 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -541,7 +541,7 @@ static int serial_break(struct tty_struct *tty, int break_state) if (port->serial->type->break_ctl) return port->serial->type->break_ctl(tty, break_state); - return 0; + return -ENOTTY; } static int serial_proc_show(struct seq_file *m, void *v)