Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8053204ybi; Tue, 9 Jul 2019 08:23:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVDdxRh7s4zJt9u2IKW3jvI2OOohMoV/lwEnZDoX8FHWe9qjvNGLhDPaIvC+Bzj3kcEYwT X-Received: by 2002:a63:6986:: with SMTP id e128mr32540774pgc.220.1562685828530; Tue, 09 Jul 2019 08:23:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562685828; cv=none; d=google.com; s=arc-20160816; b=sntOo4nePIbXOTSIC3K8sV4uRLVoof/VlU3DcgSjYWIH0VYceA/HRR2AzeWllNJog4 OL8ciLBvfXUJxnVC9hDn1n8Xgv5+JdqawHOLz4Fl/5Jv8IROMCf0DdPp65atEWOng7vW LvvnyG72uOxCEIH+d/uawVWllHmWvSF7M4a+M910/Q54IM1WTuGT1gh6tjBALuFPIjYf dqW7zdd0YZolxtWE8Kvpbav0i+SxJQTFRB3STki6OXyD3uI4o2HabCviUwpEImyRsqts AfaIwiZF8NMytPZCZuOIJrEGwiWL0e9uekw4QjRaqmAFRcPAfFpwG+CVnt/uGna7b+CN EW/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=e1apagjkbX3SvWMORi3n1uLHAQqUyJdVXyUoVJnOmwU=; b=rgdmv5xSaUWsE+O1ZstgzYM7pNNFRxsmMYkP7a81z76iu72/LPKeieRsNhzmwgkVtU OS13i7XtYAic2eouDxcjfntZXDyPZvEg8Q+jkVA8TjKj7orESQDMqj3aAzt4xaArrC1q O2Yy0zYkZX2jSAZi+apbRJ6JetY7PyEgu2fCDXJjqsf7NnEMi5bSPRbT9K9t1H0ucZhr fdxfAfjQ0pAMHTAgPWk8tXZJRfPJnWgfFZQDZ60VuyrtiD2qN5U5fePgEJAEd6Py0Tmt YSTg4sg7yZa0w6ke8fOHfGkjGcphyRdBmCvasrQ8Wboz8kTd7O5HceYKByXvcS+RZEvD SKYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f17si21546771pgv.338.2019.07.09.08.23.33; Tue, 09 Jul 2019 08:23:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726346AbfGIPWg convert rfc822-to-8bit (ORCPT + 99 others); Tue, 9 Jul 2019 11:22:36 -0400 Received: from www.llwyncelyn.cymru ([82.70.14.225]:48284 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbfGIPWg (ORCPT ); Tue, 9 Jul 2019 11:22:36 -0400 Received: from alans-desktop (82-70-14-226.dsl.in-addr.zen.co.uk [82.70.14.226]) by fuzix.org (8.15.2/8.15.2) with ESMTP id x69FMLr7021205; Tue, 9 Jul 2019 16:22:21 +0100 Date: Tue, 9 Jul 2019 16:22:21 +0100 From: Alan Cox To: Martin =?UTF-8?B?SHVuZGViw7hsbA==?= Cc: Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org, Sean =?UTF-8?B?Tnlla2o=?= =?UTF-8?B?w6Zy?= , Esben Haabendal Subject: Re: [PATCH 4/4] tty: n_gsm: add ioctl to map serial device to mux'ed tty Message-ID: <20190709162221.623f99ce@alans-desktop> In-Reply-To: <20190708190252.24628-4-martin@geanix.com> References: <20190708190252.24628-1-martin@geanix.com> <20190708190252.24628-4-martin@geanix.com> Organization: Intel Corporation X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 8 Jul 2019 21:02:52 +0200 Martin Hundebøll wrote: > Guessing the base tty for a gsm0710 multiplexed serial device is not > currently possible, which makes it racy to use with multiple modems. > > Add a way to map the physical serial tty to its related mux devices > using a ioctl. That looks very sensible > + int base; > > /* open the serial port connected to the modem */ > fd = open(SERIAL_PORT, O_RDWR | O_NOCTTY | O_NDELAY); > @@ -58,6 +61,11 @@ Major parts of the initialization program : > c.mtu = 127; > /* set the new configuration */ > ioctl(fd, GSMIOC_SETCONF, &c); > + /* get and print base gsmtty device node */ > + ioctl(fd, GSMIOC_GETBASE, &base); Can we at least use a specific sized type ? uint32_t or whatever is fine. Alan