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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B84A7C2BA1A for ; Thu, 20 Jun 2024 16:43:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:To:From: Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zCnekOgzHJ5CtNqqN1hEHsWUPpfbXDdutXGhUVlconY=; b=oU+ug0t3jKXJg4Ufbuk0fiNcZd Ms7Vq9PyDtOeDRSeZAiUNUz1qLnsjdNtQPK1535Dj0ik89xey8eN9F+ukfPXcVlQuojksk258MQ+3 4A94JbVBsj/MrRwFDBuouCG2G8suiE/6p1l9J0LHKmKTSPSn8TxbD6cXK1CaGtraKDlnFZOdWy/YK waedonTnV1vZi9CHeTFeVKDuEqAm20VB2Gd7FrrS5oLxdqKdFp+FVlROZYQKHfCOsaN4wJ7HTwB5Z TFbaEwxMYAPO4fKdCl7VnL4KIoauF10tvgOtg9Si+num8wD+vzX7WAWtzuH78fNnfjdHpgckI36vs ybYmuqAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKKso-00000005vHK-45RN; Thu, 20 Jun 2024 16:43:34 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sKKsT-00000005v7T-1Yyk for linux-arm-kernel@lists.infradead.org; Thu, 20 Jun 2024 16:43:15 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 632AB240005; Thu, 20 Jun 2024 16:43:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1718901791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zCnekOgzHJ5CtNqqN1hEHsWUPpfbXDdutXGhUVlconY=; b=EN3Rla40J76rp4uxb98AiJsO9bmSyCfqNZia+LcMqKEdmZcebP+27tab//3SrxFUcHQBJL 3AU25VosnRi/zgpew0HqncZXezZAmh/Rr8sTw6x0XqfcigIUDpZBcSfMJPIxqw5KSP6cIo +H+nxgh/087GcC7gnPTifJnz/6pzWsICipD04n0Emsa+cGigFc+rh7ld2BtNq4YYpPKd6N C+sNoxdVYLtvZmFf1WIA1K08UnP7KbBn3jRiMg/YFD7N7/G+J8MCW36V7MSgBMA5Jt4lgk y2T1T/ldqmbj1TcVxIfCImdFJjKEyU+9v0MV1/x0kNazRDKJgHOIMeQfYKmM3A== Date: Thu, 20 Jun 2024 18:43:09 +0200 From: Herve Codina To: Andy Shevchenko , Simon Horman , Sai Krishna Gajula , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lee Jones , Arnd Bergmann , Horatiu Vultur , UNGLinuxDriver@microchip.com, Andrew Lunn , Heiner Kallweit , Russell King , Saravana Kannan , Bjorn Helgaas , Philipp Zabel , Lars Povlsen , Steen Hegelund , Daniel Machon , Alexandre Belloni , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Allan Nielsen , Luca Ceresoli , Thomas Petazzoni Subject: Re: [PATCH v2 18/19] mfd: Add support for LAN966x PCI device Message-ID: <20240620184309.6d1a29a1@bootlin.com> In-Reply-To: References: <20240527161450.326615-1-herve.codina@bootlin.com> <20240527161450.326615-19-herve.codina@bootlin.com> <20240620175646.24455efb@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: herve.codina@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240620_094313_880193_027A5DB7 X-CRM114-Status: GOOD ( 31.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org My bad, I wrongly answered first in private. I already eesend my answers with people in Cc Now, this is the Andy's your reply. Sorry for this mistake. Herve On Thu, 20 Jun 2024 18:07:16 +0200 Andy Shevchenko wrote: > On Thu, Jun 20, 2024 at 5:56 PM Herve Codina wrote: > > On Wed, 5 Jun 2024 23:24:43 +0300 > > Andy Shevchenko wrote: > > > Mon, May 27, 2024 at 06:14:45PM +0200, Herve Codina kirjoitti: > > ... > > > > > + if (!dev->of_node) { > > > > + dev_err(dev, "Missing of_node for device\n"); > > > > + return -EINVAL; > > > > + } > > > > > > Why do you need this? The code you have in _create_intr_ctrl() will take care > > > already for this case. > > > > The code in _create_intr_ctrl checks for fwnode and not an of_node. > > > > The check here is to ensure that an of_node is available as it will be use > > for DT overlay loading. > > So, what exactly do you want to check? fwnode check covers this. > > > I will keep the check here and use dev_of_node() instead of dev->of_node. > > It needs to be well justified as from a coding point of view this is a > duplication. > > ... > > > > > + pci_set_master(pdev); > > > > > > You don't use MSI, what is this for? > > > > DMA related. > > Allows the PCI device to be master on the bus and so initiate transactions. > > > > Did I misunderstood ? > > So, you mean that the PCI device may initiate DMA transactions and > they are not related to MSI, correct? > > ... > > > > > +static struct pci_device_id lan966x_pci_ids[] = { > > > > + { PCI_DEVICE(0x1055, 0x9660) }, > > > > > > Don't you have VENDOR_ID defined somewhere? > > > > No and 0x1055 is taken by PCI_VENDOR_ID_EFAR in pci-ids.h > > but SMSC acquired EFAR late 1990's and MCHP acquired SMSC in 2012 > > https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet/microchip/lan743x_main.h#L851 > > > > I will patch pci-ids.h to create: > > #define PCI_VENDOR_ID_SMSC PCI_VENDOR_ID_EFAR > > #define PCI_VENDOR_ID_MCHP PCI_VENDOR_ID_SMSC > > As part of this patch, I will update lan743x_main.h to remove its own #define > > > > And use PCI_VENDOR_ID_MCHP in this series. > > Okay, but I don't think (but I haven't checked) we have something like > this ever done there. In any case it's up to Bjorn how to implement > this. > > > > > + { 0, } > > > > > > Unneeded ' 0, ' part > > > > Will be removed. > > > > > > +}; >