Re: [PATCH] earlyprintk: Clean up pciserial

From: Peter Zijlstra
Date: Thu Aug 25 2022 - 15:36:47 EST


On Thu, Aug 25, 2022 at 12:39:59PM -0500, Bjorn Helgaas wrote:

> > - (((classcode >> 8) & 0xff) != 0x02)) /* 16550 I/F at BAR0 */ {

> > diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
> > index 6feade66efdb..1d2c7df8cd41 100644
> > --- a/include/linux/pci_ids.h
> > +++ b/include/linux/pci_ids.h
> > @@ -75,6 +75,9 @@
> > #define PCI_CLASS_COMMUNICATION_MODEM 0x0703
> > #define PCI_CLASS_COMMUNICATION_OTHER 0x0780
> >
> > +/* I/F for SERIAL/MODEM */
>
> I/F? Grep says it's fairly common, but doesn't seem completely
> obvious. I guess it means "interface"?

It does, I carried the nomenclature from the above line; happy to change
it if you want.

https://wiki.osdev.org/PCI#Class_Codes

Calls it 'Prog IF'.

> > +#define PCI_SERIAL_16550_COMPATIBLE 0x02
> > +
> > #define PCI_BASE_CLASS_SYSTEM 0x08
> > #define PCI_CLASS_SYSTEM_PIC 0x0800
> > #define PCI_CLASS_SYSTEM_PIC_IOAPIC 0x080010