Subject: [PATCH 2/3] powernv/pci: Allow any write trigger the diag dump

From: Oliver O'Halloran <[email-masked]>
Date: Thu, 12 Sep 2019 15:29:44 +1000

Make the dump trigger off any input rather than just '1'. This allows you
to write "echo 1> dump_diag_data" and it'll do what you want rather than
erroring out pointlessly.

Signed-off-by: Oliver O'Halloran <[email-masked]>
---
 arch/powerpc/platforms/powernv/pci-ioda.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index b24339b..f684d3a 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -3047,9 +3047,6 @@ static int pnv_pci_diag_data_set(void *data, u64 val)
 	struct pnv_phb *phb = data;
 	s64 ret;
 
-	if (val != 1ULL)
-		return -EINVAL;
-
 	/* Retrieve the diag data from firmware */
 	ret = opal_pci_get_phb_diag_data2(phb->opal_id, phb->diag_data,
 					  phb->diag_data_size);
-- 
2.9.5