mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>,
	<netdev@vger.kernel.org>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<bryan.whitehead@microchip.com>, <UNGLinuxDriver@microchip.com>,
	<linux@armlinux.org.uk>, <maxime.chevallier@bootlin.com>,
	<rdunlap@infradead.org>, <Steen.Hegelund@microchip.com>,
	<daniel.machon@microchip.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next V2 2/5] net: lan743x: Add support to software-nodes for sfp
Date: Thu, 12 Sep 2024 12:08:40 +0530	[thread overview]
Message-ID: <ZuKMcMexEAqTLnSc@HYD-DK-UNGSW21.microchip.com> (raw)
In-Reply-To: <cb39041e-9b72-4b76-bfd7-03f825b20f23@lunn.ch>

Hi Andrew,

The 09/11/2024 19:17, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> > diff --git a/drivers/net/ethernet/microchip/Kconfig b/drivers/net/ethernet/microchip/Kconfig
> > index 2e3eb37a45cd..9c08a4af257a 100644
> > --- a/drivers/net/ethernet/microchip/Kconfig
> > +++ b/drivers/net/ethernet/microchip/Kconfig
> > @@ -50,6 +50,8 @@ config LAN743X
> >       select CRC16
> >       select CRC32
> >       select PHYLINK
> > +     select I2C_PCI1XXXX
> > +     select GP_PCI1XXXX
> 
> GP_ is odd. GPIO drivers usually use GPIO_. Saying that, GPIO_PCI1XXXX
> is not in 6.11-rc7. Is it in gpio-next?
> 

Yes. But GPIO driver developer use this.
I have to use the same here.

It's exist in 6.11-rc6
drivers/misc/mchp_pci1xxxx/Kconfig
This was defined along back.

>Is it in gpio-next? 
No. available in net-next

