From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1CB3C43381 for ; Sun, 3 Mar 2019 11:00:39 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6F18F20863 for ; Sun, 3 Mar 2019 11:00:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="QEUfg88j"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="z0FNwNNW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F18F20863 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kroah.com Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.91) (envelope-from ) id 1h0Oqw-0008KX-Ry; Sun, 03 Mar 2019 06:00:18 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1h0Oqt-0008KQ-G6 for kernelnewbies@kernelnewbies.org; Sun, 03 Mar 2019 06:00:15 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 6847E21F3F; Sun, 3 Mar 2019 06:00:14 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 03 Mar 2019 06:00:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=pvEvR8Wk4IH1yEAr4JOPAnvS6MY EisYO/V9E6O5+67Q=; b=QEUfg88jk0Yi7nm4WEqjDWmlrXK3jB3LbVMyiayrf16 GM0Y/oMDPbtbZZT87WoQUUYmSORh/MJ96Z+cviYq5IFUi84+XRbxnnomGKMz5khR qWrHKqP4SY2pAtIzEa/CHHfmK/Ygcp6S4jCcoLkVjctPhQm181g1PS/CZDDc1hZ7 rA1YAAlQycENhi/k/UzHAjAFuQm6AgYMn4mtPjAfJGuqWWCKpbpR2ygAD94ihOy7 kbMM8YhnU4fb7fvZiObNZjyxcJj+/7mxEQVM4BEugDsDzypKCN8Y2GlgbnUWZCga Tb+zu2lEbzi0k5aZFtMLMJ2AoUvhnMxpHB3pNKieB5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=pvEvR8 Wk4IH1yEAr4JOPAnvS6MYEisYO/V9E6O5+67Q=; b=z0FNwNNWJWv9VHBllpQclP gtHSh01gZgVqTzruSlmZmKH5KiBudhRt5HtIok+Y3NSo04hHsKAep8VQo9XQQAyM DfLnKjF48O1Q1D9VR5S/9MTMYjrXJH6qf8sTdjysSbD2Yp6cnIsrqLJ0mIgpwKYF GnF3gqqGPWM8RCVEjE30OXyYIcxYXxR2G0tSBOhoIwhVDj4IdUsZ3dL93eJgbFax q0AXmHdCGF0nDCxFoVzFdbKMVgwUA5IsP9eMFgIugUsMOUvC01IVir/wN36eU3ib IWeIS/fZqbLxIChSm3RjyDr9dq04kF+/ujTw8SLAYZsADBjhOvwoua92BatejgbQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrvdelgddvfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujggfsehttdertddtredvnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucfkphepkeefrdekiedrkeelrddutd ejnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhhdrtghomhenucev lhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost (5356596b.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 1B794E44D7; Sun, 3 Mar 2019 06:00:13 -0500 (EST) Date: Sun, 3 Mar 2019 12:00:11 +0100 From: Greg KH To: Jeffrey Walton Subject: Re: How to make /dev/ttyACM0 (and friends) exclusive? Message-ID: <20190303110011.GA10485@kroah.com> References: <3824.1551552333@turing-police> <8247.1551592550@turing-police> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Cc: Valdis Kletnieks , kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Sun, Mar 03, 2019 at 03:55:44AM -0500, Jeffrey Walton wrote: > On Sun, Mar 3, 2019 at 12:55 AM wrote: > > > > On Sat, 02 Mar 2019 14:36:12 -0500, Jeffrey Walton said: > > > > > I feel like I am missing something... Does Linux consider the modem a > > > shared resource instead of an exclusive resource? What use cases > > > support two different programs sending commands to the modem at the > > > same time? > > > > The Linux kernel has exactly zero clue what a "modem" is. It's talking to a > > serial port, and doesn't care where the other end of the serial cable is. If > > you have a onboard modem, that cable may be all of 2 mm long and consist of a > > bunch of traces between two chips on a PCB, or even internal connections > > between two sides of a chip, but it's still there. > > > > So the correct question is "what use cases have two programs talking to the > > same serial port"? > > I agree about the general case of serial lines and /dev/ttySn. However... > > /dev/ttyACMn are modems, not serial lines. For whatever reason the > kernel made a special case for the devices. The kernel knows exactly > what they are. The kernel has no idea that this is a "modem". It doesn't even know what a modem is. All it knows is that this is a tty device, and then there happens to be a driver that knows how to speak the USB ACM class protocol bound to it. Again, go delete modem manager off of your system, it is the thing that keeps opening the port up to see if you have made a valid connection on the device or not. If you write your own program to talk to the device, modem manager is not needed at all, and is known to cause this problem. greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies