RE: [PATCH v12 03/19] PCI: Add PCI_HEADER_TYPE_MULTI_FUNC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bjorn,

> From: Bjorn Helgaas, Sent: Saturday, April 15, 2023 3:58 AM
> 
> On Fri, Apr 14, 2023 at 03:16:06PM +0900, Yoshihiro Shimoda wrote:
> > Add PCI_HEADER_TYPE_MULTI_FUNC macro which is "Multi-Function Device"
> > of Header Type Register.
> >
> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
> > ---
> >  include/uapi/linux/pci_regs.h | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
> > index 5d48413ac28f..a302b67d2834 100644
> > --- a/include/uapi/linux/pci_regs.h
> > +++ b/include/uapi/linux/pci_regs.h
> > @@ -80,6 +80,7 @@
> >  #define  PCI_HEADER_TYPE_NORMAL		0
> >  #define  PCI_HEADER_TYPE_BRIDGE		1
> >  #define  PCI_HEADER_TYPE_CARDBUS	2
> > +#define  PCI_HEADER_TYPE_MULTI_FUNC	0x80
> 
> We test this a few places already; if we add this new macro, shouldn't
> we update those places to use it?

Thank you for your comment! We should updated drivers/pci/{probe,quirks}.c
like the following code for example:

	dev->multifunction = !!(hdr_type & 0x80);

I'll update them on v13.

Best regards,
Yoshihiro Shimoda

> >  #define PCI_BIST		0x0f	/* 8 bits */
> >  #define  PCI_BIST_CODE_MASK	0x0f	/* Return result */
> > --
> > 2.25.1
> >




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux