Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1370379pxk; Thu, 10 Sep 2020 13:42:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcVJrdx60up3lxfJZYtsiMidsRivuUyYFo6fqwtG4meQ2LA1wpbGdbHdNf6R2U2UgmqW2B X-Received: by 2002:a17:906:a053:: with SMTP id bg19mr11218475ejb.444.1599770531355; Thu, 10 Sep 2020 13:42:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599770531; cv=none; d=google.com; s=arc-20160816; b=uLGm9joFzceOmx1wE5llGFJds838QuBRjQPV+4PH90qGTPodmjgrpG7yOvYwonZ28o gEqzRHTm8vC95LLyWiLHHlQSBm9v6ebMIooVm+iqq1Zx7xqsI94+nnKuIsPqWcjuw3Ae k2qs8bnWSEoAlZ6zZ2maxChXlIFmahWvXcteNDQ+jqogA0VIRlbQwbt7M0M455DsrBex AnETJz3YbscIfdvotl7sNxZpu0OqMaygPIRMf52rbhZo1KKd4q8xRXQvQ86essyZHZJA sw0DiULCajnzz/BpUhiXnrCSl1r3vE2HtFeZeUBvwllgTVB8QhJ9QXQliLRtgXKDpyRO 1hJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Y2y1le8nyG2JexijK6Fs2sG9ohALNiodGvwyFKYgP6Q=; b=QtQZey9Y4pKF/xLYrhWLSurPq/dHKofcq6Z+u8DUaWgK+auuHjo6+yqawBqi2OTwqr eBybtIrc0H+OOlvVYOt3zVhn19Xdtwt6YPQ9cZTjeheucwjn2DBlrBLYhosU1WpGfX7D EdZPJxox0D1LWDpMW+vdKAuwi8uCXLHnPNqOxTMjctrHE38gGDx31whq3sw2ec3XNEOl QnKTDpeyHsEetaXQ/MQi2/7YkT5Lr2v2L6zu7IBgqSz+lRKfu47/OOkV6kzKtY1MCEht EUqrVauvRisgREY/6CxdMIVftW3w7c4dElEf3YLt4pp4LQ2aeQvZk+C1saElHNGlunM6 /D8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o2si1791262eda.463.2020.09.10.13.41.48; Thu, 10 Sep 2020 13:42:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727010AbgIJUjO (ORCPT + 99 others); Thu, 10 Sep 2020 16:39:14 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:56378 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726962AbgIJUiy (ORCPT ); Thu, 10 Sep 2020 16:38:54 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kGTLE-00E8So-Ti; Thu, 10 Sep 2020 22:38:48 +0200 Date: Thu, 10 Sep 2020 22:38:48 +0200 From: Andrew Lunn To: Oded Gabbay Cc: Jakub Kicinski , "Linux-Kernel@Vger. Kernel. Org" , netdev@vger.kernel.org, SW_Drivers , Greg Kroah-Hartman , "David S. Miller" Subject: Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver Message-ID: <20200910203848.GJ3354160@lunn.ch> References: <20200910161126.30948-1-oded.gabbay@gmail.com> <20200910130112.1f6bd9e9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20200910202513.GH3354160@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 10, 2020 at 11:30:33PM +0300, Oded Gabbay wrote: > On Thu, Sep 10, 2020 at 11:25 PM Andrew Lunn wrote: > > > > > Can you please elaborate on how to do this with a single driver that > > > is already in misc ? > > > As I mentioned in the cover letter, we are not developing a > > > stand-alone NIC. We have a deep-learning accelerator with a NIC > > > interface. > > > > This sounds like an MFD. > > > > Andrew > > Yes and no. There is only one functionality - training of deep > learning (Accelerating compute operations) :) > The rdma is just our method of scaling-out - our method of > intra-connection between GAUDI devices (similar to NVlink or AMD > crossfire). > So the H/W exposes a single physical function at the PCI level. And > thus Linux can call a single driver for it during the PCI probe. Yes, it probes the MFD driver. The MFD driver then creates platform drivers for the sub functions. i.e. it would create an Ethernet platform driver. That then gets probed in the usual way. The child device can get access to the parent device, if it needs to share things, e.g. a device on a bus. This is typically I2C or SPI, but there is no reason it cannot be a PCI device. Go look in drivers/mfd. Andrew