Re: [PATCH v2 tty-next 1/3] 8250: microchip: pci1xxxx: Add driver for quad-uart support.

From: Tharunkumar.Pasumarthi
Date: Wed Oct 26 2022 - 06:54:35 EST


On Mon, 2022-10-03 at 12:22 +0300, Andy Shevchenko wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> > +       return 0;
> > +}
>
> Do you really have cards that are providing IO ports? If not, simplify
> this accordingly.

Device does not have IO ports. I will remove support in code.


> > +       if (num_vectors == 4)
>
> This check should take care of all possible MSI >= 2, correct?

Hardware supports 2 modes:
1. One irq vector for all the instances
2. nth irq vector for nth instance
Some subsystem ID like PCI_SUBDEVICE_ID_MCHP_PCI1XXXX_4p and
PCI_SUBDEVICE_ID_MCHP_PCI11414 will fail in 2nd mode if all the 4 irq vectors
are not assigned. Therefore, to reduce complexity, software will handle only 1
or 4 irq vectors.

> > +       for (i = 0; i < nr_ports; i++) {
> > +               if (num_vectors == 4)
>
> Ditto.

Hardware supports 2 modes:
1. One irq vector for all the instances
2. nth irq vector for nth instance
Some subsystem ID like PCI_SUBDEVICE_ID_MCHP_PCI1XXXX_4p and
PCI_SUBDEVICE_ID_MCHP_PCI11414 will fail in 2nd mode if all the 4 irq vectors
are not assigned. Therefore, to reduce complexity, software will handle only 1
or 4 irq vectors.

> > +               .flags          = UART_CAP_FIFO,
> > +       },
>
> Can you assign this in ->setup() or so instead of adding a new port type?

Okay, I will assign in pci1xxxx_setup API.


Thanks Andy for the review. Going forward, I will be addressing the comments (if
any).

Thanks,
Tharun Kumar P