Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1119079ybi; Wed, 19 Jun 2019 13:57:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJJnDXdQz9mJHdH1D7iHK+TstqPiIw1NA9nGkCK+x8Ip/M0jPoyiUj7mHJl60h9Xa9O2V/ X-Received: by 2002:a63:1322:: with SMTP id i34mr9641153pgl.424.1560977852532; Wed, 19 Jun 2019 13:57:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560977852; cv=none; d=google.com; s=arc-20160816; b=VMPLdLhQUZAopDaRDbfs1Pydukw+IipzXHuXYo0fFZXNJr7UD+TvFeSL3ZuBp/hmRN droROjGYpkDUiYzlQdSeU2UIneve85sO8TtHhPg8fE3ug+IUEzEtlkux4hPBxvopVRK+ SSURBIIaIBB9Bv3k8c9gpbrr8qvnnKo8q/vKsfp5MJjyhwDk9BTktSiBykU2ZLw8oyKm glsUQUBWDQlLUMpUDOFEOTHZ6YVC76VMcEs0ub7DSm6NBDKM8qKraDieBSBZjHAFmmeZ QWHWrVfBmQyEVRNVfw9flavQsvpOmoAHTRftT6tzLv+zYrzOon1vzlg++aUCuZKpuFn2 tyVw== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=4XBnmKse0JJqmA0IjQQsko/84PNrXcpZHqRvNctipE0=; b=dhKbTLL6afEfKIq/qc1j5NY75HQ0j9RhS6LoErxw1paor+tzvDaraursmiAHHgJqfL A+MLxiMXy4Ak+8uE619ZRhFGTU/1lQPmSp7vvdWHEA4fnNvop2h8aODA0bSglAQ+32Xn 8KiFf08OH2TtpXRVxt4vGwwCAD9HB8PEqPa2A4KPZMfIiZkjZpJ4WTVnHRJmzZ12h8eS w1AsrcvTCpUkHUTgicm9tNTrTCJVLXFm2UweXl4z++mJmaEeNpxxpk4RC25LoMZ6hVRC ZXEBAQCXrg/05jpXpPXQeyzLk/nWCmcZi/0HVU43jHYbOdZ5gt9gGyqU47cU9tgwuwiv z5YQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 63si17629213pfg.192.2019.06.19.13.57.16; Wed, 19 Jun 2019 13:57:32 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730329AbfFSU5J (ORCPT + 99 others); Wed, 19 Jun 2019 16:57:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38236 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726244AbfFSU5J (ORCPT ); Wed, 19 Jun 2019 16:57:09 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A385B30C1330; Wed, 19 Jun 2019 20:57:06 +0000 (UTC) Received: from ovpn-112-53.rdu2.redhat.com (ovpn-112-53.rdu2.redhat.com [10.10.112.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id DACED608A7; Wed, 19 Jun 2019 20:56:59 +0000 (UTC) Message-ID: <414bc504bf62ea8de2ad195c00ce64dc0acb773c.camel@redhat.com> Subject: Re: [PATCH v2 00/17] net: introduce Qualcomm IPA driver From: Dan Williams To: Arnd Bergmann , Johannes Berg Cc: Alex Elder , Subash Abhinov Kasiviswanathan , abhishek.esse@gmail.com, Ben Chan , Bjorn Andersson , cpratapa@codeaurora.org, David Miller , DTML , Eric Caruso , evgreen@chromium.org, Ilias Apalodimas , Linux ARM , linux-arm-msm@vger.kernel.org, Linux Kernel Mailing List , linux-soc@vger.kernel.org, Networking , syadagir@codeaurora.org Date: Wed, 19 Jun 2019 15:56:58 -0500 In-Reply-To: References: <380a6185-7ad1-6be0-060b-e6e5d4126917@linaro.org> <36bca57c999f611353fd9741c55bb2a7@codeaurora.org> <153fafb91267147cf22e2bf102dd822933ec823a.camel@redhat.com> <97cbfb3723607c95d78e25785262ae7b0acdb11c.camel@sipsolutions.net> <54a5acb6cf26ebc6447f8ebcbdcb8e0eed693ab3.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Wed, 19 Jun 2019 20:57:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2019-06-18 at 23:06 +0200, Arnd Bergmann wrote: > On Tue, Jun 18, 2019 at 10:39 PM Johannes Berg > wrote: > > On Tue, 2019-06-18 at 22:33 +0200, Arnd Bergmann wrote: > > It seems to me though that this is far more complex than what I'm > > proposing? What I'm proposing there doesn't even need any userspace > > involvement, as long as all the pieces are in the different sub- > > drivers, > > they'd fall out automatically. > > > > And realistically, the wwan_device falls out anyway at some point, > > the > > only question is if we really make one specific driver be the > > "owner" of > > it. I'm suggesting that we don't, and just make its lifetime depend > > on > > the links to parts it has (unless something like IPA actually wants > > to > > be an owner). > > My feeling so far is that having the wwan_device be owned by a device > gives a nicer abstraction model that is also simpler for the common > case. A device driver like ipa would end up with a probe() function > that does does wwan_device_alloc/wwan_device_register, corresponding > to alloc_etherdev/register_netdev, and then communicates through > callbacks. > > I agree the compound device case would get more complex by > shoehorning it into this model, but that can be a valid tradeoff > if it's the exceptional case rather than the common one. In my experience, the compound device model is by far the most prevalent for regular Linux distros or anything *not* running on an SoC with an integrated modem. But it's also quite common for Android, no? drivers/net/ethernet/msm/ has rmnet and IPA ethernet drivers while arch/arm/mach-msm/ has various SMD-related control channel drivers like smd_tty.c and smd_qmi.c and smd_nmea.c. At least that's how I remember older SMD-based devices being in the 8xxx and 9xxx time. Ideally those setups can benefit from this framework as well, without having to write entirely new composite drivers for those devices. Dan