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=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 68286C433E2 for ; Thu, 10 Sep 2020 20:39:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 32033214F1 for ; Thu, 10 Sep 2020 20:39:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727025AbgIJUjN (ORCPT ); Thu, 10 Sep 2020 16:39:13 -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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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