Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp51549pxk; Thu, 10 Sep 2020 23:25:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjvN31IfvQH0kpJowFsYfRjLEGEGO4QnRTSMlMtbzxbQDEtVTWgIZqmndQESEV3tl7UYNl X-Received: by 2002:aa7:d40f:: with SMTP id z15mr417303edq.247.1599805510704; Thu, 10 Sep 2020 23:25:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599805510; cv=none; d=google.com; s=arc-20160816; b=LNQQOx3wPPjm91plPASio2WDif5Fk1OLzzBpC1tpQKEyemjFEvoCyAs8wP0DR8bGHi 61r9K25fVOxNpVq1zXTOS6XTyv0zO2Rod9DCP95OlBBaJs1ZLB865mhJvcEX2H9F18Ry WLSP2GEFu/NooN0Slo2Zs/79uyRgomL/stuG1bYON0o0udMFwBRcr+W57pjUPRtSZB6N Qck6EDqpPkKmn4AEAoKTPg7+CtrglJwO+U+iOI85BMpGhoR45srltbTRsxc7d17mO7eS 0niaGxdOjDAP4e+Yl8SGoSYjUT2P5tjK50SKjUEj94rIWmuXcnY3jP///6gxYFZNBA4P f03A== 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 :dkim-signature; bh=wPApHpHuQnxqsa2y7C2yiT0rcRECb858rhZrN2PLOus=; b=qTHqyftQECabv6utAp4yiUs5v6xy/ZKIkpP4A/yRk+13NK2Of0DwhcLqThNzqUFA2R x927iL9sUC3u8tNJ/hzphlGxJ7s/gvh8yeIk9xU5PKnJccteCMxHt872Gl6Ruac5KX24 2/AXbA/vKV3hu+fg4rxeZClioCgjkOKKk8/VApU3VVHwTEi/wE7LFnxeCnubKaL6/q6g 8MyJfgEfHTryC2ecpOIHrsEqCth2TwYFAymemlOD4PeR+y0GtDPqMC2CrjaB8WCnfLS4 pj+0A+k9cadC/671+cxuyLlHDqYEGYPXTKfWQclrr14PENO7MqOOVK2a0vJ1kQ/MIan4 9fVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="d/wbDJJa"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u26si640772edv.154.2020.09.10.23.24.44; Thu, 10 Sep 2020 23:25:10 -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; dkim=pass header.i=@kernel.org header.s=default header.b="d/wbDJJa"; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725791AbgIKGW4 (ORCPT + 99 others); Fri, 11 Sep 2020 02:22:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:37286 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725774AbgIKGWw (ORCPT ); Fri, 11 Sep 2020 02:22:52 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 01DD9221EB; Fri, 11 Sep 2020 06:22:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599805371; bh=RXWz2Q1kkAl4t00VZDK+YTtnXoO2Y+/66lxmxxsMQhY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=d/wbDJJaqA683iXRRzUutNDqI+TBYUQu/Cx46nW3PUvamh396/LrtCPG7EskSRy9k +WCF+UDKjE8AV++aynqOB/t0am8taizadhf75qKRNWFxddmopzZ9L8wos47Fl248VB dTPAxsmByxsxBNZMihhuE0U9zc6Mwm5qEYWgwDCE= Date: Fri, 11 Sep 2020 08:22:47 +0200 From: Greg Kroah-Hartman To: Andrew Lunn Cc: Oded Gabbay , Jakub Kicinski , "Linux-Kernel@Vger. Kernel. Org" , netdev@vger.kernel.org, SW_Drivers , "David S. Miller" Subject: Re: [PATCH 00/15] Adding GAUDI NIC code to habanalabs driver Message-ID: <20200911062247.GB554610@kroah.com> References: <20200910161126.30948-1-oded.gabbay@gmail.com> <20200910130112.1f6bd9e9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20200910202513.GH3354160@lunn.ch> <20200910203848.GJ3354160@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200910203848.GJ3354160@lunn.ch> 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 10:38:48PM +0200, Andrew Lunn wrote: > 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. Why do we keep going down this path each time this comes up... No, mfd doesn't work for this case, but the "virtual bus" that gets posted ever once in a while would solve this issue. Hopefully one day the Intel developers will wake up and post it again here so that we can review it and hopefully merge it to solve this very common problem... thanks, greg k-h