diff options
author | David S. Miller <davem@davemloft.net> | 2011-12-22 16:23:59 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-06 17:14:01 -0500 |
commit | 747b409502fe765784cda1135d806042beddaa89 (patch) | |
tree | 3318a10bc0876a40b107a63dffe0af95f8792b68 /arch/sparc | |
parent | fca54d03a85e883b813255c63bbf11049d2eeb7a (diff) |
sparc64: Fix MSIQ HV call ordering in pci_sun4v_msiq_build_irq().
[ Upstream commit 7cc8583372a21d98a23b703ad96cab03180b5030 ]
This silently was working for many years and stopped working on
Niagara-T3 machines.
We need to set the MSIQ to VALID before we can set it's state to IDLE.
On Niagara-T3, setting the state to IDLE first was causing HV_EINVAL
errors. The hypervisor documentation says, rather ambiguously, that
the MSIQ must be "initialized" before one can set the state.
I previously understood this to mean merely that a successful setconf()
operation has been performed on the MSIQ, which we have done at this
point. But it seems to also mean that it has been set VALID too.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/pci_sun4v.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index b01a06e9ae4..9e73c4a37ae 100644 --- a/arch/sparc/kernel/pci_sun4v.c +++ b/arch/sparc/kernel/pci_sun4v.c | |||
@@ -848,10 +848,10 @@ static int pci_sun4v_msiq_build_irq(struct pci_pbm_info *pbm, | |||
848 | if (!irq) | 848 | if (!irq) |
849 | return -ENOMEM; | 849 | return -ENOMEM; |
850 | 850 | ||
851 | if (pci_sun4v_msiq_setstate(pbm->devhandle, msiqid, HV_MSIQSTATE_IDLE)) | ||
852 | return -EINVAL; | ||
853 | if (pci_sun4v_msiq_setvalid(pbm->devhandle, msiqid, HV_MSIQ_VALID)) | 851 | if (pci_sun4v_msiq_setvalid(pbm->devhandle, msiqid, HV_MSIQ_VALID)) |
854 | return -EINVAL; | 852 | return -EINVAL; |
853 | if (pci_sun4v_msiq_setstate(pbm->devhandle, msiqid, HV_MSIQSTATE_IDLE)) | ||
854 | return -EINVAL; | ||
855 | 855 | ||
856 | return irq; | 856 | return irq; |
857 | } | 857 | } |