>>> On 01.10.18 at 17:57, <jbeul...@suse.com> 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 <jbeul...@suse.com>
> 
> --- 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@lists.xenproject.org 
> https://lists.xenproject.org/mailman/listinfo/xen-devel 





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

Reply via email to