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

[Xen-devel] Ping: [PATCH] ns16550/PCI: fix skipping of devices



>>> On 01.10.18 at 17:57, <JBeulich@xxxxxxxx> wrote:
> Selecting between single/multiple BAR mode should happen after checking
> whether to skip the present device, or else multi-BAR devices won't be
> skipped correctly, due to port_idx getting set to zero in that case.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> --- a/xen/drivers/char/ns16550.c
> +++ b/xen/drivers/char/ns16550.c
> @@ -1037,18 +1037,18 @@ pci_uart_config(struct ns16550 *uart, bo
>                      }
>                  }
>  
> -                if ( !param->bar0 )
> -                {
> -                    bar_idx = idx;
> -                    port_idx = 0;
> -                }
> -
>                  if ( port_idx >= param->max_ports )
>                  {
>                      idx -= param->max_ports;
>                      continue;
>                  }
>  
> +                if ( !param->bar0 )
> +                {
> +                    bar_idx = idx;
> +                    port_idx = 0;
> +                }
> +
>                  uart->io_base = 0;
>                  bar = pci_conf_read32(0, b, d, f,
>                                        PCI_BASE_ADDRESS_0 + bar_idx*4);
> 
> 
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxxx 
> https://lists.xenproject.org/mailman/listinfo/xen-devel 





_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.