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=-0.8 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED 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 44FECC43381 for ; Sun, 3 Mar 2019 08:57:51 +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 AA12F20675 for ; Sun, 3 Mar 2019 08:57:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pcvA1jdh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA12F20675 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 1h0Mvq-0007Qs-5o; Sun, 03 Mar 2019 03:57:14 -0500 Received: from mail-it1-x143.google.com ([2607:f8b0:4864:20::143]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1h0Mvn-0007Ql-Vi for kernelnewbies@kernelnewbies.org; Sun, 03 Mar 2019 03:57:12 -0500 Received: by mail-it1-x143.google.com with SMTP id l66so3254745itg.3 for ; Sun, 03 Mar 2019 00:57:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=tvgBGBBtbMPvg/LXboTJf5PmXKvX4Ex1SMg7UMcn07E=; b=pcvA1jdh1xRIveRA4612vs2XJJ9EDi1zl+yq7JP43TweA+6O2EdcnP4ho2x5B7HpeC HMUAfHkxSzN+SBplFCj5FBa8/nFY7qaKEC2JuHHozNemqCTYrH6uNP4+Vc13TZeZVdPR EulzcGSIt+wq67t/FncVJ8Nnxpe+kzZKhGr33tVXvRUJHwZmroknzwVooAB42utNCnHa M3E/0IvJru8zd4D6qmHKhamRfrJ6+YrTssIV7FYNGSv3OrC0dPXPU2p3uqDaIxGlHi8o /eFwzCWLliJD6+KWdaNgNd8HmvoNtCj5zoONuBsaGDH+dBEkK2pGDPJ5ufqU2GhrCSxh 0ZNg== 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:reply-to :from:date:message-id:subject:to:cc; bh=tvgBGBBtbMPvg/LXboTJf5PmXKvX4Ex1SMg7UMcn07E=; b=Hf8jo6Rf3ZiBcxedMinwmqLtSxm1SKbFzH9U4rPx8AImqUZdn/UulkenmODgYUkaGl BndMFEke3jJHAgc0WWjXzvUoaa/uhQqG2kCdsZuu8EGIR1nlDQfZ4PgRD0WOnlGVB8lp F7kXIgO+rdtYW8aMHk5WuP3skGgjFjq7souVMmLBEwO7IjPahkpbCNhgZRRwZsHXNneU NzqFqsz1ATXfDNU0V6zfAX3qxwzfNvHCCEwQ4Gz37xSpvpADbJh6ZANn0w57aWji8hhD pnARI/XFPpeQK5pOUBeXDC1Ybyk3oazqjpf0oJEP7WHrgj8tyPenRggN4T/Gc/K5DGVB INsQ== X-Gm-Message-State: APjAAAXxlXxbacfSGiJnJI66eSrx2kaZS4f6KYGEssMCu1b3YfQnj8G6 mQalS7aWnODNVmw0gs0HpKpwxiNyUpkEE62GnwY= X-Google-Smtp-Source: APXvYqw74Zq8/vS9CL+KCzO/U9l1H49h1LTSFr79zxY1rKE9M6yt42UJmguCQ1Pbi9ud2P2FqESojQbtKdTDOXBhRN0= X-Received: by 2002:a24:7cc4:: with SMTP id a187mr8100839itd.171.1551603370517; Sun, 03 Mar 2019 00:56:10 -0800 (PST) MIME-Version: 1.0 References: <3824.1551552333@turing-police> <8247.1551592550@turing-police> In-Reply-To: <8247.1551592550@turing-police> From: Jeffrey Walton Date: Sun, 3 Mar 2019 03:55:44 -0500 Message-ID: Subject: Re: How to make /dev/ttyACM0 (and friends) exclusive? To: Valdis Kletnieks Cc: 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: , Reply-To: noloader@gmail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org 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. Jeff _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies