All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ns16550/PCI: fix skipping of devices
@ 2018-10-01 15:57 Jan Beulich
  2018-10-26 11:05 ` Ping: " Jan Beulich
  2018-11-29 16:56 ` Wei Liu
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Beulich @ 2018-10-01 15:57 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
	Julien Grall

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@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Ping: [PATCH] ns16550/PCI: fix skipping of devices
  2018-10-01 15:57 [PATCH] ns16550/PCI: fix skipping of devices Jan Beulich
@ 2018-10-26 11:05 ` Jan Beulich
  2018-11-29 16:56 ` Wei Liu
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2018-10-26 11:05 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
	Julien Grall

>>> On 01.10.18 at 17:57, <JBeulich@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 <jbeulich@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ns16550/PCI: fix skipping of devices
  2018-10-01 15:57 [PATCH] ns16550/PCI: fix skipping of devices Jan Beulich
  2018-10-26 11:05 ` Ping: " Jan Beulich
@ 2018-11-29 16:56 ` Wei Liu
  1 sibling, 0 replies; 3+ messages in thread
From: Wei Liu @ 2018-11-29 16:56 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
	Julien Grall, xen-devel

On Mon, Oct 01, 2018 at 09:57:56AM -0600, Jan Beulich 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@suse.com>

Seeing that this has been pending for so long, obviously no-one else has
the time or interest of expertise to review it, I will have to defer to
you as the expert in this area.

Acked-by: Wei Liu <wei.liu2@citrix.com>

to this patch and the other series you posted.

Wei.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-29 16:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-01 15:57 [PATCH] ns16550/PCI: fix skipping of devices Jan Beulich
2018-10-26 11:05 ` Ping: " Jan Beulich
2018-11-29 16:56 ` Wei Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.