On Fri, May 27, 2022 at 11:35 PM Konstantin Smola via Xenomai
<[email protected]> wrote:
>
> pci probe was overwriting baud_base with default values, ignoring baud_base 
> arguments passed in while loading driver.
>
> Signed-off-by: Konstantin Smola <[email protected]>
> ---
>  kernel/drivers/serial/16550A_pci.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/drivers/serial/16550A_pci.h 
> b/kernel/drivers/serial/16550A_pci.h
> index 91b0390..b747a10 100644
> --- a/kernel/drivers/serial/16550A_pci.h
> +++ b/kernel/drivers/serial/16550A_pci.h
> @@ -244,7 +244,8 @@ static int rt_16550_pci_probe(struct pci_dev *pdev,
>                         io[i] = base_addr + port * board->port_ofs;
>                         irq[i] = pdev->irq;
>                         irqtype[i] = board->irqtype;
> -                       baud_base[i] = board->baud_base;
> +         if (baud_base[i] == 0)
> +                          baud_base[i] = board->baud_base;

This assumes that the i-th baud_base you specify as module parameter
will also be
the i-th probed PCI driver.
But PCI can probe devices in any order, even userspace an unbind/bind
them at will.

-- 
Thanks,
//richard

Reply via email to