Subject: Re: [PATCH net-next v3] net: txgbe: Add build support for txgbe

From: Leon Romanovsky <[email-masked]>
Date: Mon, 30 May 2022 15:28:58 +0300

On Mon, May 30, 2022 at 02:17:08PM +0800, Jiawen Wu wrote:
> On Saturday, May 28, 2022 12:45 AM, Leon Romanovsky wrote:
> > On Fri, May 27, 2022 at 02:31:57PM +0800, Jiawen Wu wrote:
> > > Add doc build infrastructure for txgbe driver.
> > > Initialize PCI memory space for WangXun 10 Gigabit Ethernet devices.
> > >
> > > Signed-off-by: Jiawen Wu <[email-masked]>
> > > ---
> > >  .../device_drivers/ethernet/index.rst         |   1 +
> > >  .../device_drivers/ethernet/wangxun/txgbe.rst |  20 ++
> > >  MAINTAINERS                                   |   7 +
> > >  drivers/net/ethernet/Kconfig                  |   1 +
> > >  drivers/net/ethernet/Makefile                 |   1 +
> > >  drivers/net/ethernet/wangxun/Kconfig          |  32 +++
> > >  drivers/net/ethernet/wangxun/Makefile         |   6 +
> > >  drivers/net/ethernet/wangxun/txgbe/Makefile   |   9 +
> > >  drivers/net/ethernet/wangxun/txgbe/txgbe.h    |  27 ++
> > >  .../net/ethernet/wangxun/txgbe/txgbe_main.c   | 241
> > ++++++++++++++++++
> > >  .../net/ethernet/wangxun/txgbe/txgbe_type.h   |  65 +++++
> > >  11 files changed, 410 insertions(+)
> > >  create mode 100644
> > > Documentation/networking/device_drivers/ethernet/wangxun/txgbe.rst
> > >  create mode 100644 drivers/net/ethernet/wangxun/Kconfig
> > >  create mode 100644 drivers/net/ethernet/wangxun/Makefile
> > >  create mode 100644 drivers/net/ethernet/wangxun/txgbe/Makefile
> > >  create mode 100644 drivers/net/ethernet/wangxun/txgbe/txgbe.h
> > >  create mode 100644 drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
> > >  create mode 100644 drivers/net/ethernet/wangxun/txgbe/txgbe_type.h
> > 
> > <...>
> >
> > > +	pci_set_master(pdev);
> > > +	/* errata 16 */
> > > +	pcie_capability_clear_and_set_word(pdev, PCI_EXP_DEVCTL,
> > > +					   PCI_EXP_DEVCTL_READRQ,
> > > +					   0x1000);
> > 
> > Why do you need this in probe function and not as PCI quirk?
> > 
> 
> It is necessary to set read request size 256 bytes for us.
> Otherwise, some PCI exception issues may occur.

It is not what I asked.
I would expect such code in PCI quirk and not in probe function.

Thanks