Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-06-18 Thread Piotr Gregor
On Sat, Jun 17, 2017 at 08:14:33PM -0500, Bjorn Helgaas wrote: > On Sat, Jun 17, 2017 at 06:45:44PM +0100, Piotr Gregor wrote: > > Hi Bjorn, > > > > The pci_cfg_access_lock is most likely not needed there. > > The assignment by return type is indeed preferred in this case. > > > > However, you

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-06-18 Thread Piotr Gregor
On Sat, Jun 17, 2017 at 08:14:33PM -0500, Bjorn Helgaas wrote: > On Sat, Jun 17, 2017 at 06:45:44PM +0100, Piotr Gregor wrote: > > Hi Bjorn, > > > > The pci_cfg_access_lock is most likely not needed there. > > The assignment by return type is indeed preferred in this case. > > > > However, you

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-06-17 Thread Bjorn Helgaas
On Sat, Jun 17, 2017 at 06:45:44PM +0100, Piotr Gregor wrote: > Hi Bjorn, > > The pci_cfg_access_lock is most likely not needed there. > The assignment by return type is indeed preferred in this case. > > However, you have changed the meaning of returned boolean information > by

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-06-17 Thread Bjorn Helgaas
On Sat, Jun 17, 2017 at 06:45:44PM +0100, Piotr Gregor wrote: > Hi Bjorn, > > The pci_cfg_access_lock is most likely not needed there. > The assignment by return type is indeed preferred in this case. > > However, you have changed the meaning of returned boolean information > by

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-06-17 Thread Piotr Gregor
Hi Bjorn, The pci_cfg_access_lock is most likely not needed there. The assignment by return type is indeed preferred in this case. However, you have changed the meaning of returned boolean information by pci_intx_mask_broken leaving pci_intx_mask_supported unchanged. The test should be: if

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-06-17 Thread Piotr Gregor
Hi Bjorn, The pci_cfg_access_lock is most likely not needed there. The assignment by return type is indeed preferred in this case. However, you have changed the meaning of returned boolean information by pci_intx_mask_broken leaving pci_intx_mask_supported unchanged. The test should be: if

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-06-16 Thread Bjorn Helgaas
On Fri, May 26, 2017 at 10:02:25PM +0100, Piotr Gregor wrote: > The test for INTx masking via config space command performed > in pci_intx_mask_supported() should be performed before PCI device > can be used. This is to avoid reading/writing of PCI_COMMAND_INTX_DISABLE > register which may collide

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-06-16 Thread Bjorn Helgaas
On Fri, May 26, 2017 at 10:02:25PM +0100, Piotr Gregor wrote: > The test for INTx masking via config space command performed > in pci_intx_mask_supported() should be performed before PCI device > can be used. This is to avoid reading/writing of PCI_COMMAND_INTX_DISABLE > register which may collide

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-28 Thread Michael S. Tsirkin
On Fri, May 26, 2017 at 10:02:25PM +0100, Piotr Gregor wrote: > The test for INTx masking via config space command performed > in pci_intx_mask_supported() should be performed before PCI device > can be used. This is to avoid reading/writing of PCI_COMMAND_INTX_DISABLE > register which may collide

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-28 Thread Michael S. Tsirkin
On Fri, May 26, 2017 at 10:02:25PM +0100, Piotr Gregor wrote: > The test for INTx masking via config space command performed > in pci_intx_mask_supported() should be performed before PCI device > can be used. This is to avoid reading/writing of PCI_COMMAND_INTX_DISABLE > register which may collide

[PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-26 Thread Piotr Gregor
The test for INTx masking via config space command performed in pci_intx_mask_supported() should be performed before PCI device can be used. This is to avoid reading/writing of PCI_COMMAND_INTX_DISABLE register which may collide with MSI/MSI-X interrupts. This patch moves test performed in

[PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-26 Thread Piotr Gregor
The test for INTx masking via config space command performed in pci_intx_mask_supported() should be performed before PCI device can be used. This is to avoid reading/writing of PCI_COMMAND_INTX_DISABLE register which may collide with MSI/MSI-X interrupts. This patch moves test performed in

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-26 Thread Alex Williamson
On Fri, 26 May 2017 22:02:25 +0100 Piotr Gregor wrote: > The test for INTx masking via config space command performed > in pci_intx_mask_supported() should be performed before PCI device > can be used. This is to avoid reading/writing of PCI_COMMAND_INTX_DISABLE >

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-26 Thread Alex Williamson
On Fri, 26 May 2017 22:02:25 +0100 Piotr Gregor wrote: > The test for INTx masking via config space command performed > in pci_intx_mask_supported() should be performed before PCI device > can be used. This is to avoid reading/writing of PCI_COMMAND_INTX_DISABLE > register which may collide with

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-25 Thread Alex Williamson
On Thu, 25 May 2017 22:32:25 +0100 Piotr Gregor wrote: > The test for INTx masking via config space command performed > in pci_intx_mask_supported should be performed before PCI device > can be used. This is to avoid reading/writing of PCI_COMMAND_INTX_DISABLE > register

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-25 Thread Alex Williamson
On Thu, 25 May 2017 22:32:25 +0100 Piotr Gregor wrote: > The test for INTx masking via config space command performed > in pci_intx_mask_supported should be performed before PCI device > can be used. This is to avoid reading/writing of PCI_COMMAND_INTX_DISABLE > register which may collide with

[PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-25 Thread Piotr Gregor
The test for INTx masking via config space command performed in pci_intx_mask_supported should be performed before PCI device can be used. This is to avoid reading/writing of PCI_COMMAND_INTX_DISABLE register which may collide with MSI/MSI-X interrupts. This patch moves test performed in

[PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-25 Thread Piotr Gregor
The test for INTx masking via config space command performed in pci_intx_mask_supported should be performed before PCI device can be used. This is to avoid reading/writing of PCI_COMMAND_INTX_DISABLE register which may collide with MSI/MSI-X interrupts. This patch moves test performed in

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-25 Thread Piotr Gregor
Very good suggestions. Will be reflected in changed patch.

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-25 Thread Piotr Gregor
Very good suggestions. Will be reflected in changed patch.

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-25 Thread Alex Williamson
On Thu, 25 May 2017 21:22:01 +0300 "Michael S. Tsirkin" wrote: > On Thu, May 25, 2017 at 07:13:23PM +0100, Piotr Gregor wrote: > > The test for INTx masking via config space command performed > > in pci_intx_mask_supported should be performed before PCI device > > can be used.

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-25 Thread Alex Williamson
On Thu, 25 May 2017 21:22:01 +0300 "Michael S. Tsirkin" wrote: > On Thu, May 25, 2017 at 07:13:23PM +0100, Piotr Gregor wrote: > > The test for INTx masking via config space command performed > > in pci_intx_mask_supported should be performed before PCI device > > can be used. This is to avoid

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-25 Thread Michael S. Tsirkin
On Thu, May 25, 2017 at 07:13:23PM +0100, Piotr Gregor wrote: > The test for INTx masking via config space command performed > in pci_intx_mask_supported should be performed before PCI device > can be used. This is to avoid reading/writing of PCI_COMMAND_INTX_DISABLE > register which may collide

Re: [PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-25 Thread Michael S. Tsirkin
On Thu, May 25, 2017 at 07:13:23PM +0100, Piotr Gregor wrote: > The test for INTx masking via config space command performed > in pci_intx_mask_supported should be performed before PCI device > can be used. This is to avoid reading/writing of PCI_COMMAND_INTX_DISABLE > register which may collide

[PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-25 Thread Piotr Gregor
The test for INTx masking via config space command performed in pci_intx_mask_supported should be performed before PCI device can be used. This is to avoid reading/writing of PCI_COMMAND_INTX_DISABLE register which may collide with MSI/MSI-X interrupts. This patch simplifies test performed in

[PATCH] PCI: Move test of INTx masking to pci_setup_device

2017-05-25 Thread Piotr Gregor
The test for INTx masking via config space command performed in pci_intx_mask_supported should be performed before PCI device can be used. This is to avoid reading/writing of PCI_COMMAND_INTX_DISABLE register which may collide with MSI/MSI-X interrupts. This patch simplifies test performed in