> > +static void *pci1xxxx_perif_drvdata_get(struct lan743x_adapter *adapter,
> > +                                     u16 perif_id)
> > +{
> > +     struct pci_dev *pdev = adapter->pdev;
> > +     struct pci_bus *perif_bus;
> > +     struct pci_dev *perif_dev;
> > +     struct pci_dev *br_dev;
> > +     struct pci_bus *br_bus;
> > +     struct pci_dev *dev;
> > +
> > +     /* PCI11x1x devices' PCIe topology consists of a top level pcie
> > +      * switch with up to four downstream ports, some of which have
> > +      * integrated endpoints connected to them. One of the downstream ports
> > +      * has an embedded single function pcie ethernet controller which is
> > +      * handled by this driver. Another downstream port has an
> > +      * embedded multifunction pcie endpoint, with four pcie functions
> > +      * (the "peripheral controllers": I2C controller, GPIO controller,
> > +      * UART controllers, SPIcontrollers)
> > +      * The code below navigates the PCI11x1x topology
> > +      * to find (by matching its PCI device ID) the peripheral controller
> > +      * that should be paired to the embedded ethernet controller.
> > +      */
> > +     br_dev = pci_upstream_bridge(pdev);
> > +     if (!br_dev) {
> > +             netif_err(adapter, drv, adapter->netdev,
> > +                       "upstream bridge not found\n");
> > +             return br_dev;
> > +     }
> > +
> > +     br_bus = br_dev->bus;
> > +     list_for_each_entry(dev, &br_bus->devices, bus_list) {
> > +             if (dev->vendor == PCI1XXXX_VENDOR_ID &&
> > +                 (dev->device & ~PCI1XXXX_DEV_MASK) ==
> > +                  PCI1XXXX_BR_PERIF_ID) {
> > +                     perif_bus = dev->subordinate;
> > +                     list_for_each_entry(perif_dev, &perif_bus->devices,
> > +                                         bus_list) {
> > +                             if (perif_dev->vendor == PCI1XXXX_VENDOR_ID &&
> > +                                 (perif_dev->device & ~PCI1XXXX_DEV_MASK) ==
> > +                                  perif_id)
> > +                                     return pci_get_drvdata(perif_dev);
> > +                     }
> > +             }
> > +     }
> 
> It would be good to have the PCI Maintainers review of this. Maybe
> pull this out into a patch of its own and Cc: Bjorn Helgaas
> <bhelgaas@google.com>

Sure. I will add Cc: Bjorn Helgaas.

> 
>         Andrew

-- 
Thanks,                                                                         
Raju

  reply	other threads:[~2024-09-12  6:42 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-11 16:10 [PATCH net-next V2 0/5] Add support to SFP for PCI11x1x chips Raju Lakkaraju
2024-09-11 16:10 ` [PATCH net-next V2 1/5] net: lan743x: Add SFP support check flag Raju Lakkaraju
2024-09-11 16:44   ` Christophe JAILLET
2024-09-12  6:12     ` Raju Lakkaraju
2024-09-11 17:06   ` Andrew Lunn
2024-09-12  6:29     ` Raju Lakkaraju
2024-09-12 14:52       ` Andrew Lunn
2024-09-12 15:36         ` Ronnie.Kunin
2024-09-12 15:58           ` Andrew Lunn
2024-09-12 16:36             ` Ronnie.Kunin
2024-09-16 18:41             ` Russell King (Oracle)
2024-09-16 18:30   ` Russell King (Oracle)
2024-09-11 16:10 ` [PATCH net-next V2 2/5] net: lan743x: Add support to software-nodes for sfp Raju Lakkaraju
2024-09-11 16:54   ` Christophe JAILLET
2024-09-12  6:32     ` Raju Lakkaraju
2024-09-16 19:31       ` Russell King (Oracle)
2024-09-16 20:37         ` Andrew Lunn
2024-09-11 17:17   ` Andrew Lunn
2024-09-12  6:38     ` Raju Lakkaraju [this message]
2024-09-12 15:19       ` Andrew Lunn
2024-09-16 19:34         ` Russell King (Oracle)
2024-09-14 17:37   ` kernel test robot
2024-09-11 16:10 ` [PATCH net-next V2 3/5] net: lan743x: Register the platform device for sfp pluggable module Raju Lakkaraju
2024-09-15  2:16   ` kernel test robot
2024-09-11 16:10 ` [PATCH net-next V2 4/5] net: lan743x: Implement phylink pcs Raju Lakkaraju
2024-09-11 17:24   ` Maxime Chevallier
2024-09-12  6:46     ` Raju Lakkaraju
2024-09-11 17:26   ` Andrew Lunn
2024-09-12  6:53     ` Raju Lakkaraju
2024-09-12 15:28       ` Andrew Lunn
2024-09-12 16:04         ` Ronnie.Kunin
2024-09-12 16:13           ` Andrew Lunn
2024-09-12 18:51             ` Ronnie.Kunin
2024-09-12 19:37               ` Andrew Lunn
2024-09-13  8:54           ` Raju Lakkaraju - I30499
2024-09-13 13:19             ` Andrew Lunn
2024-09-13 14:23               ` Ronnie.Kunin
2024-09-13 15:03                 ` Andrew Lunn
2024-09-13 22:53                   ` Ronnie.Kunin
2024-09-14 14:39                     ` Andrew Lunn
2024-09-11 16:10 ` [PATCH net-next V2 5/5] net: lan743x: Add Support for 2.5G SFP with 2500Base-X Interface Raju Lakkaraju
2024-09-11 17:31   ` Andrew Lunn
2024-09-11 20:01     ` Maxime Chevallier
2024-09-12  7:01       ` Raju Lakkaraju
2024-09-12 11:49         ` Maxime Chevallier
2024-09-12  7:04     ` Raju Lakkaraju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZuKMcMexEAqTLnSc@HYD-DK-UNGSW21.microchip.com \
    --to=raju.lakkaraju@microchip.com \
    --cc=Steen.Hegelund@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=bryan.whitehead@microchip.com \
    --cc=daniel.machon@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®