aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2015-08-18 13:39:27 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-08-19 04:41:10 -0400
commit3d8258e4ab5166ca702b2828c99a5fa7dcb40a0c (patch)
treea04fc89710bf10a565052a0d0a4d8feef6e3c6f9
parent24d05ff863e78544e8538a792e3234291cdd5650 (diff)
s390/pci: move debug messages to debugfs
The error messages in pci_insn are for debug purposes only. Move them to the debugfs. Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/pci/pci_insn.c33
1 files changed, 23 insertions, 10 deletions
diff --git a/arch/s390/pci/pci_insn.c b/arch/s390/pci/pci_insn.c
index 85267c058af8..dcc2634ccbe2 100644
--- a/arch/s390/pci/pci_insn.c
+++ b/arch/s390/pci/pci_insn.c
@@ -8,10 +8,23 @@
8#include <linux/errno.h> 8#include <linux/errno.h>
9#include <linux/delay.h> 9#include <linux/delay.h>
10#include <asm/pci_insn.h> 10#include <asm/pci_insn.h>
11#include <asm/pci_debug.h>
11#include <asm/processor.h> 12#include <asm/processor.h>
12 13
13#define ZPCI_INSN_BUSY_DELAY 1 /* 1 microsecond */ 14#define ZPCI_INSN_BUSY_DELAY 1 /* 1 microsecond */
14 15
16static inline void zpci_err_insn(u8 cc, u8 status, u64 req, u64 offset)
17{
18 struct {
19 u8 cc;
20 u8 status;
21 u64 req;
22 u64 offset;
23 } data = {cc, status, req, offset};
24
25 zpci_err_hex(&data, sizeof(data));
26}
27
15/* Modify PCI Function Controls */ 28/* Modify PCI Function Controls */
16static inline u8 __mpcifc(u64 req, struct zpci_fib *fib, u8 *status) 29static inline u8 __mpcifc(u64 req, struct zpci_fib *fib, u8 *status)
17{ 30{
@@ -38,8 +51,8 @@ int zpci_mod_fc(u64 req, struct zpci_fib *fib)
38 } while (cc == 2); 51 } while (cc == 2);
39 52
40 if (cc) 53 if (cc)
41 printk_once(KERN_ERR "%s: error cc: %d status: %d\n", 54 zpci_err_insn(cc, status, req, 0);
42 __func__, cc, status); 55
43 return (cc) ? -EIO : 0; 56 return (cc) ? -EIO : 0;
44} 57}
45 58
@@ -72,8 +85,8 @@ int zpci_refresh_trans(u64 fn, u64 addr, u64 range)
72 } while (cc == 2); 85 } while (cc == 2);
73 86
74 if (cc) 87 if (cc)
75 printk_once(KERN_ERR "%s: error cc: %d status: %d dma_addr: %Lx size: %Lx\n", 88 zpci_err_insn(cc, status, addr, range);
76 __func__, cc, status, addr, range); 89
77 return (cc) ? -EIO : 0; 90 return (cc) ? -EIO : 0;
78} 91}
79 92
@@ -121,8 +134,8 @@ int zpci_load(u64 *data, u64 req, u64 offset)
121 } while (cc == 2); 134 } while (cc == 2);
122 135
123 if (cc) 136 if (cc)
124 printk_once(KERN_ERR "%s: error cc: %d status: %d req: %Lx offset: %Lx\n", 137 zpci_err_insn(cc, status, req, offset);
125 __func__, cc, status, req, offset); 138
126 return (cc > 0) ? -EIO : cc; 139 return (cc > 0) ? -EIO : cc;
127} 140}
128EXPORT_SYMBOL_GPL(zpci_load); 141EXPORT_SYMBOL_GPL(zpci_load);
@@ -159,8 +172,8 @@ int zpci_store(u64 data, u64 req, u64 offset)
159 } while (cc == 2); 172 } while (cc == 2);
160 173
161 if (cc) 174 if (cc)
162 printk_once(KERN_ERR "%s: error cc: %d status: %d req: %Lx offset: %Lx\n", 175 zpci_err_insn(cc, status, req, offset);
163 __func__, cc, status, req, offset); 176
164 return (cc > 0) ? -EIO : cc; 177 return (cc > 0) ? -EIO : cc;
165} 178}
166EXPORT_SYMBOL_GPL(zpci_store); 179EXPORT_SYMBOL_GPL(zpci_store);
@@ -195,8 +208,8 @@ int zpci_store_block(const u64 *data, u64 req, u64 offset)
195 } while (cc == 2); 208 } while (cc == 2);
196 209
197 if (cc) 210 if (cc)
198 printk_once(KERN_ERR "%s: error cc: %d status: %d req: %Lx offset: %Lx\n", 211 zpci_err_insn(cc, status, req, offset);
199 __func__, cc, status, req, offset); 212
200 return (cc > 0) ? -EIO : cc; 213 return (cc > 0) ? -EIO : cc;
201} 214}
202EXPORT_SYMBOL_GPL(zpci_store_block); 215EXPORT_SYMBOL_GPL(zpci_store_block);