1 From: Gerald Schaefer <geraldsc@de.ibm.com>
2 Subject: Kernel message catalog infrastucture and message generation
5 Instrument the kernel components such that a kernel message catalog as well as
6 related man pages can be automatically generated.
8 This patch now uses pr_xyz instead of kmsg_xyz and there is no Tag anymore
11 Acked-by: John Jolly <jjolly@suse.de>
13 Documentation/kmsg/s390/aes_s390 | 30 +
14 Documentation/kmsg/s390/af_iucv | 33 +
15 Documentation/kmsg/s390/ap | 47 ++
16 Documentation/kmsg/s390/appldata | 88 +++
17 Documentation/kmsg/s390/cio | 92 +++
18 Documentation/kmsg/s390/claw | 666 ++++++++++++++++++++++++++++
19 Documentation/kmsg/s390/cpcmd | 17
20 Documentation/kmsg/s390/cpu | 69 ++
21 Documentation/kmsg/s390/ctcm | 199 ++++++++
22 Documentation/kmsg/s390/dcssblk | 162 +++++++
23 Documentation/kmsg/s390/extmem | 290 ++++++++++++
24 Documentation/kmsg/s390/hypfs | 56 ++
25 Documentation/kmsg/s390/iucv | 20
26 Documentation/kmsg/s390/lcs | 160 ++++++
27 Documentation/kmsg/s390/monreader | 127 +++++
28 Documentation/kmsg/s390/monwriter | 16
29 Documentation/kmsg/s390/netiucv | 139 ++++++
30 Documentation/kmsg/s390/qeth | 472 ++++++++++++++++++++
31 Documentation/kmsg/s390/s390dbf | 83 +++
32 Documentation/kmsg/s390/sclp_cmd | 6
33 Documentation/kmsg/s390/sclp_config | 3
34 Documentation/kmsg/s390/sclp_cpi | 2
35 Documentation/kmsg/s390/sclp_sdias | 4
36 Documentation/kmsg/s390/setup | 151 ++++++
37 Documentation/kmsg/s390/time | 36 +
38 Documentation/kmsg/s390/vmcp | 13
39 Documentation/kmsg/s390/vmlogrdr | 5
40 Documentation/kmsg/s390/vmur | 34 +
41 Documentation/kmsg/s390/xpram | 58 ++
42 Documentation/kmsg/s390/zdump | 12
43 Documentation/kmsg/s390/zfcp | 830 ++++++++++++++++++++++++++++++++++++
46 arch/s390/appldata/appldata.h | 4
47 arch/s390/appldata/appldata_base.c | 11
48 arch/s390/appldata/appldata_os.c | 20
49 arch/s390/crypto/aes_s390.c | 13
50 arch/s390/hypfs/hypfs_diag.c | 9
51 arch/s390/hypfs/inode.c | 13
52 arch/s390/kernel/Makefile | 4
53 arch/s390/kernel/cpcmd.c | 6
54 arch/s390/kernel/debug.c | 36 -
55 arch/s390/kernel/processor.c | 97 ++++
56 arch/s390/kernel/setup.c | 159 +-----
57 arch/s390/kernel/smp.c | 16
58 arch/s390/kernel/time.c | 13
59 arch/s390/kernel/topology.c | 4
60 arch/s390/mm/extmem.c | 105 +---
61 drivers/s390/block/dcssblk.c | 73 +--
62 drivers/s390/block/xpram.c | 40 -
63 drivers/s390/char/monreader.c | 40 -
64 drivers/s390/char/monwriter.c | 4
65 drivers/s390/char/sclp_cmd.c | 28 -
66 drivers/s390/char/sclp_config.c | 9
67 drivers/s390/char/sclp_cpi_sys.c | 11
68 drivers/s390/char/sclp_sdias.c | 17
69 drivers/s390/char/vmcp.c | 7
70 drivers/s390/char/vmlogrdr.c | 25 -
71 drivers/s390/char/vmur.c | 14
72 drivers/s390/char/zcore.c | 13
73 drivers/s390/cio/blacklist.c | 13
74 drivers/s390/cio/chsc.c | 7
75 drivers/s390/cio/cio.c | 4
76 drivers/s390/cio/cmf.c | 7
77 drivers/s390/cio/css.c | 7
78 drivers/s390/crypto/ap_bus.c | 9
79 drivers/s390/net/claw.c | 258 +++++------
80 drivers/s390/net/ctcm_fsms.c | 45 +
81 drivers/s390/net/ctcm_main.c | 71 +--
82 drivers/s390/net/ctcm_main.h | 6
83 drivers/s390/net/ctcm_mpc.c | 14
84 drivers/s390/net/ctcm_sysfs.c | 2
85 drivers/s390/net/lcs.c | 91 ++-
86 drivers/s390/net/netiucv.c | 63 +-
87 drivers/s390/net/qeth_core.h | 7
88 drivers/s390/net/qeth_core_main.c | 148 +++---
89 drivers/s390/net/qeth_l2_main.c | 40 -
90 drivers/s390/net/qeth_l3_main.c | 214 ++++-----
91 drivers/s390/scsi/zfcp_aux.c | 10
92 drivers/s390/scsi/zfcp_ccw.c | 14
93 drivers/s390/scsi/zfcp_cfdc.c | 2
94 drivers/s390/scsi/zfcp_dbf.c | 2
95 drivers/s390/scsi/zfcp_erp.c | 53 +-
96 drivers/s390/scsi/zfcp_fc.c | 2
97 drivers/s390/scsi/zfcp_fsf.c | 234 +++-------
98 drivers/s390/scsi/zfcp_qdio.c | 28 -
99 drivers/s390/scsi/zfcp_scsi.c | 5
100 drivers/s390/scsi/zfcp_sysfs.c | 2
101 include/linux/device.h | 28 -
102 include/linux/kernel.h | 38 +
103 kernel/printk.c | 45 +
104 net/iucv/af_iucv.c | 18
106 scripts/Makefile.build | 14
107 scripts/kmsg-doc | 477 ++++++++++++++++++++
108 95 files changed, 5641 insertions(+), 1081 deletions(-)
111 +++ b/Documentation/kmsg/s390/aes_s390
114 + * Text: "Allocating AES fallback algorithm %s failed\n"
117 + * @1: algorithm name
119 + * The advanced encryption standard (AES) algorithm includes three modes with
120 + * 128-bit, 192-bit, and 256-bit keys. Your hardware system only provides
121 + * hardware acceleration for the 128-bit mode. The aes_s390 module failed to
122 + * allocate a software fallback for the AES modes that are not supported by the
123 + * hardware. A possible reason for this problem is that the aes_generic module
124 + * that provides the fallback algorithms is not available.
126 + * Use the 128-bit mode only or ensure that the aes_generic module is available
127 + * and loaded and reload the aes_s390 module.
131 + * Text: "AES hardware acceleration is only available for 128-bit keys\n"
132 + * Severity: Informational
134 + * The advanced encryption standard (AES) algorithm includes three modes with
135 + * 128-bit, 192-bit, and 256-bit keys. Your hardware system only provides
136 + * hardware acceleration for the 128-bit key mode. The aes_s390 module
137 + * will use the less performant software fallback algorithm for the 192-bit
138 + * and 256-bit key modes.
144 +++ b/Documentation/kmsg/s390/af_iucv
147 + * Text: "Application %s on z/VM guest %s exceeds message limit\n"
150 + * @1: application name
153 + * Messages or packets destined for the application have accumulated and
154 + * reached the maximum value. The default for the message limit is 65535.
155 + * You can specify a different limit as the value for MSGLIMIT within
156 + * the IUCV statement of the z/VM virtual machine on which the application
159 + * Ensure that you do not send data faster than the application retrieves
160 + * them. Ensure that the message limit on the z/VM guest virtual machine
161 + * on which the application runs is high enough.
165 + * Text: "The af_iucv module cannot be loaded without z/VM\n"
168 + * The AF_IUCV protocol connects socket applications running in Linux
169 + * kernels on different z/VM virtual machines, or it connects a Linux
170 + * application to another sockets application running in a z/VM virtual
171 + * machine. On Linux instances that run in environments other than the
172 + * z/VM hypervisor, the AF_IUCV protocol does not provide any useful
173 + * function and the corresponding af_iucv module cannot be loaded.
175 + * Load the af_iucv module only on Linux instances that run as guest
176 + * operating systems of the z/VM hypervisor. If the module has been
177 + * compiled into the kernel, ignore this message.
180 +++ b/Documentation/kmsg/s390/ap
183 + * Text: "%d is not a valid cryptographic domain\n"
184 + * Severity: Warning
186 + * @1: AP domain index
188 + * The cryptographic domain specified for the 'domain=' module or kernel
189 + * parameter must be an integer in the range 0 to 15.
191 + * Reload the cryptographic device driver with a correct module parameter.
192 + * If the device driver has been compiled into the kernel, correct the value
193 + * in the kernel parameter line and reboot Linux.
197 + * Text: "The hardware system does not support AP instructions\n"
198 + * Severity: Warning
200 + * The ap module addresses AP adapters through AP instructions. The hardware
201 + * system on which the Linux instance runs does not support AP instructions.
202 + * The ap module cannot detect any AP adapters.
204 + * Load the ap module only if your Linux instance runs on hardware that
205 + * supports AP instructions. If the ap module has been compiled into the kernel,
206 + * ignore this message.
210 + * Text: "Registering adapter interrupts for AP %d failed\n"
215 + * The hardware system supports AP adapter interrupts but failed to enable
216 + * an adapter for interrupts. Possible causes for this error are:
217 + * i) The AP adapter firmware does not support AP interrupts.
218 + * ii) An AP adapter firmware update to a firmware level that supports AP
219 + * adapter interrupts failed.
220 + * iii) The AP adapter firmware has been successfully updated to a level that
221 + * supports AP interrupts but the new firmware has not been activated.
223 + * Ensure that the firmware on your AP adapters support AP interrupts and that
224 + * any firmware updates have completed successfully. If necessary, deconfigure
225 + * your cryptographic adapters and reconfigure them to ensure that any firmware
226 + * updates become active, then reload the ap module. If the ap module has been
227 + * compiled into the kernel, reboot Linux.
230 +++ b/Documentation/kmsg/s390/appldata
233 + * Text: "Starting the data collection for %s failed with rc=%d\n"
236 + * @1: appldata module
239 + * The specified data collection module used the z/VM diagnose call
240 + * DIAG 0xDC to start writing data. z/VM returned an error and the data
241 + * collection could not start. If the return code is 5, your z/VM guest
242 + * virtual machine is not authorized to write data records.
244 + * If the return code is 5, ensure that your z/VM guest virtual machine's
245 + * entry in the z/VM directory includes the OPTION APPLMON statement.
246 + * For other return codes see the section about DIAGNOSE Code X'DC'
247 + * in "z/VM CP Programming Services".
251 + * Text: "Stopping the data collection for %s failed with rc=%d\n"
254 + * @1: appldata module
257 + * The specified data collection module used the z/VM diagnose call DIAG 0xDC
258 + * to stop writing data. z/VM returned an error and the data collection
261 + * See the section about DIAGNOSE Code X'DC' in "z/VM CP Programming Services".
265 + * Text: "Starting a new OS data collection failed with rc=%d\n"
270 + * After a CPU hotplug event, the record size for the running operating
271 + * system data collection is no longer correct. The appldata_os module tried
272 + * to start a new data collection with the correct record size but received
273 + * an error from the z/VM diagnose call DIAG 0xDC. Any data collected with
274 + * the current record size might be faulty.
276 + * Start a new data collection with the cappldata_os module. For information
277 + * about starting data collections see "Device Drivers, Features, and
278 + * Commands". For information about the return codes see the section about
279 + * DIAGNOSE Code X'DC' in "z/VM CP Programming Services".
283 + * Text: "Stopping a faulty OS data collection failed with rc=%d\n"
288 + * After a CPU hotplug event, the record size for the running operating
289 + * system data collection is no longer correct. The appldata_os module tried
290 + * to stop the faulty data collection but received an error from the z/VM
291 + * diagnose call DIAG 0xDC. Any data collected with the current record size
294 + * Try to restart appldata_os monitoring. For information about stopping
295 + * and starting data collections see "Device Drivers, Features, and
296 + * Commands". For information about the return codes see the section about
297 + * DIAGNOSE Code X'DC' in "z/VM CP Programming Services".
301 + * Text: "Maximum OS record size %i exceeds the maximum record size %i\n"
307 + * The OS record size grows with the number of CPUs and is adjusted by the
308 + * appldata_os module in response to CPU hotplug events. For more than 110
309 + * CPUs the record size would exceed the maximum record size of 4024 bytes
310 + * that is supported by the z/VM hypervisor. To prevent the maximum supported
311 + * record size from being exceeded while data collection is in progress,
312 + * you cannot load the appldata_os module on Linux instances that are
313 + * configured for a maximum of more than 110 CPUs.
315 + * If you do not want to collect operating system data, you can ignore this
316 + * message. If you want to collect operating system data, reconfigure your
317 + * Linux instance to support less than 110 CPUs.
321 +++ b/Documentation/kmsg/s390/cio
324 + * Text: "%s is not a valid device for the cio_ignore kernel parameter\n"
325 + * Severity: Warning
327 + * @1: device bus-ID
329 + * The device specification for the cio_ignore kernel parameter is
330 + * syntactically incorrect or specifies an unknown device. This device is not
331 + * excluded from being sensed and analyzed.
333 + * Correct your device specification in the kernel parameter line to have the
334 + * device excluded when you next reboot Linux. You can write the correct
335 + * device specification to /proc/cio_ignore to add the device to the list of
336 + * devices to be excluded. This does not immediately make the device
337 + * inaccessible but the device is ignored if it disappears and later reappears.
341 + * Text: "0.%x.%04x to 0.%x.%04x is not a valid range for cio_ignore\n"
342 + * Severity: Warning
344 + * @1: from subchannel set ID
345 + * @2: from device number
346 + * @3: to subchannel set ID
347 + * @4: to device number
349 + * The device range specified for the cio_ignore kernel parameter is
350 + * syntactically incorrect. No devices specified with this range are
351 + * excluded from being sensed and analyzed.
353 + * Correct your range specification in the kernel parameter line to have the
354 + * range of devices excluded when you next reboot Linux. You can write the
355 + * correct range specification to /proc/cio_ignore to add the range of devices
356 + * to the list of devices to be excluded. This does not immediately make the
357 + * devices in the range inaccessible but any of these devices are ignored if
358 + * they disappear and later reappear.
362 + * Text: "Processing %s for channel path %x.%02x\n"
365 + * @1: configuration change
366 + * @2: channel subsystem ID
369 + * A configuration change is in progress for the given channel path.
375 + * Text: "No CCW console was found\n"
376 + * Severity: Warning
378 + * Linux did not find the expected CCW console and tries to use an alternative
379 + * console. A possible reason why the console was not found is that the console
380 + * has been specified in the cio_ignore list.
382 + * None, if an appropriate alternative console has been found, and you want
383 + * to use this alternative console. If you want to use the CCW console, ensure
384 + * that is not specified in the cio_ignore list, explicitly specify the console
385 + * with the 'condev=' kernel parameter, and reboot Linux.
389 + * Text: "Channel measurement facility initialized using format %s (mode %s)\n"
390 + * Severity: Informational
395 + * The channel measurement facility has been initialized successfully. Format
396 + * 'extended' should be used for z990 and later mainframe systems. Format
397 + * 'basic' is intended for earlier mainframes. Mode 'autodetected' means that
398 + * the format has been set automatically. Mode 'parameter' means that the
399 + * format has been set according to the 'format=' kernel parameter.
405 + * Text: "The CSS device driver initialization failed with errno=%d\n"
410 + * The channel subsystem bus could not be established.
412 + * See the errno man page to find out what caused the problem.
414 + /*? Text: "%s: Got subchannel machine check but no sch_event handler provided.\n" */
416 +++ b/Documentation/kmsg/s390/claw
419 + * Text: "%s: add_files failed\n"
420 + * Severity: Warning
424 + * sysfs_create_group() failed to create the
425 + * /proc/... files for the new device.
426 + * This could be a result of the /proc file
427 + * system not being available or it could be
428 + * a symptom of a more serious problem.
430 + * The device will not start. Re-start the device
431 + * If the /proc file system is not available CLAW
432 + * devices cannot be used.
436 + * Text: "%s: unsolicited interrupt for device received c-%02x d-%02x\n"
437 + * Severity: Warning
439 + * @1: Channel Device address
440 + * @2: Returned SubChannel Status word
441 + * @3: Returned Device Status word
443 + * An IRQ (channel interrupt) was received for a device that
444 + * was not in a state to receive data. The IRQ will be
447 + * This can happen as devices come on and off line.
448 + * If the problem persists or the device will not
449 + * activate, channel tracing or device traces may be
450 + * used to diagnose the problem.
454 + * Text: "%s: Can't determine channel for interrupt\n"
455 + * Severity: Warning
457 + * @1: Channel Device address
459 + * The interrupt device was not the READ or WRITE device
460 + * for the CLAW device. The bus address of the interrupt
461 + * is displayed. This should not occur and indicates a
462 + * a problem in the CCW driver in the kernel.
464 + * If the problem persists check if an incorrect device type
465 + * has been assigned to a CLAW channel.
469 + * Text: "%s: %s: wrong selection code - irq state=%d\n"
470 + * Severity: Warning
472 + * @1: Channel Device Address
473 + * @2: network device name (eg. claw0)
474 + * @3: Current CLAW device status
476 + * The CLAW device is in an invalid CCW state
477 + * to handle IO. The interrupt will be ignored.
479 + * The device may need to be restarted. If the problem
480 + * persists s390dbf traces and CCW traces may be used
481 + * to diagnose the problem.
482 + * The CLAW status is a number from 0 to 4 indicating the device
483 + * driver's view of the read or write channel state.
484 + * Channel status values:
485 + * 0 The channel is inactive
486 + * 1 The channel is ready to start
488 + * 3 The channel is started for READ
489 + * 4 The channel is started for WRITE
493 + * Text: "%s: %s: channel problems during close - read: %02x - write: %02x\n"
494 + * Severity: Warning
496 + * @1: Channel Device Address
497 + * @2: network device name (eg. claw0)
498 + * @3: Saved CLAW Read sub channel Device Status
499 + * @4: Saved CLAW Write sub channel Device Status
501 + * claw_release() has freed all of the storage
502 + * for the device. The device state is expected to be
503 + * DEVICE END and CHANNEL END and it was not.
504 + * The device may not restart cleanly.
506 + * The device should restart after varying it
507 + * on and offline. If not it, power the CLAW device off
508 + * and on and retry.
512 + * Text: "%s: Device not found for IO ENODEV\n"
515 + * @1: Channel Device Address
517 + * A Channel Command Word was executed and returned
518 + * a non-zero return code (ERRNO) was returned by
519 + * the Common IO Layer.
521 + * The ERRNO indicated was ENODEV. This indicates that the
522 + * Device was offline or not operational.
523 + * Check the status of the device and restart the device.
527 + * Text: "%s: Status pending... EIO \n"
530 + * @1: Channel Device Address
532 + * The Common IO Layer returned an EIO ERRNO
533 + * when a CCW was executed.
534 + * A 'sub-channel check for device:' message may
535 + * also be seen with the cstat and other device status.
537 + * The device may be in an invalid state. Check the
538 + * device status and restart the device if needed.
542 + * Text: "%s: Invalid Dev State EINVAL \n"
545 + * @1: Channel Device Address
547 + * The Common IO Layer returned an EINVAL ERRNO
548 + * when a CCW was executed.
549 + * A 'sub-channel check for device:' message may
550 + * also be seen with the cstat and other device status.
552 + * The ERRNO indicated was ENODEV. This indicates that the
553 + * Device was offline or not operational.
554 + * Check the status of the device and restart the device.
558 + * Text: "%s: Unknown error in Do_IO %d\n"
563 + * The Common IO Layer returned an unexpected ERRNO
564 + * when a CCW was executed.
565 + * A 'sub-channel check for device:' message may
566 + * also be seen with the cstat and other device status.
568 + * Determine the ERRNO issued and restart the device.
569 + * If the problem remains a sub-channel trace may be needed.
573 + * Text: "%s: %s: Interface disconnect or Selective reset occurred (remote side)\n"
574 + * Severity: Warning
576 + * @1: Channel Device Address
577 + * @2: network device name (eg. claw0)
579 + * The CCW completed with the Returned Device Status word
580 + * having DEV_STAT_UNIT_CHECK set. The Sense code contained 0x41
582 + * The CLAW device has been reset or the CLAW device's
583 + * channel card has been reset.
584 + * Once the device is back in service restart the device.
588 + * Text: "%s: %s: System reset occurred (remote side)\n"
589 + * Severity: Warning
591 + * @1: Channel Device Address
592 + * @2: network device name (eg. claw0)
594 + * The CCW completed with the Returned Device Status word
595 + * having DEV_STAT_UNIT_CHECK set. The Sense code contained 0x40
597 + * The CLAW device has been reset or the CLAW device's
598 + * channel card has been reset.
599 + * Once the device is back in service restart the device.
603 + * Text: "%s: %s: Data-streaming timeout)\n"
604 + * Severity: Warning
606 + * @1: Channel Device Address
607 + * @2: network device name (eg. claw0)
609 + * The CCW completed with the Returned Device Status word
610 + * having DEV_STAT_UNIT_CHECK set. The Sense code contained 0x24
612 + * The device may be having errors or the channel is not operating
613 + * properly. CCW trace may be needed to diagnose. Restart
618 + * Text: "%s: %s: Data-transfer parity error\n"
619 + * Severity: Warning
621 + * @1: Channel Device Address
622 + * @1: network device name (eg. claw0)
624 + * The CCW completed with the Returned Device Status word
625 + * having DEV_STAT_UNIT_CHECK set. The Sense code contained 0x20
627 + * The device may be having errors or the channel is not operating
628 + * properly. CCW trace may be needed to diagnose. Restart
633 + * Text: "%s: %s: Hardware malfunction (remote side)\n"
634 + * Severity: Warning
636 + * @1: Channel Device Address
637 + * @2: network device name (eg. claw0)
639 + * The CCW completed with the Returned Device Status word
640 + * having DEV_STAT_UNIT_CHECK set. The Sense code contained 0x30
642 + * The CLAW Device may be in error. Check the device and restart.
643 + * If the problem continues CCW traces and device
644 + * diagnosis will be needed.
648 + * Text: "%s: %s: read-data parity error (remote side)\n"
649 + * Severity: Warning
651 + * @1: Channel Device Address
652 + * @2: network device name (eg. claw0)
654 + * The CCW completed with the Returned Device Status word
655 + * having DEV_STAT_UNIT_CHECK set. The Sense code contained 0x10
657 + * The CLAW Device may be in error. Check the device and restart.
658 + * If the problem continues CCW traces and device
659 + * diagnosis will be needed.
663 + * Text: "%s: %s: %d is wrong version id. Expected %d\n"
664 + * Severity: Informational
666 + * @1: Channel Device Address
667 + * @2: network device name (eg. claw0)
668 + * @3: CLAW API version (must be '2')
671 + * The claw device driver received a
672 + * SYSTEM_VALIDATE_REQUEST packet with a mismatched version ID
673 + * claw expects all packets to be version 2.
675 + * The CLAW device has sent an invalid packet. Check the device
676 + * and if needed trace the channel to determine the cause.
680 + * Text: "%s: %s: Host name mismatch. Received: %s expected: %s\n"
681 + * Severity: Informational
683 + * @1: Channel Device Address
684 + * @2: network device name (eg. claw0)
685 + * @3: The 1 to 8 character host name received
686 + * @4: The 1 to 8 character host name configured
688 + * The HOSTNAME portion of the CLAW parameters does not match the
689 + * HOSTNAME received on a control packet from the CLAW Device.
690 + * The 1 to 8 character host name received is the received host name.
692 + * Check the claw device parameters and the CLAW device definitions.
693 + * Correct the parameter so the parameters match and
694 + * restart the device.
698 + * Text: "%s: %s: WS name mismatch. Received: %s expected: %s\n"
699 + * Severity: Informational
701 + * @1: Channel Device Address
702 + * @1: network device name (eg. claw0)
703 + * @2: The 1 to 8 character Work Station Name received
704 + * @3: The 1 to 8 character Work Station Name configured
706 + * The Work Station name portion of the CLAW parameters does not match the
707 + * WSNAME received on a control packet from the CLAW Device.
708 + * The received Work Station name is in The 1 to 8 character Work Station Name received.
710 + * Check the claw device parameters and the CLAW device definitions.
711 + * Correct the parameter so the parameters match and
712 + * restart the device.
716 + * Text: "%s: host write size is too small\n"
717 + * Severity: Informational
719 + * @1: Channel Device Address
721 + * The write buffer size received from the
722 + * CLAW device is smaller than the
723 + * write buffer size that the parameters the
724 + * device was defined with.
726 + * Check the setup of the device and the
727 + * claw device parameters and correct the
732 + * Text: "%s: host read size is too small\n"
733 + * Severity: Informational
735 + * @1: Channel Device Address
737 + * * The read buffer size received from the
738 + * CLAW device is smaller than the
739 + * read buffer size in the parameters the
740 + * device was defined with.
742 + * Check the setup of the device and the
743 + * claw device parameters and correct the
748 + * Text: "%s: %s: Recv Sys Validate Resp: Vers=%d,Corr=%d,RC=%d,WS name=%.8s,Host name=%.8s\n"
749 + * Severity: Informational
751 + * @1: Channel Device Address
752 + * @2: network device name (eg. claw0)
753 + * @3: CLAW API version (must be '2')
754 + * @4: CLAW device identifier
755 + * @5: Return code received from CLAW device
756 + * @6: The 1 to 8 character Work Station Name received
757 + * @7: The 1 to 8 character Host Name received
759 + * A System Validate packet was sent to the device and
760 + * a response was received. The message summarizes
761 + * the content of the response.
763 + * Check for expected values.
767 + * Text: "%s: %s: Sys Validate Resp : Host, WS name is mismatch\n"
768 + * Severity: Informational
770 + * @1: Channel Device Address
771 + * @2: network device name (eg. claw0)
773 + * A System validate request sent to the CLAW
774 + * device has been rejected due to
775 + * mismatched parameters. The device will not start.
777 + * Check the CLAW device parameters and ensure
778 + * they match the CLAW devices definitions.
782 + * Text: "%s: %s: Sys Validate Resp : Wrong version\n"
783 + * Severity: Informational
785 + * @1: Channel Device Address
786 + * @2: network device name (eg. claw0)
788 + * A System validate request sent to the CLAW
789 + * device has been rejected due to
790 + * mismatched parameters. The device will not start.
792 + * Check the CLAW device parameters and ensure
793 + * they match the CLAW devices definitions.
797 + * Text: "%s: %s: Sys Validate Resp : bad frame size\n"
798 + * Severity: Informational
800 + * @1: Channel Device Address
801 + * @2: network device name (eg. claw0)
803 + * A System validate request sent to the CLAW
804 + * device has been rejected due to
805 + * mismatched parameters. The device will not start.
807 + * Check the CLAW device parameters and ensure
808 + * they match the CLAW devices definitions.
812 + * Text: "%s: %s: Sys Validate error code=%d \n"
813 + * Severity: Informational
815 + * @1: Channel Device Address
816 + * @2: network device name (eg. claw0)
817 + * @3: Return code received
819 + * A System validate request sent to the CLAW
820 + * device has been rejected due to
821 + * mismatched parameters. The device will not start.
823 + * Check the CLAW device parameters and ensure
824 + * they match the CLAW devices definitions.
828 + * Text: "%s: %s: Conn Req error : already logical link is active \n"
829 + * Severity: Informational
831 + * @1: Channel Device Address
832 + * @2: network device name (eg. claw0)
834 + * A connection request has been received but the
835 + * logical link is already active.
837 + * This can be a timing error. If the device
838 + * fails to connect a restart may be needed.
842 + * Text: "%s: %s: Conn Req error : req logical link id is not 1\n"
843 + * Severity: Informational
845 + * @1: Channel Device Address
846 + * @2: network device name (eg. claw0)
848 + * The current CLAW design allows only logical link 1
849 + * A device attempted to connect with a Log Link ID
850 + * other than 1. The connection will be rejected.
852 + * Check the device setup and restart the device.
856 + * Text: "%s: %s: Conn Req error : req appl name does not match\n"
857 + * Severity: Informational
859 + * @1: Channel Device Address
860 + * @1: network device name (eg. claw0)
862 + * A Connection Request was received with a mismatched
863 + * WS Application name.
865 + * Check the device driver setup and restart the device.
869 + * Text: "%s: %s: Conn Resp error: rc=%d \n"
870 + * Severity: Informational
872 + * @1: Channel Device Address
873 + * @1: network device name (eg. claw0)
874 + * @2: Return code received
876 + * An error was detected by the CLAW device in
877 + * the Connection Request packet it processed.
879 + * Check the device parameters and restart.
883 + * Text: "%s: %s: Conn Resp error: req appl name does not match\n"
884 + * Severity: Informational
886 + * @1: Channel Device Address
887 + * @2: network device name (eg. claw0)
889 + * The CLAW device received a Connection Request with
890 + * a mismatched Application ID. The connection will
893 + * Check the definitions in the device and the device driver
894 + * and correct errors.
898 + * Text: "%s: %s: Conn confirm: unexpected linkid=%d \n"
899 + * Severity: Informational
901 + * @1: Channel Device Address
902 + * @2: network device name (eg. claw0)
903 + * @3: p_ctlbk->linkid
905 + * A Connection Confirmed packet was received
906 + * with a different link Id than the default
908 + * The link will not become active. A restart
909 + * is required after checking the device parameters.
913 + * Text: "%s: %s: CLAW ERROR detected\n"
914 + * Severity: Informational
916 + * @1: Channel Device Address
917 + * @2: network device name (eg. claw0)
919 + * The CLAW device detected an error condition
921 + * Check the logs and traces on the device.
922 + * If the problem persists diagnostic traces may be
927 + * Text: "%s: %s: Unexpected command code=%d \n"
928 + * Severity: Informational
930 + * @1: Channel Device Address
931 + * @2: network device name (eg. claw0)
932 + * @3: CLAW command code received
934 + * This should not occur. An undefined command code
935 + * was received in a control packet from the CLAW
938 + * Restart the device. If the problem persists
939 + * tracing of the connection and diagnosis of the
940 + * device may be needed.
944 + * Text: "%s: %s: Invalid frame detected length is %02x\n"
945 + * Severity: Informational
947 + * @1: Channel Device Address
948 + * @2: network device name (eg. claw0)
949 + * @3: Data packet frame length value
951 + * Claw data packet was received with an invalid length field.
952 + * the header length is shown. This can be the result of
953 + * data errors or invalid packing.
955 + * restart the device and if the problem persists trace the
956 + * device or channel interface.
960 + * Text: "%s: buffer allocate failed on receive\n"
961 + * Severity: Informational
963 + * @1: Channel Device Address
965 + * Claw data packet was received but allocate for the recevie buffer
966 + * failed. this can be a low memory condition.
967 + * the data packet will be dropped.
969 + * Restart the device if the problem persists.
973 + * Text: "%s: add channel failed with ret = %d\n"
974 + * Severity: Warning
976 + * @1: Channel Device Address
979 + * add_channel() failed with return code rc.
980 + * This is most likely an ENOMEM errno returned from
981 + * an attempt to allocate an IRB for the CLAW
982 + * channel device structure.
984 + * Check the return code and take action as needed.
985 + * If this is caused by a low memory condition in the
986 + * kernel itself several other messages and symptoms
987 + * may appear. if the problem persists expert assistance
988 + * in kernel diagosis may be needed.
992 + * Text: "%s: device set online READ failed with ret = %d\n"
993 + * Severity: Warning
995 + * @1: Channel Device Address
998 + * A non zero return code was the result of an attempt to
999 + * set the device online. The device cannot be activated.
1001 + * Check the device driver parameters and the system definitions.
1005 + * Text: "%s: device set online WRITE failed with ret = %d\n"
1006 + * Severity: Warning
1008 + * @1: Channel Device Address
1011 + * A non zero return code was the result of an attempt to
1012 + * set the device online. The device cannot be activated.
1014 + * Check the device driver parameters and the system definitions.
1018 + * Text: "%s: failed creating network device\n"
1019 + * Severity: Warning
1021 + * @1: Channel Device Address
1023 + * Creation of a network claw device failed.
1024 + * no pointer to a new device was returned.
1026 + * Check for errors in the Linux system.
1027 + * This can result from memory shortage or
1028 + * errors in setup.
1032 + * Text: "debug_register failed %d\n"
1033 + * Severity: Warning
1037 + * The claw driver failed to register with the ccw
1038 + * s390dbf facility. No DBF traces will be available.
1040 + * Check the state of the dbf facility unload the
1041 + * the device driver and reload.
1045 + * Text: "register_cu3088_discipline() failed rc=%d\n"
1046 + * Severity: Warning
1050 + * The claw driver failed to register with the
1051 + * channel subsystem drivers. cu3088 driver
1052 + * may not be loaded or may not be operational.
1054 + * Check the state of the cu3088 facility unload the
1055 + * the device driver and reload.
1058 +/*? Text: "%s: %s: CLAW device %.8s: Received Control Packet\n" */
1059 +/*? Text: "%s: %s: CLAW device %.8s: System validate completed.\n" */
1060 +/*? Text: "%s: %s: CLAW device %.8s: Connection completed link_id=%d.\n" */
1061 +/*? Text: "%s: %s: remote side is not ready\n" */
1062 +/*? Text: "%s: %s: Unit Check with sense byte:0x%04x\n" */
1063 +/*? Text: "%s: %s: write connection restarting\n" */
1064 +/*? Text: "%s: %s: subchannel check for device: %04x - Sch Stat %02x Dev Stat %02x CPA - %04x\n" */
1065 +/*? Text: "%s: %s: Unit Exception occurred in write channel\n" */
1066 +/*? Text: "%s: %s: Resetting Event occurred:\n" */
1067 +/*? Text: "%s: %s: Recv Conn Confirm:Vers=%d,link_id=%d,Corr=%d,Host appl=%.8s,WS appl=%.8s\n" */
1068 +/*? Text: "%s: %s: Recv Conn Req: Vers=%d,link_id=%d,Corr=%d,HOST appl=%.8s,WS appl=%.8s\n" */
1069 +/*? Text: "%s: %s: Recv Sys Validate Request: Vers=%d,link_id=%d,Corr=%d,WS name=%.8s,Host name=%.8s\n" */
1070 +/*? Text: "%s: %s: Confirmed Now packing\n" */
1071 +/*? Text: "%s: %s: Unit Check Occured in write channel\n" */
1072 +/*? Text: "%s: %s: Restart is required after remote side recovers \n" */
1073 +/*? Text: "%s: %s: sys Validate Rsize:%d Wsize:%d\n" */
1074 +/*? Text: "%s: %s:readsize=%d writesize=%d readbuffer=%d writebuffer=%d read=0x%04x write=0x%04x\n" */
1075 +/*? Text: "%s: %s:host_name:%.8s, adapter_name :%.8s api_type: %.8s\n" */
1076 +/*? Text: "Driver unloaded\n" */
1077 +/*? Text: "Loading %s\n" */
1078 +/*? Text: "%s: will be removed.\n" */
1079 +/*? Text: "%s: add for %s\n" */
1080 +/*? Text: "%s: %s: shutting down \n" */
1081 +/*? Text: "%s: CLAW device %.8s: System validate completed.\n" */
1082 +/*? Text: "%s: %s: Disconnect: Vers=%d,link_id=%d,Corr=%d\n" */
1083 +/*? Text: "%s: %s: Revc Conn Resp: Vers=%d,link_id=%d,Corr=%d,RC=%d,Host appl=%.8s, WS appl=%.8s\n" */
1085 +++ b/Documentation/kmsg/s390/cpcmd
1088 + * Text: "The cpcmd kernel function failed to allocate a response buffer\n"
1089 + * Severity: Warning
1091 + * IPL code, console detection, and device drivers like vmcp or vmlogrdr use
1092 + * the cpcmd kernel function to send commands to the z/VM control program (CP).
1093 + * If a program that uses the cpcmd function does not allocate a contiguous
1094 + * response buffer below 2 GB guest real storage, cpcmd creates a bounce buffer
1095 + * to be used as the response buffer. Because of low memory or memory
1096 + * fragmentation, cpcmd could not create the bounce buffer.
1098 + * Look for related page allocation failure messages and at the stack trace to
1099 + * find out which program or operation failed. Free some memory and retry the
1100 + * failed operation. Consider allocating more memory to your z/VM guest virtual
1105 +++ b/Documentation/kmsg/s390/cpu
1108 + * Text: "Processor %d started, address %d, identification %06X\n"
1109 + * Severity: Informational
1111 + * @1: logical CPU number
1113 + * @3: CPU identification number
1115 + * The kernel detected a CPU with the given characteristics.
1121 + * Text: "Processor %d stopped\n"
1122 + * Severity: Informational
1124 + * @1: logical CPU number
1126 + * A logical CPU has been set offline.
1132 + * Text: "%d configured CPUs, %d standby CPUs\n"
1133 + * Severity: Informational
1135 + * @1: number of configured CPUs
1136 + * @2: number of standby CPUs
1138 + * The kernel detected the given number of configured and standby CPUs.
1144 + * Text: "The CPU configuration topology of the machine is:"
1145 + * Severity: Informational
1147 + * The first six values of the topology information represent fields Mag1 to
1148 + * Mag6 of system-information block (SYSIB) 15.1.2. These fields specify the
1149 + * maximum numbers of topology-list entries (TLE) at successive topology nesting
1150 + * levels. The last value represents the MNest value of SYSIB 15.1.2 which
1151 + * specifies the maximum possible nesting that can be configured through
1152 + * dynamic changes. For details see the SYSIB 15.1.2 information in the
1153 + * "Principles of Operation."
1159 + * Text: "CPU %i exceeds the maximum %i and is excluded from the dump\n"
1160 + * Severity: Warning
1163 + * @2: maximum CPU number
1165 + * The Linux kernel is used as a system dumper but it runs on more CPUs than
1166 + * it has been compiled for with the CONFIG_NR_CPUS kernel configuration
1167 + * option. The system dump will be created but information on one or more
1168 + * CPUs will be missing.
1170 + * Update the system dump kernel to a newer version that supports more
1171 + * CPUs or reduce the number of installed CPUs and reproduce the problem
1172 + * that should be analyzed. If you send the system dump that prompted this
1173 + * message to a support organization, be sure to communicate that the dump
1174 + * does not include all CPU information.
1177 +++ b/Documentation/kmsg/s390/ctcm
1180 + * Text: "%s: An I/O-error occurred on the CTCM device\n"
1183 + * @1: bus ID of the CTCM device
1185 + * An I/O error was detected on one of the subchannels of the CTCM device.
1186 + * Depending on the error, the CTCM device driver might attempt an automatic
1189 + * Check the status of the CTCM device, for example, with ifconfig. If the
1190 + * device is not operational, perform a manual recovery. See "Device Drivers,
1191 + * Features, and Commands" for details about how to recover a CTCM device.
1195 + * Text: "%s: An adapter hardware operation timed out\n"
1198 + * @1: bus ID of the CTCM device
1200 + * The CTCM device uses an adapter to physically connect to its communication
1201 + * peer. An operation on this adapter timed out.
1203 + * Check the status of the CTCM device, for example, with ifconfig. If the
1204 + * device is not operational, perform a manual recovery. See "Device Drivers,
1205 + * Features, and Commands" for details about how to recover a CTCM device.
1209 + * Text: "%s: An error occurred on the adapter hardware\n"
1212 + * @1: bus ID of the CTCM device
1214 + * The CTCM device uses an adapter to physically connect to its communication
1215 + * peer. An operation on this adapter returned an error.
1217 + * Check the status of the CTCM device, for example, with ifconfig. If the
1218 + * device is not operational, perform a manual recovery. See "Device Drivers,
1219 + * Features, and Commands" for details about how to recover a CTCM device.
1223 + * Text: "%s: The communication peer has disconnected\n"
1224 + * Severity: Notice
1228 + * The remote device has disconnected. Possible reasons are that the remote
1229 + * interface has been closed or that the operating system instance with the
1230 + * communication peer has been rebooted or shut down.
1232 + * Check the status of the peer device. Ensure that the peer operating system
1233 + * instance is running and that the peer interface is operational.
1237 + * Text: "%s: The remote operating system is not available\n"
1238 + * Severity: Notice
1242 + * The operating system instance with the communication peer has disconnected.
1243 + * Possible reasons are that the operating system instance has been rebooted
1246 + * Ensure that the peer operating system instance is running and that the peer
1247 + * interface is operational.
1251 + * Text: "%s: The adapter received a non-specific IRQ\n"
1252 + * Severity: Warning
1254 + * @1: bus ID of the CTCM device
1256 + * The adapter hardware used by the CTCM device received an IRQ that cannot
1257 + * be mapped to a particular device. This is a hardware problem.
1259 + * Check the status of the CTCM device, for example, with ifconfig. Check if
1260 + * the connection to the remote device still works. If the CTCM device is not
1261 + * operational, set it offline and back online. If this does not resolve the
1262 + * problem, perform a manual recovery. See "Device Drivers, Features, and
1263 + * Commands" for details about how to recover a CTCM device. If this problem
1264 + * persists, gather Linux debug data, collect the hardware logs, and report the
1265 + * problem to your support organization.
1269 + * Text: "%s: A check occurred on the subchannel\n"
1270 + * Severity: Warning
1272 + * @1: bus ID of the CTCM device
1274 + * A check condition has been detected on the subchannel.
1276 + * Check if the connection to the remote device still works. If the CTCM device
1277 + * is not operational, set it offline and back online. If this does not resolve
1278 + * the problem, perform a manual recovery. See "Device Drivers, Features, and
1279 + * Commands" for details about how to recover a CTCM device. If this problem
1280 + * persists, gather Linux debug data and report the problem to your support
1285 + * Text: "%s: The communication peer is busy\n"
1286 + * Severity: Informational
1290 + * A busy target device was reported. This might be a temporary problem.
1292 + * If this problem persists or is reported frequently ensure that the target
1293 + * device is working properly.
1297 + * Text: "%s: The specified target device is not valid\n"
1302 + * A target device was called with a faulty device specification. This is an
1303 + * adapter hardware problem.
1305 + * Gather Linux debug data, collect the hardware logs, and contact IBM support.
1309 + * Text: "An I/O operation resulted in error %04x\n"
1313 + * @2: error information
1315 + * A hardware operation ended with an error.
1317 + * Check the status of the CTCM device, for example, with ifconfig. If the
1318 + * device is not operational, perform a manual recovery. See "Device Drivers,
1319 + * Features, and Commands" for details about how to recover a CTCM device.
1320 + * If this problem persists, gather Linux debug data, collect the hardware logs,
1321 + * and report the problem to your support organization.
1325 + * Text: "%s: Initialization failed with RX/TX init handshake error %s\n"
1326 + * Severity: Warning
1328 + * @1: bus ID of the CTCM device
1329 + * @2: error information
1331 + * A problem occurred during the initialization of the connection. If the
1332 + * connection can be established after an automatic recovery, a success message
1335 + * If the problem is not resolved by the automatic recovery process, check the
1336 + * local and remote device. If this problem persists, gather Linux debug data
1337 + * and report the problem to your support organization.
1341 + * Text: "%s: The network backlog for %s is exceeded, package dropped\n"
1342 + * Severity: Warning
1344 + * @1: bus ID of the CTCM device
1345 + * @2: calling function
1347 + * There is more network traffic than can be handled by the device. The device
1348 + * is closed and some data has not been transmitted. The device might be
1349 + * recovered automatically.
1351 + * Investigate and resolve the congestion. If necessary, set the device
1352 + * online to make it operational.
1356 + * Text: "%s: The XID used in the MPC protocol is not valid, rc = %d\n"
1357 + * Severity: Warning
1359 + * @1: bus ID of the CTCM device
1362 + * The exchange identification (XID) used by the CTCM device driver when
1363 + * in MPC mode is not valid.
1365 + * Note the error information provided with this message and contact your
1366 + * support organization.
1369 +/*? Text: "CTCM driver unloaded\n" */
1370 +/*? Text: "%s: %s Internal error: net_device is NULL, ch = 0x%p\n" */
1371 +/*? Text: "%s / register_cu3088_discipline failed, ret = %d\n" */
1372 +/*? Text: "%s: %s: Internal error: Can't determine channel for interrupt device %s\n" */
1373 +/*? Text: "CTCM driver initialized\n" */
1374 +/*? Text: "%s: setup OK : r/w = %s/%s, protocol : %d\n" */
1375 +/*? Text: "%s: Connected with remote side\n" */
1376 +/*? Text: "%s: Restarting device\n" */
1379 +++ b/Documentation/kmsg/s390/dcssblk
1382 + * Text: "Adjacent DCSSs %s and %s are not contiguous\n"
1388 + * You can only map a set of two or more DCSSs to a single DCSS device if the
1389 + * DCSSs in the set form a contiguous memory space. The DCSS device cannot be
1390 + * created because there is a memory gap between two adjacent DCSSs.
1392 + * Ensure that you have specified all DCSSs that belong to the set. Check the
1393 + * definitions of the DCSSs on the z/VM hypervisor to verify that they form
1394 + * a contiguous memory space.
1398 + * Text: "DCSS %s and DCSS %s have incompatible types\n"
1404 + * You can only map a set of two or more DCSSs to a single DCSS device if
1405 + * either all DCSSs in the set have the same type or if the set contains DCSSs
1406 + * of the two types EW and EN but no other type. The DCSS device cannot be
1407 + * created because at least two of the specified DCSSs are not compatible.
1409 + * Check the definitions of the DCSSs on the z/VM hypervisor to verify that
1410 + * their types are compatible.
1414 + * Text: "DCSS %s is of type SC and cannot be loaded as exclusive-writable\n"
1419 + * You cannot load a DCSS device in exclusive-writable access mode if the DCSS
1420 + * devise maps to one or more DCSSs of type SC.
1422 + * Load the DCSS in shared access mode.
1426 + * Text: "DCSS device %s is removed after a failed access mode change\n"
1431 + * To change the access mode of a DCSS device, all DCSSs that map to the device
1432 + * were unloaded. Reloading the DCSSs for the new access mode failed and the
1433 + * device is removed.
1435 + * Look for related messages to find out why the DCSSs could not be reloaded.
1436 + * If necessary, add the device again.
1440 + * Text: "All DCSSs that map to device %s are saved\n"
1441 + * Severity: Informational
1445 + * A save request has been submitted for the DCSS device. Changes to all DCSSs
1446 + * that map to the device are saved permanently.
1452 + * Text: "Device %s is in use, its DCSSs will be saved when it becomes idle\n"
1453 + * Severity: Informational
1457 + * A save request for the device has been deferred until the device becomes
1458 + * idle. Then changes to all DCSSs that the device maps to will be saved
1465 + * Text: "A pending save request for device %s has been canceled\n"
1466 + * Severity: Informational
1470 + * A save request for the DCSSs that map to a DCSS device has been pending
1471 + * while the device was in use. This save request has been canceled. Changes to
1472 + * the DCSSs will not be saved permanently.
1478 + * Text: "Loaded %s with total size %lu bytes and capacity %lu sectors\n"
1479 + * Severity: Informational
1482 + * @2: total size in bytes
1483 + * @3: total size in 512 byte sectors
1485 + * The listed DCSSs have been verified as contiguous and successfully loaded.
1486 + * The displayed sizes are the sums of all DCSSs.
1492 + * Text: "Device %s cannot be removed because it is not a known device\n"
1493 + * Severity: Warning
1497 + * The DCSS device you are trying to remove is not known to the DCSS device
1500 + * List the entries under /sys/devices/dcssblk/ to see the names of the
1501 + * existing DCSS devices.
1505 + * Text: "Device %s cannot be removed while it is in use\n"
1506 + * Severity: Warning
1510 + * You are trying to remove a device that is in use.
1512 + * Make sure that all users of the device close the device before you try to
1517 + * Text: "Device %s has become idle and is being saved now\n"
1518 + * Severity: Informational
1522 + * A save request for the DCSSs that map to a DCSS device has been pending
1523 + * while the device was in use. The device has become idle and all changes
1524 + * to the DCSSs are now saved permanently.
1530 + * Text: "Writing to %s failed because it is a read-only device\n"
1531 + * Severity: Warning
1535 + * The DCSS device is in shared access mode and cannot be written to. Depending
1536 + * on the type of the DCSSs that the device maps to, you might be able to
1537 + * change the access mode to exclusive-writable.
1539 + * If the DCSSs of the device are of type SC, do not attempt to write to the
1540 + * device. If the DCSSs of the device are of type ER or SR, change the access
1541 + * mode to exclusive-writable before writing to the device.
1544 +++ b/Documentation/kmsg/s390/extmem
1547 + * Text: "Querying a DCSS type failed with rc=%ld\n"
1548 + * Severity: Warning
1552 + * The DCSS kernel interface used z/VM diagnose call X'64' to query the
1553 + * type of a DCSS. z/VM failed to determine the type and returned an error.
1555 + * Look for related messages to find out which DCSS is affected.
1556 + * For details about the return codes see the section about DIAGNOSE Code
1557 + * X'64' in "z/VM CP Programming Services".
1561 + * Text: "Loading DCSS %s failed with rc=%ld\n"
1562 + * Severity: Warning
1567 + * The DCSS kernel interface used diagnose call X'64' to load a DCSS. z/VM
1568 + * failed to load the DCSS and returned an error.
1570 + * For details about the return codes see the section about DIAGNOSE Code
1571 + * X'64' in "z/VM CP Programming Services".
1575 + * Text: "DCSS %s of range %p to %p and type %s loaded as exclusive-writable\n"
1576 + * Severity: Informational
1579 + * @2: starting page address
1580 + * @3: ending page address
1583 + * The DCSS was loaded successfully in exclusive-writable access mode.
1589 + * Text: "DCSS %s of range %p to %p and type %s loaded in shared access mode\n"
1590 + * Severity: Informational
1593 + * @2: starting page address
1594 + * @3: ending page address
1597 + * The DCSS was loaded successfully in shared access mode.
1603 + * Text: "DCSS %s is already in the requested access mode\n"
1604 + * Severity: Informational
1608 + * A request to reload a DCSS with a new access mode has been rejected
1609 + * because the new access mode is the same as the current access mode.
1615 + * Text: "DCSS %s is in use and cannot be reloaded\n"
1616 + * Severity: Warning
1620 + * Reloading a DCSS in a different access mode has failed because the DCSS is
1621 + * being used by one or more device drivers. The DCSS remains loaded with the
1622 + * current access mode.
1624 + * Ensure that the DCSS is not used by any device driver then try again to
1625 + * load the DCSS with the new access mode.
1629 + * Text: "DCSS %s overlaps with used memory resources and cannot be reloaded\n"
1630 + * Severity: Warning
1634 + * The DCSS has been unloaded and cannot be reloaded because it overlaps with
1635 + * another loaded DCSS or with the memory of the z/VM guest virtual machine
1636 + * (guest storage).
1638 + * Ensure that no DCSS is loaded that has overlapping memory resources
1639 + * with the DCSS you want to reload. If the DCSS overlaps with guest storage,
1640 + * use the DEF STORE CONFIG z/VM CP command to create a sufficient storage gap
1641 + * for the DCSS. For details, see the section about the DCSS device driver in
1642 + * "Device Drivers, Features, and Commands".
1646 + * Text: "Reloading DCSS %s failed with rc=%ld\n"
1647 + * Severity: Warning
1652 + * The DCSS kernel interface used z/VM diagnose call X'64' to reload a DCSS
1653 + * in a different access mode. The DCSS was unloaded but z/VM failed to reload
1656 + * For details about the return codes see the section about DIAGNOSE Code
1657 + * X'64' in "z/VM CP Programming Services".
1661 + * Text: "Unloading unknown DCSS %s failed\n"
1666 + * The specified DCSS cannot be unloaded. The DCSS is known to the DCSS device
1667 + * driver but not to the DCSS kernel interface. This problem indicates a
1668 + * program error in extmem.c.
1670 + * Report this problem to your support organization.
1674 + * Text: "Saving unknown DCSS %s failed\n"
1679 + * The specified DCSS cannot be saved. The DCSS is known to the DCSS device
1680 + * driver but not to the DCSS kernel interface. This problem indicates a
1681 + * program error in extmem.c.
1683 + * Report this problem to your support organization.
1687 + * Text: "Saving a DCSS failed with DEFSEG response code %i\n"
1690 + * @1: response-code
1692 + * The DEFSEG z/VM CP command failed to permanently save changes to a DCSS.
1694 + * Look for related messages to find the cause of this error. See also message
1695 + * HCP<response-code>E in the DEFSEG section of the "z/VM CP Command and
1696 + * Utility Reference".
1700 + * Text: "Saving a DCSS failed with SAVESEG response code %i\n"
1703 + * @1: response-code
1705 + * The SAVESEG z/VM CP command failed to permanently save changes to a DCSS.
1707 + * Look for related messages to find the cause of this error. See also message
1708 + * HCP<response-code>E in the SAVESEG section of the "z/VM CP Command and
1709 + * Utility Reference".
1713 + * Text: "DCSS %s cannot be loaded or queried\n"
1718 + * You cannot load or query the specified DCSS because it either is not defined
1719 + * in the z/VM hypervisor, or it is a class S DCSS, or it is above 2047 MB
1720 + * and he Linux system is a 31-bit system.
1722 + * Use the CP command "QUERY NSS" to find out if the DCSS is a valid
1723 + * DCSS that can be loaded.
1727 + * Text: "DCSS %s cannot be loaded or queried without z/VM\n"
1732 + * A DCSS is a z/VM resource. Your Linux instance is not running as a z/VM
1733 + * guest operating system and, therefore, cannot load DCSSs.
1735 + * Load DCSSs only on Linux instances that run as z/VM guest operating systems.
1739 + * Text: "Loading or querying DCSS %s resulted in a hardware error\n"
1744 + * Either the z/VM DIAGNOSE X'64' query or load call issued for the DCSS
1745 + * returned with an error.
1747 + * Look for previous extmem message to find the return code from the
1748 + * DIAGNOSE X'64' query or load call. For details about the return codes see
1749 + * the section about DIAGNOSE Code X'64' in "z/VM CP Programming Services".
1753 + * Text: "DCSS %s has multiple page ranges and cannot be loaded or queried\n"
1758 + * You can only load or query a DCSS with multiple page ranges if:
1759 + * - The DCSS has 6 or fewer page ranges
1760 + * - The page ranges form a contiguous address space
1761 + * - The page ranges are of type EW or EN
1763 + * Check the definition of the DCSS to make sure that the conditions for
1764 + * DCSSs with multiple page ranges are met.
1768 + * Text: "%s needs used memory resources and cannot be loaded or queried\n"
1773 + * You cannot load or query the DCSS because it overlaps with an already
1774 + * loaded DCSS or with the memory of the z/VM guest virtual machine
1775 + * (guest storage).
1777 + * Ensure that no DCSS is loaded that has overlapping memory resources
1778 + * with the DCSS you want to load or query. If the DCSS overlaps with guest
1779 + * storage, use the DEF STORE CONFIG z/VM CP command to create a sufficient
1780 + * storage gap for the DCSS. For details, see the section about the DCSS
1781 + * device driver in "Device Drivers, Features, and Commands".
1785 + * Text: "DCSS %s is already loaded in a different access mode\n"
1790 + * The DCSS you are trying to load has already been loaded in a different
1791 + * access mode. You cannot simultaneously load the DCSS in different modes.
1793 + * Reload the DCSS in a different mode or load it with the same mode in which
1794 + * it has already been loaded.
1798 + * Text: "There is not enough memory to load or query DCSS %s\n"
1803 + * The available memory is not enough to load or query the DCSS.
1805 + * Free some memory and repeat the failed operation.
1809 + * Text: "DCSS %s overlaps with used storage and cannot be loaded\n"
1814 + * You cannot load the DCSS because it overlaps with an already loaded DCSS
1815 + * or with the memory of the z/VM guest virtual machine (guest storage).
1817 + * Ensure that no DCSS is loaded that has overlapping memory resources
1818 + * with the DCSS you want to load. If the DCSS overlaps with guest storage,
1819 + * use the DEF STORE CONFIG z/VM CP command to create a sufficient storage gap
1820 + * for the DCSS. For details, see the section about the DCSS device driver in
1821 + * "Device Drivers, Features, and Commands".
1825 + * Text: "DCSS %s exceeds the kernel mapping range (%lu) and cannot be loaded\n"
1829 + * @2: kernel mapping range in bytes
1831 + * You cannot load the DCSS because it exceeds the kernel mapping range limit.
1833 + * Ensure that the DCSS range is defined below the kernel mapping range.
1837 +++ b/Documentation/kmsg/s390/hypfs
1840 + * Text: "The hardware system does not support hypfs\n"
1843 + * hypfs requires DIAGNOSE Code X'204' but this diagnose code is not available
1844 + * on your hardware. You need more recent hardware to use hypfs.
1850 + * Text: "The hardware system does not provide all functions required by hypfs\n"
1853 + * hypfs requires DIAGNOSE Code X'224' but this diagnode code is not available
1854 + * on your hardware. You need more recent hardware to use hypfs.
1860 + * Text: "Updating the hypfs tree failed\n"
1863 + * There was not enough memory available to update the hypfs tree.
1865 + * Free some memory and try again to update the hypfs tree. Consider assigning
1866 + * more memory to your LPAR or z/VM guest virtual machine.
1870 + * Text: "%s is not a valid mount option\n"
1873 + * @1: mount option
1875 + * hypfs has detected mount options that are not valid.
1877 + * See "Device Drivers Features and Commands" for information about valid
1878 + * mount options for hypfs.
1882 + * Text: "Initialization of hypfs failed with rc=%i\n"
1887 + * Initialization of hypfs failed because of resource or hardware constraints.
1888 + * Possible reasons for this problem are insufficient free memory or missing
1889 + * hardware interfaces.
1891 + * See errno.h for information about the error codes.
1894 +/*? Text: "Hypervisor filesystem mounted\n" */
1896 +++ b/Documentation/kmsg/s390/iucv
1899 + * Text: "Defining an interrupt buffer on CPU %i failed with 0x%02x (%s)\n"
1900 + * Severity: Warning
1903 + * @2: hexadecimal error value
1904 + * @3: short error code explanation
1906 + * Defining an interrupt buffer for external interrupts failed. Error
1907 + * value 0x03 indicates a problem with the z/VM directory entry of the
1908 + * z/VM guest virtual machine. This problem can also be caused by a
1911 + * If the error value is 0x03, examine the z/VM directory entry of your
1912 + * z/VM guest virtual machine. If the directory entry is correct or if the
1913 + * error value is not 0x03, report this problem to your support organization.
1916 +/*? Text: "iucv_external_interrupt: out of memory\n" */
1919 +++ b/Documentation/kmsg/s390/lcs
1922 + * Text: "%s: Allocating a socket buffer to interface %s failed\n"
1925 + * @1: bus ID of the LCS device
1926 + * @2: network interface
1928 + * LAN channel station (LCS) devices require a socket buffer (SKB) structure
1929 + * for storing incoming data. The LCS device driver failed to allocate an SKB
1930 + * structure to the LCS device. A likely cause of this problem is memory
1933 + * Free some memory and repeat the failed operation.
1937 + * Text: "%s: Shutting down the LCS device failed\n "
1940 + * @1: bus ID of the LCS device
1942 + * A request to shut down a LAN channel station (LCS) device resulted in an
1943 + * error. The error is logged in the LCS trace at trace level 4.
1945 + * Try again to shut down the device. If the error persists, see the LCS trace
1946 + * to find out what causes the error.
1950 + * Text: "%s: Detecting a network adapter for LCS devices failed with rc=%d (0x%x)\n"
1951 + * Severity: Warning
1953 + * @1: lcs_detect return code in decimal notation
1954 + * @2: lcs_detect return code in hexadecimal notation
1956 + * The LCS device driver could not initialize a network adapter.
1958 + * Note the return codes from the error message and contact IBM support.
1962 + * Text: "%s: A recovery process has been started for the LCS device\n"
1963 + * Severity: Warning
1965 + * @1: bus ID of the LCS device
1967 + * The LAN channel station (LCS) device is shut down and restarted. The recovery
1968 + * process might have been initiated by a user or started automatically as a
1969 + * response to a device problem.
1971 + * Wait until a message indicates the completion of the recovery process.
1975 + * Text: "%s: An I/O-error occurred on the LCS device\n"
1976 + * Severity: Warning
1978 + * @1: bus ID of the LCS device
1980 + * The LAN channel station (LCS) device reported a problem that can be recovered
1981 + * by the LCS device driver. Repeated occurrences of this problem indicate a
1982 + * malfunctioning device.
1984 + * If this problem occurs frequently, initiate a recovery process for the
1985 + * device, for example, by writing '1' to the 'recover' sysfs attribute of the
1990 + * Text: "%s: A command timed out on the LCS device\n"
1991 + * Severity: Warning
1993 + * @1: bus ID of the LCS device
1995 + * The LAN channel station (LCS) device reported a problem that can be recovered
1996 + * by the LCS device driver. Repeated occurrences of this problem indicate a
1997 + * malfunctioning device.
1999 + * If this problem occurs frequently, initiate a recovery process for the
2000 + * device, for example, by writing '1' to the 'recover' sysfs attribute of the
2005 + * Text: "%s: An error occurred on the LCS device, rc=%ld\n"
2006 + * Severity: Warning
2008 + * @1: bus ID of the LCS device
2011 + * The LAN channel station (LCS) device reported a problem that can be recovered
2012 + * by the LCS device driver. Repeated occurrences of this problem indicate a
2013 + * malfunctioning device.
2015 + * If this problem occurs frequently, initiate a recovery process for the
2016 + * device, for example, by writing '1' to the 'recover' sysfs attribute of the
2021 + * Text: "%s: The LCS device stopped because of an error, dstat=0x%X, cstat=0x%X \n"
2022 + * Severity: Warning
2024 + * @1: bus ID of the LCS device
2025 + * @2: device status
2026 + * @3: subchannel status
2028 + * The LAN channel station (LCS) device reported an error. The LCS device driver
2029 + * might start a device recovery process.
2031 + * If the device driver does not start a recovery process, initiate a recovery
2032 + * process, for example, by writing '1' to the 'recover' sysfs attribute of the
2033 + * device. If the problem persists, note the status information provided with
2034 + * the message and contact IBM support.
2038 + * Text: "%s: Starting an LCS device resulted in an error, rc=%d!\n"
2041 + * @1: bus ID of the LCS device
2042 + * @2: ccw_device_start return code in decimal notation
2044 + * The LAN channel station (LCS) device driver failed to initialize an LCS
2045 + * device. The device is not operational.
2047 + * Initiate a recovery process, for example, by writing '1' to the 'recover'
2048 + * sysfs attribute of the device. If the problem persists, contact IBM support.
2052 + * Text: "%s: Sending data from the LCS device to the LAN failed with rc=%d\n"
2053 + * Severity: Warning
2055 + * @1: bus ID of the LCS device
2056 + * @2: ccw_device_resume return code in decimal notation
2058 + * The LAN channel station (LCS) device driver could not send data to the LAN
2059 + * using the LCS device. This might be a temporary problem. Operations continue
2060 + * on the LCS device.
2062 + * If this problem occurs frequently, initiate a recovery process, for example,
2063 + * by writing '1' to the 'recover' sysfs attribute of the device. If the
2064 + * problem persists, contact IBM support.
2067 +/*? Text: "Query IPAssist failed. Assuming unsupported!\n" */
2068 +/*? Text: "Stoplan for %s initiated by LGW.\n" */
2069 +/*? Text: "Not enough memory to add new multicast entry!\n" */
2070 +/*? Text: "Not enough memory for debug facility.\n" */
2071 +/*? Text: "Adding multicast address failed. Table possibly full!\n" */
2072 +/*? Text: "Error in opening device!\n" */
2073 +/*? Text: "LCS device %s %s IPv6 support\n" */
2074 +/*? Text: "Device %s successfully recovered!\n" */
2075 +/*? Text: "LCS device %s %s Multicast support\n" */
2076 +/*? Text: " Initialization failed\n" */
2077 +/*? Text: "Loading %s\n" */
2078 +/*? Text: "Initialization failed\n" */
2079 +/*? Text: "Terminating lcs module.\n" */
2080 +/*? Text: "Device %s could not be recovered!\n" */
2082 +++ b/Documentation/kmsg/s390/monreader
2085 + * Text: "Reading monitor data failed with rc=%i\n"
2090 + * The z/VM *MONITOR record device driver failed to read monitor data
2091 + * because the IUCV REPLY function failed. The read function against
2092 + * the monitor record device returns EIO. All monitor data that has been read
2093 + * since the last read with 0 size is incorrect.
2095 + * Disregard all monitor data that has been read since the last read with
2096 + * 0 size. If the device driver has been compiled as a separate module, unload
2097 + * and reload the monreader module. If the device driver has been compiled
2098 + * into the kernel, reboot Linux. For more information about possible causes
2099 + * of the error see the IUCV section in "z/VM CP Programming Services" and
2100 + * the *MONITOR section in "z/VM Performance".
2104 + * Text: "z/VM *MONITOR system service disconnected with rc=%i\n"
2107 + * @1: IPUSER SEVER return code
2109 + * The z/VM *MONITOR record device driver receives monitor records through
2110 + * an IUCV connection to the z/VM *MONITOR system service. This connection
2111 + * has been severed and the read function of the z/VM *MONITOR device driver
2112 + * returns EIO. All data received since the last read with 0 size is incorrect.
2114 + * Disregard all monitor data read since the last read with 0 size. Close and
2115 + * reopen the monitor record device. For information about the IPUSER SEVER
2116 + * return codes see "z/VM Performance".
2120 + * Text: "The read queue for monitor data is full\n"
2121 + * Severity: Warning
2123 + * The read function of the z/VM *MONITOR device driver returns EOVERFLOW
2124 + * because not enough monitor data has been read since the monitor device
2125 + * has been opened. Monitor data already read are valid and subsequent reads
2126 + * return valid data but some intermediate data might be missing.
2128 + * Be aware that monitor data might be missing. Assure that you regularly
2129 + * read monitor data after opening the monitor record device.
2133 + * Text: "Connecting to the z/VM *MONITOR system service failed with rc=%i\n"
2136 + * @1: IUCV CONNECT return code
2138 + * The z/VM *MONITOR record device driver receives monitor records through
2139 + * an IUCV connection to the z/VM *MONITOR system service. This connection
2140 + * could not be established when the monitor record device was opened. If
2141 + * the return code is 15, your z/VM guest virtual machine is not authorized
2142 + * to connect to the *MONITOR system service.
2144 + * If the return code is 15, ensure that the IUCV *MONITOR statement is
2145 + * included in the z/VM directory entry for your z/VM guest virtual machine.
2146 + * For other IUCV CONNECT return codes see the IUCV section in "CP Programming
2147 + * Services" and the *MONITOR section in "z/VM Performance".
2151 + * Text: "Disconnecting the z/VM *MONITOR system service failed with rc=%i\n"
2152 + * Severity: Warning
2154 + * @1: IUCV SEVER return code
2156 + * The z/VM *MONITOR record device driver receives monitor data through an
2157 + * IUCV connection to the z/VM *MONITOR system service. This connection
2158 + * could not be closed when the monitor record device was closed. You might
2159 + * not be able to resume monitoring.
2161 + * No immediate action is necessary. If you cannot open the monitor record
2162 + * device in the future, reboot Linux. For information about the IUCV SEVER
2163 + * return codes see the IUCV section in "CP Programming Services" and the
2164 + * *MONITOR section in "z/VM Performance".
2168 + * Text: "The z/VM *MONITOR record device driver cannot be loaded without z/VM\n"
2171 + * The z/VM *MONITOR record device driver uses z/VM system services to provide
2172 + * monitor data about z/VM guest operating systems to applications on Linux.
2173 + * On Linux instances that run in environments other than the z/VM hypervisor,
2174 + * the z/VM *MONITOR record device driver does not provide any useful
2175 + * function and the corresponding monreader module cannot be loaded.
2177 + * Load the z/VM *MONITOR record device driver only on Linux instances that run
2178 + * as guest operating systems of the z/VM hypervisor. If the z/VM *MONITOR
2179 + * record device driver has been compiled into the kernel, ignore this message.
2183 + * Text: "The z/VM *MONITOR record device driver failed to register with IUCV\n"
2186 + * The z/VM *MONITOR record device driver receives monitor data through an IUCV
2187 + * connection and needs to register with the IUCV device driver. This
2188 + * registration failed and the z/VM *MONITOR record device driver was not
2189 + * loaded. A possible cause of this problem is insufficient memory.
2191 + * Free some memory and try again to load the module. If the z/VM *MONITOR
2192 + * record device driver has been compiled into the kernel, you might have to
2193 + * configure more memory and reboot Linux. If you do not want to read monitor
2194 + * data, ignore this message.
2198 + * Text: "The specified *MONITOR DCSS %s does not have the required type SC\n"
2203 + * The DCSS that was specified with the monreader.mondcss kernel parameter or
2204 + * with the mondcss module parameter cannot be a *MONITOR DCSS because it is
2207 + * Confirm that you are using the name of the DCSS that has been configured as
2208 + * the *MONITOR DCSS on the z/VM hypervisor. If the default name, MONDCSS, is
2209 + * used, omit the monreader.mondcss or mondcss parameter.
2212 +++ b/Documentation/kmsg/s390/monwriter
2215 + * Text: "Writing monitor data failed with rc=%i\n"
2220 + * The monitor stream application device driver used the z/VM diagnose call
2221 + * DIAG X'DC' to start writing monitor data. z/VM returned an error and the
2222 + * monitor data cannot be written. If the return code is 5, your z/VM guest
2223 + * virtual machine is not authorized to write monitor data.
2225 + * If the return code is 5, ensure that your z/VM guest virtual machine's
2226 + * entry in the z/VM directory includes the OPTION APPLMON statement.
2227 + * For other return codes see the section about DIAGNOSE Code X'DC'
2228 + * in "z/VM CP Programming Services".
2231 +++ b/Documentation/kmsg/s390/netiucv
2234 + * Text: "%s: The peer interface of the IUCV device has closed the connection\n"
2235 + * Severity: Informational
2237 + * @1: bus ID of the IUCV device
2239 + * The peer interface on the remote z/VM guest virtual machine has closed the
2240 + * connection. Do not expect further packets on this interface. Any packets
2241 + * you send to this interface will be dropped.
2247 + * Text: "%s: The IUCV device failed to connect to z/VM guest %s\n"
2248 + * Severity: Warning
2250 + * @1: bus ID of the IUCV device
2251 + * @2: z/VM user ID
2253 + * The connection cannot be established because the z/VM guest virtual
2254 + * machine with the peer interface is not running.
2256 + * Ensure that the z/VM guest virtual machine with the peer interface is
2257 + * running; then try again to establish the connection.
2261 + * Text: "%s: The IUCV device failed to connect to the peer on z/VM guest %s\n"
2262 + * Severity: Warning
2264 + * @1: bus ID of the IUCV device
2265 + * @2: z/VM user ID
2267 + * The connection cannot be established because the z/VM guest virtual machine
2268 + * with the peer interface is not configured for IUCV connections.
2270 + * Configure the z/VM guest virtual machine with the peer interface for IUCV
2271 + * connections; then try again to establish the connection.
2275 + * Text: "%s: Connecting the IUCV device would exceed the maximum number of IUCV connections\n"
2278 + * @1: bus ID of the IUCV device
2280 + * The connection cannot be established because the maximum number of IUCV
2281 + * connections has been reached on the local z/VM guest virtual machine.
2283 + * Close some of the established IUCV connections on the local z/VM guest
2284 + * virtual machine; then try again to establish the connection.
2288 + * Text: "%s: z/VM guest %s has too many IUCV connections to connect with the IUCV device\n"
2291 + * @1: bus ID of the IUCV device
2292 + * @2: remote z/VM user ID
2294 + * Connecting to the remote z/VM guest virtual machine failed because the
2295 + * maximum number of IUCV connections for the remote z/VM guest virtual
2296 + * machine has been reached.
2298 + * Close some of the established IUCV connections on the remote z/VM guest
2299 + * virtual machine; then try again to establish the connection.
2303 + * Text: "%s: The IUCV device cannot connect to a z/VM guest with no IUCV authorization\n"
2306 + * @1: bus ID of the IUCV device
2308 + * Because the remote z/VM guest virtual machine is not authorized for IUCV
2309 + * connections, the connection cannot be established.
2311 + * Add the statements 'IUCV ALLOW' and 'IUCV ANY' to the z/VM directory
2312 + * entry of the remote z/VM guest virtual machine; then try again to
2313 + * establish the connection. See "z/VM CP Planning and Administration"
2314 + * for details about the IUCV statements.
2318 + * Text: "%s: Connecting the IUCV device failed with error %d\n"
2321 + * @1: bus ID of the IUCV device
2324 + * The connection cannot be established because of an IUCV CONNECT error.
2326 + * Report this problem to your support organization.
2330 + * Text: "%s: The IUCV device has been connected successfully to %s\n"
2331 + * Severity: Informational
2333 + * @1: bus ID of the IUCV device
2334 + * @2: remote z/VM user ID
2336 + * The connection has been established and the interface is ready to
2337 + * transmit communication packages.
2343 + * Text: "%s: The IUCV interface to %s has been established successfully\n"
2344 + * Severity: Informational
2346 + * @1: bus ID of the IUCV device
2347 + * @2: remote z/VM user ID
2349 + * The IUCV interface to the remote z/VM guest virtual machine has been
2350 + * established and can be activated with "ifconfig up" or an equivalent
2357 + * Text: "%s: The IUCV device is connected to %s and cannot be removed\n"
2358 + * Severity: Warning
2360 + * @1: bus ID of the IUCV device
2361 + * @2: remote z/VM user ID
2363 + * Removing a connection failed because the interface is active with a peer
2364 + * interface on a remote z/VM guest virtual machine.
2366 + * Deactivate the interface with "ifconfig down" or an equivalent command;
2367 + * then try again to remove the interface.
2370 +/*? Text: "driver unloaded\n" */
2371 +/*? Text: "driver initialized\n" */
2373 +++ b/Documentation/kmsg/s390/qeth
2376 + * Text: "%s: The LAN is offline\n"
2377 + * Severity: Warning
2379 + * @1: bus ID of the qeth device
2381 + * A start LAN command was sent by the qeth device driver but the physical or
2382 + * virtual adapter has not started the LAN. The LAN might take a few seconds
2383 + * to become available.
2385 + * Check the status of the qeth device, for example, with the lsqeth command.
2386 + * If the device does not become operational within a few seconds, initiate a
2387 + * recovery process, for example, by writing '1' to the 'recover' sysfs
2388 + * attribute of the device.
2392 + * Text: "%s: The user canceled setting the qeth device offline\n"
2393 + * Severity: Warning
2395 + * @1: bus ID of the qeth device
2397 + * A user initiated setting the device offline but subsequently canceled the
2398 + * operation, for example, with CTRL+C.
2400 + * Check the status of the qeth device, for example, with the lsqeth command.
2401 + * If necessary, repeat the operation to set the device offline.
2405 + * Text: "%s: A recovery process has been started for the device\n"
2406 + * Severity: Warning
2408 + * @1: bus ID of the qeth device
2410 + * A recovery process was started either by the qeth device driver or through
2413 + * Wait until a message indicates the completion of the recovery process.
2417 + * Text: "%s: The qeth device driver failed to recover an error on the device\n"
2418 + * Severity: Warning
2420 + * @1: bus ID of the qeth device
2422 + * The qeth device driver performed an automatic recovery operation to recover
2423 + * an error on a qeth device. The recovery operation failed.
2425 + * Try the following actions in the given order: i) Check the status of the
2426 + * qeth device, for example, with the lsqeth command. ii) Initiate a recovery
2427 + * process by writing '1' to the 'recover' sysfs attribute of the device.
2428 + * iii) Ungroup and regroup the subchannel triplet of the device. vi) Reboot
2429 + * Linux. v) If the problem persists, gather Linux debug data and report the
2430 + * problem to your support organization.
2434 + * Text: "%s: The link for interface %s on CHPID 0x%X failed\n"
2435 + * Severity: Warning
2437 + * @1: bus ID of the qeth device
2438 + * @2: network interface name
2441 + * A network link failed. A possible reason for this error is that a physical
2442 + * network cable has been disconnected.
2444 + * Ensure that the network cable on the adapter hardware is connected properly.
2445 + * If the connection is to a guest LAN, ensure that the device is still coupled
2446 + * to the guest LAN.
2450 + * Text: "%s: The link for %s on CHPID 0x%X has been restored\n"
2451 + * Severity: Informational
2453 + * @1: bus ID of the qeth device
2454 + * @2: network interface name
2457 + * A failed network link has been re-established. A device recovery is in
2460 + * Wait until a message indicates the completion of the recovery process.
2464 + * Text: "%s: A hardware operation timed out on the device\n"
2465 + * Severity: Warning
2467 + * @1: bus ID of the qeth device
2469 + * A hardware operation timed out on the qeth device.
2471 + * Check the status of the qeth device, for example, with the lsqeth command.
2472 + * If the device is not operational, initiate a recovery process, for example,
2473 + * by writing '1' to the 'recover' sysfs attribute of the device.
2477 + * Text: "%s: The adapter hardware is of an unknown type\n"
2480 + * @1: bus ID of the qeth device
2482 + * The qeth device driver does not recognize the adapter hardware. The cause
2483 + * of this problem could be a hardware error or a Linux level that does not
2484 + * support your adapter hardware.
2486 + * i) Investigate if your adapter hardware is supported by your Linux level.
2487 + * Consider using hardware that is supported by your Linux level or upgrading
2488 + * to a Linux level that supports your hardware. ii) Install the latest
2489 + * firmware on your adapter hardware. iii) If the problem persists and is not
2490 + * caused by a version mismatch, contact IBM support.
2494 + * Text: "%s: The adapter is used exclusively by another host\n"
2497 + * @1: bus ID of the qeth device
2499 + * The qeth adapter is exclusively used by another host.
2501 + * Use another qeth adapter or configure this one not exclusively to a
2502 + * particular host.
2506 + * Text: "%s: QDIO reported an error, rc=%i\n"
2507 + * Severity: Warning
2509 + * @1: bus ID of the qeth device
2512 + * The QDIO subsystem reported an error.
2514 + * Check for related QDIO errors. Check the status of the qeth device, for
2515 + * example, with the lsqeth command. If the device is not operational, initiate
2516 + * a recovery process, for example, by writing '1' to the 'recover' sysfs
2517 + * attribute of the device.
2521 + * Text: "%s: There is no kernel module to support discipline %d\n"
2524 + * @1: bus ID of the qeth device
2527 + * The qeth device driver or a user command requested a kernel module for a
2528 + * particular qeth discipline. Either the discipline is not supported by the
2529 + * qeth device driver or the requested module is not available to your Linux
2532 + * Check if the requested discipline module has been compiled into the kernel
2533 + * or is present in /lib/modules/<version>/kernel/drivers/s390/net.
2537 + * Text: "Initializing the qeth device driver failed\n"
2541 + * The base module of the qeth device driver could not be initialized.
2543 + * See errno.h to determine the reason for the error.
2544 + * i) Reboot Linux. ii) If the problem persists, gather Linux debug data and
2545 + * report the problem to your support organization.
2549 + * Text: "%s: Registering IP address %s failed\n"
2550 + * Severity: Warning
2552 + * @1: bus ID of the qeth device
2555 + * An IP address could not be registered with the network adapter.
2557 + * Check if another operating system instance has already registered the
2558 + * IP address with the same network adapter or at the same logical IP subnet.
2562 + * Text: "%s: Reading the adapter MAC address failed\n"
2563 + * Severity: Warning
2565 + * @1: bus ID of the qeth device
2567 + * The qeth device driver could not read the MAC address from the network
2570 + * Ungroup and regroup the subchannel triplet of the device. If this does not
2571 + * resolve the problem, reboot Linux. If the problem persists, gather Linux
2572 + * debug data and report the problem to your support organization.
2576 + * Text: "%s: Starting ARP processing support for %s failed\n"
2577 + * Severity: Warning
2579 + * @1: bus ID of the qeth device
2580 + * @2: network interface name
2582 + * The qeth device driver could not start ARP support on the network adapter.
2584 + * Ungroup and regroup the subchannel triplet of the device. If this does not
2585 + * resolve the problem, reboot Linux. If the problem persists, gather Linux
2586 + * debug data and report the problem to your support organization.
2590 + * Text: "%s: Starting IP fragmentation support for %s failed\n"
2591 + * Severity: Warning
2593 + * @1: bus ID of the qeth device
2594 + * @2: network interface name
2596 + * The qeth device driver could not start IP fragmentation support on the
2597 + * network adapter.
2599 + * Ungroup and regroup the subchannel triplet of the device. If this does not
2600 + * resolve the problem, reboot Linux. If the problem persists, gather Linux
2601 + * debug data and report the problem to your support organization.
2605 + * Text: "%s: Starting proxy ARP support for %s failed\n"
2606 + * Severity: Warning
2608 + * @1: bus ID of the qeth device
2609 + * @2: network interface name
2611 + * The qeth device driver could not start proxy ARP support on the network
2614 + * None if you do not require proxy ARP support. If you need proxy ARP,
2615 + * ungroup and regroup the subchannel triplet of the device. If this does not
2616 + * resolve the problem, reboot Linux. If the problem persists, gather Linux
2617 + * debug data and report the problem to your support organization.
2621 + * Text: "%s: Starting VLAN support for %s failed\n"
2622 + * Severity: Warning
2624 + * @1: bus ID of the qeth device
2625 + * @2: network interface name
2627 + * The qeth device driver could not start VLAN support on the network adapter.
2629 + * None if you do not require VLAN support. If you need VLAN support,
2630 + * ungroup and regroup the subchannel triplet of the device. If this does not
2631 + * resolve the problem, reboot Linux. If the problem persists, gather Linux
2632 + * debug data and report the problem to your support organization.
2636 + * Text: "%s: Starting multicast support for %s failed\n"
2637 + * Severity: Warning
2639 + * @1: bus ID of the qeth device
2640 + * @2: network interface name
2642 + * The qeth device driver could not start multicast support on the network
2645 + * Ungroup and regroup the subchannel triplet of the device. If this does not
2646 + * resolve the problem, reboot Linux. If the problem persists, gather Linux
2647 + * debug data and report the problem to your support organization.
2651 + * Text: "%s: Activating IPv6 support for %s failed\n"
2654 + * @1: bus ID of the qeth device
2655 + * @2: network interface name
2657 + * The qeth device driver could not activate IPv6 support on the network
2660 + * None if you do not require IPv6 communication. If you need IPv6 support,
2661 + * ungroup and regroup the subchannel triplet of the device. If this does not
2662 + * resolve the problem, reboot Linux. If the problem persists, gather Linux
2663 + * debug data and report the problem to your support organization.
2667 + * Text: "%s: Enabling the passthrough mode for %s failed\n"
2668 + * Severity: Warning
2670 + * @1: bus ID of the qeth device
2671 + * @2: network interface name
2673 + * The qeth device driver could not enable the passthrough mode on the
2674 + * network adapter. The passthrough mode is required for all network traffic
2675 + * other than IPv4. In particular, the passthrough mode is required for IPv6
2678 + * None if all you want to support is IPv4 communication. If you want to support
2679 + * IPv6 or other network traffic apart from IPv4, ungroup and regroup the
2680 + * subchannel triplet of the device. If this does not resolve the problem,
2681 + * reboot Linux. If the problem persists, gather Linux debug data and report
2682 + * the problem to your support organization.
2686 + * Text: "%s: Enabling broadcast filtering for %s failed\n"
2687 + * Severity: Warning
2689 + * @1: bus ID of the qeth device
2690 + * @2: network interface name
2692 + * The qeth device driver could not enable broadcast filtering on the network
2695 + * Ungroup and regroup the subchannel triplet of the device. If this does not
2696 + * resolve the problem, reboot Linux. If the problem persists, gather Linux
2697 + * debug data and report the problem to your support organization.
2701 + * Text: "%s: Setting up broadcast filtering for %s failed\n"
2702 + * Severity: Warning
2704 + * @1: bus ID of the qeth device
2705 + * @2: network interface name
2707 + * The qeth device driver could not set up broadcast filtering on the network
2710 + * Ungroup and regroup the subchannel triplet of the device. If this does not
2711 + * resolve the problem, reboot Linux. If the problem persists, gather Linux
2712 + * debug data and report the problem to your support organization.
2716 + * Text: "%s: Setting up broadcast echo filtering for %s failed\n"
2717 + * Severity: Warning
2719 + * @1: bus ID of the qeth device
2720 + * @2: network interface name
2722 + * The qeth device driver could not set up broadcast echo filtering on the
2723 + * network adapter.
2725 + * Ungroup and regroup the subchannel triplet of the device. If this does not
2726 + * resolve the problem, reboot Linux. If the problem persists, gather Linux
2727 + * debug data and report the problem to your support organization.
2731 + * Text: "%s: Starting HW checksumming for %s failed, using SW checksumming\n"
2732 + * Severity: Warning
2734 + * @1: bus ID of the qeth device
2735 + * @2: network interface name
2737 + * The network adapter supports hardware checksumming for incoming IP packages
2738 + * but the qeth device driver could not start hardware checksumming on the
2739 + * adapter. The qeth device driver continues to use software checksumming for
2740 + * incoming IP packages.
2742 + * None if you do not require hardware checksumming for incoming network
2743 + * traffic. If you want to enable hardware checksumming, ungroup and regroup
2744 + * the subchannel triplet of the device. If this does not resolve the problem,
2745 + * reboot Linux. If the problem persists, gather Linux debug data and report
2746 + * the problem to your support organization.
2750 + * Text: "%s: Enabling HW checksumming for %s failed, using SW checksumming\n"
2751 + * Severity: Warning
2753 + * @1: bus ID of the qeth device
2754 + * @2: network interface name
2756 + * The network adapter supports hardware checksumming for incoming IP packages
2757 + * but the qeth device driver could not enable hardware checksumming on the
2758 + * adapter. The qeth device driver continues to use software checksumming for
2759 + * incoming IP packages.
2761 + * None if you do not require hardware checksumming for incoming network
2762 + * traffic. If you want to enable hardware checksumming, ungroup and regroup
2763 + * the subchannel triplet of the device. If this does not resolve the problem,
2764 + * reboot Linux. If the problem persists, gather Linux debug data and report
2765 + * the problem to your support organization.
2769 + * Text: "%s: Starting outbound TCP segmentation offload for %s failed\n"
2770 + * Severity: Warning
2772 + * @1: bus ID of the qeth device
2773 + * @2: network interface name
2775 + * The network adapter supports TCP segmentation offload, but the qeth device
2776 + * driver could not start this support on the adapter.
2778 + * None if you do not require TCP segmentation offload. If you want to
2779 + * enable TCP segmentation offload, ungroup and regroup the subchannel triplet
2780 + * of the device. If this does not resolve the problem, reboot Linux. If the
2781 + * problem persists, gather Linux debug data and report the problem to your
2782 + * support organization.
2786 + * Text: "%s: The network adapter failed to generate a unique ID\n"
2787 + * Severity: Warning
2789 + * @1: bus ID of the qeth device
2791 + * In IBM mainframe environments, network interfaces are not identified by
2792 + * a specific MAC address. Therefore, the network adapters provide the network
2793 + * interfaces with unique IDs to be used in their IPv6 link local addresses.
2794 + * Without such a unique ID, duplicate addresses might be assigned in other
2797 + * Install the latest firmware on the adapter hardware. Manually, configure
2798 + * an IPv6 link local address for this device.
2802 + * Text: "There is no IPv6 support for the layer 3 discipline\n"
2803 + * Severity: Warning
2805 + * If you want to use IPv6 with the layer 3 discipline, you need a Linux kernel
2806 + * with IPv6 support. Because your Linux kernel has not been compiled with
2807 + * IPv6 support, you cannot use IPv6 with the layer 3 discipline, even if your
2808 + * adapter supports IPv6.
2810 + * Use a Linux kernel that has been complied to include IPv6 support if you
2811 + * want to use IPv6 with layer 3 qeth devices.
2814 +/*? Text: "core functions removed\n" */
2815 +/*? Text: "%s: Device is a%s card%s%s%s\nwith link type %s.\n" */
2816 +/*? Text: "%s: Device is a%s card%s%s%s\nwith link type %s (no portname needed by interface).\n" */
2817 +/*? Text: "%s: Device is a%s card%s%s%s\nwith link type %s (portname: %s)\n" */
2818 +/*? Text: "%s: issue_next_read failed: no iob available!\n" */
2819 +/*? Text: "%s: Priority Queueing not supported\n" */
2820 +/*? Text: "%s: sense data available. cstat 0x%X dstat 0x%X\n" */
2821 +/*? Text: "loading core functions\n" */
2822 +/*? Text: "%s: MAC address %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x successfully registered on device %s\n" */
2823 +/*? Text: "%s: Device successfully recovered!\n" */
2824 +/*? Text: "register layer 2 discipline\n" */
2825 +/*? Text: "unregister layer 2 discipline\n" */
2826 +/*? Text: "%s: Hardware IP fragmentation not supported on %s\n" */
2827 +/*? Text: "%s: IPv6 not supported on %s\n" */
2828 +/*? Text: "%s: VLAN not supported on %s\n" */
2829 +/*? Text: "%s: Inbound source address not supported on %s\n" */
2830 +/*? Text: "%s: IPV6 enabled\n" */
2831 +/*? Text: "%s: ARP processing not supported on %s!\n" */
2832 +/*? Text: "%s: Hardware IP fragmentation enabled \n" */
2833 +/*? Text: "%s: set adapter parameters not supported.\n" */
2834 +/*? Text: "%s: VLAN enabled\n" */
2835 +/*? Text: "register layer 3 discipline\n" */
2836 +/*? Text: "%s: Outbound TSO enabled\n" */
2837 +/*? Text: "%s: Broadcast not supported on %s\n" */
2838 +/*? Text: "%s: Outbound TSO not supported on %s\n" */
2839 +/*? Text: "%s: Inbound HW Checksumming not supported on %s,\ncontinuing using Inbound SW Checksumming\n" */
2840 +/*? Text: "%s: Using no checksumming on %s.\n" */
2841 +/*? Text: "%s: Broadcast enabled\n" */
2842 +/*? Text: "%s: Multicast not supported on %s\n" */
2843 +/*? Text: "%s: Using SW checksumming on %s.\n" */
2844 +/*? Text: "%s: HW Checksumming (inbound) enabled\n" */
2845 +/*? Text: "unregister layer 3 discipline\n" */
2846 +/*? Text: "%s: Multicast enabled\n" */
2848 +++ b/Documentation/kmsg/s390/s390dbf
2851 + * Text: "Root becomes the owner of all s390dbf files in sysfs\n"
2852 + * Severity: Warning
2854 + * The S/390 debug feature you are using only supports uid/gid = 0.
2860 + * Text: "Registering debug feature %s failed\n"
2863 + * @1: feature name
2865 + * The initialization of an S/390 debug feature failed. A likely cause of this
2866 + * problem is memory constraints. The system keeps running, but the debug
2867 + * data for this feature will not be available in sysfs.
2869 + * Consider assigning more memory to your LPAR or z/VM guest virtual machine.
2873 + * Text: "Registering view %s/%s would exceed the maximum number of views %i\n"
2876 + * @1: feature name
2880 + * The maximum number of allowed debug feature views has been reached. The
2881 + * view has not been registered. The system keeps running but the new view
2882 + * will not be available in sysfs. This is a program error.
2884 + * Report this problem to your support partner.
2888 + * Text: "%s is not a valid level for a debug feature\n"
2889 + * Severity: Warning
2893 + * Setting a new level for a debug feature by using the 'level' sysfs attribute
2894 + * failed. Valid levels are the minus sign (-) and the integers in the
2895 + * range 0 to 6. The minus sign switches off the feature. The numbers switch
2896 + * the feature on, where higher numbers produce more debug output.
2898 + * Write a valid value to the 'level' sysfs attribute.
2902 + * Text: "Flushing debug data failed because %c is not a valid area\n"
2903 + * Severity: Informational
2905 + * @1: debug area number
2907 + * Flushing a debug area by using the 'flush' sysfs attribute failed. Valid
2908 + * values are the minus sign (-) for flushing all areas, or the number of the
2909 + * respective area for flushing a single area.
2911 + * Write a valid area number or the minus sign (-) to the 'flush' sysfs
2916 + * Text: "Allocating memory for %i pages failed\n"
2917 + * Severity: Informational
2919 + * @1: number of pages
2921 + * Setting the debug feature size by using the 'page' sysfs attribute failed.
2922 + * Linux did not have enough memory for expanding the debug feature to the
2925 + * Use a smaller number of pages for the debug feature or allocate more
2926 + * memory to your LPAR or z/VM guest virtual machine.
2929 +/*? Text: "%s: set new size (%i pages)\n" */
2930 +/*? Text: "%s: switched off\n" */
2931 +/*? Text: "%s: level %i is out of range (%i - %i)\n" */
2932 +/*? Text: "Registering view %s/%s failed due to out of memory\n" */
2934 +++ b/Documentation/kmsg/s390/sclp_cmd
2936 +/*? Text: "sync request failed (cmd=0x%08x, status=0x%02x)\n" */
2937 +/*? Text: "readcpuinfo failed (response=0x%04x)\n" */
2938 +/*? Text: "configure cpu failed (cmd=0x%08x, response=0x%04x)\n" */
2939 +/*? Text: "configure channel-path failed (cmd=0x%08x, response=0x%04x)\n" */
2940 +/*? Text: "read channel-path info failed (response=0x%04x)\n" */
2943 +++ b/Documentation/kmsg/s390/sclp_config
2945 +/*? Text: "cpu capability changed.\n" */
2946 +/*? Text: "no configuration management.\n" */
2949 +++ b/Documentation/kmsg/s390/sclp_cpi
2951 +/*? Text: "request failed (status=0x%02x)\n" */
2952 +/*? Text: "request failed with response code 0x%x\n" */
2954 +++ b/Documentation/kmsg/s390/sclp_sdias
2956 +/*? Text: "sclp_send failed for get_nr_blocks\n" */
2957 +/*? Text: "SCLP error: %x\n" */
2958 +/*? Text: "sclp_send failed: %x\n" */
2959 +/*? Text: "Error from SCLP while copying hsa. Event status = %x\n" */
2961 +++ b/Documentation/kmsg/s390/setup
2964 + * Text: "Execute protection active, mvcos available\n"
2965 + * Severity: Informational
2967 + * The kernel parameter 'noexec' has been specified. The kernel will
2968 + * honor the execute bit of mappings and will use the mvcos instruction
2969 + * to copy between the user and kernel address space.
2975 + * Text: "Execute protection active, mvcos not available\n"
2976 + * Severity: Informational
2978 + * The kernel parameter 'noexec' has been specified. The kernel will
2979 + * honor the execute bit of mappings. The mvcos instruction is not
2980 + * available and the kernel will use the slower page table walk method
2981 + * to copy between the user and kernel address space.
2987 + * Text: "Address spaces switched, mvcos available\n"
2988 + * Severity: Informational
2990 + * The kernel parameter 'switch_amode' has been specified. The kernel
2991 + * will use the primary address space for user space processes and the
2992 + * home address space for the kernel. The mvcos instruction is used to
2993 + * copy between the user and kernel address space.
2999 + * Text: "Address spaces switched, mvcos not available\n"
3000 + * Severity: Informational
3002 + * The kernel parameter 'switch_amode' has been specified. The kernel
3003 + * will use the primary address space for user space processes and the
3004 + * home address space for the kernel. The mvcos instruction is not
3005 + * available and the kernel will use the slower page table walk method
3006 + * to copy between the user and kernel address space.
3012 + * Text: "initrd extends beyond end of memory (0x%08lx > 0x%08lx) disabling initrd\n"
3015 + * @1: start address of the initial RAM disk
3016 + * @2: memory end address
3018 + * The load address and the size of the initial RAM disk result in an end
3019 + * address of the initial RAM disk that is beyond the end of the system
3022 + * Lower the load address of the initial RAM disk, reduce the size of the
3023 + * initial RAM disk, or increase the size if the system memory to make the
3024 + * initial RAM disk fit into the memory.
3028 + * Text: "Moving initrd (0x%08lx -> 0x%08lx, size: %ld)\n"
3029 + * Severity: Informational
3031 + * @1: old start address of the initial RAM disk
3032 + * @2: new start address of the initial RAM disk
3033 + * @3: size of the initial RAM disk
3035 + * The location of the initial RAM disk conflicted with the boot memory bitmap.
3036 + * To resolve the conflict the initial RAM disk has been moved to a new
3043 + * Text: "Linux is running as a z/VM guest operating system in 31-bit mode\n"
3044 + * Severity: Informational
3046 + * The 31-bit Linux kernel detected that it is running as a guest operating
3047 + * system of the z/VM hypervisor.
3053 + * Text: "Linux is running natively in 31-bit mode\n"
3054 + * Severity: Informational
3056 + * The 31-bit Linux kernel detected that it is running on an IBM mainframe,
3057 + * either as the sole operating system in an LPAR or as the sole operating
3058 + * system on the entire mainframe. The Linux kernel is not running as a
3059 + * guest operating system of the z/VM hypervisor.
3065 + * Text: "The hardware system has IEEE compatible floating point units\n"
3066 + * Severity: Informational
3068 + * The Linux kernel detected that it is running on a hardware system with
3069 + * CPUs that have IEEE compatible floating point units.
3075 + * Text: "The hardware system has no IEEE compatible floating point units\n"
3076 + * Severity: Informational
3078 + * The Linux kernel detected that it is running on a hardware system with
3079 + * CPUs that do not have IEEE compatible floating point units.
3085 + * Text: "Linux is running as a z/VM guest operating system in 64-bit mode\n"
3086 + * Severity: Informational
3088 + * The 64-bit Linux kernel detected that it is running as a guest operating
3089 + * system of the z/VM hypervisor.
3095 + * Text: "Linux is running natively in 64-bit mode\n"
3096 + * Severity: Informational
3098 + * The 64-bit Linux kernel detected that it is running on an IBM mainframe,
3099 + * either as the sole operating system in an LPAR or as the sole operating
3100 + * system on the entire mainframe. The Linux kernel is not running as a
3101 + * guest operating system of the z/VM hypervisor.
3107 + * Text: "Linux is running under KVM in 64-bit mode\n"
3108 + * Severity: Informational
3110 + * The 64-bit kernel detected that it is running under the KVM hypervisor.
3115 +++ b/Documentation/kmsg/s390/time
3118 + * Text: "The ETR interface has adjusted the clock by %li microseconds\n"
3119 + * Severity: Notice
3121 + * @1: number of microseconds
3123 + * The external time reference (ETR) interface has synchronized the system
3124 + * clock with the external reference and set it to a new value. The time
3125 + * difference between the old and new clock value has been passed to the
3126 + * network time protocol (NTP) as a single shot adjustment.
3132 + * Text: "The real or virtual hardware system does not provide an ETR interface\n"
3133 + * Severity: Warning
3135 + * The 'etr=' parameter has been passed on the kernel parameter line for
3136 + * a Linux instance that does not have access to the external time reference
3139 + * To avoid this warning remove the 'etr=' kernel parameter.
3143 + * Text: "The real or virtual hardware system does not provide an STP interface\n"
3144 + * Severity: Warning
3146 + * The 'stp=' parameter has been passed on the kernel parameter line for
3147 + * a Linux instance that does not have access to the server time protocol
3150 + * To avoid this warning remove the 'stp=' kernel parameter.
3154 +++ b/Documentation/kmsg/s390/vmcp
3157 + * Text: "The z/VM CP interface device driver cannot be loaded without z/VM\n"
3158 + * Severity: Warning
3160 + * With the z/VM CP interface you can issue z/VM CP commands from a Linux
3161 + * terminal session. On Linux instances that run in environments other than
3162 + * the z/VM hypervisor, the z/VM CP interface does not provide any useful
3163 + * function and the corresponding vmcp device driver cannot be loaded.
3165 + * Load the vmcp device driver only on Linux instances that run as guest
3166 + * operating systems of the z/VM hypervisor. If the device driver has been
3167 + * compiled into the kernel, ignore this message.
3170 +++ b/Documentation/kmsg/s390/vmlogrdr
3172 +/*? Text: "vmlogrdr: failed to start recording automatically\n" */
3173 +/*? Text: "vmlogrdr: connection severed with reason %i\n" */
3174 +/*? Text: "vmlogrdr: iucv connection to %s failed with rc %i \n" */
3175 +/*? Text: "vmlogrdr: failed to stop recording automatically\n" */
3176 +/*? Text: "not running under VM, driver not loaded.\n" */
3178 +++ b/Documentation/kmsg/s390/vmur
3181 + * Text: "The %s cannot be loaded without z/VM\n"
3184 + * @1: z/VM virtual unit record device driver
3186 + * The z/VM virtual unit record device driver provides Linux with access to
3187 + * z/VM virtual unit record devices like punch card readers, card punches, and
3188 + * line printers. On Linux instances that run in environments other than the
3189 + * z/VM hypervisor, the device driver does not provide any useful function and
3190 + * the corresponding vmur module cannot be loaded.
3192 + * Load the vmur module only on Linux instances that run as guest operating
3193 + * systems of the z/VM hypervisor. If the z/VM virtual unit record device
3194 + * has been compiled into the kernel, ignore this message.
3198 + * Text: "Kernel function alloc_chrdev_region failed with error code %d\n"
3201 + * @1: error code according to errno definitions
3203 + * The z/VM virtual unit record device driver (vmur) needs to register a range
3204 + * of character device minor numbers from 0x0000 to 0xffff.
3205 + * This registration failed, probably because of memory constraints.
3207 + * Free some memory and reload the vmur module. If the z/VM virtual unit
3208 + * record device driver has been compiled into the kernel reboot Linux.
3209 + * Consider assigning more memory to your LPAR or z/VM guest virtual machine.
3212 +/*? Text: "%s loaded.\n" */
3213 +/*? Text: "%s unloaded.\n" */
3215 +++ b/Documentation/kmsg/s390/xpram
3218 + * Text: "%d is not a valid number of XPRAM devices\n"
3221 + * @1: number of partitions
3223 + * The number of XPRAM partitions specified for the 'devs' module parameter
3224 + * or with the 'xpram.parts' kernel parameter must be an integer in the
3225 + * range 1 to 32. The XPRAM device driver created a maximum of 32 partitions
3226 + * that are probably not configured as intended.
3228 + * If the XPRAM device driver has been compiled as a separate module,
3229 + * unload the module and load it again with a correct value for the
3230 + * 'devs' module parameter. If the XPRAM device driver has been compiled
3231 + * into the kernel, correct the 'xpram.parts' parameter in the kernel
3232 + * command line and restart Linux.
3236 + * Text: "Not enough expanded memory available\n"
3239 + * The amount of expanded memory required to set up your XPRAM partitions
3240 + * depends on the 'sizes' parameter specified for the xpram module or on
3241 + * the specifications for the 'xpram.parts' parameter if the XPRAM device
3242 + * driver has been compiled into the kernel. Your
3243 + * current specification exceed the amount of available expanded memory.
3244 + * Your XPRAM partitions are probably not configured as intended.
3246 + * If the XPRAM device driver has been compiled as a separate module,
3247 + * unload the xpram module and load it again with an appropriate value
3248 + * for the 'sizes' module parameter. If the XPRAM device driver has been
3249 + * compiled into the kernel, adjust the 'xpram.parts' parameter in the
3250 + * kernel command line and restart Linux. If you need more than the
3251 + * available expanded memory, increase the expanded memory allocation for
3252 + * your virtual hardware or LPAR.
3256 + * Text: "No expanded memory available\n"
3259 + * The XPRAM device driver has been loaded in a Linux instance that runs
3260 + * in an LPAR or virtual hardware without expanded memory.
3263 + * Allocate expanded memory for your LPAR or virtual hardware or do not
3264 + * load the xpram module. You can ignore this message, if you do not want
3265 + * to create XPRAM partitions.
3268 +/*? Text: " number of devices (partitions): %d \n" */
3269 +/*? Text: " size of partition %d: %u kB\n" */
3270 +/*? Text: " size of partition %d to be set automatically\n" */
3271 +/*? Text: " memory needed (for sized partitions): %lu kB\n" */
3272 +/*? Text: " partitions to be sized automatically: %d\n" */
3273 +/*? Text: " automatically determined partition size: %lu kB\n" */
3274 +/*? Text: " %u pages expanded memory found (%lu KB).\n" */
3276 +++ b/Documentation/kmsg/s390/zdump
3279 + * Text: "The 32-bit dump tool cannot be used for a 64-bit system\n"
3282 + * The dump process ends without creating a system dump.
3284 + * Use a 64-bit dump tool to obtain a system dump for 64-bit Linux instance.
3287 +/*? Text: "DETECTED 'S390 (32 bit) OS'\n" */
3288 +/*? Text: "0x%x is an unknown architecture.\n" */
3289 +/*? Text: "DETECTED 'S390X (64 bit) OS'\n" */
3291 +++ b/Documentation/kmsg/s390/zfcp
3294 + * Text: "%s is not a valid SCSI device\n"
3297 + * @1: device specification
3299 + * The specification for an initial SCSI device provided with the 'zfcp.device'
3300 + * kernel parameter or with the 'device' module parameter is syntactically
3301 + * incorrect. The specified SCSI device could not be attached to the Linux
3304 + * Correct the value for the 'zfcp.device' or 'device' parameter and reboot
3305 + * Linux. See "Device Drivers, Features, and Commands" for information about
3310 + * Text: "Registering the misc device zfcp_cfdc failed\n"
3313 + * The zfcp device driver failed to register the device that provides access to
3314 + * the adapter access control file (ACL tables). The device driver
3315 + * initialization failed. A possible cause for this problem is memory
3318 + * Free some memory and try again to load the zfcp device driver. If the zfcp
3319 + * device driver has been compiled into the kernel, reboot Linux. Consider
3320 + * assigning more memory to your LPAR or z/VM guest virtual machine. If the
3321 + * problem persists, contact your support organization.
3325 + * Text: "The zfcp device driver could not register with the common I/O layer\n"
3328 + * The device driver initialization failed. A possible cause of this problem is
3329 + * memory constraints.
3331 + * Free some memory and try again to load the zfcp device driver. If the zfcp
3332 + * device driver has been compiled into the kernel, reboot Linux. Consider
3333 + * assigning more memory to your LPAR or z/VM guest virtual machine. If the
3334 + * problem persists, contact your support organization.
3338 + * Text: "%s: Setting up data structures for the FCP adapter failed\n"
3341 + * @1: bus ID of the zfcp device
3343 + * The zfcp device driver could not allocate data structures for an FCP adapter.
3344 + * A possible reason for this problem is memory constraints.
3346 + * Set the FCP adapter offline or detach it from the Linux system, free some
3347 + * memory and set the FCP adapter online again or attach it again. If this
3348 + * problem persists, gather Linux debug data, collect the FCP adapter
3349 + * hardware logs, and report the problem to your support organization.
3353 + * Text: "%s: The FCP device is operational again\n"
3354 + * Severity: Informational
3356 + * @1: bus ID of the zfcp device
3358 + * An FCP device has been unavailable because it had been detached from the
3359 + * Linux system or because the corresponding CHPID was offline. The FCP device
3360 + * is now available again and the zfcp device driver resumes all operations to
3367 + * Text: "%s: The CHPID for the FCP device is offline\n"
3368 + * Severity: Warning
3370 + * @1: bus ID of the zfcp device
3372 + * The CHPID for an FCP device has been set offline, either logically in Linux
3373 + * or on the hardware.
3375 + * Find out which CHPID corresponds to the FCP device, for example, with the
3376 + * lscss command. Check if the CHPID has been set logically offline in sysfs.
3377 + * Write 'on' to the CHPID's status attribute to set it online. If the CHPID is
3378 + * online in sysfs, find out if it has been varied offline through a hardware
3379 + * management interface, for example the service element (SE).
3383 + * Text: "%s: The FCP device has been detached\n"
3384 + * Severity: Warning
3386 + * @1: bus ID of the zfcp device
3388 + * An FCP device is no longer available to Linux.
3390 + * Ensure that the FCP adapter is operational and attached to the LPAR or z/VM
3391 + * virtual machine.
3395 + * Text: "%s: Registering the FCP device with the SCSI stack failed\n"
3398 + * @1: bus ID of the zfcp device
3400 + * The FCP adapter could not be registered with the Linux SCSI
3401 + * stack. A possible reason for this problem is memory constraints.
3403 + * Set the FCP adapter offline or detach it from the Linux system, free some
3404 + * memory and set the FCP adapter online again or attach it again. If this
3405 + * problem persists, gather Linux debug data, collect the FCP adapter
3406 + * hardware logs, and report the problem to your support organization.
3410 + * Text: "%s: ERP cannot recover an error on the FCP device\n"
3413 + * @1: bus ID of the zfcp device
3415 + * An error occurred on an FCP device. The error recovery procedure (ERP)
3416 + * could not resolve the error. The FCP device driver cannot use the FCP device.
3418 + * Check for previous error messages for the same FCP device to find the
3419 + * cause of the problem.
3423 + * Text: "%s: Creating an ERP thread for the FCP device failed.\n"
3426 + * @1: bus ID of the zfcp device
3428 + * The zfcp device driver could not set up error recovery procedure (ERP)
3429 + * processing for the FCP device. The FCP device is not available for use
3432 + * Free some memory and try again to load the zfcp device driver. If the zfcp
3433 + * device driver has been compiled into the kernel, reboot Linux. Consider
3434 + * assigning more memory to your LPAR or z/VM guest virtual machine. If the
3435 + * problem persists, contact your support organization.
3439 + * Text: "%s: ERP failed for unit 0x%016Lx on port 0x%016Lx\n"
3442 + * @1: bus ID of the zfcp device
3446 + * An error occurred on the SCSI device at the specified LUN. The error recovery
3447 + * procedure (ERP) could not resolve the error. The SCSI device is not
3450 + * Verify that the LUN is correct. Check the fibre channel fabric for errors
3451 + * related to the specified WWPN and LUN, the storage server, and Linux.
3455 + * Text: "%s: ERP failed for remote port 0x%016Lx\n"
3458 + * @1: bus ID of the zfcp device
3461 + * An error occurred on a remote port. The error recovery procedure (ERP)
3462 + * could not resolve the error. The port is not available.
3464 + * Verify that the WWPN is correct and check the fibre channel fabric for
3465 + * errors related to the WWPN.
3469 + * Text: "%s: Attaching the name server port to the FCP device failed\n"
3472 + * @1: bus ID of the zfcp device
3474 + * The zfcp device driver could not attach the name server port of the fibre
3475 + * channel fabric to an FCP device. A possible cause of this problem is
3476 + * memory constraints.
3478 + * Set the FCP device offline, free some memory, then set the FCP device online
3479 + * again. If this does not resolve the problem, reboot Linux and try again to
3480 + * set the FCP device online.
3484 + * Text: "%s: Registering unit 0x%016Lx on port 0x%016Lx failed\n"
3487 + * @1: bus ID of the zfcp device
3491 + * The Linux kernel could not allocate enough memory to register the SCSI
3492 + * device at the indicated LUN with the SCSI stack. The SCSI device is not
3495 + * Free some memory then detach the LUN and attach it again.
3499 + * Text: "%s: Registering port 0x%016Lx failed\n"
3502 + * @1: bus ID of the zfcp device
3505 + * The Linux kernel could not allocate enough memory to register the
3506 + * remote port with the indicated WWPN with the SCSI stack. The remote
3507 + * port is not available.
3509 + * Free some memory and trigger the rescan for ports.
3513 + * Text: "%s: A QDIO problem occurred\n"
3514 + * Severity: Warning
3516 + * @1: bus ID of the zfcp device
3518 + * QDIO reported a problem to the zfcp device driver. The zfcp device driver
3519 + * tries to recover this problem.
3521 + * Check for related error messages. If this problem occurs frequently, gather
3522 + * Linux debug data and contact your support organization.
3526 + * Text: "%s: A QDIO protocol error occurred, operations continue\n"
3527 + * Severity: Warning
3529 + * @1: bus ID of the zfcp device
3531 + * The zfcp device driver detected a missing flag in a QDIO queue. The device
3532 + * driver tries to keep the FCP device operational.
3534 + * Check for related error messages. If this problem occurs frequently, gather
3535 + * Linux debug data, collect the FCP adapter hardware logs, and report the
3536 + * problem to your support organization.
3540 + * Text: "%s: Setting up the QDIO connection to the FCP adapter failed\n"
3543 + * @1: bus ID of the zfcp device
3545 + * The zfcp device driver failed to establish a QDIO connection with the FCP
3548 + * Set the FCP adapter offline or detach it from the Linux system, free some
3549 + * memory and set the FCP adapter online again or attach it again. If this
3550 + * problem persists, gather Linux debug data, collect the FCP adapter
3551 + * hardware logs, and report the problem to your support organization.
3555 + * Text: "%s: The FCP adapter reported a problem that cannot be recovered\n"
3558 + * @1: bus ID of the zfcp device
3560 + * The FCP adapter has a problem that cannot be recovered by the zfcp device
3561 + * driver. The zfcp device driver stopped using the FCP device.
3563 + * Gather Linux debug data, collect the FCP adapter hardware logs, and report
3564 + * this problem to your support organization.
3568 + * Text: "%s: There is a wrap plug instead of a fibre channel cable\n"
3569 + * Severity: Warning
3571 + * @1: bus ID of the zfcp device
3573 + * The FCP adapter is not physically connected to the fibre channel fabric.
3575 + * Remove the wrap plug from the FCP adapter and connect the adapter with the
3576 + * fibre channel fabric.
3580 + * Text: "%s: Access denied to unit 0x%016Lx on port 0x%016Lx\n"
3581 + * Severity: Warning
3583 + * @1: bus ID of the zfcp device
3587 + * The Linux system is not allowed to access the SCSI device at the indicated
3590 + * Update the access control table of the FCP device to grant the Linux
3591 + * system access to the LUN or remove the LUN from the Linux system.
3595 + * Text: "%s: FCP device not operational because of an unsupported FC class\n"
3598 + * @1: bus ID of the zfcp device
3600 + * The FCP adapter hardware does not support the fibre channel service class
3601 + * requested by the zfcp device driver. This problem indicates a program error
3602 + * in the zfcp device driver.
3604 + * Gather Linux debug data, collect the FCP adapter hardware logs, and report
3605 + * this problem to your support organization.
3609 + * Text: "%s: 0x%Lx is an ambiguous request identifier\n"
3612 + * @1: bus ID of the zfcp device
3615 + * The FCP adapter reported that it received the same request ID twice. This is
3616 + * an error. The zfcp device driver stopped using the FCP device.
3618 + * Gather Linux debug data, collect the FCP adapter hardware logs, and report
3619 + * this problem to your support organization.
3623 + * Text: "%s: QTCB version 0x%x not supported by FCP adapter (0x%x to 0x%x)\n"
3626 + * @1: bus ID of the zfcp device
3627 + * @2: requested version
3628 + * @3: lowest supported version
3629 + * @4: highest supported version
3631 + * See message text.
3632 + * The queue transfer control block (QTCB) version requested by the zfcp device
3633 + * driver is not supported by the FCP adapter hardware.
3635 + * If the requested version is higher than the highest version supported by the
3636 + * hardware, install more recent firmware on the FCP adapter. If the requested
3637 + * version is lower then the lowest version supported by the hardware, upgrade
3638 + * to a Linux level with a more recent zfcp device driver.
3642 + * Text: "%s: The FCP adapter could not log in to the fibre channel fabric\n"
3643 + * Severity: Warning
3645 + * @1: bus ID of the zfcp device
3647 + * The fibre channel switch rejected the login request from the FCP adapter.
3649 + * Check the fibre channel fabric or switch logs for possible errors.
3653 + * Text: "%s: The FCP device is suspended because of a firmware update\n"
3654 + * Severity: Warning
3656 + * @1: bus ID of the zfcp device
3658 + * The FCP device is not available while a firmware update is in progress. This
3659 + * problem is temporary. The FCP device will resume operations when the
3660 + * firmware update is completed.
3662 + * Wait 10 seconds and try the operation again.
3666 + * Text: "%s: All NPIV ports on the FCP adapter have been assigned\n"
3667 + * Severity: Warning
3669 + * @1: bus ID of the zfcp device
3671 + * The number of N_Port ID Virtualization (NPIV) ports that can be assigned
3672 + * on an FCP adapter is limited. Once assigned, NPIV ports are not released
3673 + * automatically but have to be released explicitly through the support
3676 + * Identify NPIV ports that have been assigned but are no longer in use and
3677 + * release them from the SE.
3681 + * Text: "%s: The link between the FCP adapter and the FC fabric is down\n"
3682 + * Severity: Warning
3684 + * @1: bus ID of the zfcp device
3686 + * The FCP adapter is not usable. Specific error information is not available.
3688 + * Check the cabling and the fibre channel fabric configuration. If this
3689 + * problem persists, gather Linux debug data, collect the FCP adapter
3690 + * hardware logs, and report the problem to your support organization.
3694 + * Text: "%s: Access denied to port 0x%016Lx\n"
3695 + * Severity: Warning
3697 + * @1: bus ID of the zfcp device
3700 + * The Linux system is not allowed to access the remote port with the specified
3703 + * Update the access control table of the FCP device to grant the Linux
3704 + * system access to the WWPN or remove the WWPN from the Linux system.
3708 + * Text: "%s: The QTCB type is not supported by the FCP adapter\n"
3711 + * @1: bus ID of the zfcp device
3713 + * The queue transfer control block (QTCB) type requested by the zfcp device
3714 + * driver is not supported by the FCP adapter hardware.
3716 + * Install the latest firmware on your FCP adapter hardware. If this does not
3717 + * resolve the problem, upgrade to a Linux level with a more recent zfcp device
3718 + * driver. If the problem persists, contact your support organization.
3722 + * Text: "%s: The error threshold for checksum statistics has been exceeded\n"
3723 + * Severity: Warning
3725 + * @1: bus ID of the zfcp device
3727 + * The FCP adapter has reported a large number of bit errors. This might
3728 + * indicate a problem with the physical components of the fibre channel fabric.
3729 + * Details about the errors have been written to the HBA trace for the FCP
3732 + * Check for problems in the fibre channel fabric and ensure that all cables
3733 + * are properly plugged.
3737 + * Text: "%s: The local link has been restored\n"
3738 + * Severity: Informational
3740 + * @1: bus ID of the zfcp device
3742 + * A problem with the connection between the FCP adapter and the adjacent node
3743 + * on the fibre channel fabric has been resolved. The FCP adapter is now
3744 + * available again.
3750 + * Text: "%s: Access denied according to ACT rule type %s, rule %d\n"
3751 + * Severity: Warning
3753 + * @1: bus ID of the zfcp device
3754 + * @2: access rule type
3757 + * A rule in the access control table (ACT) for the FCP device denies access
3758 + * to a remote port or a LUN.
3760 + * Examine the access control tables for the FCP device to see if the
3761 + * specified rule is correct.
3765 + * Text: "%s: The mode table on the FCP adapter has been damaged\n"
3766 + * Severity: Warning
3768 + * @1: bus ID of the zfcp device
3770 + * This is an FCP adapter hardware problem.
3772 + * Report this problem with FCP hardware logs to IBM support.
3776 + * Text: "%s: The adjacent fibre channel node does not support FCP\n"
3777 + * Severity: Warning
3779 + * @1: bus ID of the zfcp device
3781 + * The fibre channel switch or storage system that is connected to the FCP
3782 + * channel does not support the fibre channel protocol (FCP). The zfcp
3783 + * device driver stopped using the FCP device.
3785 + * Check the adjacent fibre channel node.
3789 + * Text: "%s: The FCP adapter does not recognize the command 0x%x\n"
3792 + * @1: bus ID of the zfcp device
3795 + * A command code that was sent from the zfcp device driver to the FCP adapter
3796 + * is not valid. The zfcp device driver stopped using the FCP device.
3798 + * Gather Linux debug data, collect the FCP adapter hardware logs, and report
3799 + * this problem to your support organization.
3803 + * Text: "%s: There is no light signal from the local fibre channel cable\n"
3804 + * Severity: Warning
3806 + * @1: bus ID of the zfcp device
3808 + * There is no signal on the fibre channel cable that connects the FCP adapter
3809 + * to the fibre channel fabric.
3811 + * Ensure that the cable is in place and connected properly to the FCP adapter
3812 + * and to the adjacent fibre channel switch or storage system.
3816 + * Text: "%s: The WWPN assignment file on the FCP adapter has been damaged\n"
3817 + * Severity: Warning
3819 + * @1: bus ID of the zfcp device
3821 + * This is an FCP adapter hardware problem.
3823 + * Report this problem with FCP hardware logs to IBM support.
3827 + * Text: "%s: The FCP device detected a WWPN that is duplicate or not valid\n"
3828 + * Severity: Warning
3830 + * @1: bus ID of the zfcp device
3832 + * This condition indicates an error in the FCP adapter hardware or in the z/VM
3835 + * Gather Linux debug data, collect the FCP adapter hardware logs, and report
3836 + * this problem to IBM support.
3840 + * Text: "%s: The fibre channel fabric does not support NPIV\n"
3841 + * Severity: Warning
3843 + * @1: bus ID of the zfcp device
3845 + * The FCP adapter requires N_Port ID Virtualization (NPIV) from the adjacent
3846 + * fibre channel node. Either the FCP adapter is connected to a fibre channel
3847 + * switch that does not support NPIV or the FCP adapter tries to use NPIV in a
3848 + * point-to-point setup. The connection is not operational.
3850 + * Verify that NPIV is correctly used for this connection. Check the FCP adapter
3851 + * configuration and the fibre channel switch configuration. If necessary,
3852 + * update the fibre channel switch firmware.
3856 + * Text: "%s: The FCP adapter cannot support more NPIV ports\n"
3857 + * Severity: Warning
3859 + * @1: bus ID of the zfcp device
3861 + * N_Port ID Virtualization (NPIV) ports consume physical resources on the FCP
3862 + * adapter. The FCP adapter resources are exhausted. The connection is not
3865 + * Analyze the number of available NPIV ports and which operating system
3866 + * instances use them. If necessary, reconfigure your setup to move some
3867 + * NPIV ports to an FCP adapter with free resources.
3871 + * Text: "%s: The adjacent switch cannot support more NPIV ports\n"
3872 + * Severity: Warning
3874 + * @1: bus ID of the zfcp device
3876 + * N_Port ID Virtualization (NPIV) ports consume physical resources. The
3877 + * resources of the fibre channel switch that is connected to the FCP adapter
3878 + * are exhausted. The connection is not operational.
3880 + * Analyze the number of available NPIV ports on the adjacent fibre channel
3881 + * switch and how they are used. If necessary, reconfigure your fibre channel
3882 + * fabric to accommodate the required NPIV ports.
3886 + * Text: "%s: 0x%x is not a valid transfer protocol status\n"
3889 + * @1: bus ID of the zfcp device
3890 + * @2: status information
3892 + * The transfer protocol status information reported by the FCP adapter is not
3893 + * a valid status for the zfcp device driver. The zfcp device driver stopped
3894 + * using the FCP device.
3896 + * Gather Linux debug data, collect the FCP adapter hardware logs, and report
3897 + * this problem to your support organization.
3901 + * Text: "%s: Unknown or unsupported arbitrated loop fibre channel topology detected\n"
3904 + * @1: bus ID of the zfcp device
3906 + * The FCP device is connected to a fibre channel arbitrated loop or the FCP adapter
3907 + * reported an unknown fibre channel topology. The zfcp device driver supports
3908 + * point-to-point connections and switched fibre channel fabrics but not arbitrated
3909 + * loop topologies. The FCP device cannot be used.
3911 + * Check the fibre channel setup and ensure that only supported topologies are
3912 + * connected to the FCP adapter.
3916 + * Text: "%s: FCP adapter maximum QTCB size (%d bytes) is too small\n"
3919 + * @1: bus ID of the zfcp device
3920 + * @2: maximum supported size
3921 + * @3: requested QTCB size
3923 + * The queue transfer control block (QTCB) size requested by the zfcp
3924 + * device driver is not supported by the FCP adapter hardware.
3926 + * Update the firmware on your FCP adapter hardware to the latest
3927 + * available level and update the Linux kernel to the latest supported
3928 + * level. If the problem persists, contact your support organization.
3932 + * Text: "%s: The FCP adapter only supports newer control block versions\n"
3935 + * @1: bus ID of the zfcp device
3937 + * The protocol supported by the FCP adapter is not compatible with the zfcp
3940 + * Upgrade your Linux kernel to a level that includes a zfcp device driver
3941 + * with support for the control block version required by your FCP adapter.
3945 + * Text: "%s: The FCP adapter only supports older control block versions\n"
3948 + * @1: bus ID of the zfcp device
3950 + * The protocol supported by the FCP adapter is not compatible with the zfcp
3953 + * Install the latest firmware on your FCP adapter.
3957 + * Text: "%s: Not enough FCP adapter resources to open remote port 0x%016Lx\n"
3958 + * Severity: Warning
3960 + * @1: bus ID of the zfcp device
3963 + * Each port that is opened consumes physical resources of the FCP adapter to
3964 + * which it is attached. These resources are exhausted and the specified port
3965 + * cannot be opened.
3967 + * Reduce the total number of remote ports that are attached to the
3972 + * Text: "%s: Remote port 0x%016Lx could not be opened\n"
3973 + * Severity: Warning
3975 + * @1: bus ID of the zfcp device
3978 + * The FCP adapter rejected a request to open the specified port. No retry
3981 + * Verify the setup and try removing and adding the port again. If this
3982 + * problem persists, gather Linux debug data, collect the FCP adapter
3983 + * hardware logs, and report the problem to your support organization.
3987 + * Text: "%s: LUN 0x%Lx on port 0x%Lx is already in use by CSS%d, MIF Image ID %x\n"
3988 + * Severity: Warning
3990 + * @1: bus ID of the zfcp device
3992 + * @3: remote port WWPN
3993 + * @4: channel subsystem ID
3994 + * @5: MIF Image ID of the LPAR
3996 + * The SCSI device at the indicated LUN is already in use by another system.
3997 + * Only one system at a time can use the SCSI device.
3999 + * Ensure that the other system stops using the device before trying to use it.
4003 + * Text: "%s: No handle is available for LUN 0x%016Lx on port 0x%016Lx\n"
4004 + * Severity: Warning
4006 + * @1: bus ID of the zfcp device
4010 + * The FCP adapter can only open a limited number of SCSI devices. This limit
4011 + * has been reached and the SCSI device at the indicated LUN cannot be opened.
4013 + * Check all SCSI devices opened through the FCP adapter and close some of them.
4017 + * Text: "%s: SCSI device at LUN 0x%016Lx on port 0x%016Lx opened read-only\n"
4018 + * Severity: Informational
4020 + * @1: bus ID of the zfcp device
4024 + * The access control tables in the FCP adapter allow read-only access for the
4025 + * LUN. Write access is not permitted for your Linux instance. The SCSI
4026 + * device has been opened successfully in read-only access mode.
4028 + * None if read-only access is sufficient. If you require write access, change
4029 + * the access control tables in the FCP adapter.
4033 + * Text: "%s: Exclusive read-only access not supported (unit 0x%016Lx, port 0x%016Lx)\n"
4036 + * @1: bus ID of the zfcp device
4040 + * The access configuration specified in the access control tables of the FCP
4041 + * adapter is not valid. The SCSI device at the indicated LUN cannot be
4044 + * Change the access control tables in the FCP adapter.
4048 + * Text: "%s: Shared read-write access not supported (unit 0x%016Lx, port 0x%016Lx\n)"
4051 + * @1: bus ID of the zfcp device
4055 + * The access configuration specified in the access control tables of the FCP
4056 + * adapter is not valid. The SCSI device at the indicated LUN cannot be
4059 + * Change the access control tables in the FCP adapter.
4063 + * Text: "%s: Incorrect direction %d, unit 0x%016Lx on port 0x%016Lx closed\n"
4066 + * @1: bus ID of the zfcp device
4067 + * @2: value in direction field
4071 + * The direction field in a SCSI request contains an incorrect value. The zfcp
4072 + * device driver closed down the SCSI device at the indicated LUN.
4074 + * Gather Linux debug data and report this problem to your support organization.
4078 + * Text: "%s: Incorrect CDB length %d, unit 0x%016Lx on port 0x%016Lx closed\n"
4081 + * @1: bus ID of the zfcp device
4082 + * @2: value in length field
4086 + * The control-data-block (CDB) length field in a SCSI request is not valid or
4087 + * too large for the FCP adapter. The zfcp device driver closed down the SCSI
4088 + * device at the indicated LUN.
4090 + * Gather Linux debug data and report this problem to your support organization.
4094 + * Text: "%s: Oversize data package, unit 0x%016Lx on port 0x%016Lx closed\n"
4097 + * @1: bus ID of the zfcp device
4101 + * A SCSI request with too much data has been sent to the SCSI device at the
4102 + * indicated LUN. The FCP adapter cannot handle data packets of this size and
4103 + * the SCSI device driver closed down the SCSI device.
4105 + * Gather Linux debug data and report this problem to your support organization.
4109 + * Text: "%s: Opening WKA port 0x%x failed\n"
4110 + * Severity: Warning
4112 + * @1: bus ID of the zfcp device
4113 + * @2: destination ID of the WKA port
4115 + * The FCP adapter rejected a request to open the specified
4116 + * well-known address (WKA) port. No retry is possible.
4118 + * Verify the setup and check if the maximum number of remote ports
4119 + * used through this adapter is below the maximum allowed. If the
4120 + * problem persists, gather Linux debug data, collect the FCP adapter
4121 + * hardware logs, and report the problem to your support organization.
4125 @@ -63,6 +63,20 @@ ifndef KBUILD_CHECKSRC
4129 +# Call message checker as part of the C compilation
4131 +# Use 'make D=1' to enable checking
4132 +# Use 'make D=2' to create the message catalog
4135 + ifeq ("$(origin D)", "command line")
4136 + KBUILD_KMSG_CHECK = $(D)
4139 +ifndef KBUILD_KMSG_CHECK
4140 + KBUILD_KMSG_CHECK = 0
4143 # Use make M=dir to specify directory of external module to build
4144 # Old syntax make ... SUBDIRS=$PWD is still supported
4145 # Setting the environment variable KBUILD_EXTMOD take precedence
4146 @@ -321,6 +335,7 @@ PERL = perl
4149 CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise $(CF)
4150 +KMSG_CHECK = $(srctree)/scripts/kmsg-doc
4152 CFLAGS_MODULE = $(MODFLAGS)
4153 AFLAGS_MODULE = $(MODFLAGS)
4154 @@ -361,6 +376,7 @@ export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODU
4155 export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
4156 export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
4157 export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
4158 +export KBUILD_KMSG_CHECK KMSG_CHECK
4160 # When compiling out-of-tree modules, put MODVERDIR in the module
4161 # tree rather than in the kernel tree. The kernel tree might
4162 --- a/arch/s390/Kconfig
4163 +++ b/arch/s390/Kconfig
4164 @@ -572,6 +572,15 @@ bool "s390 guest support (EXPERIMENTAL)"
4165 select VIRTIO_CONSOLE
4167 Select this option if you want to run the kernel under s390 linux
4170 + bool "Kernel message numbers"
4173 + Select this option if you want to include a message number to the
4174 + prefix for kernel messages issued by the s390 architecture and
4175 + driver code. See "Documentation/s390/kmsg.txt" for more details.
4179 source "net/Kconfig"
4180 --- a/arch/s390/appldata/appldata.h
4181 +++ b/arch/s390/appldata/appldata.h
4183 #define CTL_APPLDATA_NET_SUM 2125
4184 #define CTL_APPLDATA_PROC 2126
4186 -#define P_INFO(x...) printk(KERN_INFO MY_PRINT_NAME " info: " x)
4187 -#define P_ERROR(x...) printk(KERN_ERR MY_PRINT_NAME " error: " x)
4188 -#define P_WARNING(x...) printk(KERN_WARNING MY_PRINT_NAME " status: " x)
4190 struct appldata_ops {
4191 struct list_head list;
4192 struct ctl_table_header *sysctl_header;
4193 --- a/arch/s390/appldata/appldata_base.c
4194 +++ b/arch/s390/appldata/appldata_base.c
4196 * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
4199 +#define KMSG_COMPONENT "appldata"
4201 #include <linux/module.h>
4202 #include <linux/init.h>
4203 #include <linux/slab.h>
4205 #include "appldata.h"
4208 -#define MY_PRINT_NAME "appldata" /* for debug messages, etc. */
4209 #define APPLDATA_CPU_INTERVAL 10000 /* default (CPU) time for
4210 sampling interval in
4212 @@ -390,8 +391,8 @@ appldata_generic_handler(ctl_table *ctl,
4213 (unsigned long) ops->data, ops->size,
4216 - P_ERROR("START DIAG 0xDC for %s failed, "
4217 - "return code: %d\n", ops->name, rc);
4218 + pr_err("Starting the data collection for %s "
4219 + "failed with rc=%d\n", ops->name, rc);
4220 module_put(ops->owner);
4223 @@ -401,8 +402,8 @@ appldata_generic_handler(ctl_table *ctl,
4224 (unsigned long) ops->data, ops->size,
4227 - P_ERROR("STOP DIAG 0xDC for %s failed, "
4228 - "return code: %d\n", ops->name, rc);
4229 + pr_err("Stopping the data collection for %s "
4230 + "failed with rc=%d\n", ops->name, rc);
4231 module_put(ops->owner);
4233 spin_unlock(&appldata_ops_lock);
4234 --- a/arch/s390/appldata/appldata_os.c
4235 +++ b/arch/s390/appldata/appldata_os.c
4237 * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
4240 +#define KMSG_COMPONENT "appldata"
4242 #include <linux/module.h>
4243 #include <linux/init.h>
4244 #include <linux/slab.h>
4246 #include "appldata.h"
4249 -#define MY_PRINT_NAME "appldata_os" /* for debug messages, etc. */
4250 #define LOAD_INT(x) ((x) >> FSHIFT)
4251 #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
4253 @@ -143,21 +144,16 @@ static void appldata_get_os_data(void *d
4254 (unsigned long) ops.data, new_size,
4257 - P_ERROR("os: START NEW DIAG 0xDC failed, "
4258 - "return code: %d, new size = %i\n", rc,
4260 + pr_err("Starting a new OS data collection "
4261 + "failed with rc=%d\n", rc);
4263 rc = appldata_diag(APPLDATA_RECORD_OS_ID,
4265 (unsigned long) ops.data, ops.size,
4268 - P_ERROR("os: STOP OLD DIAG 0xDC failed, "
4269 - "return code: %d, old size = %i\n", rc,
4272 - P_INFO("os: old record size = %i stopped\n",
4274 + pr_err("Stopping a faulty OS data "
4275 + "collection failed with rc=%d\n", rc);
4277 ops.size = new_size;
4279 @@ -178,8 +174,8 @@ static int __init appldata_os_init(void)
4280 max_size = sizeof(struct appldata_os_data) +
4281 (NR_CPUS * sizeof(struct appldata_os_per_cpu));
4282 if (max_size > APPLDATA_MAX_REC_SIZE) {
4283 - P_ERROR("Max. size of OS record = %i, bigger than maximum "
4284 - "record size (%i)\n", max_size, APPLDATA_MAX_REC_SIZE);
4285 + pr_err("Maximum OS record size %i exceeds the maximum "
4286 + "record size %i\n", max_size, APPLDATA_MAX_REC_SIZE);
4290 --- a/arch/s390/crypto/aes_s390.c
4291 +++ b/arch/s390/crypto/aes_s390.c
4296 +#define KMSG_COMPONENT "aes_s390"
4298 #include <crypto/aes.h>
4299 #include <crypto/algapi.h>
4300 #include <linux/err.h>
4301 @@ -169,7 +171,8 @@ static int fallback_init_cip(struct cryp
4302 CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK);
4304 if (IS_ERR(sctx->fallback.cip)) {
4305 - printk(KERN_ERR "Error allocating fallback algo %s\n", name);
4306 + pr_err("Allocating AES fallback algorithm %s failed\n",
4308 return PTR_ERR(sctx->fallback.blk);
4311 @@ -349,7 +352,8 @@ static int fallback_init_blk(struct cryp
4312 CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK);
4314 if (IS_ERR(sctx->fallback.blk)) {
4315 - printk(KERN_ERR "Error allocating fallback algo %s\n", name);
4316 + pr_err("Allocating AES fallback algorithm %s failed\n",
4318 return PTR_ERR(sctx->fallback.blk);
4321 @@ -515,9 +519,8 @@ static int __init aes_s390_init(void)
4323 /* z9 109 and z9 BC/EC only support 128 bit key length */
4324 if (keylen_flag == AES_KEYLEN_128)
4326 - "aes_s390: hardware acceleration only available for "
4327 - "128 bit keys\n");
4328 + pr_info("AES hardware acceleration is only available for"
4329 + " 128-bit keys\n");
4331 ret = crypto_register_alg(&aes_alg);
4333 --- a/arch/s390/hypfs/hypfs_diag.c
4334 +++ b/arch/s390/hypfs/hypfs_diag.c
4336 * Hypervisor filesystem for Linux on s390. Diag 204 and 224
4339 - * Copyright (C) IBM Corp. 2006
4340 + * Copyright IBM Corp. 2006, 2008
4341 * Author(s): Michael Holzheu <holzheu@de.ibm.com>
4344 +#define KMSG_COMPONENT "hypfs"
4346 #include <linux/types.h>
4347 #include <linux/errno.h>
4348 #include <linux/string.h>
4349 @@ -527,13 +529,14 @@ __init int hypfs_diag_init(void)
4352 if (diag204_probe()) {
4353 - printk(KERN_ERR "hypfs: diag 204 not working.");
4354 + pr_err("The hardware system does not support hypfs\n");
4357 rc = diag224_get_name_table();
4359 diag204_free_buffer();
4360 - printk(KERN_ERR "hypfs: could not get name table.\n");
4361 + pr_err("The hardware system does not provide all "
4362 + "functions required by hypfs\n");
4366 --- a/arch/s390/hypfs/inode.c
4367 +++ b/arch/s390/hypfs/inode.c
4369 * arch/s390/hypfs/inode.c
4370 * Hypervisor filesystem for Linux on s390.
4372 - * Copyright (C) IBM Corp. 2006
4373 + * Copyright IBM Corp. 2006, 2008
4374 * Author(s): Michael Holzheu <holzheu@de.ibm.com>
4377 +#define KMSG_COMPONENT "hypfs"
4379 #include <linux/types.h>
4380 #include <linux/errno.h>
4381 #include <linux/fs.h>
4382 @@ -200,7 +202,7 @@ static ssize_t hypfs_aio_write(struct ki
4384 rc = hypfs_diag_create_files(sb, sb->s_root);
4386 - printk(KERN_ERR "hypfs: Update failed\n");
4387 + pr_err("Updating the hypfs tree failed\n");
4388 hypfs_delete_tree(sb->s_root);
4391 @@ -252,8 +254,7 @@ static int hypfs_parse_options(char *opt
4395 - printk(KERN_ERR "hypfs: Unrecognized mount option "
4396 - "\"%s\" or missing value\n", str);
4397 + pr_err("%s is not a valid mount option\n", str);
4401 @@ -317,7 +318,7 @@ static int hypfs_fill_super(struct super
4403 hypfs_update_update(sb);
4404 sb->s_root = root_dentry;
4405 - printk(KERN_INFO "hypfs: Hypervisor filesystem mounted\n");
4406 + pr_info("Hypervisor filesystem mounted\n");
4410 @@ -513,7 +514,7 @@ fail_sysfs:
4414 - printk(KERN_ERR "hypfs: Initialization failed with rc = %i.\n", rc);
4415 + pr_err("Initialization of hypfs failed with rc=%i\n", rc);
4419 --- a/arch/s390/kernel/Makefile
4420 +++ b/arch/s390/kernel/Makefile
4421 @@ -12,8 +12,8 @@ CFLAGS_smp.o := -Wno-nonnull
4423 CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
4425 -obj-y := bitmap.o traps.o time.o process.o base.o early.o \
4426 - setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \
4427 +obj-y := bitmap.o traps.o time.o process.o base.o early.o setup.o \
4428 + processor.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \
4429 s390_ext.o debug.o irq.o ipl.o dis.o diag.o mem_detect.o
4431 obj-y += $(if $(CONFIG_64BIT),entry64.o,entry.o)
4432 --- a/arch/s390/kernel/cpcmd.c
4433 +++ b/arch/s390/kernel/cpcmd.c
4435 * Christian Borntraeger (cborntra@de.ibm.com),
4438 +#define KMSG_COMPONENT "cpcmd"
4440 #include <linux/kernel.h>
4441 #include <linux/module.h>
4442 #include <linux/slab.h>
4443 @@ -104,8 +106,8 @@ int cpcmd(const char *cmd, char *respons
4444 (((unsigned long)response + rlen) >> 31)) {
4445 lowbuf = kmalloc(rlen, GFP_KERNEL | GFP_DMA);
4447 - printk(KERN_WARNING
4448 - "cpcmd: could not allocate response buffer\n");
4449 + pr_warning("The cpcmd kernel function failed to "
4450 + "allocate a response buffer\n");
4453 spin_lock_irqsave(&cpcmd_lock, flags);
4454 --- a/arch/s390/kernel/debug.c
4455 +++ b/arch/s390/kernel/debug.c
4457 * Bugreports to: <Linux390@de.ibm.com>
4460 +#define KMSG_COMPONENT "s390dbf"
4462 #include <linux/stddef.h>
4463 #include <linux/kernel.h>
4464 #include <linux/errno.h>
4465 @@ -693,8 +695,8 @@ debug_info_t *debug_register_mode(const
4466 /* Since debugfs currently does not support uid/gid other than root, */
4467 /* we do not allow gid/uid != 0 until we get support for that. */
4468 if ((uid != 0) || (gid != 0))
4469 - printk(KERN_WARNING "debug: Warning - Currently only uid/gid "
4470 - "= 0 are supported. Using root as owner now!");
4471 + pr_warning("Root becomes the owner of all s390dbf files "
4475 mutex_lock(&debug_mutex);
4476 @@ -709,7 +711,7 @@ debug_info_t *debug_register_mode(const
4477 debug_register_view(rc, &debug_pages_view);
4480 - printk(KERN_ERR "debug: debug_register failed for %s\n",name);
4481 + pr_err("Registering debug feature %s failed\n", name);
4483 mutex_unlock(&debug_mutex);
4485 @@ -763,8 +765,8 @@ debug_set_size(debug_info_t* id, int nr_
4486 if(pages_per_area > 0){
4487 new_areas = debug_areas_alloc(pages_per_area, nr_areas);
4489 - printk(KERN_WARNING "debug: could not allocate memory "\
4490 - "for pagenumber: %i\n",pages_per_area);
4491 + pr_info("Allocating memory for %i pages failed\n",
4496 @@ -780,8 +782,7 @@ debug_set_size(debug_info_t* id, int nr_
4497 memset(id->active_entries,0,sizeof(int)*id->nr_areas);
4498 memset(id->active_pages, 0, sizeof(int)*id->nr_areas);
4499 spin_unlock_irqrestore(&id->lock,flags);
4500 - printk(KERN_INFO "debug: %s: set new size (%i pages)\n"\
4501 - ,id->name, pages_per_area);
4502 + pr_info("%s: set new size (%i pages)\n" ,id->name, pages_per_area);
4506 @@ -800,10 +801,9 @@ debug_set_level(debug_info_t* id, int ne
4507 spin_lock_irqsave(&id->lock,flags);
4508 if(new_level == DEBUG_OFF_LEVEL){
4509 id->level = DEBUG_OFF_LEVEL;
4510 - printk(KERN_INFO "debug: %s: switched off\n",id->name);
4511 + pr_info("%s: switched off\n",id->name);
4512 } else if ((new_level > DEBUG_MAX_LEVEL) || (new_level < 0)) {
4514 - "debug: %s: level %i is out of range (%i - %i)\n",
4515 + pr_info("%s: level %i is out of range (%i - %i)\n",
4516 id->name, new_level, 0, DEBUG_MAX_LEVEL);
4518 id->level = new_level;
4519 @@ -1108,8 +1108,8 @@ debug_register_view(debug_info_t * id, s
4520 pde = debugfs_create_file(view->name, mode, id->debugfs_root_entry,
4521 id , &debug_file_ops);
4523 - printk(KERN_WARNING "debug: debugfs_create_file() failed!"\
4524 - " Cannot register view %s/%s\n", id->name,view->name);
4525 + pr_err("Registering view %s/%s failed due to out of "
4526 + "memory\n", id->name,view->name);
4530 @@ -1119,10 +1119,8 @@ debug_register_view(debug_info_t * id, s
4533 if (i == DEBUG_MAX_VIEWS) {
4534 - printk(KERN_WARNING "debug: cannot register view %s/%s\n",
4535 - id->name,view->name);
4536 - printk(KERN_WARNING
4537 - "debug: maximum number of views reached (%i)!\n", i);
4538 + pr_err("Registering view %s/%s would exceed the maximum "
4539 + "number of views %i\n", id->name, view->name, i);
4540 debugfs_remove(pde);
4543 @@ -1303,7 +1301,8 @@ debug_input_level_fn(debug_info_t * id,
4544 new_level = debug_get_uint(str);
4547 - printk(KERN_INFO "debug: level `%s` is not valid\n", str);
4548 + pr_warning("%s is not a valid level for a debug "
4549 + "feature\n", str);
4552 debug_set_level(id, new_level);
4553 @@ -1380,7 +1379,8 @@ debug_input_flush_fn(debug_info_t * id,
4557 - printk(KERN_INFO "debug: area `%c` is not valid\n", input_buf[0]);
4558 + pr_info("Flushing debug data failed because %c is not a valid "
4559 + "area\n", input_buf[0]);
4562 *offset += user_len;
4564 +++ b/arch/s390/kernel/processor.c
4567 + * arch/s390/kernel/processor.c
4569 + * Copyright IBM Corp. 2008
4570 + * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
4573 +#define KMSG_COMPONENT "cpu"
4575 +#include <linux/kernel.h>
4576 +#include <linux/init.h>
4577 +#include <linux/smp.h>
4578 +#include <linux/seq_file.h>
4579 +#include <linux/delay.h>
4581 +#include <asm/elf.h>
4582 +#include <asm/lowcore.h>
4583 +#include <asm/param.h>
4585 +void __cpuinit print_cpu_info(struct cpuinfo_S390 *cpuinfo)
4587 + pr_info("Processor %d started, address %d, identification %06X\n",
4588 + cpuinfo->cpu_nr, cpuinfo->cpu_addr, cpuinfo->cpu_id.ident);
4592 + * show_cpuinfo - Get information on one CPU for use by procfs.
4595 +static int show_cpuinfo(struct seq_file *m, void *v)
4597 + static const char *hwcap_str[8] = {
4598 + "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp",
4601 + struct cpuinfo_S390 *cpuinfo;
4602 + unsigned long n = (unsigned long) v - 1;
4605 + s390_adjust_jiffies();
4606 + preempt_disable();
4608 + seq_printf(m, "vendor_id : IBM/S390\n"
4609 + "# processors : %i\n"
4610 + "bogomips per cpu: %lu.%02lu\n",
4611 + num_online_cpus(), loops_per_jiffy/(500000/HZ),
4612 + (loops_per_jiffy/(5000/HZ))%100);
4613 + seq_puts(m, "features\t: ");
4614 + for (i = 0; i < 8; i++)
4615 + if (hwcap_str[i] && (elf_hwcap & (1UL << i)))
4616 + seq_printf(m, "%s ", hwcap_str[i]);
4617 + seq_puts(m, "\n");
4620 + if (cpu_online(n)) {
4622 + if (smp_processor_id() == n)
4623 + cpuinfo = &S390_lowcore.cpu_data;
4625 + cpuinfo = &lowcore_ptr[n]->cpu_data;
4627 + cpuinfo = &S390_lowcore.cpu_data;
4629 + seq_printf(m, "processor %li: "
4630 + "version = %02X, "
4631 + "identification = %06X, "
4632 + "machine = %04X\n",
4633 + n, cpuinfo->cpu_id.version,
4634 + cpuinfo->cpu_id.ident,
4635 + cpuinfo->cpu_id.machine);
4641 +static void *c_start(struct seq_file *m, loff_t *pos)
4643 + return *pos < NR_CPUS ? (void *)((unsigned long) *pos + 1) : NULL;
4646 +static void *c_next(struct seq_file *m, void *v, loff_t *pos)
4649 + return c_start(m, pos);
4652 +static void c_stop(struct seq_file *m, void *v)
4656 +const struct seq_operations cpuinfo_op = {
4660 + .show = show_cpuinfo,
4663 --- a/arch/s390/kernel/setup.c
4664 +++ b/arch/s390/kernel/setup.c
4666 * This file handles the architecture-dependent parts of initialization
4669 +#define KMSG_COMPONENT "setup"
4671 #include <linux/errno.h>
4672 #include <linux/module.h>
4673 #include <linux/sched.h>
4675 #include <linux/bootmem.h>
4676 #include <linux/root_dev.h>
4677 #include <linux/console.h>
4678 -#include <linux/seq_file.h>
4679 #include <linux/kernel_stat.h>
4680 #include <linux/device.h>
4681 #include <linux/notifier.h>
4682 @@ -291,8 +292,8 @@ unsigned int switch_amode = 0;
4684 EXPORT_SYMBOL_GPL(switch_amode);
4686 -static void set_amode_and_uaccess(unsigned long user_amode,
4687 - unsigned long user32_amode)
4688 +static int set_amode_and_uaccess(unsigned long user_amode,
4689 + unsigned long user32_amode)
4691 psw_user_bits = PSW_BASE_BITS | PSW_MASK_DAT | user_amode |
4692 PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK |
4693 @@ -309,11 +310,11 @@ static void set_amode_and_uaccess(unsign
4694 PSW_MASK_MCHECK | PSW_DEFAULT_KEY;
4696 if (MACHINE_HAS_MVCOS) {
4697 - printk("mvcos available.\n");
4698 memcpy(&uaccess, &uaccess_mvcos_switch, sizeof(uaccess));
4701 - printk("mvcos not available.\n");
4702 memcpy(&uaccess, &uaccess_pt, sizeof(uaccess));
4707 @@ -328,9 +329,10 @@ static int __init early_parse_switch_amo
4708 early_param("switch_amode", early_parse_switch_amode);
4710 #else /* CONFIG_S390_SWITCH_AMODE */
4711 -static inline void set_amode_and_uaccess(unsigned long user_amode,
4712 - unsigned long user32_amode)
4713 +static inline int set_amode_and_uaccess(unsigned long user_amode,
4714 + unsigned long user32_amode)
4718 #endif /* CONFIG_S390_SWITCH_AMODE */
4720 @@ -355,11 +357,20 @@ early_param("noexec", early_parse_noexec
4721 static void setup_addressing_mode(void)
4724 - printk("S390 execute protection active, ");
4725 - set_amode_and_uaccess(PSW_ASC_SECONDARY, PSW32_ASC_SECONDARY);
4726 + if (set_amode_and_uaccess(PSW_ASC_SECONDARY,
4727 + PSW32_ASC_SECONDARY))
4728 + pr_info("Execute protection active, "
4729 + "mvcos available\n");
4731 + pr_info("Execute protection active, "
4732 + "mvcos not available\n");
4733 } else if (switch_amode) {
4734 - printk("S390 address spaces switched, ");
4735 - set_amode_and_uaccess(PSW_ASC_PRIMARY, PSW32_ASC_PRIMARY);
4736 + if (set_amode_and_uaccess(PSW_ASC_PRIMARY, PSW32_ASC_PRIMARY))
4737 + pr_info("Address spaces switched, "
4738 + "mvcos available\n");
4740 + pr_info("Address spaces switched, "
4741 + "mvcos not available\n");
4743 #ifdef CONFIG_TRACE_IRQFLAGS
4744 sysc_restore_trace_psw.mask = psw_kernel_bits & ~PSW_MASK_MCHECK;
4745 @@ -572,15 +583,15 @@ setup_memory(void)
4746 start = PFN_PHYS(start_pfn) + bmap_size + PAGE_SIZE;
4748 if (start + INITRD_SIZE > memory_end) {
4749 - printk("initrd extends beyond end of memory "
4750 - "(0x%08lx > 0x%08lx)\n"
4751 + pr_err("initrd extends beyond end of "
4752 + "memory (0x%08lx > 0x%08lx) "
4753 "disabling initrd\n",
4754 start + INITRD_SIZE, memory_end);
4755 INITRD_START = INITRD_SIZE = 0;
4757 - printk("Moving initrd (0x%08lx -> 0x%08lx, "
4759 - INITRD_START, start, INITRD_SIZE);
4760 + pr_info("Moving initrd (0x%08lx -> "
4761 + "0x%08lx, size: %ld)\n",
4762 + INITRD_START, start, INITRD_SIZE);
4763 memmove((void *) start, (void *) INITRD_START,
4765 INITRD_START = start;
4766 @@ -642,8 +653,9 @@ setup_memory(void)
4767 initrd_start = INITRD_START;
4768 initrd_end = initrd_start + INITRD_SIZE;
4770 - printk("initrd extends beyond end of memory "
4771 - "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
4772 + pr_err("initrd extends beyond end of "
4773 + "memory (0x%08lx > 0x%08lx) "
4774 + "disabling initrd\n",
4775 initrd_start + INITRD_SIZE, memory_end);
4776 initrd_start = initrd_end = 0;
4778 @@ -756,21 +768,27 @@ setup_arch(char **cmdline_p)
4779 * print what head.S has found out about the machine
4781 #ifndef CONFIG_64BIT
4782 - printk((MACHINE_IS_VM) ?
4783 - "We are running under VM (31 bit mode)\n" :
4784 - "We are running native (31 bit mode)\n");
4785 - printk((MACHINE_HAS_IEEE) ?
4786 - "This machine has an IEEE fpu\n" :
4787 - "This machine has no IEEE fpu\n");
4788 + if (MACHINE_IS_VM)
4789 + pr_info("Linux is running as a z/VM "
4790 + "guest operating system in 31-bit mode\n");
4792 + pr_info("Linux is running natively in 31-bit mode\n");
4793 + if (MACHINE_HAS_IEEE)
4794 + pr_info("The hardware system has IEEE compatible "
4795 + "floating point units\n");
4797 + pr_info("The hardware system has no IEEE compatible "
4798 + "floating point units\n");
4799 #else /* CONFIG_64BIT */
4801 - printk("We are running under VM (64 bit mode)\n");
4802 + pr_info("Linux is running as a z/VM "
4803 + "guest operating system in 64-bit mode\n");
4804 else if (MACHINE_IS_KVM) {
4805 - printk("We are running under KVM (64 bit mode)\n");
4806 + pr_info("Linux is running under KVM in 64-bit mode\n");
4807 add_preferred_console("hvc", 0, NULL);
4808 s390_virtio_console_init();
4810 - printk("We are running native (64 bit mode)\n");
4811 + pr_info("Linux is running natively in 64-bit mode\n");
4812 #endif /* CONFIG_64BIT */
4814 /* Have one command line that is parsed and saved in /proc/cmdline */
4815 @@ -818,90 +836,3 @@ setup_arch(char **cmdline_p)
4816 /* Setup zfcpdump support */
4817 setup_zfcpdump(console_devno);
4820 -void __cpuinit print_cpu_info(struct cpuinfo_S390 *cpuinfo)
4822 - printk(KERN_INFO "cpu %d "
4826 - "vers=%02X ident=%06X machine=%04X unused=%04X\n",
4829 - cpuinfo->cpu_addr,
4831 - cpuinfo->cpu_id.version,
4832 - cpuinfo->cpu_id.ident,
4833 - cpuinfo->cpu_id.machine,
4834 - cpuinfo->cpu_id.unused);
4838 - * show_cpuinfo - Get information on one CPU for use by procfs.
4841 -static int show_cpuinfo(struct seq_file *m, void *v)
4843 - static const char *hwcap_str[8] = {
4844 - "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp",
4847 - struct cpuinfo_S390 *cpuinfo;
4848 - unsigned long n = (unsigned long) v - 1;
4851 - s390_adjust_jiffies();
4852 - preempt_disable();
4854 - seq_printf(m, "vendor_id : IBM/S390\n"
4855 - "# processors : %i\n"
4856 - "bogomips per cpu: %lu.%02lu\n",
4857 - num_online_cpus(), loops_per_jiffy/(500000/HZ),
4858 - (loops_per_jiffy/(5000/HZ))%100);
4859 - seq_puts(m, "features\t: ");
4860 - for (i = 0; i < 8; i++)
4861 - if (hwcap_str[i] && (elf_hwcap & (1UL << i)))
4862 - seq_printf(m, "%s ", hwcap_str[i]);
4863 - seq_puts(m, "\n");
4866 - if (cpu_online(n)) {
4868 - if (smp_processor_id() == n)
4869 - cpuinfo = &S390_lowcore.cpu_data;
4871 - cpuinfo = &lowcore_ptr[n]->cpu_data;
4873 - cpuinfo = &S390_lowcore.cpu_data;
4875 - seq_printf(m, "processor %li: "
4876 - "version = %02X, "
4877 - "identification = %06X, "
4878 - "machine = %04X\n",
4879 - n, cpuinfo->cpu_id.version,
4880 - cpuinfo->cpu_id.ident,
4881 - cpuinfo->cpu_id.machine);
4887 -static void *c_start(struct seq_file *m, loff_t *pos)
4889 - return *pos < NR_CPUS ? (void *)((unsigned long) *pos + 1) : NULL;
4891 -static void *c_next(struct seq_file *m, void *v, loff_t *pos)
4894 - return c_start(m, pos);
4896 -static void c_stop(struct seq_file *m, void *v)
4899 -const struct seq_operations cpuinfo_op = {
4903 - .show = show_cpuinfo,
4906 --- a/arch/s390/kernel/smp.c
4907 +++ b/arch/s390/kernel/smp.c
4909 * cpu_number_map in other architectures.
4912 +#define KMSG_COMPONENT "cpu"
4914 #include <linux/module.h>
4915 #include <linux/init.h>
4916 #include <linux/mm.h>
4917 @@ -388,8 +390,8 @@ static void __init smp_get_save_area(uns
4918 if (ipl_info.type != IPL_TYPE_FCP_DUMP)
4920 if (cpu >= NR_CPUS) {
4921 - printk(KERN_WARNING "Registers for cpu %i not saved since dump "
4922 - "kernel was compiled with NR_CPUS=%i\n", cpu, NR_CPUS);
4923 + pr_warning("CPU %i exceeds the maximum %i and is excluded from "
4924 + "the dump\n", cpu, NR_CPUS - 1);
4927 zfcpdump_save_areas[cpu] = kmalloc(sizeof(union save_area), GFP_KERNEL);
4928 @@ -562,7 +564,7 @@ static void __init smp_detect_cpus(void)
4932 - printk(KERN_INFO "CPUs: %d configured, %d standby\n", c_cpus, s_cpus);
4933 + pr_info("%d configured CPUs, %d standby CPUs\n", c_cpus, s_cpus);
4935 __smp_rescan_cpus();
4937 @@ -688,12 +690,8 @@ int __cpuinit __cpu_up(unsigned int cpu)
4939 ccode = signal_processor_p((__u32)(unsigned long)(lowcore_ptr[cpu]),
4940 cpu, sigp_set_prefix);
4942 - printk("sigp_set_prefix failed for cpu %d "
4943 - "with condition code %d\n",
4944 - (int) cpu, (int) ccode);
4949 idle = current_set[cpu];
4950 cpu_lowcore = lowcore_ptr[cpu];
4951 @@ -776,7 +774,7 @@ void __cpu_die(unsigned int cpu)
4952 while (!smp_cpu_not_running(cpu))
4954 smp_free_lowcore(cpu);
4955 - printk(KERN_INFO "Processor %d spun down\n", cpu);
4956 + pr_info("Processor %d stopped\n", cpu);
4960 --- a/arch/s390/kernel/time.c
4961 +++ b/arch/s390/kernel/time.c
4963 * Copyright (C) 1991, 1992, 1995 Linus Torvalds
4966 +#define KMSG_COMPONENT "time"
4968 #include <linux/errno.h>
4969 #include <linux/module.h>
4970 #include <linux/sched.h>
4971 @@ -291,8 +293,8 @@ static unsigned long long adjust_time(un
4973 jiffies_timer_cc += delta;
4974 if (adjust.offset != 0) {
4975 - printk(KERN_NOTICE "etr: time adjusted by %li micro-seconds\n",
4977 + pr_notice("The ETR interface has adjusted the clock "
4978 + "by %li microseconds\n", adjust.offset);
4979 adjust.modes = ADJ_OFFSET_SINGLESHOT;
4980 do_adjtimex(&adjust);
4982 @@ -443,8 +445,8 @@ static void etr_reset(void)
4983 etr_tolec = get_clock();
4984 set_bit(CLOCK_SYNC_HAS_ETR, &clock_sync_flags);
4985 } else if (etr_port0_online || etr_port1_online) {
4986 - printk(KERN_WARNING "Running on non ETR capable "
4987 - "machine, only local mode available.\n");
4988 + pr_warning("The real or virtual hardware system does "
4989 + "not provide an ETR interface\n");
4990 etr_port0_online = etr_port1_online = 0;
4993 @@ -1359,7 +1361,8 @@ static void __init stp_reset(void)
4995 set_bit(CLOCK_SYNC_HAS_STP, &clock_sync_flags);
4996 else if (stp_online) {
4997 - printk(KERN_WARNING "Running on non STP capable machine.\n");
4998 + pr_warning("The real or virtual hardware system does "
4999 + "not provide an STP interface\n");
5000 free_bootmem((unsigned long) stp_page, PAGE_SIZE);
5003 --- a/arch/s390/kernel/topology.c
5004 +++ b/arch/s390/kernel/topology.c
5006 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
5009 +#define KMSG_COMPONENT "cpu"
5011 #include <linux/kernel.h>
5012 #include <linux/mm.h>
5013 #include <linux/init.h>
5014 @@ -311,7 +313,7 @@ void __init s390_init_cpu_topology(void)
5015 for (i = 0; i < info->mnest - 2; i++)
5016 nr_cores *= info->mag[NR_MAG - 3 - i];
5018 - printk(KERN_INFO "CPU topology:");
5019 + pr_info("The CPU configuration topology of the machine is:");
5020 for (i = 0; i < NR_MAG; i++)
5021 printk(" %d", info->mag[i]);
5022 printk(" / %d\n", info->mnest);
5023 --- a/arch/s390/mm/extmem.c
5024 +++ b/arch/s390/mm/extmem.c
5026 * (C) IBM Corporation 2002-2004
5029 +#define KMSG_COMPONENT "extmem"
5031 #include <linux/kernel.h>
5032 #include <linux/string.h>
5033 #include <linux/spinlock.h>
5035 #include <asm/cpcmd.h>
5036 #include <asm/setup.h>
5038 -#define DCSS_DEBUG /* Debug messages on/off */
5040 -#define DCSS_NAME "extmem"
5042 -#define PRINT_DEBUG(x...) printk(KERN_DEBUG DCSS_NAME " debug:" x)
5044 -#define PRINT_DEBUG(x...) do {} while (0)
5046 -#define PRINT_INFO(x...) printk(KERN_INFO DCSS_NAME " info:" x)
5047 -#define PRINT_WARN(x...) printk(KERN_WARNING DCSS_NAME " warning:" x)
5048 -#define PRINT_ERR(x...) printk(KERN_ERR DCSS_NAME " error:" x)
5051 #define DCSS_LOADSHR 0x00
5052 #define DCSS_LOADNSR 0x04
5053 #define DCSS_PURGESEG 0x08
5054 @@ -286,7 +275,7 @@ query_segment_type (struct dcss_segment
5058 - PRINT_WARN ("segment_type: diag returned error %ld\n", vmrc);
5059 + pr_warning("Querying a DCSS type failed with rc=%ld\n", vmrc);
5060 rc = dcss_diag_translate_rc (vmrc);
5063 @@ -368,7 +357,6 @@ query_segment_type (struct dcss_segment
5064 * -EIO : could not perform query diagnose
5065 * -ENOENT : no such segment
5066 * -ENOTSUPP: multi-part segment cannot be used with linux
5067 - * -ENOSPC : segment cannot be used (overlaps with storage)
5068 * -ENOMEM : out of memory
5069 * 0 .. 6 : type of segment as defined in include/asm-s390/extmem.h
5071 @@ -480,9 +468,8 @@ __segment_load (char *name, int do_nonsh
5075 - PRINT_WARN ("segment_load: could not load segment %s - "
5076 - "diag returned error (%ld)\n",
5078 + pr_warning("Loading DCSS %s failed with rc=%ld\n", name,
5080 rc = dcss_diag_translate_rc(end_addr);
5081 dcss_diag(&purgeseg_scode, seg->dcss_name,
5083 @@ -496,15 +483,13 @@ __segment_load (char *name, int do_nonsh
5084 *addr = seg->start_addr;
5087 - PRINT_INFO ("segment_load: loaded segment %s range %p .. %p "
5088 - "type %s in non-shared mode\n", name,
5089 - (void*)seg->start_addr, (void*)seg->end,
5090 - segtype_string[seg->vm_segtype]);
5091 + pr_info("DCSS %s of range %p to %p and type %s loaded as "
5092 + "exclusive-writable\n", name, (void*) seg->start_addr,
5093 + (void*) seg->end, segtype_string[seg->vm_segtype]);
5095 - PRINT_INFO ("segment_load: loaded segment %s range %p .. %p "
5096 - "type %s in shared mode\n", name,
5097 - (void*)seg->start_addr, (void*)seg->end,
5098 - segtype_string[seg->vm_segtype]);
5099 + pr_info("DCSS %s of range %p to %p and type %s loaded in "
5100 + "shared access mode\n", name, (void*) seg->start_addr,
5101 + (void*) seg->end, segtype_string[seg->vm_segtype]);
5105 @@ -593,14 +578,14 @@ segment_modify_shared (char *name, int d
5108 if (do_nonshared == seg->do_nonshared) {
5109 - PRINT_INFO ("segment_modify_shared: not reloading segment %s"
5110 - " - already in requested mode\n",name);
5111 + pr_info("DCSS %s is already in the requested access "
5116 if (atomic_read (&seg->ref_count) != 1) {
5117 - PRINT_WARN ("segment_modify_shared: not reloading segment %s - "
5118 - "segment is in use by other driver(s)\n",name);
5119 + pr_warning("DCSS %s is in use and cannot be reloaded\n",
5124 @@ -613,8 +598,8 @@ segment_modify_shared (char *name, int d
5125 seg->res->flags |= IORESOURCE_READONLY;
5127 if (request_resource(&iomem_resource, seg->res)) {
5128 - PRINT_WARN("segment_modify_shared: could not reload segment %s"
5129 - " - overlapping resources\n", name);
5130 + pr_warning("DCSS %s overlaps with used memory resources "
5131 + "and cannot be reloaded\n", name);
5135 @@ -632,9 +617,8 @@ segment_modify_shared (char *name, int d
5139 - PRINT_WARN ("segment_modify_shared: could not reload segment %s"
5140 - " - diag returned error (%ld)\n",
5142 + pr_warning("Reloading DCSS %s failed with rc=%ld\n", name,
5144 rc = dcss_diag_translate_rc(end_addr);
5147 @@ -673,8 +657,7 @@ segment_unload(char *name)
5148 mutex_lock(&dcss_lock);
5149 seg = segment_by_name (name);
5151 - PRINT_ERR ("could not find segment %s in segment_unload, "
5152 - "please report to linux390@de.ibm.com\n",name);
5153 + pr_err("Unloading unknown DCSS %s failed\n", name);
5156 if (atomic_dec_return(&seg->ref_count) != 0)
5157 @@ -709,8 +692,7 @@ segment_save(char *name)
5158 seg = segment_by_name (name);
5161 - PRINT_ERR("could not find segment %s in segment_save, please "
5162 - "report to linux390@de.ibm.com\n", name);
5163 + pr_err("Saving unknown DCSS %s failed\n", name);
5167 @@ -727,14 +709,14 @@ segment_save(char *name)
5169 cpcmd(cmd1, NULL, 0, &response);
5171 - PRINT_ERR("segment_save: DEFSEG failed with response code %i\n",
5173 + pr_err("Saving a DCSS failed with DEFSEG response code "
5174 + "%i\n", response);
5177 cpcmd(cmd2, NULL, 0, &response);
5179 - PRINT_ERR("segment_save: SAVESEG failed with response code %i\n",
5181 + pr_err("Saving a DCSS failed with SAVESEG response code "
5182 + "%i\n", response);
5186 @@ -749,44 +731,41 @@ void segment_warning(int rc, char *seg_n
5190 - PRINT_WARN("cannot load/query segment %s, "
5191 - "does not exist\n", seg_name);
5192 + pr_err("DCSS %s cannot be loaded or queried\n", seg_name);
5195 - PRINT_WARN("cannot load/query segment %s, "
5196 - "not running on VM\n", seg_name);
5197 + pr_err("DCSS %s cannot be loaded or queried without "
5198 + "z/VM\n", seg_name);
5201 - PRINT_WARN("cannot load/query segment %s, "
5202 - "hardware error\n", seg_name);
5203 + pr_err("Loading or querying DCSS %s resulted in a "
5204 + "hardware error\n", seg_name);
5207 - PRINT_WARN("cannot load/query segment %s, "
5208 - "is a multi-part segment\n", seg_name);
5209 + pr_err("DCSS %s has multiple page ranges and cannot be "
5210 + "loaded or queried\n", seg_name);
5213 - PRINT_WARN("cannot load/query segment %s, "
5214 - "overlaps with storage\n", seg_name);
5215 + pr_err("DCSS %s overlaps with used storage and cannot "
5216 + "be loaded\n", seg_name);
5219 - PRINT_WARN("cannot load/query segment %s, "
5220 - "overlaps with already loaded dcss\n", seg_name);
5221 + pr_err("%s needs used memory resources and cannot be "
5222 + "loaded or queried\n", seg_name);
5225 - PRINT_WARN("cannot load/query segment %s, "
5226 - "already loaded in incompatible mode\n", seg_name);
5227 + pr_err("DCSS %s is already loaded in a different access "
5228 + "mode\n", seg_name);
5231 - PRINT_WARN("cannot load/query segment %s, "
5232 - "out of memory\n", seg_name);
5233 + pr_err("There is not enough memory to load or query "
5234 + "DCSS %s\n", seg_name);
5237 - PRINT_WARN("cannot load/query segment %s, "
5238 - "exceeds kernel mapping range\n", seg_name);
5239 + pr_err("DCSS %s exceeds the kernel mapping range (%lu) "
5240 + "and cannot be loaded\n", seg_name, VMEM_MAX_PHYS);
5243 - PRINT_WARN("cannot load/query segment %s, "
5244 - "return value %i\n", seg_name, rc);
5248 --- a/drivers/s390/block/dcssblk.c
5249 +++ b/drivers/s390/block/dcssblk.c
5251 * Authors: Carsten Otte, Stefan Weinhuber, Gerald Schaefer
5254 +#define KMSG_COMPONENT "dcssblk"
5256 #include <linux/module.h>
5257 #include <linux/moduleparam.h>
5258 #include <linux/ctype.h>
5260 #include <linux/interrupt.h>
5261 #include <asm/s390_rdev.h>
5263 -//#define DCSSBLK_DEBUG /* Debug messages on/off */
5264 #define DCSSBLK_NAME "dcssblk"
5265 #define DCSSBLK_MINORS_PER_DISK 1
5266 #define DCSSBLK_PARM_LEN 400
5268 -#ifdef DCSSBLK_DEBUG
5269 -#define PRINT_DEBUG(x...) printk(KERN_DEBUG DCSSBLK_NAME " debug: " x)
5271 -#define PRINT_DEBUG(x...) do {} while (0)
5273 -#define PRINT_INFO(x...) printk(KERN_INFO DCSSBLK_NAME " info: " x)
5274 -#define PRINT_WARN(x...) printk(KERN_WARNING DCSSBLK_NAME " warning: " x)
5275 -#define PRINT_ERR(x...) printk(KERN_ERR DCSSBLK_NAME " error: " x)
5277 static int dcssblk_open(struct inode *inode, struct file *filp);
5278 static int dcssblk_release(struct inode *inode, struct file *filp);
5279 static int dcssblk_make_request(struct request_queue *q, struct bio *bio);
5280 @@ -261,10 +253,9 @@ dcssblk_is_continuous(struct dcssblk_dev
5281 /* check continuity */
5282 for (i = 0; i < dev_info->num_of_segments - 1; i++) {
5283 if ((sort_list[i].end + 1) != sort_list[i+1].start) {
5284 - PRINT_ERR("Segment %s is not contiguous with "
5286 - sort_list[i].segment_name,
5287 - sort_list[i+1].segment_name);
5288 + pr_err("Adjacent DCSSs %s and %s are not "
5289 + "contiguous\n", sort_list[i].segment_name,
5290 + sort_list[i+1].segment_name);
5294 @@ -275,10 +266,10 @@ dcssblk_is_continuous(struct dcssblk_dev
5295 !(sort_list[i+1].segment_type &
5296 SEGMENT_EXCLUSIVE) ||
5297 (sort_list[i+1].segment_type == SEG_TYPE_ER)) {
5298 - PRINT_ERR("Segment %s has different type from "
5300 - sort_list[i].segment_name,
5301 - sort_list[i+1].segment_name);
5302 + pr_err("DCSS %s and DCSS %s have "
5303 + "incompatible types\n",
5304 + sort_list[i].segment_name,
5305 + sort_list[i+1].segment_name);
5309 @@ -380,8 +371,9 @@ dcssblk_shared_store(struct device *dev,
5310 } else if (inbuf[0] == '0') {
5311 /* reload segments in exclusive mode */
5312 if (dev_info->segment_type == SEG_TYPE_SC) {
5313 - PRINT_ERR("Segment type SC (%s) cannot be loaded in "
5314 - "non-shared mode\n", dev_info->segment_name);
5315 + pr_err("DCSS %s is of type SC and cannot be "
5316 + "loaded as exclusive-writable\n",
5317 + dev_info->segment_name);
5321 @@ -404,9 +396,8 @@ dcssblk_shared_store(struct device *dev,
5325 - PRINT_ERR("Could not reload segment(s) of the device %s, removing "
5326 - "segment(s) now!\n",
5327 - dev_info->segment_name);
5328 + pr_err("DCSS device %s is removed after a failed access mode "
5329 + "change\n", dev_info->segment_name);
5331 list_for_each_entry(entry, &dev_info->seg_list, lh) {
5333 @@ -454,17 +445,17 @@ dcssblk_save_store(struct device *dev, s
5334 if (inbuf[0] == '1') {
5335 if (atomic_read(&dev_info->use_count) == 0) {
5336 // device is idle => we save immediately
5337 - PRINT_INFO("Saving segment(s) of the device %s\n",
5338 - dev_info->segment_name);
5339 + pr_info("All DCSSs that map to device %s are "
5340 + "saved\n", dev_info->segment_name);
5341 list_for_each_entry(entry, &dev_info->seg_list, lh) {
5342 segment_save(entry->segment_name);
5345 // device is busy => we save it when it becomes
5346 // idle in dcssblk_release
5347 - PRINT_INFO("Device %s is currently busy, segment(s) "
5348 - "will be saved when it becomes idle...\n",
5349 - dev_info->segment_name);
5350 + pr_info("Device %s is in use, its DCSSs will be "
5351 + "saved when it becomes idle\n",
5352 + dev_info->segment_name);
5353 dev_info->save_pending = 1;
5355 } else if (inbuf[0] == '0') {
5356 @@ -472,9 +463,9 @@ dcssblk_save_store(struct device *dev, s
5357 // device is busy & the user wants to undo his save
5359 dev_info->save_pending = 0;
5360 - PRINT_INFO("Pending save for segment(s) of the device "
5361 - "%s deactivated\n",
5362 - dev_info->segment_name);
5363 + pr_info("A pending save request for device %s "
5364 + "has been canceled\n",
5365 + dev_info->segment_name);
5368 up_write(&dcssblk_devices_sem);
5369 @@ -614,9 +605,8 @@ dcssblk_add_store(struct device *dev, st
5371 seg_byte_size = (dev_info->end - dev_info->start + 1);
5372 set_capacity(dev_info->gd, seg_byte_size >> 9); // size in sectors
5373 - PRINT_INFO("Loaded segment(s) %s, size = %lu Byte, "
5374 - "capacity = %lu (512 Byte) sectors\n", local_buf,
5375 - seg_byte_size, seg_byte_size >> 9);
5376 + pr_info("Loaded %s with total size %lu bytes and capacity %lu "
5377 + "sectors\n", local_buf, seg_byte_size, seg_byte_size >> 9);
5379 dev_info->save_pending = 0;
5380 dev_info->is_shared = 1;
5381 @@ -744,13 +734,15 @@ dcssblk_remove_store(struct device *dev,
5382 dev_info = dcssblk_get_device_by_name(local_buf);
5383 if (dev_info == NULL) {
5384 up_write(&dcssblk_devices_sem);
5385 - PRINT_WARN("Device %s is not loaded!\n", local_buf);
5386 + pr_warning("Device %s cannot be removed because it is not a "
5387 + "known device\n", local_buf);
5391 if (atomic_read(&dev_info->use_count) != 0) {
5392 up_write(&dcssblk_devices_sem);
5393 - PRINT_WARN("Device %s is in use!\n", local_buf);
5394 + pr_warning("Device %s cannot be removed while it is in "
5395 + "use\n", local_buf);
5399 @@ -808,8 +800,8 @@ dcssblk_release(struct inode *inode, str
5400 down_write(&dcssblk_devices_sem);
5401 if (atomic_dec_and_test(&dev_info->use_count)
5402 && (dev_info->save_pending)) {
5403 - PRINT_INFO("Device %s became idle and is being saved now\n",
5404 - dev_info->segment_name);
5405 + pr_info("Device %s has become idle and is being saved "
5406 + "now\n", dev_info->segment_name);
5407 list_for_each_entry(entry, &dev_info->seg_list, lh) {
5408 segment_save(entry->segment_name);
5410 @@ -852,8 +844,9 @@ dcssblk_make_request(struct request_queu
5412 /* cannot write to these segments */
5413 if (bio_data_dir(bio) == WRITE) {
5414 - PRINT_WARN("rejecting write to ro device %s\n",
5415 - dev_info->dev.bus_id);
5416 + pr_warning("Writing to %s failed because it "
5417 + "is a read-only device\n",
5418 + dev_name(&dev_info->dev));
5422 --- a/drivers/s390/block/xpram.c
5423 +++ b/drivers/s390/block/xpram.c
5425 * generic hard disk support to replace ad-hoc partitioning
5428 +#define KMSG_COMPONENT "xpram"
5430 #include <linux/module.h>
5431 #include <linux/moduleparam.h>
5432 #include <linux/ctype.h> /* isdigit, isxdigit */
5434 #define XPRAM_DEVS 1 /* one partition */
5435 #define XPRAM_MAX_DEVS 32 /* maximal number of devices (partitions) */
5437 -#define PRINT_DEBUG(x...) printk(KERN_DEBUG XPRAM_NAME " debug:" x)
5438 -#define PRINT_INFO(x...) printk(KERN_INFO XPRAM_NAME " info:" x)
5439 -#define PRINT_WARN(x...) printk(KERN_WARNING XPRAM_NAME " warning:" x)
5440 -#define PRINT_ERR(x...) printk(KERN_ERR XPRAM_NAME " error:" x)
5444 unsigned int size; /* size of xpram segment in pages */
5445 unsigned int offset; /* start page of xpram segment */
5446 @@ -263,7 +259,7 @@ static int __init xpram_setup_sizes(unsi
5448 /* Check number of devices. */
5449 if (devs <= 0 || devs > XPRAM_MAX_DEVS) {
5450 - PRINT_ERR("invalid number %d of devices\n",devs);
5451 + pr_err("%d is not a valid number of XPRAM devices\n",devs);
5455 @@ -294,22 +290,22 @@ static int __init xpram_setup_sizes(unsi
5459 - PRINT_INFO(" number of devices (partitions): %d \n", xpram_devs);
5460 + pr_info(" number of devices (partitions): %d \n", xpram_devs);
5461 for (i = 0; i < xpram_devs; i++) {
5463 - PRINT_INFO(" size of partition %d: %u kB\n",
5464 - i, xpram_sizes[i]);
5465 + pr_info(" size of partition %d: %u kB\n",
5466 + i, xpram_sizes[i]);
5468 - PRINT_INFO(" size of partition %d to be set "
5469 - "automatically\n",i);
5470 + pr_info(" size of partition %d to be set "
5471 + "automatically\n",i);
5473 - PRINT_DEBUG(" memory needed (for sized partitions): %lu kB\n",
5475 - PRINT_DEBUG(" partitions to be sized automatically: %d\n",
5477 + pr_info(" memory needed (for sized partitions): %lu kB\n",
5479 + pr_info(" partitions to be sized automatically: %d\n",
5482 if (mem_needed > pages * 4) {
5483 - PRINT_ERR("Not enough expanded memory available\n");
5484 + pr_err("Not enough expanded memory available\n");
5488 @@ -321,8 +317,8 @@ static int __init xpram_setup_sizes(unsi
5491 mem_auto = ((pages - mem_needed / 4) / mem_auto_no) * 4;
5492 - PRINT_INFO(" automatically determined "
5493 - "partition size: %lu kB\n", mem_auto);
5494 + pr_info(" automatically determined "
5495 + "partition size: %lu kB\n", mem_auto);
5496 for (i = 0; i < xpram_devs; i++)
5497 if (xpram_sizes[i] == 0)
5498 xpram_sizes[i] = mem_auto;
5499 @@ -412,12 +408,12 @@ static int __init xpram_init(void)
5501 /* Find out size of expanded memory. */
5502 if (xpram_present() != 0) {
5503 - PRINT_WARN("No expanded memory available\n");
5504 + pr_err("No expanded memory available\n");
5507 xpram_pages = xpram_highest_page_index() + 1;
5508 - PRINT_INFO(" %u pages expanded memory found (%lu KB).\n",
5509 - xpram_pages, (unsigned long) xpram_pages*4);
5510 + pr_info(" %u pages expanded memory found (%lu KB).\n",
5511 + xpram_pages, (unsigned long) xpram_pages*4);
5512 rc = xpram_setup_sizes(xpram_pages);
5515 --- a/drivers/s390/char/monreader.c
5516 +++ b/drivers/s390/char/monreader.c
5518 * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
5521 +#define KMSG_COMPONENT "monreader"
5523 #include <linux/module.h>
5524 #include <linux/moduleparam.h>
5525 #include <linux/init.h>
5527 #include <asm/ebcdic.h>
5528 #include <asm/extmem.h>
5530 -//#define MON_DEBUG /* Debug messages on/off */
5532 -#define MON_NAME "monreader"
5534 -#define P_INFO(x...) printk(KERN_INFO MON_NAME " info: " x)
5535 -#define P_ERROR(x...) printk(KERN_ERR MON_NAME " error: " x)
5536 -#define P_WARNING(x...) printk(KERN_WARNING MON_NAME " warning: " x)
5539 -#define P_DEBUG(x...) printk(KERN_DEBUG MON_NAME " debug: " x)
5541 -#define P_DEBUG(x...) do {} while (0)
5544 #define MON_COLLECT_SAMPLE 0x80
5545 #define MON_COLLECT_EVENT 0x40
5546 @@ -172,7 +161,7 @@ static int mon_send_reply(struct mon_msg
5548 monmsg->replied_msglim = 1;
5550 - P_ERROR("read, IUCV reply failed with rc = %i\n\n", rc);
5551 + pr_err("Reading monitor data failed with rc=%i\n", rc);
5555 @@ -251,7 +240,8 @@ static void mon_iucv_path_severed(struct
5557 struct mon_private *monpriv = path->private;
5559 - P_ERROR("IUCV connection severed with rc = 0x%X\n", ipuser[0]);
5560 + pr_err("z/VM *MONITOR system service disconnected with rc=%i\n",
5562 iucv_path_sever(path, NULL);
5563 atomic_set(&monpriv->iucv_severed, 1);
5564 wake_up(&mon_conn_wait_queue);
5565 @@ -266,8 +256,7 @@ static void mon_iucv_message_pending(str
5566 memcpy(&monpriv->msg_array[monpriv->write_index]->msg,
5568 if (atomic_inc_return(&monpriv->msglim_count) == MON_MSGLIM) {
5569 - P_WARNING("IUCV message pending, message limit (%i) reached\n",
5571 + pr_warning("The read queue for monitor data is full\n");
5572 monpriv->msg_array[monpriv->write_index]->msglim_reached = 1;
5574 monpriv->write_index = (monpriv->write_index + 1) % MON_MSGLIM;
5575 @@ -311,8 +300,8 @@ static int mon_open(struct inode *inode,
5576 rc = iucv_path_connect(monpriv->path, &monreader_iucv_handler,
5577 MON_SERVICE, NULL, user_data_connect, monpriv);
5579 - P_ERROR("iucv connection to *MONITOR failed with "
5580 - "IPUSER SEVER code = %i\n", rc);
5581 + pr_err("Connecting to the z/VM *MONITOR system service "
5582 + "failed with rc=%i\n", rc);
5586 @@ -353,7 +342,8 @@ static int mon_close(struct inode *inode
5588 rc = iucv_path_sever(monpriv->path, user_data_sever);
5590 - P_ERROR("close, iucv_sever failed with rc = %i\n", rc);
5591 + pr_warning("Disconnecting the z/VM *MONITOR system service "
5592 + "failed with rc=%i\n", rc);
5594 atomic_set(&monpriv->iucv_severed, 0);
5595 atomic_set(&monpriv->iucv_connected, 0);
5596 @@ -469,7 +459,8 @@ static int __init mon_init(void)
5599 if (!MACHINE_IS_VM) {
5600 - P_ERROR("not running under z/VM, driver not loaded\n");
5601 + pr_err("The z/VM *MONITOR record device driver cannot be "
5602 + "loaded without z/VM\n");
5606 @@ -478,7 +469,8 @@ static int __init mon_init(void)
5608 rc = iucv_register(&monreader_iucv_handler, 1);
5610 - P_ERROR("failed to register with iucv driver\n");
5611 + pr_err("The z/VM *MONITOR record device driver failed to "
5612 + "register with IUCV\n");
5616 @@ -488,8 +480,8 @@ static int __init mon_init(void)
5619 if (rc != SEG_TYPE_SC) {
5620 - P_ERROR("segment %s has unsupported type, should be SC\n",
5622 + pr_err("The specified *MONITOR DCSS %s does not have the "
5623 + "required type SC\n", mon_dcss_name);
5627 --- a/drivers/s390/char/monwriter.c
5628 +++ b/drivers/s390/char/monwriter.c
5630 * Author(s): Melissa Howland <Melissa.Howland@us.ibm.com>
5633 +#define KMSG_COMPONENT "monwriter"
5635 #include <linux/module.h>
5636 #include <linux/moduleparam.h>
5637 #include <linux/init.h>
5638 @@ -64,9 +66,9 @@ static int monwrite_diag(struct monwrite
5639 rc = appldata_asm(&id, fcn, (void *) buffer, myhdr->datalen);
5642 + pr_err("Writing monitor data failed with rc=%i\n", rc);
5645 - printk("DIAG X'DC' error with return code: %i\n", rc);
5649 --- a/drivers/s390/char/sclp_cmd.c
5650 +++ b/drivers/s390/char/sclp_cmd.c
5652 * Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
5655 +#define KMSG_COMPONENT "sclp_cmd"
5657 #include <linux/completion.h>
5658 #include <linux/init.h>
5659 #include <linux/errno.h>
5661 #include <linux/memory.h>
5662 #include <asm/chpid.h>
5663 #include <asm/sclp.h>
5666 -#define TAG "sclp_cmd: "
5669 #define SCLP_CMDW_READ_SCP_INFO 0x00020001
5670 #define SCLP_CMDW_READ_SCP_INFO_FORCED 0x00120001
5671 @@ -169,8 +170,8 @@ static int do_sync_request(sclp_cmdw_t c
5673 /* Check response. */
5674 if (request->status != SCLP_REQ_DONE) {
5675 - printk(KERN_WARNING TAG "sync request failed "
5676 - "(cmd=0x%08x, status=0x%02x)\n", cmd, request->status);
5677 + pr_warning("sync request failed (cmd=0x%08x, "
5678 + "status=0x%02x)\n", cmd, request->status);
5682 @@ -224,8 +225,8 @@ int sclp_get_cpu_info(struct sclp_cpu_in
5685 if (sccb->header.response_code != 0x0010) {
5686 - printk(KERN_WARNING TAG "readcpuinfo failed "
5687 - "(response=0x%04x)\n", sccb->header.response_code);
5688 + pr_warning("readcpuinfo failed (response=0x%04x)\n",
5689 + sccb->header.response_code);
5693 @@ -262,8 +263,9 @@ static int do_cpu_configure(sclp_cmdw_t
5697 - printk(KERN_WARNING TAG "configure cpu failed (cmd=0x%08x, "
5698 - "response=0x%04x)\n", cmd, sccb->header.response_code);
5699 + pr_warning("configure cpu failed (cmd=0x%08x, "
5700 + "response=0x%04x)\n", cmd,
5701 + sccb->header.response_code);
5705 @@ -623,9 +625,9 @@ static int do_chp_configure(sclp_cmdw_t
5709 - printk(KERN_WARNING TAG "configure channel-path failed "
5710 - "(cmd=0x%08x, response=0x%04x)\n", cmd,
5711 - sccb->header.response_code);
5712 + pr_warning("configure channel-path failed "
5713 + "(cmd=0x%08x, response=0x%04x)\n", cmd,
5714 + sccb->header.response_code);
5718 @@ -692,8 +694,8 @@ int sclp_chp_read_info(struct sclp_chp_i
5721 if (sccb->header.response_code != 0x0010) {
5722 - printk(KERN_WARNING TAG "read channel-path info failed "
5723 - "(response=0x%04x)\n", sccb->header.response_code);
5724 + pr_warning("read channel-path info failed "
5725 + "(response=0x%04x)\n", sccb->header.response_code);
5729 --- a/drivers/s390/char/sclp_config.c
5730 +++ b/drivers/s390/char/sclp_config.c
5732 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
5735 +#define KMSG_COMPONENT "sclp_config"
5737 #include <linux/init.h>
5738 #include <linux/errno.h>
5739 #include <linux/cpu.h>
5740 #include <linux/sysdev.h>
5741 #include <linux/workqueue.h>
5742 #include <asm/smp.h>
5745 -#define TAG "sclp_config: "
5748 struct conf_mgm_data {
5750 @@ -31,7 +32,7 @@ static void sclp_cpu_capability_notify(s
5752 struct sys_device *sysdev;
5754 - printk(KERN_WARNING TAG "cpu capability changed.\n");
5755 + pr_warning("cpu capability changed.\n");
5757 for_each_online_cpu(cpu) {
5758 sysdev = get_cpu_sysdev(cpu);
5759 @@ -78,7 +79,7 @@ static int __init sclp_conf_init(void)
5762 if (!(sclp_conf_register.sclp_send_mask & EVTYP_CONFMGMDATA_MASK)) {
5763 - printk(KERN_WARNING TAG "no configuration management.\n");
5764 + pr_warning("no configuration management.\n");
5765 sclp_unregister(&sclp_conf_register);
5768 --- a/drivers/s390/char/sclp_cpi_sys.c
5769 +++ b/drivers/s390/char/sclp_cpi_sys.c
5771 * Michael Ernst <mernst@de.ibm.com>
5774 +#define KMSG_COMPONENT "sclp_cpi"
5776 #include <linux/kernel.h>
5777 #include <linux/init.h>
5778 #include <linux/stat.h>
5780 #include <linux/completion.h>
5781 #include <asm/ebcdic.h>
5782 #include <asm/sclp.h>
5785 #include "sclp_rw.h"
5786 #include "sclp_cpi_sys.h"
5787 @@ -150,16 +153,16 @@ static int cpi_req(void)
5788 wait_for_completion(&completion);
5790 if (req->status != SCLP_REQ_DONE) {
5791 - printk(KERN_WARNING "cpi: request failed (status=0x%02x)\n",
5793 + pr_warning("request failed (status=0x%02x)\n",
5799 response = ((struct cpi_sccb *) req->sccb)->header.response_code;
5800 if (response != 0x0020) {
5801 - printk(KERN_WARNING "cpi: failed with "
5802 - "response code 0x%x\n", response);
5803 + pr_warning("request failed with response code 0x%x\n",
5808 --- a/drivers/s390/char/sclp_sdias.c
5809 +++ b/drivers/s390/char/sclp_sdias.c
5811 * Author(s): Michael Holzheu
5814 +#define KMSG_COMPONENT "sclp_sdias"
5816 #include <linux/sched.h>
5817 #include <asm/sclp.h>
5818 #include <asm/debug.h>
5819 #include <asm/ipl.h>
5822 #include "sclp_rw.h"
5824 #define TRACE(x...) debug_sprintf_event(sdias_dbf, 1, x)
5825 -#define ERROR_MSG(x...) printk ( KERN_ALERT "SDIAS: " x )
5827 #define SDIAS_RETRIES 300
5828 #define SDIAS_SLEEP_TICKS 50
5829 @@ -131,7 +133,7 @@ int sclp_sdias_blk_count(void)
5831 rc = sdias_sclp_send(&request);
5833 - ERROR_MSG("sclp_send failed for get_nr_blocks\n");
5834 + pr_err("sclp_send failed for get_nr_blocks\n");
5837 if (sccb.hdr.response_code != 0x0020) {
5838 @@ -145,7 +147,8 @@ int sclp_sdias_blk_count(void)
5839 rc = sccb.evbuf.blk_cnt;
5842 - ERROR_MSG("SCLP error: %x\n", sccb.evbuf.event_status);
5843 + pr_err("SCLP error: %x\n",
5844 + sccb.evbuf.event_status);
5848 @@ -201,7 +204,7 @@ int sclp_sdias_copy(void *dest, int star
5850 rc = sdias_sclp_send(&request);
5852 - ERROR_MSG("sclp_send failed: %x\n", rc);
5853 + pr_err("sclp_send failed: %x\n", rc);
5856 if (sccb.hdr.response_code != 0x0020) {
5857 @@ -219,9 +222,9 @@ int sclp_sdias_copy(void *dest, int star
5858 case EVSTATE_NO_DATA:
5861 - ERROR_MSG("Error from SCLP while copying hsa. "
5862 - "Event status = %x\n",
5863 - sccb.evbuf.event_status);
5864 + pr_err("Error from SCLP while copying hsa. "
5865 + "Event status = %x\n",
5866 + sccb.evbuf.event_status);
5870 --- a/drivers/s390/char/vmcp.c
5871 +++ b/drivers/s390/char/vmcp.c
5873 * The idea of this driver is based on cpint from Neale Ferguson and #CP in CMS
5876 +#define KMSG_COMPONENT "vmcp"
5878 #include <linux/fs.h>
5879 #include <linux/init.h>
5880 #include <linux/kernel.h>
5881 @@ -26,8 +28,6 @@ MODULE_LICENSE("GPL");
5882 MODULE_AUTHOR("Christian Borntraeger <borntraeger@de.ibm.com>");
5883 MODULE_DESCRIPTION("z/VM CP interface");
5885 -#define PRINTK_HEADER "vmcp: "
5887 static debug_info_t *vmcp_debug;
5889 static int vmcp_open(struct inode *inode, struct file *file)
5890 @@ -193,7 +193,8 @@ static int __init vmcp_init(void)
5893 if (!MACHINE_IS_VM) {
5894 - PRINT_WARN("z/VM CP interface is only available under z/VM\n");
5895 + pr_warning("The z/VM CP interface device driver cannot be "
5896 + "loaded without z/VM\n");
5900 --- a/drivers/s390/char/vmlogrdr.c
5901 +++ b/drivers/s390/char/vmlogrdr.c
5903 * Stefan Weinhuber <wein@de.ibm.com>
5907 +#define KMSG_COMPONENT "vmlogrdr"
5909 #include <linux/module.h>
5910 #include <linux/init.h>
5911 #include <linux/errno.h>
5913 #include <linux/smp_lock.h>
5914 #include <linux/string.h>
5919 ("(C) 2004 IBM Corporation by Xenia Tkatschow (xenia@us.ibm.com)\n"
5920 " Stefan Weinhuber (wein@de.ibm.com)");
5921 @@ -174,8 +175,7 @@ static void vmlogrdr_iucv_path_severed(s
5922 struct vmlogrdr_priv_t * logptr = path->private;
5923 u8 reason = (u8) ipuser[8];
5925 - printk (KERN_ERR "vmlogrdr: connection severed with"
5926 - " reason %i\n", reason);
5927 + pr_err("vmlogrdr: connection severed with reason %i\n", reason);
5929 iucv_path_sever(path, NULL);
5931 @@ -333,8 +333,8 @@ static int vmlogrdr_open (struct inode *
5932 if (logptr->autorecording) {
5933 ret = vmlogrdr_recording(logptr,1,logptr->autopurge);
5935 - printk (KERN_WARNING "vmlogrdr: failed to start "
5936 - "recording automatically\n");
5937 + pr_warning("vmlogrdr: failed to start "
5938 + "recording automatically\n");
5941 /* create connection to the system service */
5942 @@ -345,9 +345,9 @@ static int vmlogrdr_open (struct inode *
5943 logptr->system_service, NULL, NULL,
5946 - printk (KERN_ERR "vmlogrdr: iucv connection to %s "
5947 - "failed with rc %i \n", logptr->system_service,
5949 + pr_err("vmlogrdr: iucv connection to %s "
5950 + "failed with rc %i \n",
5951 + logptr->system_service, connect_rc);
5955 @@ -388,8 +388,8 @@ static int vmlogrdr_release (struct inod
5956 if (logptr->autorecording) {
5957 ret = vmlogrdr_recording(logptr,0,logptr->autopurge);
5959 - printk (KERN_WARNING "vmlogrdr: failed to stop "
5960 - "recording automatically\n");
5961 + pr_warning("vmlogrdr: failed to stop "
5962 + "recording automatically\n");
5964 logptr->dev_in_use = 0;
5966 @@ -824,8 +824,7 @@ static int __init vmlogrdr_init(void)
5969 if (! MACHINE_IS_VM) {
5970 - printk (KERN_ERR "vmlogrdr: not running under VM, "
5971 - "driver not loaded.\n");
5972 + pr_err("not running under VM, driver not loaded.\n");
5976 --- a/drivers/s390/char/vmur.c
5977 +++ b/drivers/s390/char/vmur.c
5979 * Frank Munzert <munzert@de.ibm.com>
5982 +#define KMSG_COMPONENT "vmur"
5984 #include <linux/cdev.h>
5985 #include <linux/smp_lock.h>
5987 @@ -40,8 +42,6 @@ MODULE_AUTHOR("IBM Corporation");
5988 MODULE_DESCRIPTION("s390 z/VM virtual unit record device driver");
5989 MODULE_LICENSE("GPL");
5991 -#define PRINTK_HEADER "vmur: "
5993 static dev_t ur_first_dev_maj_min;
5994 static struct class *vmur_class;
5995 static struct debug_info *vmur_dbf;
5996 @@ -988,7 +988,8 @@ static int __init ur_init(void)
5999 if (!MACHINE_IS_VM) {
6000 - PRINT_ERR("%s is only available under z/VM.\n", ur_banner);
6001 + pr_err("The %s cannot be loaded without z/VM\n",
6006 @@ -1007,7 +1008,8 @@ static int __init ur_init(void)
6008 rc = alloc_chrdev_region(&dev, 0, NUM_MINORS, "vmur");
6010 - PRINT_ERR("alloc_chrdev_region failed: err = %d\n", rc);
6011 + pr_err("Kernel function alloc_chrdev_region failed with "
6012 + "error code %d\n", rc);
6013 goto fail_unregister_driver;
6015 ur_first_dev_maj_min = MKDEV(MAJOR(dev), 0);
6016 @@ -1017,7 +1019,7 @@ static int __init ur_init(void)
6017 rc = PTR_ERR(vmur_class);
6018 goto fail_unregister_region;
6020 - PRINT_INFO("%s loaded.\n", ur_banner);
6021 + pr_info("%s loaded.\n", ur_banner);
6024 fail_unregister_region:
6025 @@ -1035,7 +1037,7 @@ static void __exit ur_exit(void)
6026 unregister_chrdev_region(ur_first_dev_maj_min, NUM_MINORS);
6027 ccw_driver_unregister(&ur_driver);
6028 debug_unregister(vmur_dbf);
6029 - PRINT_INFO("%s unloaded.\n", ur_banner);
6030 + pr_info("%s unloaded.\n", ur_banner);
6033 module_init(ur_init);
6034 --- a/drivers/s390/char/zcore.c
6035 +++ b/drivers/s390/char/zcore.c
6037 * Author(s): Michael Holzheu
6040 +#define KMSG_COMPONENT "zdump"
6042 #include <linux/init.h>
6043 #include <linux/miscdevice.h>
6044 #include <linux/utsname.h>
6048 #define TRACE(x...) debug_sprintf_event(zcore_dbf, 1, x)
6049 -#define MSG(x...) printk( KERN_ALERT x )
6050 -#define ERROR_MSG(x...) printk ( KERN_ALERT "DUMP: " x )
6054 @@ -563,19 +563,19 @@ static int __init sys_info_init(enum arc
6058 - MSG("DETECTED 'S390X (64 bit) OS'\n");
6059 + pr_alert("DETECTED 'S390X (64 bit) OS'\n");
6060 sys_info.sa_base = SAVE_AREA_BASE_S390X;
6061 sys_info.sa_size = sizeof(struct save_area_s390x);
6062 set_s390x_lc_mask(&sys_info.lc_mask);
6065 - MSG("DETECTED 'S390 (32 bit) OS'\n");
6066 + pr_alert("DETECTED 'S390 (32 bit) OS'\n");
6067 sys_info.sa_base = SAVE_AREA_BASE_S390;
6068 sys_info.sa_size = sizeof(struct save_area_s390);
6069 set_s390_lc_mask(&sys_info.lc_mask);
6072 - ERROR_MSG("unknown architecture 0x%x.\n",arch);
6073 + pr_alert("0x%x is an unknown architecture.\n",arch);
6076 sys_info.arch = arch;
6077 @@ -674,7 +674,8 @@ static int __init zcore_init(void)
6080 if (arch == ARCH_S390X) {
6081 - ERROR_MSG("32 bit dumper can't dump 64 bit system!\n");
6082 + pr_alert("The 32-bit dump tool cannot be used for a "
6083 + "64-bit system\n");
6087 --- a/drivers/s390/cio/blacklist.c
6088 +++ b/drivers/s390/cio/blacklist.c
6090 * Arnd Bergmann (arndb@de.ibm.com)
6093 +#define KMSG_COMPONENT "cio"
6095 #include <linux/init.h>
6096 #include <linux/vmalloc.h>
6097 #include <linux/slab.h>
6098 @@ -49,9 +51,10 @@ static int blacklist_range(range_action
6100 if ((from_ssid > to_ssid) || ((from_ssid == to_ssid) && (from > to))) {
6102 - printk(KERN_WARNING "cio: Invalid cio_ignore range "
6103 - "0.%x.%04x-0.%x.%04x\n", from_ssid, from,
6105 + pr_warning("0.%x.%04x to 0.%x.%04x is not a valid "
6106 + "range for cio_ignore\n", from_ssid, from,
6112 @@ -139,8 +142,8 @@ static int parse_busid(char *str, unsign
6115 if (rc && msgtrigger)
6116 - printk(KERN_WARNING "cio: Invalid cio_ignore device '%s'\n",
6118 + pr_warning("%s is not a valid device for the cio_ignore "
6119 + "kernel parameter\n", str);
6123 --- a/drivers/s390/cio/chsc.c
6124 +++ b/drivers/s390/cio/chsc.c
6126 * Arnd Bergmann (arndb@de.ibm.com)
6129 +#define KMSG_COMPONENT "cio"
6131 #include <linux/module.h>
6132 #include <linux/slab.h>
6133 #include <linux/init.h>
6134 @@ -333,6 +335,7 @@ static void chsc_process_sei_chp_config(
6135 struct chp_config_data *data;
6136 struct chp_id chpid;
6138 + char *events[3] = {"configure", "deconfigure", "cancel deconfigure"};
6140 CIO_CRW_EVENT(4, "chsc: channel-path-configuration notification\n");
6141 if (sei_area->rs != 0)
6142 @@ -343,8 +346,8 @@ static void chsc_process_sei_chp_config(
6143 if (!chp_test_bit(data->map, num))
6146 - printk(KERN_WARNING "cio: processing configure event %d for "
6147 - "chpid %x.%02x\n", data->op, chpid.cssid, chpid.id);
6148 + pr_notice("Processing %s for channel path %x.%02x\n",
6149 + events[data->op], chpid.cssid, chpid.id);
6152 chp_cfg_schedule(chpid, 1);
6153 --- a/drivers/s390/cio/cio.c
6154 +++ b/drivers/s390/cio/cio.c
6156 * Martin Schwidefsky (schwidefsky@de.ibm.com)
6159 +#define KMSG_COMPONENT "cio"
6161 #include <linux/module.h>
6162 #include <linux/init.h>
6163 #include <linux/slab.h>
6164 @@ -773,7 +775,7 @@ cio_probe_console(void)
6165 sch_no = cio_get_console_sch_no();
6167 console_subchannel_in_use = 0;
6168 - printk(KERN_WARNING "cio: No ccw console found!\n");
6169 + pr_warning("No CCW console was found\n");
6170 return ERR_PTR(-ENODEV);
6172 memset(&console_subchannel, 0, sizeof(struct subchannel));
6173 --- a/drivers/s390/cio/cmf.c
6174 +++ b/drivers/s390/cio/cmf.c
6176 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
6179 +#define KMSG_COMPONENT "cio"
6181 #include <linux/bootmem.h>
6182 #include <linux/device.h>
6183 #include <linux/init.h>
6184 @@ -1359,9 +1361,8 @@ static int __init init_cmf(void)
6189 - printk(KERN_INFO "cio: Channel measurement facility using %s "
6190 - "format (%s)\n", format_string, detect_string);
6191 + pr_info("Channel measurement facility initialized using format "
6192 + "%s (mode %s)\n", format_string, detect_string);
6196 --- a/drivers/s390/cio/css.c
6197 +++ b/drivers/s390/cio/css.c
6199 * Author(s): Arnd Bergmann (arndb@de.ibm.com)
6200 * Cornelia Huck (cornelia.huck@de.ibm.com)
6203 +#define KMSG_COMPONENT "cio"
6205 #include <linux/module.h>
6206 #include <linux/init.h>
6207 #include <linux/device.h>
6208 @@ -844,8 +847,8 @@ out:
6209 s390_unregister_crw_handler(CRW_RSC_CSS);
6210 chsc_free_sei_area();
6211 kfree(slow_subchannel_set);
6212 - printk(KERN_WARNING"cio: failed to initialize css driver (%d)!\n",
6214 + pr_alert("The CSS device driver initialization failed with "
6215 + "errno=%d\n", ret);
6219 --- a/drivers/s390/crypto/ap_bus.c
6220 +++ b/drivers/s390/crypto/ap_bus.c
6222 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
6225 +#define KMSG_COMPONENT "ap"
6227 #include <linux/module.h>
6228 #include <linux/init.h>
6229 #include <linux/delay.h>
6230 @@ -1337,12 +1339,13 @@ int __init ap_module_init(void)
6233 if (ap_domain_index < -1 || ap_domain_index >= AP_DOMAINS) {
6234 - printk(KERN_WARNING "Invalid param: domain = %d. "
6235 - " Not loading.\n", ap_domain_index);
6236 + pr_warning("%d is not a valid cryptographic domain\n",
6240 if (ap_instructions_available() != 0) {
6241 - printk(KERN_WARNING "AP instructions not installed.\n");
6242 + pr_warning("The hardware system does not support "
6243 + "AP instructions\n");
6246 register_reset_call(&ap_reset_call);
6247 --- a/drivers/s390/net/claw.c
6248 +++ b/drivers/s390/net/claw.c
6250 * 1.25 Added Packing support
6254 +#define KMSG_COMPONENT "claw"
6256 #include <asm/ccwdev.h>
6257 #include <asm/ccwgroup.h>
6258 #include <asm/debug.h>
6260 CLAW uses the s390dbf file system see claw_trace and claw_setup
6264 +static char version[] __initdata = "CLAW driver";
6265 static char debug_buffer[255];
6267 * Debug Facility Stuff
6268 @@ -298,8 +301,7 @@ claw_probe(struct ccwgroup_device *cgdev
6271 put_device(&cgdev->dev);
6272 - printk(KERN_WARNING "add_files failed %s %s Exit Line %d \n",
6273 - cgdev->cdev[0]->dev.bus_id,__func__,__LINE__);
6274 + dev_warn(&cgdev->dev, "add_files failed\n");
6275 CLAW_DBF_TEXT_(2, setup, "probex%d", rc);
6278 @@ -496,7 +498,8 @@ claw_open(struct net_device *dev)
6279 ~(DEV_STAT_CHN_END | DEV_STAT_DEV_END)) != 0x00) ||
6280 (((privptr->channel[READ].flag |
6281 privptr->channel[WRITE].flag) & CLAW_TIMER) != 0x00)) {
6282 - printk(KERN_INFO "%s: remote side is not ready\n", dev->name);
6283 + dev_info(&privptr->channel[READ].cdev->dev,
6284 + "%s: remote side is not ready\n", dev->name);
6285 CLAW_DBF_TEXT(2, trace, "notrdy");
6287 for ( i = 0; i < 2; i++) {
6288 @@ -582,10 +585,9 @@ claw_irq_handler(struct ccw_device *cdev
6289 CLAW_DBF_TEXT(4, trace, "clawirq");
6290 /* Bypass all 'unsolicited interrupts' */
6291 if (!cdev->dev.driver_data) {
6292 - printk(KERN_WARNING "claw: unsolicited interrupt for device:"
6293 - "%s received c-%02x d-%02x\n",
6294 - cdev->dev.bus_id, irb->scsw.cmd.cstat,
6295 - irb->scsw.cmd.dstat);
6296 + dev_warn(&cdev->dev, "unsolicited interrupt for device "
6297 + "received c-%02x d-%02x\n",
6298 + irb->scsw.cmd.cstat, irb->scsw.cmd.dstat);
6299 CLAW_DBF_TEXT(2, trace, "badirq");
6302 @@ -597,8 +599,8 @@ claw_irq_handler(struct ccw_device *cdev
6303 else if (privptr->channel[WRITE].cdev == cdev)
6304 p_ch = &privptr->channel[WRITE];
6306 - printk(KERN_WARNING "claw: Can't determine channel for "
6307 - "interrupt, device %s\n", cdev->dev.bus_id);
6308 + dev_warn(&cdev->dev, "Can't determine channel for "
6310 CLAW_DBF_TEXT(2, trace, "badchan");
6313 @@ -612,7 +614,8 @@ claw_irq_handler(struct ccw_device *cdev
6315 /* Check for good subchannel return code, otherwise info message */
6316 if (irb->scsw.cmd.cstat && !(irb->scsw.cmd.cstat & SCHN_STAT_PCI)) {
6317 - printk(KERN_INFO "%s: subchannel check for device: %04x -"
6318 + dev_info(&cdev->dev,
6319 + "%s: subchannel check for device: %04x -"
6320 " Sch Stat %02x Dev Stat %02x CPA - %04x\n",
6321 dev->name, p_ch->devno,
6322 irb->scsw.cmd.cstat, irb->scsw.cmd.dstat,
6323 @@ -651,7 +654,7 @@ claw_irq_handler(struct ccw_device *cdev
6324 wake_up(&p_ch->wait); /* wake claw_open (READ)*/
6325 } else if (p_ch->flag == CLAW_WRITE) {
6326 p_ch->claw_state = CLAW_START_WRITE;
6327 - /* send SYSTEM_VALIDATE */
6328 + /* send SYSTEM_VALIDATE */
6329 claw_strt_read(dev, LOCK_NO);
6330 claw_send_control(dev,
6331 SYSTEM_VALIDATE_REQUEST,
6332 @@ -659,10 +662,9 @@ claw_irq_handler(struct ccw_device *cdev
6334 p_env->adapter_name);
6336 - printk(KERN_WARNING "claw: unsolicited "
6337 - "interrupt for device:"
6338 - "%s received c-%02x d-%02x\n",
6340 + dev_warn(&cdev->dev, "unsolicited "
6341 + "interrupt for device "
6342 + "received c-%02x d-%02x\n",
6343 irb->scsw.cmd.cstat,
6344 irb->scsw.cmd.dstat);
6346 @@ -677,8 +679,8 @@ claw_irq_handler(struct ccw_device *cdev
6347 (p_ch->irb->ecw[0] & 0x40) == 0x40 ||
6348 (p_ch->irb->ecw[0]) == 0) {
6349 privptr->stats.rx_errors++;
6350 - printk(KERN_INFO "%s: Restart is "
6351 - "required after remote "
6352 + dev_info(&cdev->dev,
6353 + "%s: Restart is required after remote "
6357 @@ -713,11 +715,13 @@ claw_irq_handler(struct ccw_device *cdev
6359 case CLAW_START_WRITE:
6360 if (p_ch->irb->scsw.cmd.dstat & DEV_STAT_UNIT_CHECK) {
6361 - printk(KERN_INFO "%s: Unit Check Occured in "
6362 + dev_info(&cdev->dev,
6363 + "%s: Unit Check Occured in "
6364 "write channel\n", dev->name);
6365 clear_bit(0, (void *)&p_ch->IO_active);
6366 if (p_ch->irb->ecw[0] & 0x80) {
6367 - printk(KERN_INFO "%s: Resetting Event "
6368 + dev_info(&cdev->dev,
6369 + "%s: Resetting Event "
6370 "occurred:\n", dev->name);
6371 init_timer(&p_ch->timer);
6372 p_ch->timer.function =
6373 @@ -725,7 +729,8 @@ claw_irq_handler(struct ccw_device *cdev
6374 p_ch->timer.data = (unsigned long)p_ch;
6375 p_ch->timer.expires = jiffies + 10*HZ;
6376 add_timer(&p_ch->timer);
6377 - printk(KERN_INFO "%s: write connection "
6378 + dev_info(&cdev->dev,
6379 + "%s: write connection "
6380 "restarting\n", dev->name);
6382 CLAW_DBF_TEXT(4, trace, "rstrtwrt");
6383 @@ -733,9 +738,10 @@ claw_irq_handler(struct ccw_device *cdev
6385 if (p_ch->irb->scsw.cmd.dstat & DEV_STAT_UNIT_EXCEP) {
6386 clear_bit(0, (void *)&p_ch->IO_active);
6387 - printk(KERN_INFO "%s: Unit Exception "
6388 - "Occured in write channel\n",
6390 + dev_info(&cdev->dev,
6391 + "%s: Unit Exception "
6392 + "occurred in write channel\n",
6395 if (!((p_ch->irb->scsw.cmd.stctl & SCSW_STCTL_SEC_STATUS) ||
6396 (p_ch->irb->scsw.cmd.stctl == SCSW_STCTL_STATUS_PEND) ||
6397 @@ -757,7 +763,8 @@ claw_irq_handler(struct ccw_device *cdev
6398 CLAW_DBF_TEXT(4, trace, "StWtExit");
6401 - printk(KERN_WARNING "%s: wrong selection code - irq "
6402 + dev_warn(&cdev->dev,
6403 + "%s: wrong selection code - irq "
6404 "state=%d\n", dev->name, p_ch->claw_state);
6405 CLAW_DBF_TEXT(2, trace, "badIRQ");
6407 @@ -910,7 +917,8 @@ claw_release(struct net_device *dev)
6408 if (((privptr->channel[READ].last_dstat |
6409 privptr->channel[WRITE].last_dstat) &
6410 ~(DEV_STAT_CHN_END | DEV_STAT_DEV_END)) != 0x00) {
6411 - printk(KERN_WARNING "%s: channel problems during close - "
6412 + dev_warn(&privptr->channel[READ].cdev->dev,
6413 + "%s: channel problems during close - "
6414 "read: %02x - write: %02x\n",
6416 privptr->channel[READ].last_dstat,
6417 @@ -1135,20 +1143,19 @@ ccw_check_return_code(struct ccw_device
6418 case -EBUSY: /* BUSY is a transient state no action needed */
6421 - printk(KERN_EMERG "%s: Missing device called "
6422 - "for IO ENODEV\n", cdev->dev.bus_id);
6423 + dev_err(&cdev->dev, "Device not found "
6424 + "for IO ENODEV\n");
6427 - printk(KERN_EMERG "%s: Status pending... EIO \n",
6428 - cdev->dev.bus_id);
6429 + dev_err(&cdev->dev, "Status pending... EIO \n");
6432 - printk(KERN_EMERG "%s: Invalid Dev State EINVAL \n",
6433 - cdev->dev.bus_id);
6434 + dev_err(&cdev->dev,
6435 + "Invalid Dev State EINVAL \n");
6438 - printk(KERN_EMERG "%s: Unknown error in "
6439 - "Do_IO %d\n",cdev->dev.bus_id, return_code);
6440 + dev_err(&cdev->dev, "Unknown error in "
6441 + "Do_IO %d\n", return_code);
6444 CLAW_DBF_TEXT(4, trace, "ccwret");
6445 @@ -1162,39 +1169,40 @@ static void
6446 ccw_check_unit_check(struct chbk * p_ch, unsigned char sense )
6448 struct net_device *ndev = p_ch->ndev;
6449 + struct device *dev = &p_ch->cdev->dev;
6451 CLAW_DBF_TEXT(4, trace, "unitchek");
6452 - printk(KERN_INFO "%s: Unit Check with sense byte:0x%04x\n",
6453 - ndev->name, sense);
6454 + dev_info(dev, "%s: Unit Check with sense byte:0x%04x\n",
6455 + ndev->name, sense);
6459 - printk(KERN_WARNING "%s: Interface disconnect or "
6460 + dev_warn(dev, "%s: Interface disconnect or "
6462 "occurred (remote side)\n", ndev->name);
6465 - printk(KERN_WARNING "%s: System reset occured"
6466 + dev_warn(dev, "%s: System reset occurred"
6467 " (remote side)\n", ndev->name);
6470 else if (sense & 0x20) {
6472 - printk(KERN_WARNING "%s: Data-streaming "
6473 + dev_warn(dev, "%s: Data-streaming "
6474 "timeout)\n", ndev->name);
6477 - printk(KERN_WARNING "%s: Data-transfer parity"
6478 + dev_warn(dev, "%s: Data-transfer parity"
6479 " error\n", ndev->name);
6482 else if (sense & 0x10) {
6484 - printk(KERN_WARNING "%s: Hardware malfunction "
6485 + dev_warn(dev, "%s: Hardware malfunction "
6486 "(remote side)\n", ndev->name);
6489 - printk(KERN_WARNING "%s: read-data parity error "
6490 + dev_warn(dev, "%s: read-data parity error "
6491 "(remote side)\n", ndev->name);
6494 @@ -2002,7 +2010,7 @@ claw_process_control( struct net_device
6495 tdev = &privptr->channel[READ].cdev->dev;
6496 memcpy( &temp_host_name, p_env->host_name, 8);
6497 memcpy( &temp_ws_name, p_env->adapter_name , 8);
6498 - printk(KERN_INFO "%s: CLAW device %.8s: "
6499 + dev_info(tdev, "%s: CLAW device %.8s: "
6500 "Received Control Packet\n",
6501 dev->name, temp_ws_name);
6502 if (privptr->release_pend==1) {
6503 @@ -2021,30 +2029,28 @@ claw_process_control( struct net_device
6504 if (p_ctlbk->version != CLAW_VERSION_ID) {
6505 claw_snd_sys_validate_rsp(dev, p_ctlbk,
6506 CLAW_RC_WRONG_VERSION);
6507 - printk("%s: %d is wrong version id. "
6509 - dev->name, p_ctlbk->version,
6511 + dev_info(tdev, "%s: %d is wrong version id. "
6512 + "Expected %d\n", dev->name, p_ctlbk->version,
6515 p_sysval = (struct sysval *)&(p_ctlbk->data);
6516 - printk("%s: Recv Sys Validate Request: "
6517 - "Vers=%d,link_id=%d,Corr=%d,WS name=%."
6518 - "8s,Host name=%.8s\n",
6519 - dev->name, p_ctlbk->version,
6521 - p_ctlbk->correlator,
6522 - p_sysval->WS_name,
6523 - p_sysval->host_name);
6524 + dev_info(tdev, "%s: Recv Sys Validate Request: "
6525 + "Vers=%d,link_id=%d,Corr=%d,WS name=%.8s,"
6526 + "Host name=%.8s\n",
6527 + dev->name, p_ctlbk->version,
6529 + p_ctlbk->correlator,
6530 + p_sysval->WS_name,
6531 + p_sysval->host_name);
6532 if (memcmp(temp_host_name, p_sysval->host_name, 8)) {
6533 claw_snd_sys_validate_rsp(dev, p_ctlbk,
6534 CLAW_RC_NAME_MISMATCH);
6535 CLAW_DBF_TEXT(2, setup, "HSTBAD");
6536 CLAW_DBF_TEXT_(2, setup, "%s", p_sysval->host_name);
6537 CLAW_DBF_TEXT_(2, setup, "%s", temp_host_name);
6538 - printk(KERN_INFO "%s: Host name mismatch\n",
6540 - printk(KERN_INFO "%s: Received :%s: "
6541 - "expected :%s: \n",
6543 + "%s: Host name mismatch. Received: %s "
6546 p_sysval->host_name,
6548 @@ -2055,35 +2061,36 @@ claw_process_control( struct net_device
6549 CLAW_DBF_TEXT(2, setup, "WSNBAD");
6550 CLAW_DBF_TEXT_(2, setup, "%s", p_sysval->WS_name);
6551 CLAW_DBF_TEXT_(2, setup, "%s", temp_ws_name);
6552 - printk(KERN_INFO "%s: WS name mismatch\n",
6554 - printk(KERN_INFO "%s: Received :%s: "
6555 - "expected :%s: \n",
6557 - p_sysval->WS_name,
6559 + dev_info(tdev, "%s: WS name mismatch."
6560 + " Received: %s expected: %s\n",
6562 + p_sysval->WS_name,
6565 if ((p_sysval->write_frame_size < p_env->write_size) &&
6566 (p_env->packing == 0)) {
6567 claw_snd_sys_validate_rsp(dev, p_ctlbk,
6568 CLAW_RC_HOST_RCV_TOO_SMALL);
6569 - printk(KERN_INFO "%s: host write size is too "
6570 - "small\n", dev->name);
6572 + "host write size is too small\n");
6573 CLAW_DBF_TEXT(2, setup, "wrtszbad");
6575 if ((p_sysval->read_frame_size < p_env->read_size) &&
6576 (p_env->packing == 0)) {
6577 claw_snd_sys_validate_rsp(dev, p_ctlbk,
6578 CLAW_RC_HOST_RCV_TOO_SMALL);
6579 - printk(KERN_INFO "%s: host read size is too "
6580 - "small\n", dev->name);
6582 + "host read size is too small\n");
6583 CLAW_DBF_TEXT(2, setup, "rdsizbad");
6585 claw_snd_sys_validate_rsp(dev, p_ctlbk, 0);
6586 - printk(KERN_INFO "%s: CLAW device %.8s: System validate "
6587 - "completed.\n", dev->name, temp_ws_name);
6588 - printk("%s: sys Validate Rsize:%d Wsize:%d\n", dev->name,
6589 - p_sysval->read_frame_size, p_sysval->write_frame_size);
6591 + "CLAW device %.8s: System validate"
6592 + " completed.\n", temp_ws_name);
6594 + "%s: sys Validate Rsize:%d Wsize:%d\n",
6595 + dev->name, p_sysval->read_frame_size,
6596 + p_sysval->write_frame_size);
6597 privptr->system_validate_comp = 1;
6598 if (strncmp(p_env->api_type, WS_APPL_NAME_PACKED, 6) == 0)
6599 p_env->packing = PACKING_ASK;
6600 @@ -2091,8 +2098,9 @@ claw_process_control( struct net_device
6602 case SYSTEM_VALIDATE_RESPONSE:
6603 p_sysval = (struct sysval *)&(p_ctlbk->data);
6604 - printk("%s: Recv Sys Validate Resp: Vers=%d,Corr=%d,RC=%d,"
6605 - "WS name=%.8s,Host name=%.8s\n",
6607 + "%s: Recv Sys Validate Resp: Vers=%d,Corr=%d,"
6608 + "RC=%d,WS name=%.8s,Host name=%.8s\n",
6611 p_ctlbk->correlator,
6612 @@ -2101,32 +2109,31 @@ claw_process_control( struct net_device
6613 p_sysval->host_name);
6614 switch (p_ctlbk->rc) {
6616 - printk(KERN_INFO "%s: CLAW device "
6617 - "%.8s: System validate "
6619 - dev->name, temp_ws_name);
6620 + dev_info(tdev, "%s: CLAW device "
6621 + "%.8s: System validate completed.\n",
6622 + dev->name, temp_ws_name);
6623 if (privptr->system_validate_comp == 0)
6624 claw_strt_conn_req(dev);
6625 privptr->system_validate_comp = 1;
6627 case CLAW_RC_NAME_MISMATCH:
6628 - printk(KERN_INFO "%s: Sys Validate "
6629 + dev_info(tdev, "%s: Sys Validate "
6630 "Resp : Host, WS name is "
6635 case CLAW_RC_WRONG_VERSION:
6636 - printk(KERN_INFO "%s: Sys Validate "
6637 + dev_info(tdev, "%s: Sys Validate "
6638 "Resp : Wrong version\n",
6641 case CLAW_RC_HOST_RCV_TOO_SMALL:
6642 - printk(KERN_INFO "%s: Sys Validate "
6643 + dev_info(tdev, "%s: Sys Validate "
6644 "Resp : bad frame size\n",
6648 - printk(KERN_INFO "%s: Sys Validate "
6649 + dev_info(tdev, "%s: Sys Validate "
6651 dev->name, p_ctlbk->rc);
6653 @@ -2135,7 +2142,7 @@ claw_process_control( struct net_device
6655 case CONNECTION_REQUEST:
6656 p_connect = (struct conncmd *)&(p_ctlbk->data);
6657 - printk(KERN_INFO "%s: Recv Conn Req: Vers=%d,link_id=%d,"
6658 + dev_info(tdev, "%s: Recv Conn Req: Vers=%d,link_id=%d,"
6659 "Corr=%d,HOST appl=%.8s,WS appl=%.8s\n",
6662 @@ -2145,20 +2152,20 @@ claw_process_control( struct net_device
6663 p_connect->WS_name);
6664 if (privptr->active_link_ID != 0) {
6665 claw_snd_disc(dev, p_ctlbk);
6666 - printk(KERN_INFO "%s: Conn Req error : "
6667 + dev_info(tdev, "%s: Conn Req error : "
6668 "already logical link is active \n",
6671 if (p_ctlbk->linkid != 1) {
6672 claw_snd_disc(dev, p_ctlbk);
6673 - printk(KERN_INFO "%s: Conn Req error : "
6674 + dev_info(tdev, "%s: Conn Req error : "
6675 "req logical link id is not 1\n",
6678 rc = find_link(dev, p_connect->host_name, p_connect->WS_name);
6680 claw_snd_disc(dev, p_ctlbk);
6681 - printk(KERN_INFO "%s: Conn Resp error: "
6682 + dev_info(tdev, "%s: Conn Req error : "
6683 "req appl name does not match\n",
6686 @@ -2171,7 +2178,7 @@ claw_process_control( struct net_device
6687 p_env->packing = PACK_SEND;
6688 claw_snd_conn_req(dev, 0);
6690 - printk(KERN_INFO "%s: CLAW device %.8s: Connection "
6691 + dev_info(tdev, "%s: CLAW device %.8s: Connection "
6692 "completed link_id=%d.\n",
6693 dev->name, temp_ws_name,
6695 @@ -2181,7 +2188,7 @@ claw_process_control( struct net_device
6697 case CONNECTION_RESPONSE:
6698 p_connect = (struct conncmd *)&(p_ctlbk->data);
6699 - printk(KERN_INFO "%s: Revc Conn Resp: Vers=%d,link_id=%d,"
6700 + dev_info(tdev, "%s: Revc Conn Resp: Vers=%d,link_id=%d,"
6701 "Corr=%d,RC=%d,Host appl=%.8s, WS appl=%.8s\n",
6704 @@ -2192,7 +2199,7 @@ claw_process_control( struct net_device
6705 p_connect->WS_name);
6707 if (p_ctlbk->rc != 0) {
6708 - printk(KERN_INFO "%s: Conn Resp error: rc=%d \n",
6709 + dev_info(tdev, "%s: Conn Resp error: rc=%d \n",
6710 dev->name, p_ctlbk->rc);
6713 @@ -2200,7 +2207,7 @@ claw_process_control( struct net_device
6714 p_connect->host_name, p_connect->WS_name);
6716 claw_snd_disc(dev, p_ctlbk);
6717 - printk(KERN_INFO "%s: Conn Resp error: "
6718 + dev_info(tdev, "%s: Conn Resp error: "
6719 "req appl name does not match\n",
6722 @@ -2209,7 +2216,8 @@ claw_process_control( struct net_device
6724 case CONNECTION_CONFIRM:
6725 p_connect = (struct conncmd *)&(p_ctlbk->data);
6726 - printk(KERN_INFO "%s: Recv Conn Confirm:Vers=%d,link_id=%d,"
6728 + "%s: Recv Conn Confirm:Vers=%d,link_id=%d,"
6729 "Corr=%d,Host appl=%.8s,WS appl=%.8s\n",
6732 @@ -2220,21 +2228,21 @@ claw_process_control( struct net_device
6733 if (p_ctlbk->linkid == -(privptr->active_link_ID)) {
6734 privptr->active_link_ID = p_ctlbk->linkid;
6735 if (p_env->packing > PACKING_ASK) {
6736 - printk(KERN_INFO "%s: Confirmed Now packing\n",
6739 + "%s: Confirmed Now packing\n", dev->name);
6740 p_env->packing = DO_PACKED;
6742 p_ch = &privptr->channel[WRITE];
6743 wake_up(&p_ch->wait);
6745 - printk(KERN_INFO "%s: Conn confirm: "
6746 + dev_info(tdev, "%s: Conn confirm: "
6747 "unexpected linkid=%d \n",
6748 dev->name, p_ctlbk->linkid);
6749 claw_snd_disc(dev, p_ctlbk);
6753 - printk(KERN_INFO "%s: Disconnect: "
6754 + dev_info(tdev, "%s: Disconnect: "
6755 "Vers=%d,link_id=%d,Corr=%d\n",
6756 dev->name, p_ctlbk->version,
6757 p_ctlbk->linkid, p_ctlbk->correlator);
6758 @@ -2246,11 +2254,11 @@ claw_process_control( struct net_device
6759 privptr->active_link_ID = 0;
6762 - printk(KERN_INFO "%s: CLAW ERROR detected\n",
6763 + dev_info(tdev, "%s: CLAW ERROR detected\n",
6767 - printk(KERN_INFO "%s: Unexpected command code=%d \n",
6768 + dev_info(tdev, "%s: Unexpected command code=%d \n",
6769 dev->name, p_ctlbk->command);
6772 @@ -2510,7 +2518,8 @@ unpack_read(struct net_device *dev )
6774 if (p_this_ccw->header.length!=
6775 privptr->p_env->read_size ) {
6776 - printk(KERN_INFO " %s: Invalid frame detected "
6778 + "%s: Invalid frame detected "
6779 "length is %02x\n" ,
6780 dev->name, p_this_ccw->header.length);
6782 @@ -2594,8 +2603,8 @@ unpack_next:
6785 privptr->stats.rx_dropped++;
6786 - printk(KERN_WARNING "%s: %s() low on memory\n",
6787 - dev->name,__func__);
6789 + "buffer allocate failed on receive\n");
6791 privptr->mtc_offset=0;
6792 privptr->mtc_logical_link=-1;
6793 @@ -2879,7 +2888,8 @@ claw_new_device(struct ccwgroup_device *
6795 struct ccw_dev_id dev_id;
6797 - printk(KERN_INFO "claw: add for %s\n",cgdev->cdev[READ]->dev.bus_id);
6798 + dev_info(&cgdev->dev, "add for %s\n",
6799 + dev_name(&cgdev->cdev[READ]->dev));
6800 CLAW_DBF_TEXT(2, setup, "new_dev");
6801 privptr = cgdev->dev.driver_data;
6802 cgdev->cdev[READ]->dev.driver_data = privptr;
6803 @@ -2895,27 +2905,28 @@ claw_new_device(struct ccwgroup_device *
6805 ret = add_channel(cgdev->cdev[1],1,privptr);
6807 - printk(KERN_WARNING
6808 - "add channel failed with ret = %d\n", ret);
6809 + dev_warn(&cgdev->dev, "add channel failed "
6810 + "with ret = %d\n", ret);
6813 ret = ccw_device_set_online(cgdev->cdev[READ]);
6815 - printk(KERN_WARNING
6816 - "claw: ccw_device_set_online %s READ failed "
6817 - "with ret = %d\n",cgdev->cdev[READ]->dev.bus_id,ret);
6818 + dev_warn(&cgdev->dev,
6819 + "device set online READ failed "
6820 + "with ret = %d\n", ret);
6823 ret = ccw_device_set_online(cgdev->cdev[WRITE]);
6825 - printk(KERN_WARNING
6826 - "claw: ccw_device_set_online %s WRITE failed "
6827 - "with ret = %d\n",cgdev->cdev[WRITE]->dev.bus_id, ret);
6828 + dev_warn(&cgdev->dev,
6829 + "device set online WRITE failed "
6830 + "with ret = %d\n", ret);
6833 dev = alloc_netdev(0,"claw%d",claw_init_netdevice);
6835 - printk(KERN_WARNING "%s:alloc_netdev failed\n",__func__);
6836 + dev_warn(&cgdev->dev,
6837 + "failed creating network device\n");
6840 dev->ml_priv = privptr;
6841 @@ -2943,13 +2954,13 @@ claw_new_device(struct ccwgroup_device *
6842 privptr->channel[WRITE].ndev = dev;
6843 privptr->p_env->ndev = dev;
6845 - printk(KERN_INFO "%s:readsize=%d writesize=%d "
6846 + dev_info(&cgdev->dev, "%s:readsize=%d writesize=%d "
6847 "readbuffer=%d writebuffer=%d read=0x%04x write=0x%04x\n",
6848 dev->name, p_env->read_size,
6849 p_env->write_size, p_env->read_buffers,
6850 p_env->write_buffers, p_env->devno[READ],
6851 p_env->devno[WRITE]);
6852 - printk(KERN_INFO "%s:host_name:%.8s, adapter_name "
6853 + dev_info(&cgdev->dev, "%s:host_name:%.8s, adapter_name "
6854 ":%.8s api_type: %.8s\n",
6855 dev->name, p_env->host_name,
6856 p_env->adapter_name , p_env->api_type);
6857 @@ -2993,8 +3004,8 @@ claw_shutdown_device(struct ccwgroup_dev
6858 ndev = priv->channel[READ].ndev;
6860 /* Close the device */
6862 - "%s: shuting down \n",ndev->name);
6863 + dev_info(&cgdev->dev, "%s: shutting down \n",
6865 if (ndev->flags & IFF_RUNNING)
6866 ret = claw_release(ndev);
6867 ndev->flags &=~IFF_RUNNING;
6868 @@ -3019,8 +3030,7 @@ claw_remove_device(struct ccwgroup_devic
6869 CLAW_DBF_TEXT_(2, setup, "%s", cgdev->dev.bus_id);
6870 priv = cgdev->dev.driver_data;
6872 - printk(KERN_INFO "claw: %s() called %s will be removed.\n",
6873 - __func__,cgdev->cdev[0]->dev.bus_id);
6874 + dev_info(&cgdev->dev, " will be removed.\n");
6875 if (cgdev->state == CCWGROUP_ONLINE)
6876 claw_shutdown_device(cgdev);
6877 claw_remove_files(&cgdev->dev);
6878 @@ -3285,7 +3295,7 @@ claw_cleanup(void)
6880 unregister_cu3088_discipline(&claw_group_driver);
6881 claw_unregister_debug_facility();
6882 - printk(KERN_INFO "claw: Driver unloaded\n");
6883 + pr_info("Driver unloaded\n");
6887 @@ -3299,12 +3309,11 @@ static int __init
6891 - printk(KERN_INFO "claw: starting driver\n");
6893 + pr_info("Loading %s\n", version);
6894 ret = claw_register_debug_facility();
6896 - printk(KERN_WARNING "claw: %s() debug_register failed %d\n",
6898 + pr_warning("debug_register failed %d\n", ret);
6901 CLAW_DBF_TEXT(2, setup, "init_mod");
6902 @@ -3312,8 +3321,7 @@ claw_init(void)
6904 CLAW_DBF_TEXT(2, setup, "init_bad");
6905 claw_unregister_debug_facility();
6906 - printk(KERN_WARNING "claw; %s() cu3088 register failed %d\n",
6908 + pr_warning("register_cu3088_discipline() failed rc=%d\n", ret);
6912 --- a/drivers/s390/net/ctcm_fsms.c
6913 +++ b/drivers/s390/net/ctcm_fsms.c
6918 +#define KMSG_COMPONENT "ctcm"
6920 #include <linux/module.h>
6921 #include <linux/init.h>
6922 #include <linux/kernel.h>
6923 @@ -190,21 +192,22 @@ static void ctcmpc_chx_send_sweep(fsm_in
6924 void ctcm_ccw_check_rc(struct channel *ch, int rc, char *msg)
6926 CTCM_DBF_TEXT_(ERROR, CTC_DBF_ERROR,
6927 - "%s(%s): %s: %04x\n",
6928 - CTCM_FUNTAIL, ch->id, msg, rc);
6929 + "%s(%s): %s: %04x\n",
6930 + CTCM_FUNTAIL, ch->id, msg, rc);
6933 - ctcm_pr_warn("%s (%s): Busy !\n", ch->id, msg);
6934 + pr_info("%s: The communication peer is busy\n",
6936 fsm_event(ch->fsm, CTC_EVENT_IO_EBUSY, ch);
6939 - ctcm_pr_emerg("%s (%s): Invalid device called for IO\n",
6941 + pr_err("%s: The specified target device is not valid\n",
6943 fsm_event(ch->fsm, CTC_EVENT_IO_ENODEV, ch);
6946 - ctcm_pr_emerg("%s (%s): Unknown error in do_IO %04x\n",
6948 + pr_err("An I/O operation resulted in error %04x\n",
6950 fsm_event(ch->fsm, CTC_EVENT_IO_UNKNOWN, ch);
6953 @@ -886,8 +889,15 @@ static void ctcm_chx_rxiniterr(fsm_insta
6954 fsm_newstate(fi, CTC_STATE_RXERR);
6955 fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev);
6958 - ctcm_pr_warn("%s: Error during RX init handshake\n", dev->name);
6960 + CTCM_DBF_TEXT_(ERROR, CTC_DBF_ERROR,
6961 + "%s(%s): %s in %s", CTCM_FUNTAIL, ch->id,
6962 + ctc_ch_event_names[event], fsm_getstate_str(fi));
6964 + dev_warn(&dev->dev,
6965 + "Initialization failed with RX/TX init handshake "
6966 + "error %s\n", ctc_ch_event_names[event]);
6971 @@ -969,7 +979,9 @@ static void ctcm_chx_txiniterr(fsm_insta
6972 "%s(%s): %s in %s", CTCM_FUNTAIL, ch->id,
6973 ctc_ch_event_names[event], fsm_getstate_str(fi));
6975 - ctcm_pr_warn("%s: Error during TX init handshake\n", dev->name);
6976 + dev_warn(&dev->dev,
6977 + "Initialization failed with RX/TX init handshake "
6978 + "error %s\n", ctc_ch_event_names[event]);
6982 @@ -2101,14 +2113,11 @@ static void dev_action_restart(fsm_insta
6983 CTCMY_DBF_DEV_NAME(TRACE, dev, "");
6986 - ctcm_pr_info("ctcm: %s Restarting Device and "
6987 - "MPC Group in 5 seconds\n",
6989 restart_timer = CTCM_TIME_1_SEC;
6991 - ctcm_pr_info("%s: Restarting\n", dev->name);
6992 restart_timer = CTCM_TIME_5_SEC;
6994 + dev_info(&dev->dev, "Restarting device\n");
6996 dev_action_stop(fi, event, arg);
6997 fsm_event(priv->fsm, DEV_EVENT_STOP, dev);
6998 @@ -2150,16 +2159,16 @@ static void dev_action_chup(fsm_instance
6999 case DEV_STATE_STARTWAIT_RX:
7000 if (event == DEV_EVENT_RXUP) {
7001 fsm_newstate(fi, DEV_STATE_RUNNING);
7002 - ctcm_pr_info("%s: connected with remote side\n",
7004 + dev_info(&dev->dev,
7005 + "Connected with remote side\n");
7006 ctcm_clear_busy(dev);
7009 case DEV_STATE_STARTWAIT_TX:
7010 if (event == DEV_EVENT_TXUP) {
7011 fsm_newstate(fi, DEV_STATE_RUNNING);
7012 - ctcm_pr_info("%s: connected with remote side\n",
7014 + dev_info(&dev->dev,
7015 + "Connected with remote side\n");
7016 ctcm_clear_busy(dev);
7019 --- a/drivers/s390/net/ctcm_main.c
7020 +++ b/drivers/s390/net/ctcm_main.c
7025 +#define KMSG_COMPONENT "ctcm"
7027 #include <linux/module.h>
7028 #include <linux/init.h>
7029 #include <linux/kernel.h>
7030 @@ -281,14 +283,16 @@ static long ctcm_check_irb_error(struct
7032 switch (PTR_ERR(irb)) {
7034 - ctcm_pr_warn("i/o-error on device %s\n", cdev->dev.bus_id);
7035 + dev_err(&cdev->dev,
7036 + "An I/O-error occurred on the CTCM device\n");
7039 - ctcm_pr_warn("timeout on device %s\n", cdev->dev.bus_id);
7040 + dev_err(&cdev->dev,
7041 + "An adapter hardware operation timed out\n");
7044 - ctcm_pr_warn("unknown error %ld on device %s\n",
7045 - PTR_ERR(irb), cdev->dev.bus_id);
7046 + dev_err(&cdev->dev,
7047 + "An error occurred on the adapter hardware\n");
7049 return PTR_ERR(irb);
7051 @@ -309,15 +313,17 @@ static inline void ccw_unit_check(struct
7052 if (sense & SNS0_INTERVENTION_REQ) {
7054 if (ch->sense_rc != 0x01) {
7055 - ctcm_pr_debug("%s: Interface disc. or Sel. "
7056 - "reset (remote)\n", ch->id);
7058 + "%s: The communication peer has "
7059 + "disconnected\n", ch->id);
7060 ch->sense_rc = 0x01;
7062 fsm_event(ch->fsm, CTC_EVENT_UC_RCRESET, ch);
7064 if (ch->sense_rc != SNS0_INTERVENTION_REQ) {
7065 - ctcm_pr_debug("%s: System reset (remote)\n",
7068 + "%s: The remote operating system is "
7069 + "not available\n", ch->id);
7070 ch->sense_rc = SNS0_INTERVENTION_REQ;
7072 fsm_event(ch->fsm, CTC_EVENT_UC_RSRESET, ch);
7073 @@ -1194,8 +1200,11 @@ static void ctcm_irq_handler(struct ccw_
7075 /* Check for unsolicited interrupts. */
7076 if (cgdev == NULL) {
7077 - ctcm_pr_warn("ctcm: Got unsolicited irq: c-%02x d-%02x\n",
7079 + CTCM_DBF_TEXT_(TRACE, CTC_DBF_ERROR,
7080 + "%s(%s) unsolicited irq: c-%02x d-%02x\n",
7081 + CTCM_FUNTAIL, dev_name(&cdev->dev), cstat, dstat);
7082 + dev_warn(&cdev->dev,
7083 + "The adapter received a non-specific IRQ\n");
7087 @@ -1207,31 +1216,34 @@ static void ctcm_irq_handler(struct ccw_
7088 else if (priv->channel[WRITE]->cdev == cdev)
7089 ch = priv->channel[WRITE];
7091 - ctcm_pr_err("ctcm: Can't determine channel for interrupt, "
7092 - "device %s\n", cdev->dev.bus_id);
7093 + dev_err(&cdev->dev,
7094 + "%s: Internal error: Can't determine channel for "
7095 + "interrupt device %s\n",
7096 + __func__, dev_name(&cdev->dev));
7097 + /* Explain: inconsistent internal structures */
7103 - ctcm_pr_crit("ctcm: %s dev=NULL bus_id=%s, ch=0x%p\n",
7104 - __func__, cdev->dev.bus_id, ch);
7105 + dev_err(&cdev->dev,
7106 + "%s Internal error: net_device is NULL, ch = 0x%p\n",
7108 + /* Explain: inconsistent internal structures */
7112 - CTCM_DBF_TEXT_(TRACE, CTC_DBF_DEBUG,
7113 - "%s(%s): int. for %s: cstat=%02x dstat=%02x",
7114 - CTCM_FUNTAIL, dev->name, ch->id, cstat, dstat);
7116 /* Copy interruption response block. */
7117 memcpy(ch->irb, irb, sizeof(struct irb));
7119 + /* Issue error message and return on subchannel error code */
7120 if (irb->scsw.cmd.cstat) {
7121 - /* Check for good subchannel return code, otherwise error message */
7122 fsm_event(ch->fsm, CTC_EVENT_SC_UNKNOWN, ch);
7123 - ctcm_pr_warn("%s: subchannel check for dev: %s - %02x %02x\n",
7124 - dev->name, ch->id, irb->scsw.cmd.cstat,
7125 - irb->scsw.cmd.dstat);
7126 + CTCM_DBF_TEXT_(TRACE, CTC_DBF_WARN,
7127 + "%s(%s): sub-ch check %s: cs=%02x ds=%02x",
7128 + CTCM_FUNTAIL, dev->name, ch->id, cstat, dstat);
7129 + dev_warn(&cdev->dev,
7130 + "A check occurred on the subchannel\n");
7134 @@ -1239,7 +1251,7 @@ static void ctcm_irq_handler(struct ccw_
7135 if (irb->scsw.cmd.dstat & DEV_STAT_UNIT_CHECK) {
7136 if ((irb->ecw[0] & ch->sense_rc) == 0)
7137 /* print it only once */
7138 - CTCM_DBF_TEXT_(TRACE, CTC_DBF_INFO,
7139 + CTCM_DBF_TEXT_(TRACE, CTC_DBF_WARN,
7140 "%s(%s): sense=%02x, ds=%02x",
7141 CTCM_FUNTAIL, ch->id, irb->ecw[0], dstat);
7142 ccw_unit_check(ch, irb->ecw[0]);
7143 @@ -1574,6 +1586,11 @@ static int ctcm_new_device(struct ccwgro
7145 strlcpy(priv->fsm->name, dev->name, sizeof(priv->fsm->name));
7147 + dev_info(&dev->dev,
7148 + "setup OK : r/w = %s/%s, protocol : %d\n",
7149 + priv->channel[READ]->id,
7150 + priv->channel[WRITE]->id, priv->protocol);
7152 CTCM_DBF_TEXT_(SETUP, CTC_DBF_INFO,
7153 "setup(%s) OK : r/w = %s/%s, protocol : %d", dev->name,
7154 priv->channel[READ]->id,
7155 @@ -1687,7 +1704,7 @@ static void __exit ctcm_exit(void)
7157 unregister_cu3088_discipline(&ctcm_group_driver);
7158 ctcm_unregister_dbf_views();
7159 - ctcm_pr_info("CTCM driver unloaded\n");
7160 + pr_info("CTCM driver unloaded\n");
7164 @@ -1695,7 +1712,7 @@ static void __exit ctcm_exit(void)
7166 static void print_banner(void)
7168 - printk(KERN_INFO "CTCM driver initialized\n");
7169 + pr_info("CTCM driver initialized\n");
7173 @@ -1717,8 +1734,8 @@ static int __init ctcm_init(void)
7174 ret = register_cu3088_discipline(&ctcm_group_driver);
7176 ctcm_unregister_dbf_views();
7177 - ctcm_pr_crit("ctcm_init failed with register_cu3088_discipline "
7178 - "(rc = %d)\n", ret);
7179 + pr_err("%s / register_cu3088_discipline failed, ret = %d\n",
7184 --- a/drivers/s390/net/ctcm_main.h
7185 +++ b/drivers/s390/net/ctcm_main.h
7187 #define LOG_FLAG_NOMEM 8
7189 #define ctcm_pr_debug(fmt, arg...) printk(KERN_DEBUG fmt, ##arg)
7190 -#define ctcm_pr_info(fmt, arg...) printk(KERN_INFO fmt, ##arg)
7191 -#define ctcm_pr_notice(fmt, arg...) printk(KERN_NOTICE fmt, ##arg)
7192 -#define ctcm_pr_warn(fmt, arg...) printk(KERN_WARNING fmt, ##arg)
7193 -#define ctcm_pr_emerg(fmt, arg...) printk(KERN_EMERG fmt, ##arg)
7194 -#define ctcm_pr_err(fmt, arg...) printk(KERN_ERR fmt, ##arg)
7195 -#define ctcm_pr_crit(fmt, arg...) printk(KERN_CRIT fmt, ##arg)
7197 #define CTCM_PR_DEBUG(fmt, arg...) \
7199 --- a/drivers/s390/net/ctcm_mpc.c
7200 +++ b/drivers/s390/net/ctcm_mpc.c
7205 +#define KMSG_COMPONENT "ctcm"
7207 #include <linux/module.h>
7208 #include <linux/init.h>
7209 #include <linux/kernel.h>
7210 @@ -386,7 +388,7 @@ int ctc_mpc_alloc_channel(int port_num,
7211 if (grp->allocchan_callback_retries < 4) {
7212 if (grp->allochanfunc)
7213 grp->allochanfunc(grp->port_num,
7214 - grp->group_max_buflen);
7215 + grp->group_max_buflen);
7217 /* there are problems...bail out */
7218 /* there may be a state mismatch so restart */
7219 @@ -1232,8 +1234,9 @@ done:
7221 dev_kfree_skb_any(pskb);
7222 if (sendrc == NET_RX_DROP) {
7223 - printk(KERN_WARNING "%s %s() NETWORK BACKLOG EXCEEDED"
7224 - " - PACKET DROPPED\n", dev->name, __func__);
7225 + dev_warn(&dev->dev,
7226 + "The network backlog for %s is exceeded, "
7227 + "package dropped\n", __func__);
7228 fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
7231 @@ -1670,10 +1673,11 @@ static int mpc_validate_xid(struct mpcg_
7232 CTCM_FUNTAIL, ch->id);
7238 - ctcm_pr_info("ctcmpc : %s() failed\n", __FUNCTION__);
7239 + dev_warn(&dev->dev,
7240 + "The XID used in the MPC protocol is not valid, "
7242 priv->xid->xid2_flag2 = 0x40;
7243 grp->saved_xid2->xid2_flag2 = 0x40;
7245 --- a/drivers/s390/net/ctcm_sysfs.c
7246 +++ b/drivers/s390/net/ctcm_sysfs.c
7251 +#define KMSG_COMPONENT "ctcm"
7253 #include <linux/sysfs.h>
7254 #include "ctcm_main.h"
7256 --- a/drivers/s390/net/lcs.c
7257 +++ b/drivers/s390/net/lcs.c
7259 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
7262 +#define KMSG_COMPONENT "lcs"
7264 #include <linux/module.h>
7265 #include <linux/if.h>
7266 #include <linux/netdevice.h>
7268 #error Cannot compile lcs.c without some net devices switched on.
7271 -#define PRINTK_HEADER " lcs: "
7274 * initialization string for output
7276 @@ -96,7 +96,7 @@ lcs_register_debug_facility(void)
7277 lcs_dbf_setup = debug_register("lcs_setup", 2, 1, 8);
7278 lcs_dbf_trace = debug_register("lcs_trace", 4, 1, 8);
7279 if (lcs_dbf_setup == NULL || lcs_dbf_trace == NULL) {
7280 - PRINT_ERR("Not enough memory for debug facility.\n");
7281 + pr_err("Not enough memory for debug facility.\n");
7282 lcs_unregister_debug_facility();
7285 @@ -502,7 +502,9 @@ lcs_start_channel(struct lcs_channel *ch
7286 spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags);
7288 LCS_DBF_TEXT_(4,trace,"essh%s", channel->ccwdev->dev.bus_id);
7289 - PRINT_ERR("Error in starting channel, rc=%d!\n", rc);
7290 + dev_err(&channel->ccwdev->dev,
7291 + "Starting an LCS device resulted in an error,"
7296 @@ -636,7 +638,9 @@ __lcs_resume_channel(struct lcs_channel
7297 rc = ccw_device_resume(channel->ccwdev);
7299 LCS_DBF_TEXT_(4, trace, "ersc%s", channel->ccwdev->dev.bus_id);
7300 - PRINT_ERR("Error in lcs_resume_channel: rc=%d\n",rc);
7301 + dev_warn(&channel->ccwdev->dev,
7302 + "Sending data from the LCS device to the LAN failed"
7303 + " with rc=%d\n",rc);
7305 channel->state = LCS_CH_STATE_RUNNING;
7307 @@ -1082,7 +1086,7 @@ lcs_check_multicast_support(struct lcs_c
7308 cmd->cmd.lcs_qipassist.num_ip_pairs = 1;
7309 rc = lcs_send_lancmd(card, buffer, __lcs_check_multicast_cb);
7311 - PRINT_ERR("Query IPAssist failed. Assuming unsupported!\n");
7312 + pr_err("Query IPAssist failed. Assuming unsupported!\n");
7315 if (card->ip_assists_supported & LCS_IPASS_MULTICAST_SUPPORT)
7316 @@ -1115,8 +1119,8 @@ list_modified:
7317 rc = lcs_send_setipm(card, ipm);
7318 spin_lock_irqsave(&card->ipm_lock, flags);
7320 - PRINT_INFO("Adding multicast address failed. "
7321 - "Table possibly full!\n");
7322 + pr_info("Adding multicast address failed."
7323 + " Table possibly full!\n");
7324 /* store ipm in failed list -> will be added
7325 * to ipm_list again, so a retry will be done
7326 * during the next call of this function */
7327 @@ -1227,8 +1231,8 @@ lcs_set_mc_addresses(struct lcs_card *ca
7328 ipm = (struct lcs_ipm_list *)
7329 kzalloc(sizeof(struct lcs_ipm_list), GFP_ATOMIC);
7331 - PRINT_INFO("Not enough memory to add "
7332 - "new multicast entry!\n");
7333 + pr_info("Not enough memory to add"
7334 + " new multicast entry!\n");
7337 memcpy(&ipm->ipm.mac_addr, buf, LCS_MAC_LENGTH);
7338 @@ -1302,18 +1306,21 @@ lcs_check_irb_error(struct ccw_device *c
7340 switch (PTR_ERR(irb)) {
7342 - PRINT_WARN("i/o-error on device %s\n", cdev->dev.bus_id);
7343 + dev_warn(&cdev->dev,
7344 + "An I/O-error occurred on the LCS device\n");
7345 LCS_DBF_TEXT(2, trace, "ckirberr");
7346 LCS_DBF_TEXT_(2, trace, " rc%d", -EIO);
7349 - PRINT_WARN("timeout on device %s\n", cdev->dev.bus_id);
7350 + dev_warn(&cdev->dev,
7351 + "A command timed out on the LCS device\n");
7352 LCS_DBF_TEXT(2, trace, "ckirberr");
7353 LCS_DBF_TEXT_(2, trace, " rc%d", -ETIMEDOUT);
7356 - PRINT_WARN("unknown error %ld on device %s\n", PTR_ERR(irb),
7357 - cdev->dev.bus_id);
7358 + dev_warn(&cdev->dev,
7359 + "An error occurred on the LCS device, rc=%ld\n",
7361 LCS_DBF_TEXT(2, trace, "ckirberr");
7362 LCS_DBF_TEXT(2, trace, " rc???");
7364 @@ -1399,8 +1406,10 @@ lcs_irq(struct ccw_device *cdev, unsigne
7365 /* Check for channel and device errors presented */
7366 rc = lcs_get_problem(cdev, irb);
7367 if (rc || (dstat & DEV_STAT_UNIT_EXCEP)) {
7368 - PRINT_WARN("check on device %s, dstat=0x%X, cstat=0x%X \n",
7369 - cdev->dev.bus_id, dstat, cstat);
7370 + dev_warn(&cdev->dev,
7371 + "The LCS device stopped because of an error,"
7372 + " dstat=0x%X, cstat=0x%X \n",
7375 channel->state = LCS_CH_STATE_ERROR;
7377 @@ -1757,8 +1766,8 @@ lcs_get_control(struct lcs_card *card, s
7378 lcs_schedule_recovery(card);
7380 case LCS_CMD_STOPLAN:
7381 - PRINT_WARN("Stoplan for %s initiated by LGW.\n",
7383 + pr_warning("Stoplan for %s initiated by LGW.\n",
7386 netif_carrier_off(card->dev);
7388 @@ -1786,7 +1795,8 @@ lcs_get_skb(struct lcs_card *card, char
7390 skb = dev_alloc_skb(skb_len);
7392 - PRINT_ERR("LCS: alloc_skb failed for device=%s\n",
7393 + dev_err(&card->dev->dev,
7394 + " Allocating a socket buffer to interface %s failed\n",
7396 card->stats.rx_dropped++;
7398 @@ -1882,7 +1892,8 @@ lcs_stop_device(struct net_device *dev)
7399 (card->write.state != LCS_CH_STATE_RUNNING));
7400 rc = lcs_stopcard(card);
7402 - PRINT_ERR("Try it again!\n ");
7403 + dev_err(&card->dev->dev,
7404 + " Shutting down the LCS device failed\n ");
7408 @@ -1901,7 +1912,7 @@ lcs_open_device(struct net_device *dev)
7409 /* initialize statistics */
7410 rc = lcs_detect(card);
7412 - PRINT_ERR("LCS:Error in opening device!\n");
7413 + pr_err("Error in opening device!\n");
7416 dev->flags |= IFF_UP;
7417 @@ -2109,8 +2120,9 @@ lcs_new_device(struct ccwgroup_device *c
7418 rc = lcs_detect(card);
7420 LCS_DBF_TEXT(2, setup, "dtctfail");
7421 - PRINT_WARN("Detection of LCS card failed with return code "
7422 - "%d (0x%x)\n", rc, rc);
7423 + dev_warn(&card->dev->dev,
7424 + "Detecting a network adapter for LCS devices"
7425 + " failed with rc=%d (0x%x)\n", rc, rc);
7429 @@ -2140,7 +2152,7 @@ lcs_new_device(struct ccwgroup_device *c
7432 LCS_DBF_TEXT(3, setup, "errinit");
7433 - PRINT_ERR("LCS: Initialization failed\n");
7434 + pr_err(" Initialization failed\n");
7438 @@ -2172,13 +2184,13 @@ netdev_out:
7441 /* Print out supported assists: IPv6 */
7442 - PRINT_INFO("LCS device %s %s IPv6 support\n", card->dev->name,
7443 - (card->ip_assists_supported & LCS_IPASS_IPV6_SUPPORT) ?
7444 - "with" : "without");
7445 + pr_info("LCS device %s %s IPv6 support\n", card->dev->name,
7446 + (card->ip_assists_supported & LCS_IPASS_IPV6_SUPPORT) ?
7447 + "with" : "without");
7448 /* Print out supported assist: Multicast */
7449 - PRINT_INFO("LCS device %s %s Multicast support\n", card->dev->name,
7450 - (card->ip_assists_supported & LCS_IPASS_MULTICAST_SUPPORT) ?
7451 - "with" : "without");
7452 + pr_info("LCS device %s %s Multicast support\n", card->dev->name,
7453 + (card->ip_assists_supported & LCS_IPASS_MULTICAST_SUPPORT) ?
7454 + "with" : "without");
7458 @@ -2244,15 +2256,16 @@ lcs_recovery(void *ptr)
7460 LCS_DBF_TEXT(4, trace, "recover2");
7462 - PRINT_WARN("Recovery of device %s started...\n", gdev->dev.bus_id);
7463 + dev_warn(&gdev->dev,
7464 + "A recovery process has been started for the LCS device\n");
7465 rc = __lcs_shutdown_device(gdev, 1);
7466 rc = lcs_new_device(gdev);
7468 - PRINT_INFO("Device %s successfully recovered!\n",
7470 + pr_info("Device %s successfully recovered!\n",
7473 - PRINT_INFO("Device %s could not be recovered!\n",
7475 + pr_info("Device %s could not be recovered!\n",
7477 lcs_clear_thread_running_bit(card, LCS_RECOVERY_THREAD);
7480 @@ -2304,17 +2317,17 @@ __init lcs_init_module(void)
7484 - PRINT_INFO("Loading %s\n",version);
7485 + pr_info("Loading %s\n", version);
7486 rc = lcs_register_debug_facility();
7487 LCS_DBF_TEXT(0, setup, "lcsinit");
7489 - PRINT_ERR("Initialization failed\n");
7490 + pr_err("Initialization failed\n");
7494 rc = register_cu3088_discipline(&lcs_group_driver);
7496 - PRINT_ERR("Initialization failed\n");
7497 + pr_err("Initialization failed\n");
7501 @@ -2327,7 +2340,7 @@ __init lcs_init_module(void)
7503 __exit lcs_cleanup_module(void)
7505 - PRINT_INFO("Terminating lcs module.\n");
7506 + pr_info("Terminating lcs module.\n");
7507 LCS_DBF_TEXT(0, trace, "cleanup");
7508 unregister_cu3088_discipline(&lcs_group_driver);
7509 lcs_unregister_debug_facility();
7510 --- a/drivers/s390/net/netiucv.c
7511 +++ b/drivers/s390/net/netiucv.c
7516 +#define KMSG_COMPONENT "netiucv"
7520 #include <linux/module.h>
7521 @@ -846,7 +848,8 @@ static void conn_action_connsever(fsm_in
7523 fsm_deltimer(&conn->timer);
7524 iucv_path_sever(conn->path, NULL);
7525 - PRINT_INFO("%s: Remote dropped connection\n", netdev->name);
7526 + dev_info(privptr->dev, "The peer interface of the IUCV device"
7527 + " has closed the connection\n");
7528 IUCV_DBF_TEXT(data, 2,
7529 "conn_action_connsever: Remote dropped connection\n");
7530 fsm_newstate(fi, CONN_STATE_STARTWAIT);
7531 @@ -856,13 +859,15 @@ static void conn_action_connsever(fsm_in
7532 static void conn_action_start(fsm_instance *fi, int event, void *arg)
7534 struct iucv_connection *conn = arg;
7535 + struct net_device *netdev = conn->netdev;
7536 + struct netiucv_priv *privptr = netdev_priv(netdev);
7539 IUCV_DBF_TEXT(trace, 3, __func__);
7541 fsm_newstate(fi, CONN_STATE_STARTWAIT);
7542 IUCV_DBF_TEXT_(setup, 2, "%s('%s'): connecting ...\n",
7543 - conn->netdev->name, conn->userid);
7544 + netdev->name, conn->userid);
7547 * We must set the state before calling iucv_connect because the
7548 @@ -876,41 +881,45 @@ static void conn_action_start(fsm_instan
7549 NULL, iucvMagic, conn);
7552 - conn->netdev->tx_queue_len = conn->path->msglim;
7553 + netdev->tx_queue_len = conn->path->msglim;
7554 fsm_addtimer(&conn->timer, NETIUCV_TIMEOUT_5SEC,
7555 CONN_EVENT_TIMER, conn);
7558 - PRINT_INFO("%s: User %s is currently not available.\n",
7559 - conn->netdev->name,
7560 - netiucv_printname(conn->userid));
7561 + dev_warn(privptr->dev,
7562 + "The IUCV device failed to connect to z/VM guest %s\n",
7563 + netiucv_printname(conn->userid));
7564 fsm_newstate(fi, CONN_STATE_STARTWAIT);
7567 - PRINT_INFO("%s: User %s is currently not ready.\n",
7568 - conn->netdev->name,
7569 - netiucv_printname(conn->userid));
7570 + dev_warn(privptr->dev,
7571 + "The IUCV device failed to connect to the peer on z/VM"
7572 + " guest %s\n", netiucv_printname(conn->userid));
7573 fsm_newstate(fi, CONN_STATE_STARTWAIT);
7576 - PRINT_WARN("%s: Too many IUCV connections.\n",
7577 - conn->netdev->name);
7578 + dev_err(privptr->dev,
7579 + "Connecting the IUCV device would exceed the maximum"
7580 + " number of IUCV connections\n");
7581 fsm_newstate(fi, CONN_STATE_CONNERR);
7584 - PRINT_WARN("%s: User %s has too many IUCV connections.\n",
7585 - conn->netdev->name,
7586 - netiucv_printname(conn->userid));
7587 + dev_err(privptr->dev,
7588 + "z/VM guest %s has too many IUCV connections"
7589 + " to connect with the IUCV device\n",
7590 + netiucv_printname(conn->userid));
7591 fsm_newstate(fi, CONN_STATE_CONNERR);
7594 - PRINT_WARN("%s: No IUCV authorization in CP directory.\n",
7595 - conn->netdev->name);
7596 + dev_err(privptr->dev,
7597 + "The IUCV device cannot connect to a z/VM guest with no"
7598 + " IUCV authorization\n");
7599 fsm_newstate(fi, CONN_STATE_CONNERR);
7602 - PRINT_WARN("%s: iucv_connect returned error %d\n",
7603 - conn->netdev->name, rc);
7604 + dev_err(privptr->dev,
7605 + "Connecting the IUCV device failed with error %d\n",
7607 fsm_newstate(fi, CONN_STATE_CONNERR);
7610 @@ -1059,8 +1068,9 @@ dev_action_connup(fsm_instance *fi, int
7611 switch (fsm_getstate(fi)) {
7612 case DEV_STATE_STARTWAIT:
7613 fsm_newstate(fi, DEV_STATE_RUNNING);
7614 - PRINT_INFO("%s: connected with remote side %s\n",
7615 - dev->name, privptr->conn->userid);
7616 + dev_info(privptr->dev,
7617 + "The IUCV device has been connected"
7618 + " successfully to %s\n", privptr->conn->userid);
7619 IUCV_DBF_TEXT(setup, 3,
7620 "connection is up and running\n");
7622 @@ -1982,6 +1992,8 @@ static ssize_t conn_write(struct device_
7626 + dev_info(priv->dev, "The IUCV interface to %s has been"
7627 + " established successfully\n", netiucv_printname(username));
7631 @@ -2027,10 +2039,9 @@ static ssize_t remove_write (struct devi
7633 read_unlock_bh(&iucv_connection_rwlock);
7634 if (ndev->flags & (IFF_UP | IFF_RUNNING)) {
7635 - PRINT_WARN("netiucv: net device %s active with peer "
7636 - "%s\n", ndev->name, priv->conn->userid);
7637 - PRINT_WARN("netiucv: %s cannot be removed\n",
7639 + dev_warn(dev, "The IUCV device is connected"
7640 + " to %s and cannot be removed\n",
7641 + priv->conn->userid);
7642 IUCV_DBF_TEXT(data, 2, "remove_write: still active\n");
7645 @@ -2062,7 +2073,7 @@ static struct attribute_group *netiucv_d
7647 static void netiucv_banner(void)
7649 - PRINT_INFO("NETIUCV driver initialized\n");
7650 + pr_info("driver initialized\n");
7653 static void __exit netiucv_exit(void)
7654 @@ -2088,7 +2099,7 @@ static void __exit netiucv_exit(void)
7655 iucv_unregister(&netiucv_handler, 1);
7656 iucv_unregister_dbf_views();
7658 - PRINT_INFO("NETIUCV driver unloaded\n");
7659 + pr_info("driver unloaded\n");
7663 --- a/drivers/s390/net/qeth_core.h
7664 +++ b/drivers/s390/net/qeth_core.h
7667 #include "qeth_core_mpc.h"
7669 -#define KMSG_COMPONENT "qeth"
7672 * Debug Facility stuff
7674 @@ -74,11 +72,6 @@ struct qeth_dbf_info {
7675 #define QETH_DBF_TEXT_(name, level, text...) \
7676 qeth_dbf_longtext(QETH_DBF_##name, level, text)
7679 - * some more debug stuff
7681 -#define PRINTK_HEADER "qeth: "
7683 #define SENSE_COMMAND_REJECT_BYTE 0
7684 #define SENSE_COMMAND_REJECT_FLAG 0x80
7685 #define SENSE_RESETTING_EVENT_BYTE 1
7686 --- a/drivers/s390/net/qeth_core_main.c
7687 +++ b/drivers/s390/net/qeth_core_main.c
7689 * Frank Blaschka <frank.blaschka@de.ibm.com>
7692 +#define KMSG_COMPONENT "qeth"
7694 #include <linux/module.h>
7695 #include <linux/moduleparam.h>
7696 #include <linux/string.h>
7697 @@ -319,7 +321,10 @@ static int qeth_issue_next_read(struct q
7699 iob = qeth_get_buffer(&card->read);
7701 - PRINT_WARN("issue_next_read failed: no iob available!\n");
7702 + dev_warn(&card->gdev->dev, "The qeth device driver "
7703 + "failed to recover an error on the device\n");
7704 + QETH_DBF_MESSAGE(2, "%s issue_next_read failed: no iob "
7705 + "available\n", dev_name(&card->gdev->dev));
7708 qeth_setup_ccw(&card->read, iob->data, QETH_BUFSIZE);
7709 @@ -327,7 +332,8 @@ static int qeth_issue_next_read(struct q
7710 rc = ccw_device_start(card->read.ccwdev, &card->read.ccw,
7711 (addr_t) iob, 0, 0);
7713 - PRINT_ERR("Error in starting next read ccw! rc=%i\n", rc);
7714 + QETH_DBF_MESSAGE(2, "%s error in starting next read ccw! "
7715 + "rc=%i\n", dev_name(&card->gdev->dev), rc);
7716 atomic_set(&card->read.irq_pending, 0);
7717 qeth_schedule_recovery(card);
7718 wake_up(&card->wait_q);
7719 @@ -393,10 +399,9 @@ static struct qeth_ipa_cmd *qeth_check_i
7721 switch (cmd->hdr.command) {
7722 case IPA_CMD_STOPLAN:
7723 - PRINT_WARN("Link failure on %s (CHPID 0x%X) - "
7724 - "there is a network problem or "
7725 - "someone pulled the cable or "
7726 - "disabled the port.\n",
7727 + dev_warn(&card->gdev->dev,
7728 + "The link for interface %s on CHPID"
7730 QETH_CARD_IFNAME(card),
7732 card->lan_online = 0;
7733 @@ -404,9 +409,9 @@ static struct qeth_ipa_cmd *qeth_check_i
7734 netif_carrier_off(card->dev);
7736 case IPA_CMD_STARTLAN:
7737 - PRINT_INFO("Link reestablished on %s "
7738 - "(CHPID 0x%X). Scheduling "
7739 - "IP address reset.\n",
7740 + dev_info(&card->gdev->dev,
7741 + "The link for %s on CHPID 0x%X has"
7742 + " been restored\n",
7743 QETH_CARD_IFNAME(card),
7745 netif_carrier_on(card->dev);
7746 @@ -458,7 +463,7 @@ static int qeth_check_idx_response(unsig
7748 QETH_DBF_HEX(CTRL, 2, buffer, QETH_DBF_CTRL_LEN);
7749 if ((buffer[2] & 0xc0) == 0xc0) {
7750 - PRINT_WARN("received an IDX TERMINATE "
7751 + QETH_DBF_MESSAGE(2, "received an IDX TERMINATE "
7752 "with cause code 0x%02x%s\n",
7754 ((buffer[4] == 0x22) ?
7755 @@ -744,8 +749,10 @@ static int qeth_get_problem(struct ccw_d
7756 SCHN_STAT_CHN_DATA_CHK | SCHN_STAT_CHAIN_CHECK |
7757 SCHN_STAT_PROT_CHECK | SCHN_STAT_PROG_CHECK)) {
7758 QETH_DBF_TEXT(TRACE, 2, "CGENCHK");
7759 - PRINT_WARN("check on device %s, dstat=x%x, cstat=x%x ",
7760 - cdev->dev.bus_id, dstat, cstat);
7761 + dev_warn(&cdev->dev, "The qeth device driver "
7762 + "failed to recover an error on the device\n");
7763 + QETH_DBF_MESSAGE(2, "%s check on device dstat=x%x, cstat=x%x ",
7764 + dev_name(&cdev->dev), dstat, cstat);
7765 print_hex_dump(KERN_WARNING, "qeth: irb ", DUMP_PREFIX_OFFSET,
7768 @@ -784,12 +791,14 @@ static long __qeth_check_irb_error(struc
7770 switch (PTR_ERR(irb)) {
7772 - PRINT_WARN("i/o-error on device %s\n", cdev->dev.bus_id);
7773 + QETH_DBF_MESSAGE(2, "%s i/o-error on device\n",
7774 + dev_name(&cdev->dev));
7775 QETH_DBF_TEXT(TRACE, 2, "ckirberr");
7776 QETH_DBF_TEXT_(TRACE, 2, " rc%d", -EIO);
7779 - PRINT_WARN("timeout on device %s\n", cdev->dev.bus_id);
7780 + dev_warn(&cdev->dev, "A hardware operation timed out"
7781 + " on the device\n");
7782 QETH_DBF_TEXT(TRACE, 2, "ckirberr");
7783 QETH_DBF_TEXT_(TRACE, 2, " rc%d", -ETIMEDOUT);
7784 if (intparm == QETH_RCD_PARM) {
7785 @@ -802,8 +811,8 @@ static long __qeth_check_irb_error(struc
7789 - PRINT_WARN("unknown error %ld on device %s\n", PTR_ERR(irb),
7790 - cdev->dev.bus_id);
7791 + QETH_DBF_MESSAGE(2, "%s unknown error %ld on device\n",
7792 + dev_name(&cdev->dev), PTR_ERR(irb));
7793 QETH_DBF_TEXT(TRACE, 2, "ckirberr");
7794 QETH_DBF_TEXT(TRACE, 2, " rc???");
7796 @@ -869,10 +878,12 @@ static void qeth_irq(struct ccw_device *
7797 (dstat & DEV_STAT_UNIT_CHECK) ||
7799 if (irb->esw.esw0.erw.cons) {
7800 - /* TODO: we should make this s390dbf */
7801 - PRINT_WARN("sense data available on channel %s.\n",
7802 - CHANNEL_ID(channel));
7803 - PRINT_WARN(" cstat 0x%X\n dstat 0x%X\n", cstat, dstat);
7804 + dev_warn(&channel->ccwdev->dev,
7805 + "The qeth device driver failed to recover "
7806 + "an error on the device\n");
7807 + QETH_DBF_MESSAGE(2, "%s sense data available. cstat "
7808 + "0x%X dstat 0x%X\n",
7809 + dev_name(&channel->ccwdev->dev), cstat, dstat);
7810 print_hex_dump(KERN_WARNING, "qeth: irb ",
7811 DUMP_PREFIX_OFFSET, 16, 1, irb, 32, 1);
7812 print_hex_dump(KERN_WARNING, "qeth: sense data ",
7813 @@ -1174,8 +1185,8 @@ static int qeth_determine_card_type(stru
7814 card->qdio.no_out_queues = known_devices[i][8];
7815 card->info.is_multicast_different = known_devices[i][9];
7816 if (qeth_is_1920_device(card)) {
7817 - PRINT_INFO("Priority Queueing not able "
7818 - "due to hardware limitations!\n");
7819 + dev_info(&card->gdev->dev,
7820 + "Priority Queueing not supported\n");
7821 card->qdio.no_out_queues = 1;
7822 card->qdio.default_out_queue = 0;
7824 @@ -1184,7 +1195,8 @@ static int qeth_determine_card_type(stru
7827 card->info.type = QETH_CARD_TYPE_UNKNOWN;
7828 - PRINT_ERR("unknown card type on device %s\n", CARD_BUS_ID(card));
7829 + dev_err(&card->gdev->dev, "The adapter hardware is of an "
7830 + "unknown type\n");
7834 @@ -1367,8 +1379,8 @@ static int qeth_get_unitaddr(struct qeth
7835 QETH_DBF_TEXT(SETUP, 2, "getunit");
7836 rc = qeth_read_conf_data(card, (void **) &prcd, &length);
7838 - PRINT_ERR("qeth_read_conf_data for device %s returned %i\n",
7839 - CARD_DDEV_ID(card), rc);
7840 + QETH_DBF_MESSAGE(2, "%s qeth_read_conf_data returned %i\n",
7841 + dev_name(&card->gdev->dev), rc);
7844 card->info.chpid = prcd[30];
7845 @@ -1518,7 +1530,10 @@ static int qeth_idx_activate_channel(str
7846 if (rc == -ERESTARTSYS)
7848 if (channel->state != CH_STATE_ACTIVATING) {
7849 - PRINT_WARN("IDX activate timed out!\n");
7850 + dev_warn(&channel->ccwdev->dev, "The qeth device driver"
7851 + " failed to recover an error on the device\n");
7852 + QETH_DBF_MESSAGE(2, "%s IDX activate timed out\n",
7853 + dev_name(&channel->ccwdev->dev));
7854 QETH_DBF_TEXT_(SETUP, 2, "2err%d", -ETIME);
7855 qeth_clear_cmd_buffers(channel);
7857 @@ -1551,20 +1566,21 @@ static void qeth_idx_write_cb(struct qet
7859 if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) {
7860 if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19)
7861 - PRINT_ERR("IDX_ACTIVATE on write channel device %s: "
7862 - "adapter exclusively used by another host\n",
7863 - CARD_WDEV_ID(card));
7864 + dev_err(&card->write.ccwdev->dev,
7865 + "The adapter is used exclusively by another "
7868 - PRINT_ERR("IDX_ACTIVATE on write channel device %s: "
7869 - "negative reply\n", CARD_WDEV_ID(card));
7870 + QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on write channel:"
7871 + " negative reply\n",
7872 + dev_name(&card->write.ccwdev->dev));
7875 memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2);
7876 if ((temp & ~0x0100) != qeth_peer_func_level(card->info.func_level)) {
7877 - PRINT_WARN("IDX_ACTIVATE on write channel device %s: "
7878 - "function level mismatch "
7879 - "(sent: 0x%x, received: 0x%x)\n",
7880 - CARD_WDEV_ID(card), card->info.func_level, temp);
7881 + QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on write channel: "
7882 + "function level mismatch (sent: 0x%x, received: "
7883 + "0x%x)\n", dev_name(&card->write.ccwdev->dev),
7884 + card->info.func_level, temp);
7887 channel->state = CH_STATE_UP;
7888 @@ -1590,12 +1606,13 @@ static void qeth_idx_read_cb(struct qeth
7890 if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) {
7891 if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19)
7892 - PRINT_ERR("IDX_ACTIVATE on read channel device %s: "
7893 - "adapter exclusively used by another host\n",
7894 - CARD_RDEV_ID(card));
7895 + dev_err(&card->write.ccwdev->dev,
7896 + "The adapter is used exclusively by another "
7899 - PRINT_ERR("IDX_ACTIVATE on read channel device %s: "
7900 - "negative reply\n", CARD_RDEV_ID(card));
7901 + QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on read channel:"
7902 + " negative reply\n",
7903 + dev_name(&card->read.ccwdev->dev));
7907 @@ -1609,9 +1626,10 @@ static void qeth_idx_read_cb(struct qeth
7909 memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2);
7910 if (temp != qeth_peer_func_level(card->info.func_level)) {
7911 - PRINT_WARN("IDX_ACTIVATE on read channel device %s: function "
7912 - "level mismatch (sent: 0x%x, received: 0x%x)\n",
7913 - CARD_RDEV_ID(card), card->info.func_level, temp);
7914 + QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on read channel: function "
7915 + "level mismatch (sent: 0x%x, received: 0x%x)\n",
7916 + dev_name(&card->read.ccwdev->dev),
7917 + card->info.func_level, temp);
7920 memcpy(&card->token.issuer_rm_r,
7921 @@ -1685,8 +1703,9 @@ int qeth_send_control_data(struct qeth_c
7922 (addr_t) iob, 0, 0);
7923 spin_unlock_irqrestore(get_ccwdev_lock(card->write.ccwdev), flags);
7925 - PRINT_WARN("qeth_send_control_data: "
7926 - "ccw_device_start rc = %i\n", rc);
7927 + QETH_DBF_MESSAGE(2, "%s qeth_send_control_data: "
7928 + "ccw_device_start rc = %i\n",
7929 + dev_name(&card->write.ccwdev->dev), rc);
7930 QETH_DBF_TEXT_(TRACE, 2, " err%d", rc);
7931 spin_lock_irqsave(&card->lock, flags);
7932 list_del_init(&reply->list);
7933 @@ -2169,11 +2188,8 @@ static void qeth_print_status_with_portn
7935 (char) _ebcasc[(__u8) dbf_text[i]];
7937 - PRINT_INFO("Device %s/%s/%s is a%s card%s%s%s\n"
7938 + dev_info(&card->gdev->dev, "Device is a%s card%s%s%s\n"
7939 "with link type %s (portname: %s)\n",
7940 - CARD_RDEV_ID(card),
7941 - CARD_WDEV_ID(card),
7942 - CARD_DDEV_ID(card),
7943 qeth_get_cardname(card),
7944 (card->info.mcl_level[0]) ? " (level: " : "",
7945 (card->info.mcl_level[0]) ? card->info.mcl_level : "",
7946 @@ -2186,23 +2202,17 @@ static void qeth_print_status_with_portn
7947 static void qeth_print_status_no_portname(struct qeth_card *card)
7949 if (card->info.portname[0])
7950 - PRINT_INFO("Device %s/%s/%s is a%s "
7951 + dev_info(&card->gdev->dev, "Device is a%s "
7952 "card%s%s%s\nwith link type %s "
7953 "(no portname needed by interface).\n",
7954 - CARD_RDEV_ID(card),
7955 - CARD_WDEV_ID(card),
7956 - CARD_DDEV_ID(card),
7957 qeth_get_cardname(card),
7958 (card->info.mcl_level[0]) ? " (level: " : "",
7959 (card->info.mcl_level[0]) ? card->info.mcl_level : "",
7960 (card->info.mcl_level[0]) ? ")" : "",
7961 qeth_get_cardname_short(card));
7963 - PRINT_INFO("Device %s/%s/%s is a%s "
7964 + dev_info(&card->gdev->dev, "Device is a%s "
7965 "card%s%s%s\nwith link type %s.\n",
7966 - CARD_RDEV_ID(card),
7967 - CARD_WDEV_ID(card),
7968 - CARD_DDEV_ID(card),
7969 qeth_get_cardname(card),
7970 (card->info.mcl_level[0]) ? " (level: " : "",
7971 (card->info.mcl_level[0]) ? card->info.mcl_level : "",
7972 @@ -2629,9 +2639,8 @@ void qeth_queue_input_buffer(struct qeth
7974 card->perf_stats.inbound_do_qdio_start_time;
7976 - PRINT_WARN("qeth_queue_input_buffer's do_QDIO "
7977 - "return %i (device %s).\n",
7978 - rc, CARD_DDEV_ID(card));
7979 + dev_warn(&card->gdev->dev,
7980 + "QDIO reported an error, rc=%i\n", rc);
7981 QETH_DBF_TEXT(TRACE, 2, "qinberr");
7982 QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card));
7984 @@ -3764,7 +3773,8 @@ int qeth_core_hardsetup_card(struct qeth
7985 atomic_set(&card->force_alloc_skb, 0);
7988 - PRINT_WARN("Retrying to do IDX activates.\n");
7989 + QETH_DBF_MESSAGE(2, "%s Retrying to do IDX activates.\n",
7990 + dev_name(&card->gdev->dev));
7991 ccw_device_set_offline(CARD_DDEV(card));
7992 ccw_device_set_offline(CARD_WDEV(card));
7993 ccw_device_set_offline(CARD_RDEV(card));
7994 @@ -3832,7 +3842,10 @@ retry:
7998 - PRINT_ERR("Initialization in hardsetup failed! rc=%d\n", rc);
7999 + dev_warn(&card->gdev->dev, "The qeth device driver failed to recover "
8000 + "an error on the device\n");
8001 + QETH_DBF_MESSAGE(2, "%s Initialization in hardsetup failed! rc=%d\n",
8002 + dev_name(&card->gdev->dev), rc);
8005 EXPORT_SYMBOL_GPL(qeth_core_hardsetup_card);
8006 @@ -4052,8 +4065,8 @@ int qeth_core_load_discipline(struct qet
8009 if (!card->discipline.ccwgdriver) {
8010 - PRINT_ERR("Support for discipline %d not present\n",
8012 + dev_err(&card->gdev->dev, "There is no kernel module to "
8013 + "support discipline %d\n", discipline);
8017 @@ -4445,7 +4458,7 @@ static int __init qeth_core_init(void)
8021 - PRINT_INFO("loading core functions\n");
8022 + pr_info("loading core functions\n");
8023 INIT_LIST_HEAD(&qeth_core_card_list.list);
8024 rwlock_init(&qeth_core_card_list.rwlock);
8026 @@ -4485,9 +4498,10 @@ driver_err:
8028 ccw_driver_unregister(&qeth_ccw_driver);
8030 + QETH_DBF_MESSAGE(2, "Initialization failed with code %d\n", rc);
8031 qeth_unregister_dbf_views();
8033 - PRINT_ERR("Initialization failed with code %d\n", rc);
8034 + pr_err("Initializing the qeth device driver failed\n");
8038 @@ -4500,7 +4514,7 @@ static void __exit qeth_core_exit(void)
8039 ccw_driver_unregister(&qeth_ccw_driver);
8040 kmem_cache_destroy(qeth_core_header_cache);
8041 qeth_unregister_dbf_views();
8042 - PRINT_INFO("core functions removed\n");
8043 + pr_info("core functions removed\n");
8046 module_init(qeth_core_init);
8047 --- a/drivers/s390/net/qeth_l2_main.c
8048 +++ b/drivers/s390/net/qeth_l2_main.c
8050 * Frank Blaschka <frank.blaschka@de.ibm.com>
8053 +#define KMSG_COMPONENT "qeth"
8055 #include <linux/module.h>
8056 #include <linux/moduleparam.h>
8057 #include <linux/string.h>
8058 @@ -501,12 +503,13 @@ static int qeth_l2_send_setmac_cb(struct
8059 card->info.mac_bits |= QETH_LAYER2_MAC_REGISTERED;
8060 memcpy(card->dev->dev_addr, cmd->data.setdelmac.mac,
8062 - PRINT_INFO("MAC address %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x "
8063 - "successfully registered on device %s\n",
8064 - card->dev->dev_addr[0], card->dev->dev_addr[1],
8065 - card->dev->dev_addr[2], card->dev->dev_addr[3],
8066 - card->dev->dev_addr[4], card->dev->dev_addr[5],
8068 + dev_info(&card->gdev->dev,
8069 + "MAC address %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x "
8070 + "successfully registered on device %s\n",
8071 + card->dev->dev_addr[0], card->dev->dev_addr[1],
8072 + card->dev->dev_addr[2], card->dev->dev_addr[3],
8073 + card->dev->dev_addr[4], card->dev->dev_addr[5],
8078 @@ -976,8 +979,6 @@ static int __qeth_l2_set_online(struct c
8080 qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1);
8081 if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) {
8082 - PRINT_WARN("set_online of card %s interrupted by user!\n",
8083 - CARD_BUS_ID(card));
8084 return -ERESTARTSYS;
8087 @@ -1020,9 +1021,8 @@ static int __qeth_l2_set_online(struct c
8089 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
8091 - PRINT_WARN("LAN on card %s if offline! "
8092 - "Waiting for STARTLAN from card.\n",
8093 - CARD_BUS_ID(card));
8094 + dev_warn(&card->gdev->dev,
8095 + "The LAN is offline\n");
8096 card->lan_online = 0;
8099 @@ -1092,8 +1092,6 @@ static int __qeth_l2_set_offline(struct
8100 netif_carrier_off(card->dev);
8101 recover_flag = card->state;
8102 if (qeth_l2_stop_card(card, recovery_mode) == -ERESTARTSYS) {
8103 - PRINT_WARN("Stopping card %s interrupted by user!\n",
8104 - CARD_BUS_ID(card));
8105 return -ERESTARTSYS;
8107 rc = ccw_device_set_offline(CARD_DDEV(card));
8108 @@ -1126,8 +1124,8 @@ static int qeth_l2_recover(void *ptr)
8109 if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD))
8111 QETH_DBF_TEXT(TRACE, 2, "recover2");
8112 - PRINT_WARN("Recovery of device %s started ...\n",
8113 - CARD_BUS_ID(card));
8114 + dev_warn(&card->gdev->dev,
8115 + "A recovery process has been started for the device\n");
8116 card->use_hard_stop = 1;
8117 __qeth_l2_set_offline(card->gdev, 1);
8118 rc = __qeth_l2_set_online(card->gdev, 1);
8119 @@ -1135,23 +1133,23 @@ static int qeth_l2_recover(void *ptr)
8120 qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD);
8121 qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD);
8123 - PRINT_INFO("Device %s successfully recovered!\n",
8124 - CARD_BUS_ID(card));
8125 + dev_info(&card->gdev->dev,
8126 + "Device successfully recovered!\n");
8128 - PRINT_INFO("Device %s could not be recovered!\n",
8129 - CARD_BUS_ID(card));
8130 + dev_warn(&card->gdev->dev, "The qeth device driver "
8131 + "failed to recover an error on the device\n");
8135 static int __init qeth_l2_init(void)
8137 - PRINT_INFO("register layer 2 discipline\n");
8138 + pr_info("register layer 2 discipline\n");
8142 static void __exit qeth_l2_exit(void)
8144 - PRINT_INFO("unregister layer 2 discipline\n");
8145 + pr_info("unregister layer 2 discipline\n");
8148 static void qeth_l2_shutdown(struct ccwgroup_device *gdev)
8149 --- a/drivers/s390/net/qeth_l3_main.c
8150 +++ b/drivers/s390/net/qeth_l3_main.c
8152 * Frank Blaschka <frank.blaschka@de.ibm.com>
8155 +#define KMSG_COMPONENT "qeth"
8157 #include <linux/module.h>
8158 #include <linux/moduleparam.h>
8159 #include <linux/string.h>
8160 @@ -917,8 +919,8 @@ static int qeth_l3_register_addr_entry(s
8162 QETH_DBF_TEXT(TRACE, 2, "FAILED");
8163 qeth_l3_ipaddr_to_string(addr->proto, (u8 *)&addr->u, buf);
8164 - PRINT_WARN("Could not register IP address %s (rc=0x%x/%d)\n",
8166 + dev_warn(&card->gdev->dev,
8167 + "Registering IP address %s failed\n", buf);
8171 @@ -1029,24 +1031,22 @@ static int qeth_l3_setadapter_parms(stru
8172 QETH_DBF_TEXT(SETUP, 2, "setadprm");
8174 if (!qeth_is_supported(card, IPA_SETADAPTERPARMS)) {
8175 - PRINT_WARN("set adapter parameters not supported "
8176 - "on device %s.\n",
8177 - CARD_BUS_ID(card));
8178 + dev_info(&card->gdev->dev,
8179 + "set adapter parameters not supported.\n");
8180 QETH_DBF_TEXT(SETUP, 2, " notsupp");
8183 rc = qeth_query_setadapterparms(card);
8185 - PRINT_WARN("couldn't set adapter parameters on device %s: "
8186 - "x%x\n", CARD_BUS_ID(card), rc);
8187 + QETH_DBF_MESSAGE(2, "%s couldn't set adapter parameters: "
8188 + "0x%x\n", card->gdev->dev.bus_id, rc);
8191 if (qeth_adp_supported(card, IPA_SETADP_ALTER_MAC_ADDRESS)) {
8192 rc = qeth_setadpparms_change_macaddr(card);
8194 - PRINT_WARN("couldn't get MAC address on "
8195 - "device %s: x%x\n",
8196 - CARD_BUS_ID(card), rc);
8197 + dev_warn(&card->gdev->dev, "Reading the adapter MAC"
8198 + " address failed\n", rc);
8201 if ((card->info.link_type == QETH_LINK_TYPE_HSTR) ||
8202 @@ -1160,16 +1160,17 @@ static int qeth_l3_start_ipa_arp_process
8203 QETH_DBF_TEXT(TRACE, 3, "ipaarp");
8205 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) {
8206 - PRINT_WARN("ARP processing not supported "
8207 - "on %s!\n", QETH_CARD_IFNAME(card));
8208 + dev_info(&card->gdev->dev,
8209 + "ARP processing not supported on %s!\n",
8210 + QETH_CARD_IFNAME(card));
8213 rc = qeth_l3_send_simple_setassparms(card, IPA_ARP_PROCESSING,
8214 IPA_CMD_ASS_START, 0);
8216 - PRINT_WARN("Could not start ARP processing "
8217 - "assist on %s: 0x%x\n",
8218 - QETH_CARD_IFNAME(card), rc);
8219 + dev_warn(&card->gdev->dev,
8220 + "Starting ARP processing support for %s failed\n",
8221 + QETH_CARD_IFNAME(card));
8225 @@ -1181,19 +1182,21 @@ static int qeth_l3_start_ipa_ip_fragment
8226 QETH_DBF_TEXT(TRACE, 3, "ipaipfrg");
8228 if (!qeth_is_supported(card, IPA_IP_FRAGMENTATION)) {
8229 - PRINT_INFO("Hardware IP fragmentation not supported on %s\n",
8230 - QETH_CARD_IFNAME(card));
8231 + dev_info(&card->gdev->dev,
8232 + "Hardware IP fragmentation not supported on %s\n",
8233 + QETH_CARD_IFNAME(card));
8237 rc = qeth_l3_send_simple_setassparms(card, IPA_IP_FRAGMENTATION,
8238 IPA_CMD_ASS_START, 0);
8240 - PRINT_WARN("Could not start Hardware IP fragmentation "
8241 - "assist on %s: 0x%x\n",
8242 - QETH_CARD_IFNAME(card), rc);
8243 + dev_warn(&card->gdev->dev,
8244 + "Starting IP fragmentation support for %s failed\n",
8245 + QETH_CARD_IFNAME(card));
8247 - PRINT_INFO("Hardware IP fragmentation enabled \n");
8248 + dev_info(&card->gdev->dev,
8249 + "Hardware IP fragmentation enabled \n");
8253 @@ -1207,17 +1210,18 @@ static int qeth_l3_start_ipa_source_mac(
8256 if (!qeth_is_supported(card, IPA_SOURCE_MAC)) {
8257 - PRINT_INFO("Inbound source address not "
8258 - "supported on %s\n", QETH_CARD_IFNAME(card));
8259 + dev_info(&card->gdev->dev,
8260 + "Inbound source address not supported on %s\n",
8261 + QETH_CARD_IFNAME(card));
8265 rc = qeth_l3_send_simple_setassparms(card, IPA_SOURCE_MAC,
8266 IPA_CMD_ASS_START, 0);
8268 - PRINT_WARN("Could not start inbound source "
8269 - "assist on %s: 0x%x\n",
8270 - QETH_CARD_IFNAME(card), rc);
8271 + dev_warn(&card->gdev->dev,
8272 + "Starting proxy ARP support for %s failed\n",
8273 + QETH_CARD_IFNAME(card));
8277 @@ -1228,19 +1232,19 @@ static int qeth_l3_start_ipa_vlan(struct
8278 QETH_DBF_TEXT(TRACE, 3, "strtvlan");
8280 if (!qeth_is_supported(card, IPA_FULL_VLAN)) {
8281 - PRINT_WARN("VLAN not supported on %s\n",
8282 - QETH_CARD_IFNAME(card));
8283 + dev_info(&card->gdev->dev,
8284 + "VLAN not supported on %s\n", QETH_CARD_IFNAME(card));
8288 rc = qeth_l3_send_simple_setassparms(card, IPA_VLAN_PRIO,
8289 IPA_CMD_ASS_START, 0);
8291 - PRINT_WARN("Could not start vlan "
8292 - "assist on %s: 0x%x\n",
8293 - QETH_CARD_IFNAME(card), rc);
8294 + dev_warn(&card->gdev->dev,
8295 + "Starting VLAN support for %s failed\n",
8296 + QETH_CARD_IFNAME(card));
8298 - PRINT_INFO("VLAN enabled \n");
8299 + dev_info(&card->gdev->dev, "VLAN enabled\n");
8303 @@ -1252,19 +1256,20 @@ static int qeth_l3_start_ipa_multicast(s
8304 QETH_DBF_TEXT(TRACE, 3, "stmcast");
8306 if (!qeth_is_supported(card, IPA_MULTICASTING)) {
8307 - PRINT_WARN("Multicast not supported on %s\n",
8308 - QETH_CARD_IFNAME(card));
8309 + dev_info(&card->gdev->dev,
8310 + "Multicast not supported on %s\n",
8311 + QETH_CARD_IFNAME(card));
8315 rc = qeth_l3_send_simple_setassparms(card, IPA_MULTICASTING,
8316 IPA_CMD_ASS_START, 0);
8318 - PRINT_WARN("Could not start multicast "
8319 - "assist on %s: rc=%i\n",
8320 - QETH_CARD_IFNAME(card), rc);
8321 + dev_warn(&card->gdev->dev,
8322 + "Starting multicast support for %s failed\n",
8323 + QETH_CARD_IFNAME(card));
8325 - PRINT_INFO("Multicast enabled\n");
8326 + dev_info(&card->gdev->dev, "Multicast enabled\n");
8327 card->dev->flags |= IFF_MULTICAST;
8330 @@ -1315,36 +1320,37 @@ static int qeth_l3_softsetup_ipv6(struct
8332 rc = qeth_l3_query_ipassists(card, QETH_PROT_IPV6);
8334 - PRINT_ERR("IPv6 query ipassist failed on %s\n",
8335 - QETH_CARD_IFNAME(card));
8336 + dev_warn(&card->gdev->dev,
8337 + "Activating IPv6 support for %s failed\n",
8338 + QETH_CARD_IFNAME(card));
8341 rc = qeth_l3_send_simple_setassparms(card, IPA_IPV6,
8342 IPA_CMD_ASS_START, 3);
8344 - PRINT_WARN("IPv6 start assist (version 4) failed "
8346 - QETH_CARD_IFNAME(card), rc);
8347 + dev_warn(&card->gdev->dev,
8348 + "Activating IPv6 support for %s failed\n",
8349 + QETH_CARD_IFNAME(card));
8352 rc = qeth_l3_send_simple_setassparms_ipv6(card, IPA_IPV6,
8355 - PRINT_WARN("IPV6 start assist (version 6) failed "
8357 - QETH_CARD_IFNAME(card), rc);
8358 + dev_warn(&card->gdev->dev,
8359 + "Activating IPv6 support for %s failed\n",
8360 + QETH_CARD_IFNAME(card));
8363 rc = qeth_l3_send_simple_setassparms_ipv6(card, IPA_PASSTHRU,
8366 - PRINT_WARN("Could not enable passthrough "
8368 - QETH_CARD_IFNAME(card), rc);
8369 + dev_warn(&card->gdev->dev,
8370 + "Enabling the passthrough mode for %s failed\n",
8371 + QETH_CARD_IFNAME(card));
8375 - PRINT_INFO("IPV6 enabled \n");
8376 + dev_info(&card->gdev->dev, "IPV6 enabled\n");
8380 @@ -1356,8 +1362,8 @@ static int qeth_l3_start_ipa_ipv6(struct
8381 QETH_DBF_TEXT(TRACE, 3, "strtipv6");
8383 if (!qeth_is_supported(card, IPA_IPV6)) {
8384 - PRINT_WARN("IPv6 not supported on %s\n",
8385 - QETH_CARD_IFNAME(card));
8386 + dev_info(&card->gdev->dev,
8387 + "IPv6 not supported on %s\n", QETH_CARD_IFNAME(card));
8390 #ifdef CONFIG_QETH_IPV6
8391 @@ -1373,34 +1379,35 @@ static int qeth_l3_start_ipa_broadcast(s
8392 QETH_DBF_TEXT(TRACE, 3, "stbrdcst");
8393 card->info.broadcast_capable = 0;
8394 if (!qeth_is_supported(card, IPA_FILTERING)) {
8395 - PRINT_WARN("Broadcast not supported on %s\n",
8396 - QETH_CARD_IFNAME(card));
8397 + dev_info(&card->gdev->dev,
8398 + "Broadcast not supported on %s\n",
8399 + QETH_CARD_IFNAME(card));
8403 rc = qeth_l3_send_simple_setassparms(card, IPA_FILTERING,
8404 IPA_CMD_ASS_START, 0);
8406 - PRINT_WARN("Could not enable broadcasting filtering "
8408 - QETH_CARD_IFNAME(card), rc);
8409 + dev_warn(&card->gdev->dev, "Enabling broadcast filtering for "
8410 + "%s failed\n", QETH_CARD_IFNAME(card));
8414 rc = qeth_l3_send_simple_setassparms(card, IPA_FILTERING,
8415 IPA_CMD_ASS_CONFIGURE, 1);
8417 - PRINT_WARN("Could not set up broadcast filtering on %s: 0x%x\n",
8418 - QETH_CARD_IFNAME(card), rc);
8419 + dev_warn(&card->gdev->dev,
8420 + "Setting up broadcast filtering for %s failed\n",
8421 + QETH_CARD_IFNAME(card));
8424 card->info.broadcast_capable = QETH_BROADCAST_WITH_ECHO;
8425 - PRINT_INFO("Broadcast enabled \n");
8426 + dev_info(&card->gdev->dev, "Broadcast enabled\n");
8427 rc = qeth_l3_send_simple_setassparms(card, IPA_FILTERING,
8428 IPA_CMD_ASS_ENABLE, 1);
8430 - PRINT_WARN("Could not set up broadcast echo filtering on "
8431 - "%s: 0x%x\n", QETH_CARD_IFNAME(card), rc);
8432 + dev_warn(&card->gdev->dev, "Setting up broadcast echo "
8433 + "filtering for %s failed\n", QETH_CARD_IFNAME(card));
8436 card->info.broadcast_capable = QETH_BROADCAST_WITHOUT_ECHO;
8437 @@ -1419,18 +1426,18 @@ static int qeth_l3_send_checksum_command
8438 rc = qeth_l3_send_simple_setassparms(card, IPA_INBOUND_CHECKSUM,
8439 IPA_CMD_ASS_START, 0);
8441 - PRINT_WARN("Starting Inbound HW Checksumming failed on %s: "
8442 - "0x%x,\ncontinuing using Inbound SW Checksumming\n",
8443 - QETH_CARD_IFNAME(card), rc);
8444 + dev_warn(&card->gdev->dev, "Starting HW checksumming for %s "
8445 + "failed, using SW checksumming\n",
8446 + QETH_CARD_IFNAME(card));
8449 rc = qeth_l3_send_simple_setassparms(card, IPA_INBOUND_CHECKSUM,
8451 card->info.csum_mask);
8453 - PRINT_WARN("Enabling Inbound HW Checksumming failed on %s: "
8454 - "0x%x,\ncontinuing using Inbound SW Checksumming\n",
8455 - QETH_CARD_IFNAME(card), rc);
8456 + dev_warn(&card->gdev->dev, "Enabling HW checksumming for %s "
8457 + "failed, using SW checksumming\n",
8458 + QETH_CARD_IFNAME(card));
8462 @@ -1443,26 +1450,30 @@ static int qeth_l3_start_ipa_checksum(st
8463 QETH_DBF_TEXT(TRACE, 3, "strtcsum");
8465 if (card->options.checksum_type == NO_CHECKSUMMING) {
8466 - PRINT_WARN("Using no checksumming on %s.\n",
8467 - QETH_CARD_IFNAME(card));
8468 + dev_info(&card->gdev->dev,
8469 + "Using no checksumming on %s.\n",
8470 + QETH_CARD_IFNAME(card));
8473 if (card->options.checksum_type == SW_CHECKSUMMING) {
8474 - PRINT_WARN("Using SW checksumming on %s.\n",
8475 - QETH_CARD_IFNAME(card));
8476 + dev_info(&card->gdev->dev,
8477 + "Using SW checksumming on %s.\n",
8478 + QETH_CARD_IFNAME(card));
8481 if (!qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) {
8482 - PRINT_WARN("Inbound HW Checksumming not "
8483 - "supported on %s,\ncontinuing "
8484 - "using Inbound SW Checksumming\n",
8485 - QETH_CARD_IFNAME(card));
8486 + dev_info(&card->gdev->dev,
8487 + "Inbound HW Checksumming not "
8488 + "supported on %s,\ncontinuing "
8489 + "using Inbound SW Checksumming\n",
8490 + QETH_CARD_IFNAME(card));
8491 card->options.checksum_type = SW_CHECKSUMMING;
8494 rc = qeth_l3_send_checksum_command(card);
8496 - PRINT_INFO("HW Checksumming (inbound) enabled \n");
8497 + dev_info(&card->gdev->dev,
8498 + "HW Checksumming (inbound) enabled\n");
8502 @@ -1474,18 +1485,20 @@ static int qeth_l3_start_ipa_tso(struct
8503 QETH_DBF_TEXT(TRACE, 3, "sttso");
8505 if (!qeth_is_supported(card, IPA_OUTBOUND_TSO)) {
8506 - PRINT_WARN("Outbound TSO not supported on %s\n",
8507 - QETH_CARD_IFNAME(card));
8508 + dev_info(&card->gdev->dev,
8509 + "Outbound TSO not supported on %s\n",
8510 + QETH_CARD_IFNAME(card));
8513 rc = qeth_l3_send_simple_setassparms(card, IPA_OUTBOUND_TSO,
8514 IPA_CMD_ASS_START, 0);
8516 - PRINT_WARN("Could not start outbound TSO "
8517 - "assist on %s: rc=%i\n",
8518 - QETH_CARD_IFNAME(card), rc);
8519 + dev_warn(&card->gdev->dev, "Starting outbound TCP "
8520 + "segmentation offload for %s failed\n",
8521 + QETH_CARD_IFNAME(card));
8523 - PRINT_INFO("Outbound TSO enabled\n");
8524 + dev_info(&card->gdev->dev,
8525 + "Outbound TSO enabled\n");
8527 if (rc && (card->options.large_send == QETH_LARGE_SEND_TSO)) {
8528 card->options.large_send = QETH_LARGE_SEND_NO;
8529 @@ -1578,12 +1591,8 @@ static int qeth_l3_get_unique_id_cb(stru
8531 card->info.unique_id = UNIQUE_ID_IF_CREATE_ADDR_FAILED |
8532 UNIQUE_ID_NOT_BY_CARD;
8533 - PRINT_WARN("couldn't get a unique id from the card on device "
8534 - "%s (result=x%x), using default id. ipv6 "
8535 - "autoconfig on other lpars may lead to duplicate "
8536 - "ip addresses. please use manually "
8537 - "configured ones.\n",
8538 - CARD_BUS_ID(card), cmd->hdr.return_code);
8539 + dev_warn(&card->gdev->dev, "The network adapter failed to "
8540 + "generate a unique ID\n");
8544 @@ -3052,8 +3061,6 @@ static int __qeth_l3_set_online(struct c
8546 qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1);
8547 if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) {
8548 - PRINT_WARN("set_online of card %s interrupted by user!\n",
8549 - CARD_BUS_ID(card));
8550 return -ERESTARTSYS;
8553 @@ -3095,9 +3102,8 @@ static int __qeth_l3_set_online(struct c
8555 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
8557 - PRINT_WARN("LAN on card %s if offline! "
8558 - "Waiting for STARTLAN from card.\n",
8559 - CARD_BUS_ID(card));
8560 + dev_warn(&card->gdev->dev,
8561 + "The LAN is offline\n");
8562 card->lan_online = 0;
8565 @@ -3173,8 +3179,6 @@ static int __qeth_l3_set_offline(struct
8566 netif_carrier_off(card->dev);
8567 recover_flag = card->state;
8568 if (qeth_l3_stop_card(card, recovery_mode) == -ERESTARTSYS) {
8569 - PRINT_WARN("Stopping card %s interrupted by user!\n",
8570 - CARD_BUS_ID(card));
8571 return -ERESTARTSYS;
8573 rc = ccw_device_set_offline(CARD_DDEV(card));
8574 @@ -3207,8 +3211,8 @@ static int qeth_l3_recover(void *ptr)
8575 if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD))
8577 QETH_DBF_TEXT(TRACE, 2, "recover2");
8578 - PRINT_WARN("Recovery of device %s started ...\n",
8579 - CARD_BUS_ID(card));
8580 + dev_warn(&card->gdev->dev,
8581 + "A recovery process has been started for the device\n");
8582 card->use_hard_stop = 1;
8583 __qeth_l3_set_offline(card->gdev, 1);
8584 rc = __qeth_l3_set_online(card->gdev, 1);
8585 @@ -3216,11 +3220,11 @@ static int qeth_l3_recover(void *ptr)
8586 qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD);
8587 qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD);
8589 - PRINT_INFO("Device %s successfully recovered!\n",
8590 - CARD_BUS_ID(card));
8591 + dev_info(&card->gdev->dev,
8592 + "Device successfully recovered!\n");
8594 - PRINT_INFO("Device %s could not be recovered!\n",
8595 - CARD_BUS_ID(card));
8596 + dev_warn(&card->gdev->dev, "The qeth device driver "
8597 + "failed to recover an error on the device\n");
8601 @@ -3353,7 +3357,7 @@ static int qeth_l3_register_notifiers(vo
8605 - PRINT_WARN("layer 3 discipline no IPv6 support\n");
8606 + pr_warning("There is no IPv6 support for the layer 3 discipline\n");
8610 @@ -3372,7 +3376,7 @@ static int __init qeth_l3_init(void)
8614 - PRINT_INFO("register layer 3 discipline\n");
8615 + pr_info("register layer 3 discipline\n");
8616 rc = qeth_l3_register_notifiers();
8619 @@ -3380,7 +3384,7 @@ static int __init qeth_l3_init(void)
8620 static void __exit qeth_l3_exit(void)
8622 qeth_l3_unregister_notifiers();
8623 - PRINT_INFO("unregister layer 3 discipline\n");
8624 + pr_info("unregister layer 3 discipline\n");
8627 module_init(qeth_l3_init);
8628 --- a/drivers/s390/scsi/zfcp_aux.c
8629 +++ b/drivers/s390/scsi/zfcp_aux.c
8634 +#define KMSG_COMPONENT "zfcp"
8636 #include <linux/miscdevice.h>
8637 #include "zfcp_ext.h"
8639 @@ -100,8 +102,7 @@ static int __init zfcp_device_setup(char
8643 - pr_err("zfcp: Parse error for device parameter string %s, "
8644 - "device not attached.\n", devstr);
8645 + pr_err("%s is not a valid SCSI device\n", devstr);
8649 @@ -193,13 +194,14 @@ static int __init zfcp_module_init(void)
8651 retval = misc_register(&zfcp_cfdc_misc);
8653 - pr_err("zfcp: registration of misc device zfcp_cfdc failed\n");
8654 + pr_err("Registering the misc device zfcp_cfdc failed\n");
8658 retval = zfcp_ccw_register();
8660 - pr_err("zfcp: Registration with common I/O layer failed.\n");
8661 + pr_err("The zfcp device driver could not register with "
8662 + "the common I/O layer\n");
8663 goto out_ccw_register;
8666 --- a/drivers/s390/scsi/zfcp_ccw.c
8667 +++ b/drivers/s390/scsi/zfcp_ccw.c
8669 * Copyright IBM Corporation 2002, 2008
8672 +#define KMSG_COMPONENT "zfcp"
8674 #include "zfcp_ext.h"
8677 @@ -25,7 +27,8 @@ static int zfcp_ccw_probe(struct ccw_dev
8678 down(&zfcp_data.config_sema);
8679 if (zfcp_adapter_enqueue(ccw_device)) {
8680 dev_err(&ccw_device->dev,
8681 - "Setup of data structures failed.\n");
8682 + "Setting up data structures for the "
8683 + "FCP adapter failed\n");
8686 up(&zfcp_data.config_sema);
8687 @@ -156,15 +159,18 @@ static int zfcp_ccw_notify(struct ccw_de
8691 - dev_warn(&adapter->ccw_device->dev, "device gone\n");
8692 + dev_warn(&adapter->ccw_device->dev,
8693 + "The FCP device has been detached\n");
8694 zfcp_erp_adapter_shutdown(adapter, 0, 87, NULL);
8697 - dev_warn(&adapter->ccw_device->dev, "no path\n");
8698 + dev_warn(&adapter->ccw_device->dev,
8699 + "The CHPID for the FCP device is offline\n");
8700 zfcp_erp_adapter_shutdown(adapter, 0, 88, NULL);
8703 - dev_info(&adapter->ccw_device->dev, "operational again\n");
8704 + dev_info(&adapter->ccw_device->dev,
8705 + "The FCP device is operational again\n");
8706 zfcp_erp_modify_adapter_status(adapter, 11, NULL,
8707 ZFCP_STATUS_COMMON_RUNNING,
8709 --- a/drivers/s390/scsi/zfcp_cfdc.c
8710 +++ b/drivers/s390/scsi/zfcp_cfdc.c
8712 * Copyright IBM Corporation 2008
8715 +#define KMSG_COMPONENT "zfcp"
8717 #include <linux/types.h>
8718 #include <linux/miscdevice.h>
8719 #include <asm/ccwdev.h>
8720 --- a/drivers/s390/scsi/zfcp_dbf.c
8721 +++ b/drivers/s390/scsi/zfcp_dbf.c
8723 * Copyright IBM Corporation 2002, 2008
8726 +#define KMSG_COMPONENT "zfcp"
8728 #include <linux/ctype.h>
8729 #include <asm/debug.h>
8730 #include "zfcp_ext.h"
8731 --- a/drivers/s390/scsi/zfcp_erp.c
8732 +++ b/drivers/s390/scsi/zfcp_erp.c
8734 * Copyright IBM Corporation 2002, 2008
8737 +#define KMSG_COMPONENT "zfcp"
8739 #include "zfcp_ext.h"
8741 #define ZFCP_MAX_ERPS 3
8742 @@ -901,11 +903,6 @@ static int zfcp_erp_open_ptp_port(struct
8743 struct zfcp_port *port = act->port;
8745 if (port->wwpn != adapter->peer_wwpn) {
8746 - dev_err(&adapter->ccw_device->dev,
8747 - "Failed to open port 0x%016Lx, "
8748 - "Peer WWPN 0x%016Lx does not "
8749 - "match.\n", port->wwpn,
8750 - adapter->peer_wwpn);
8751 zfcp_erp_port_failed(port, 25, NULL);
8752 return ZFCP_ERP_FAILED;
8754 @@ -1065,8 +1062,14 @@ static int zfcp_erp_strategy_check_unit(
8756 case ZFCP_ERP_FAILED :
8757 atomic_inc(&unit->erp_counter);
8758 - if (atomic_read(&unit->erp_counter) > ZFCP_MAX_ERPS)
8759 + if (atomic_read(&unit->erp_counter) > ZFCP_MAX_ERPS) {
8760 + dev_err(&unit->port->adapter->ccw_device->dev,
8761 + "ERP failed for unit 0x%016Lx on "
8762 + "port 0x%016Lx\n",
8763 + (unsigned long long)unit->fcp_lun,
8764 + (unsigned long long)unit->port->wwpn);
8765 zfcp_erp_unit_failed(unit, 21, NULL);
8770 @@ -1091,8 +1094,12 @@ static int zfcp_erp_strategy_check_port(
8771 result = ZFCP_ERP_EXIT;
8773 atomic_inc(&port->erp_counter);
8774 - if (atomic_read(&port->erp_counter) > ZFCP_MAX_ERPS)
8775 + if (atomic_read(&port->erp_counter) > ZFCP_MAX_ERPS) {
8776 + dev_err(&port->adapter->ccw_device->dev,
8777 + "ERP failed for remote port 0x%016Lx\n",
8778 + (unsigned long long)port->wwpn);
8779 zfcp_erp_port_failed(port, 22, NULL);
8784 @@ -1114,8 +1121,12 @@ static int zfcp_erp_strategy_check_adapt
8786 case ZFCP_ERP_FAILED :
8787 atomic_inc(&adapter->erp_counter);
8788 - if (atomic_read(&adapter->erp_counter) > ZFCP_MAX_ERPS)
8789 + if (atomic_read(&adapter->erp_counter) > ZFCP_MAX_ERPS) {
8790 + dev_err(&adapter->ccw_device->dev,
8791 + "ERP cannot recover an error "
8792 + "on the FCP device\n");
8793 zfcp_erp_adapter_failed(adapter, 23, NULL);
8798 @@ -1263,9 +1274,9 @@ static void zfcp_erp_schedule_work(struc
8799 p = kzalloc(sizeof(*p), GFP_KERNEL);
8801 dev_err(&unit->port->adapter->ccw_device->dev,
8802 - "Out of resources. Could not register unit "
8803 - "0x%016Lx on port 0x%016Lx with SCSI stack.\n",
8804 - unit->fcp_lun, unit->port->wwpn);
8805 + "Registering unit 0x%016Lx on port 0x%016Lx failed\n",
8806 + (unsigned long long)unit->fcp_lun,
8807 + (unsigned long long)unit->port->wwpn);
8811 @@ -1286,8 +1297,8 @@ static void zfcp_erp_rport_register(stru
8812 port->rport = fc_remote_port_add(port->adapter->scsi_host, 0, &ids);
8814 dev_err(&port->adapter->ccw_device->dev,
8815 - "Failed registration of rport "
8816 - "0x%016Lx.\n", port->wwpn);
8817 + "Registering port 0x%016Lx failed\n",
8818 + (unsigned long long)port->wwpn);
8822 @@ -1484,7 +1495,7 @@ int zfcp_erp_thread_setup(struct zfcp_ad
8823 retval = kernel_thread(zfcp_erp_thread, adapter, SIGCHLD);
8825 dev_err(&adapter->ccw_device->dev,
8826 - "Creation of ERP thread failed.\n");
8827 + "Creating an ERP thread for the FCP device failed.\n");
8830 wait_event(adapter->erp_thread_wqh,
8831 @@ -1526,7 +1537,6 @@ void zfcp_erp_adapter_failed(struct zfcp
8833 zfcp_erp_modify_adapter_status(adapter, id, ref,
8834 ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET);
8835 - dev_err(&adapter->ccw_device->dev, "Adapter ERP failed.\n");
8839 @@ -1539,15 +1549,6 @@ void zfcp_erp_port_failed(struct zfcp_po
8841 zfcp_erp_modify_port_status(port, id, ref,
8842 ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET);
8844 - if (atomic_read(&port->status) & ZFCP_STATUS_PORT_WKA)
8845 - dev_err(&port->adapter->ccw_device->dev,
8846 - "Port ERP failed for WKA port d_id=0x%06x.\n",
8849 - dev_err(&port->adapter->ccw_device->dev,
8850 - "Port ERP failed for port wwpn=0x%016Lx.\n",
8855 @@ -1560,10 +1561,6 @@ void zfcp_erp_unit_failed(struct zfcp_un
8857 zfcp_erp_modify_unit_status(unit, id, ref,
8858 ZFCP_STATUS_COMMON_ERP_FAILED, ZFCP_SET);
8860 - dev_err(&unit->port->adapter->ccw_device->dev,
8861 - "Unit ERP failed for unit 0x%016Lx on port 0x%016Lx.\n",
8862 - unit->fcp_lun, unit->port->wwpn);
8866 --- a/drivers/s390/scsi/zfcp_fc.c
8867 +++ b/drivers/s390/scsi/zfcp_fc.c
8869 * Copyright IBM Corporation 2008
8872 +#define KMSG_COMPONENT "zfcp"
8874 #include "zfcp_ext.h"
8876 struct ct_iu_gpn_ft_req {
8877 --- a/drivers/s390/scsi/zfcp_fsf.c
8878 +++ b/drivers/s390/scsi/zfcp_fsf.c
8880 * Copyright IBM Corporation 2002, 2008
8883 +#define KMSG_COMPONENT "zfcp"
8885 #include <linux/blktrace_api.h>
8886 #include "zfcp_ext.h"
8888 @@ -51,19 +53,16 @@ static u32 fsf_qtcb_type[] = {
8889 [FSF_QTCB_UPLOAD_CONTROL_FILE] = FSF_SUPPORT_COMMAND
8892 -static const char *zfcp_act_subtable_type[] = {
8893 - "unknown", "OS", "WWPN", "DID", "LUN"
8896 static void zfcp_act_eval_err(struct zfcp_adapter *adapter, u32 table)
8898 u16 subtable = table >> 16;
8899 u16 rule = table & 0xffff;
8900 + const char *act_type[] = { "unknown", "OS", "WWPN", "DID", "LUN" };
8902 - if (subtable && subtable < ARRAY_SIZE(zfcp_act_subtable_type))
8903 + if (subtable && subtable < ARRAY_SIZE(act_type))
8904 dev_warn(&adapter->ccw_device->dev,
8905 - "Access denied in subtable %s, rule %d.\n",
8906 - zfcp_act_subtable_type[subtable], rule);
8907 + "Access denied according to ACT rule type %s, "
8908 + "rule %d\n", act_type[subtable], rule);
8911 static void zfcp_fsf_access_denied_port(struct zfcp_fsf_req *req,
8912 @@ -71,7 +70,7 @@ static void zfcp_fsf_access_denied_port(
8914 struct fsf_qtcb_header *header = &req->qtcb->header;
8915 dev_warn(&req->adapter->ccw_device->dev,
8916 - "Access denied, cannot send command to port 0x%016Lx.\n",
8917 + "Access denied to port 0x%016Lx\n",
8919 zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[0]);
8920 zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[1]);
8921 @@ -84,7 +83,7 @@ static void zfcp_fsf_access_denied_unit(
8923 struct fsf_qtcb_header *header = &req->qtcb->header;
8924 dev_warn(&req->adapter->ccw_device->dev,
8925 - "Access denied for unit 0x%016Lx on port 0x%016Lx.\n",
8926 + "Access denied to unit 0x%016Lx on port 0x%016Lx\n",
8927 unit->fcp_lun, unit->port->wwpn);
8928 zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[0]);
8929 zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[1]);
8930 @@ -94,9 +93,8 @@ static void zfcp_fsf_access_denied_unit(
8932 static void zfcp_fsf_class_not_supp(struct zfcp_fsf_req *req)
8934 - dev_err(&req->adapter->ccw_device->dev,
8935 - "Required FC class not supported by adapter, "
8936 - "shutting down adapter.\n");
8937 + dev_err(&req->adapter->ccw_device->dev, "FCP device not "
8938 + "operational because of an unsupported FC class\n");
8939 zfcp_erp_adapter_shutdown(req->adapter, 0, 123, req);
8940 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
8942 @@ -172,42 +170,6 @@ static void zfcp_fsf_status_read_port_cl
8943 read_unlock_irqrestore(&zfcp_data.config_lock, flags);
8946 -static void zfcp_fsf_bit_error_threshold(struct zfcp_fsf_req *req)
8948 - struct zfcp_adapter *adapter = req->adapter;
8949 - struct fsf_status_read_buffer *sr_buf = req->data;
8950 - struct fsf_bit_error_payload *err = &sr_buf->payload.bit_error;
8952 - dev_warn(&adapter->ccw_device->dev,
8953 - "Warning: bit error threshold data "
8954 - "received for the adapter: "
8955 - "link failures = %i, loss of sync errors = %i, "
8956 - "loss of signal errors = %i, "
8957 - "primitive sequence errors = %i, "
8958 - "invalid transmission word errors = %i, "
8959 - "CRC errors = %i).\n",
8960 - err->link_failure_error_count,
8961 - err->loss_of_sync_error_count,
8962 - err->loss_of_signal_error_count,
8963 - err->primitive_sequence_error_count,
8964 - err->invalid_transmission_word_error_count,
8965 - err->crc_error_count);
8966 - dev_warn(&adapter->ccw_device->dev,
8967 - "Additional bit error threshold data of the adapter: "
8968 - "primitive sequence event time-outs = %i, "
8969 - "elastic buffer overrun errors = %i, "
8970 - "advertised receive buffer-to-buffer credit = %i, "
8971 - "current receice buffer-to-buffer credit = %i, "
8972 - "advertised transmit buffer-to-buffer credit = %i, "
8973 - "current transmit buffer-to-buffer credit = %i).\n",
8974 - err->primitive_sequence_event_timeout_count,
8975 - err->elastic_buffer_overrun_error_count,
8976 - err->advertised_receive_b2b_credit,
8977 - err->current_receive_b2b_credit,
8978 - err->advertised_transmit_b2b_credit,
8979 - err->current_transmit_b2b_credit);
8982 static void zfcp_fsf_link_down_info_eval(struct zfcp_fsf_req *req, u8 id,
8983 struct fsf_link_down_info *link_down)
8985 @@ -224,62 +186,66 @@ static void zfcp_fsf_link_down_info_eval
8986 switch (link_down->error_code) {
8987 case FSF_PSQ_LINK_NO_LIGHT:
8988 dev_warn(&req->adapter->ccw_device->dev,
8989 - "The local link is down: no light detected.\n");
8990 + "There is no light signal from the local "
8991 + "fibre channel cable\n");
8993 case FSF_PSQ_LINK_WRAP_PLUG:
8994 dev_warn(&req->adapter->ccw_device->dev,
8995 - "The local link is down: wrap plug detected.\n");
8996 + "There is a wrap plug instead of a fibre "
8997 + "channel cable\n");
8999 case FSF_PSQ_LINK_NO_FCP:
9000 dev_warn(&req->adapter->ccw_device->dev,
9001 - "The local link is down: "
9002 - "adjacent node on link does not support FCP.\n");
9003 + "The adjacent fibre channel node does not "
9006 case FSF_PSQ_LINK_FIRMWARE_UPDATE:
9007 dev_warn(&req->adapter->ccw_device->dev,
9008 - "The local link is down: "
9009 - "firmware update in progress.\n");
9010 + "The FCP device is suspended because of a "
9011 + "firmware update\n");
9013 case FSF_PSQ_LINK_INVALID_WWPN:
9014 dev_warn(&req->adapter->ccw_device->dev,
9015 - "The local link is down: "
9016 - "duplicate or invalid WWPN detected.\n");
9017 + "The FCP device detected a WWPN that is "
9018 + "duplicate or not valid\n");
9020 case FSF_PSQ_LINK_NO_NPIV_SUPPORT:
9021 dev_warn(&req->adapter->ccw_device->dev,
9022 - "The local link is down: "
9023 - "no support for NPIV by Fabric.\n");
9024 + "The fibre channel fabric does not support NPIV\n");
9026 case FSF_PSQ_LINK_NO_FCP_RESOURCES:
9027 dev_warn(&req->adapter->ccw_device->dev,
9028 - "The local link is down: "
9029 - "out of resource in FCP daughtercard.\n");
9030 + "The FCP adapter cannot support more NPIV ports\n");
9032 case FSF_PSQ_LINK_NO_FABRIC_RESOURCES:
9033 dev_warn(&req->adapter->ccw_device->dev,
9034 - "The local link is down: "
9035 - "out of resource in Fabric.\n");
9036 + "The adjacent switch cannot support "
9037 + "more NPIV ports\n");
9039 case FSF_PSQ_LINK_FABRIC_LOGIN_UNABLE:
9040 dev_warn(&req->adapter->ccw_device->dev,
9041 - "The local link is down: "
9042 - "unable to login to Fabric.\n");
9043 + "The FCP adapter could not log in to the "
9044 + "fibre channel fabric\n");
9046 case FSF_PSQ_LINK_WWPN_ASSIGNMENT_CORRUPTED:
9047 dev_warn(&req->adapter->ccw_device->dev,
9048 - "WWPN assignment file corrupted on adapter.\n");
9049 + "The WWPN assignment file on the FCP adapter "
9050 + "has been damaged\n");
9052 case FSF_PSQ_LINK_MODE_TABLE_CURRUPTED:
9053 dev_warn(&req->adapter->ccw_device->dev,
9054 - "Mode table corrupted on adapter.\n");
9055 + "The mode table on the FCP adapter "
9056 + "has been damaged\n");
9058 case FSF_PSQ_LINK_NO_WWPN_ASSIGNMENT:
9059 dev_warn(&req->adapter->ccw_device->dev,
9060 - "No WWPN for assignment table on adapter.\n");
9061 + "All NPIV ports on the FCP adapter have "
9062 + "been assigned\n");
9065 dev_warn(&req->adapter->ccw_device->dev,
9066 - "The local link to adapter is down.\n");
9067 + "The link between the FCP adapter and "
9068 + "the FC fabric is down\n");
9071 zfcp_erp_adapter_failed(adapter, id, req);
9072 @@ -287,27 +253,18 @@ out:
9074 static void zfcp_fsf_status_read_link_down(struct zfcp_fsf_req *req)
9076 - struct zfcp_adapter *adapter = req->adapter;
9077 struct fsf_status_read_buffer *sr_buf = req->data;
9078 struct fsf_link_down_info *ldi =
9079 (struct fsf_link_down_info *) &sr_buf->payload;
9081 switch (sr_buf->status_subtype) {
9082 case FSF_STATUS_READ_SUB_NO_PHYSICAL_LINK:
9083 - dev_warn(&adapter->ccw_device->dev,
9084 - "Physical link is down.\n");
9085 zfcp_fsf_link_down_info_eval(req, 38, ldi);
9087 case FSF_STATUS_READ_SUB_FDISC_FAILED:
9088 - dev_warn(&adapter->ccw_device->dev,
9089 - "Local link is down "
9090 - "due to failed FDISC login.\n");
9091 zfcp_fsf_link_down_info_eval(req, 39, ldi);
9093 case FSF_STATUS_READ_SUB_FIRMWARE_UPDATE:
9094 - dev_warn(&adapter->ccw_device->dev,
9095 - "Local link is down "
9096 - "due to firmware update on adapter.\n");
9097 zfcp_fsf_link_down_info_eval(req, 40, NULL);
9100 @@ -336,14 +293,16 @@ static void zfcp_fsf_status_read_handler
9101 case FSF_STATUS_READ_SENSE_DATA_AVAIL:
9103 case FSF_STATUS_READ_BIT_ERROR_THRESHOLD:
9104 - zfcp_fsf_bit_error_threshold(req);
9105 + dev_warn(&adapter->ccw_device->dev,
9106 + "The error threshold for checksum statistics "
9107 + "has been exceeded\n");
9109 case FSF_STATUS_READ_LINK_DOWN:
9110 zfcp_fsf_status_read_link_down(req);
9112 case FSF_STATUS_READ_LINK_UP:
9113 dev_info(&adapter->ccw_device->dev,
9114 - "Local link was replugged.\n");
9115 + "The local link has been restored\n");
9116 /* All ports should be marked as ready to run again */
9117 zfcp_erp_modify_adapter_status(adapter, 30, NULL,
9118 ZFCP_STATUS_COMMON_RUNNING,
9119 @@ -387,8 +346,8 @@ static void zfcp_fsf_fsfstatus_qual_eval
9121 case FSF_SQ_NO_RECOM:
9122 dev_err(&req->adapter->ccw_device->dev,
9123 - "No recommendation could be given for a "
9124 - "problem on the adapter.\n");
9125 + "The FCP adapter reported a problem "
9126 + "that cannot be recovered\n");
9127 zfcp_erp_adapter_shutdown(req->adapter, 0, 121, req);
9130 @@ -404,8 +363,7 @@ static void zfcp_fsf_fsfstatus_eval(stru
9131 switch (req->qtcb->header.fsf_status) {
9132 case FSF_UNKNOWN_COMMAND:
9133 dev_err(&req->adapter->ccw_device->dev,
9134 - "Command issued by the device driver (0x%x) is "
9135 - "not known by the adapter.\n",
9136 + "The FCP adapter does not recognize the command 0x%x\n",
9137 req->qtcb->header.fsf_command);
9138 zfcp_erp_adapter_shutdown(req->adapter, 0, 120, req);
9139 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
9140 @@ -436,11 +394,9 @@ static void zfcp_fsf_protstatus_eval(str
9142 case FSF_PROT_QTCB_VERSION_ERROR:
9143 dev_err(&adapter->ccw_device->dev,
9144 - "The QTCB version requested by zfcp (0x%x) is not "
9145 - "supported by the FCP adapter (lowest supported "
9146 - "0x%x, highest supported 0x%x).\n",
9147 - FSF_QTCB_CURRENT_VERSION, psq->word[0],
9149 + "QTCB version 0x%x not supported by FCP adapter "
9150 + "(0x%x to 0x%x)\n", FSF_QTCB_CURRENT_VERSION,
9151 + psq->word[0], psq->word[1]);
9152 zfcp_erp_adapter_shutdown(adapter, 0, 117, req);
9154 case FSF_PROT_ERROR_STATE:
9155 @@ -450,8 +406,7 @@ static void zfcp_fsf_protstatus_eval(str
9157 case FSF_PROT_UNSUPP_QTCB_TYPE:
9158 dev_err(&adapter->ccw_device->dev,
9159 - "Packet header type used by the device driver is "
9160 - "incompatible with that used on the adapter.\n");
9161 + "The QTCB type is not supported by the FCP adapter\n");
9162 zfcp_erp_adapter_shutdown(adapter, 0, 118, req);
9164 case FSF_PROT_HOST_CONNECTION_INITIALIZING:
9165 @@ -460,7 +415,7 @@ static void zfcp_fsf_protstatus_eval(str
9167 case FSF_PROT_DUPLICATE_REQUEST_ID:
9168 dev_err(&adapter->ccw_device->dev,
9169 - "The request identifier 0x%Lx is ambiguous.\n",
9170 + "0x%Lx is an ambiguous request identifier\n",
9171 (unsigned long long)qtcb->bottom.support.req_handle);
9172 zfcp_erp_adapter_shutdown(adapter, 0, 78, req);
9174 @@ -480,9 +435,7 @@ static void zfcp_fsf_protstatus_eval(str
9177 dev_err(&adapter->ccw_device->dev,
9178 - "Transfer protocol status information"
9179 - "provided by the adapter (0x%x) "
9180 - "is not compatible with the device driver.\n",
9181 + "0x%x is not a valid transfer protocol status\n",
9182 qtcb->prefix.prot_status);
9183 zfcp_erp_adapter_shutdown(adapter, 0, 119, req);
9185 @@ -560,33 +513,17 @@ static int zfcp_fsf_exchange_config_eval
9186 adapter->peer_wwpn = bottom->plogi_payload.wwpn;
9187 adapter->peer_wwnn = bottom->plogi_payload.wwnn;
9188 fc_host_port_type(shost) = FC_PORTTYPE_PTP;
9189 - if (req->erp_action)
9190 - dev_info(&adapter->ccw_device->dev,
9191 - "Point-to-Point fibrechannel "
9192 - "configuration detected.\n");
9194 case FSF_TOPO_FABRIC:
9195 fc_host_port_type(shost) = FC_PORTTYPE_NPORT;
9196 - if (req->erp_action)
9197 - dev_info(&adapter->ccw_device->dev,
9198 - "Switched fabric fibrechannel "
9199 - "network detected.\n");
9202 fc_host_port_type(shost) = FC_PORTTYPE_NLPORT;
9203 - dev_err(&adapter->ccw_device->dev,
9204 - "Unsupported arbitrated loop fibrechannel "
9205 - "topology detected, shutting down "
9207 - zfcp_erp_adapter_shutdown(adapter, 0, 127, req);
9210 - fc_host_port_type(shost) = FC_PORTTYPE_UNKNOWN;
9211 dev_err(&adapter->ccw_device->dev,
9212 - "The fibrechannel topology reported by the"
9213 - " adapter is not known by the zfcp driver,"
9214 - " shutting down adapter.\n");
9215 - zfcp_erp_adapter_shutdown(adapter, 0, 128, req);
9216 + "Unknown or unsupported arbitrated loop "
9217 + "fibre channel topology detected\n");
9218 + zfcp_erp_adapter_shutdown(adapter, 0, 127, req);
9222 @@ -617,11 +554,9 @@ static void zfcp_fsf_exchange_config_dat
9224 if (bottom->max_qtcb_size < sizeof(struct fsf_qtcb)) {
9225 dev_err(&adapter->ccw_device->dev,
9226 - "Maximum QTCB size (%d bytes) allowed by "
9227 - "the adapter is lower than the minimum "
9228 - "required by the driver (%ld bytes).\n",
9229 - bottom->max_qtcb_size,
9230 - sizeof(struct fsf_qtcb));
9231 + "FCP adapter maximum QTCB size (%d bytes) "
9233 + bottom->max_qtcb_size);
9234 zfcp_erp_adapter_shutdown(adapter, 0, 129, req);
9237 @@ -657,15 +592,15 @@ static void zfcp_fsf_exchange_config_dat
9239 if (FSF_QTCB_CURRENT_VERSION < bottom->low_qtcb_version) {
9240 dev_err(&adapter->ccw_device->dev,
9241 - "The adapter only supports newer control block "
9242 - "versions, try updated device driver.\n");
9243 + "The FCP adapter only supports newer "
9244 + "control block versions\n");
9245 zfcp_erp_adapter_shutdown(adapter, 0, 125, req);
9248 if (FSF_QTCB_CURRENT_VERSION > bottom->high_qtcb_version) {
9249 dev_err(&adapter->ccw_device->dev,
9250 - "The adapter only supports older control block "
9251 - "versions, consider a microcode upgrade.\n");
9252 + "The FCP adapter only supports older "
9253 + "control block versions\n");
9254 zfcp_erp_adapter_shutdown(adapter, 0, 126, req);
9257 @@ -1465,8 +1400,8 @@ static void zfcp_fsf_open_port_handler(s
9259 case FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED:
9260 dev_warn(&req->adapter->ccw_device->dev,
9261 - "The adapter is out of resources. The remote port "
9262 - "0x%016Lx could not be opened, disabling it.\n",
9263 + "Not enough FCP adapter resources to open "
9264 + "remote port 0x%016Lx\n",
9266 zfcp_erp_port_failed(port, 31, req);
9267 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
9268 @@ -1479,8 +1414,8 @@ static void zfcp_fsf_open_port_handler(s
9270 case FSF_SQ_NO_RETRY_POSSIBLE:
9271 dev_warn(&req->adapter->ccw_device->dev,
9272 - "The remote port 0x%016Lx could not be "
9273 - "opened. Disabling it.\n", port->wwpn);
9274 + "Remote port 0x%016Lx could not be opened\n",
9276 zfcp_erp_port_failed(port, 32, req);
9277 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
9279 @@ -1786,14 +1721,12 @@ static void zfcp_fsf_open_unit_handler(s
9280 case FSF_LUN_SHARING_VIOLATION:
9281 if (header->fsf_status_qual.word[0])
9282 dev_warn(&adapter->ccw_device->dev,
9283 - "FCP-LUN 0x%Lx at the remote port "
9284 - "with WWPN 0x%Lx "
9285 - "connected to the adapter "
9286 - "is already in use in LPAR%d, CSS%d.\n",
9287 + "LUN 0x%Lx on port 0x%Lx is already in "
9288 + "use by CSS%d, MIF Image ID %x\n",
9291 - queue_designator->hla,
9292 - queue_designator->cssid);
9293 + queue_designator->cssid,
9294 + queue_designator->hla);
9296 zfcp_act_eval_err(adapter,
9297 header->fsf_status_qual.word[2]);
9298 @@ -1804,8 +1737,8 @@ static void zfcp_fsf_open_unit_handler(s
9300 case FSF_MAXIMUM_NUMBER_OF_LUNS_EXCEEDED:
9301 dev_warn(&adapter->ccw_device->dev,
9302 - "The adapter ran out of resources. There is no "
9303 - "handle available for unit 0x%016Lx on port 0x%016Lx.",
9304 + "No handle is available for LUN "
9305 + "0x%016Lx on port 0x%016Lx\n",
9306 unit->fcp_lun, unit->port->wwpn);
9307 zfcp_erp_unit_failed(unit, 34, req);
9309 @@ -1843,25 +1776,25 @@ static void zfcp_fsf_open_unit_handler(s
9310 atomic_set_mask(ZFCP_STATUS_UNIT_READONLY,
9312 dev_info(&adapter->ccw_device->dev,
9313 - "Read-only access for unit 0x%016Lx "
9314 - "on port 0x%016Lx.\n",
9315 + "SCSI device at LUN 0x%016Lx on port "
9316 + "0x%016Lx opened read-only\n",
9317 unit->fcp_lun, unit->port->wwpn);
9320 if (exclusive && !readwrite) {
9321 dev_err(&adapter->ccw_device->dev,
9322 - "Exclusive access of read-only unit "
9323 - "0x%016Lx on port 0x%016Lx not "
9324 - "supported, disabling unit.\n",
9325 + "Exclusive read-only access not "
9326 + "supported (unit 0x%016Lx, "
9327 + "port 0x%016Lx)\n",
9328 unit->fcp_lun, unit->port->wwpn);
9329 zfcp_erp_unit_failed(unit, 35, req);
9330 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
9331 zfcp_erp_unit_shutdown(unit, 0, 80, req);
9332 } else if (!exclusive && readwrite) {
9333 dev_err(&adapter->ccw_device->dev,
9334 - "Shared access of read-write unit "
9335 - "0x%016Lx on port 0x%016Lx not "
9336 - "supported, disabling unit.\n",
9337 + "Shared read-write access not "
9338 + "supported (unit 0x%016Lx, port "
9340 unit->fcp_lun, unit->port->wwpn);
9341 zfcp_erp_unit_failed(unit, 36, req);
9342 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
9343 @@ -2200,9 +2133,8 @@ static void zfcp_fsf_send_fcp_command_ha
9345 case FSF_DIRECTION_INDICATOR_NOT_VALID:
9346 dev_err(&req->adapter->ccw_device->dev,
9347 - "Invalid data direction (%d) given for unit "
9348 - "0x%016Lx on port 0x%016Lx, shutting down "
9350 + "Incorrect direction %d, unit 0x%016Lx on port "
9351 + "0x%016Lx closed\n",
9352 req->qtcb->bottom.io.data_direction,
9353 unit->fcp_lun, unit->port->wwpn);
9354 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 133, req);
9355 @@ -2210,9 +2142,8 @@ static void zfcp_fsf_send_fcp_command_ha
9357 case FSF_CMND_LENGTH_NOT_VALID:
9358 dev_err(&req->adapter->ccw_device->dev,
9359 - "An invalid control-data-block length field (%d) "
9360 - "was found in a command for unit 0x%016Lx on port "
9361 - "0x%016Lx. Shutting down adapter.\n",
9362 + "Incorrect CDB length %d, unit 0x%016Lx on "
9363 + "port 0x%016Lx closed\n",
9364 req->qtcb->bottom.io.fcp_cmnd_length,
9365 unit->fcp_lun, unit->port->wwpn);
9366 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 134, req);
9367 @@ -2340,10 +2271,9 @@ int zfcp_fsf_send_fcp_command_task(struc
9370 dev_err(&adapter->ccw_device->dev,
9371 - "SCSI request too large. "
9372 - "Shutting down unit 0x%016Lx on port "
9373 - "0x%016Lx.\n", unit->fcp_lun,
9374 - unit->port->wwpn);
9375 + "Oversize data package, unit 0x%016Lx "
9376 + "on port 0x%016Lx closed\n",
9377 + unit->fcp_lun, unit->port->wwpn);
9378 zfcp_erp_unit_shutdown(unit, 0, 131, req);
9381 --- a/drivers/s390/scsi/zfcp_qdio.c
9382 +++ b/drivers/s390/scsi/zfcp_qdio.c
9384 * Copyright IBM Corporation 2002, 2008
9387 +#define KMSG_COMPONENT "zfcp"
9389 #include "zfcp_ext.h"
9391 /* FIXME(tune): free space should be one max. SBAL chain plus what? */
9392 @@ -57,7 +59,7 @@ void zfcp_qdio_free(struct zfcp_adapter
9394 static void zfcp_qdio_handler_error(struct zfcp_adapter *adapter, u8 id)
9396 - dev_warn(&adapter->ccw_device->dev, "QDIO problem occurred.\n");
9397 + dev_warn(&adapter->ccw_device->dev, "A QDIO problem occurred\n");
9399 zfcp_erp_adapter_reopen(adapter,
9400 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED |
9401 @@ -175,8 +177,8 @@ static void zfcp_qdio_int_resp(struct cc
9403 if (unlikely(!(sbale->flags & SBAL_FLAGS_LAST_ENTRY)))
9404 dev_warn(&adapter->ccw_device->dev,
9405 - "Protocol violation by adapter. "
9406 - "Continuing operations.\n");
9407 + "A QDIO protocol error occurred, "
9408 + "operations continue\n");
9412 @@ -458,17 +460,11 @@ int zfcp_qdio_open(struct zfcp_adapter *
9413 if (atomic_test_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &adapter->status))
9416 - if (qdio_establish(&adapter->qdio_init_data)) {
9417 - dev_err(&adapter->ccw_device->dev,
9418 - "Establish of QDIO queues failed.\n");
9421 + if (qdio_establish(&adapter->qdio_init_data))
9422 + goto failed_establish;
9424 - if (qdio_activate(adapter->ccw_device)) {
9425 - dev_err(&adapter->ccw_device->dev,
9426 - "Activate of QDIO queues failed.\n");
9427 + if (qdio_activate(adapter->ccw_device))
9431 for (cc = 0; cc < QDIO_MAX_BUFFERS_PER_Q; cc++) {
9432 sbale = &(adapter->resp_q.sbal[cc]->element[0]);
9433 @@ -478,11 +474,8 @@ int zfcp_qdio_open(struct zfcp_adapter *
9436 if (do_QDIO(adapter->ccw_device, QDIO_FLAG_SYNC_INPUT, 0, 0,
9437 - QDIO_MAX_BUFFERS_PER_Q)) {
9438 - dev_err(&adapter->ccw_device->dev,
9439 - "Init of QDIO response queue failed.\n");
9440 + QDIO_MAX_BUFFERS_PER_Q))
9444 /* set index of first avalable SBALS / number of available SBALS */
9445 adapter->req_q.first = 0;
9446 @@ -493,5 +486,8 @@ int zfcp_qdio_open(struct zfcp_adapter *
9449 qdio_shutdown(adapter->ccw_device, QDIO_FLAG_CLEANUP_USING_CLEAR);
9451 + dev_err(&adapter->ccw_device->dev,
9452 + "Setting up the QDIO connection to the FCP adapter failed\n");
9455 --- a/drivers/s390/scsi/zfcp_scsi.c
9456 +++ b/drivers/s390/scsi/zfcp_scsi.c
9458 * Copyright IBM Corporation 2002, 2008
9461 +#define KMSG_COMPONENT "zfcp"
9463 #include "zfcp_ext.h"
9464 #include <asm/atomic.h>
9466 @@ -294,7 +296,8 @@ int zfcp_adapter_scsi_register(struct zf
9467 sizeof (struct zfcp_adapter *));
9468 if (!adapter->scsi_host) {
9469 dev_err(&adapter->ccw_device->dev,
9470 - "registration with SCSI stack failed.");
9471 + "Registering the FCP device with the "
9472 + "SCSI stack failed\n");
9476 --- a/drivers/s390/scsi/zfcp_sysfs.c
9477 +++ b/drivers/s390/scsi/zfcp_sysfs.c
9479 * Copyright IBM Corporation 2008
9482 +#define KMSG_COMPONENT "zfcp"
9484 #include "zfcp_ext.h"
9486 #define ZFCP_DEV_ATTR(_feat, _name, _mode, _show, _store) \
9487 --- a/include/linux/device.h
9488 +++ b/include/linux/device.h
9489 @@ -524,20 +524,34 @@ extern const char *dev_driver_string(con
9490 printk(level "%s %s: " format , dev_driver_string(dev) , \
9491 dev_name(dev) , ## arg)
9493 +/* dev_printk_hash for message documentation */
9494 +#if defined(__KMSG_CHECKER) && defined(KMSG_COMPONENT)
9495 +/* generate magic string for scripts/kmsg-doc to parse */
9496 +#define dev_printk_hash(level, dev, format, arg...) \
9497 + __KMSG_DEV(level _FMT_ format _ARGS_ dev, ## arg _END_)
9498 +#elif defined(CONFIG_KMSG_IDS) && defined(KMSG_COMPONENT)
9499 +int printk_dev_hash(const char *, const char *, const char *, ...);
9500 +#define dev_printk_hash(level, dev, format, arg...) \
9501 + printk_dev_hash(level "%s.%06x: ", dev_driver_string(dev), \
9502 + "%s: " format, dev_name(dev), ## arg)
9503 +#else /* !defined(CONFIG_KMSG_IDS) */
9504 +#define dev_printk_hash dev_printk
9507 #define dev_emerg(dev, format, arg...) \
9508 - dev_printk(KERN_EMERG , dev , format , ## arg)
9509 + dev_printk_hash(KERN_EMERG , dev , format , ## arg)
9510 #define dev_alert(dev, format, arg...) \
9511 - dev_printk(KERN_ALERT , dev , format , ## arg)
9512 + dev_printk_hash(KERN_ALERT , dev , format , ## arg)
9513 #define dev_crit(dev, format, arg...) \
9514 - dev_printk(KERN_CRIT , dev , format , ## arg)
9515 + dev_printk_hash(KERN_CRIT , dev , format , ## arg)
9516 #define dev_err(dev, format, arg...) \
9517 - dev_printk(KERN_ERR , dev , format , ## arg)
9518 + dev_printk_hash(KERN_ERR , dev , format , ## arg)
9519 #define dev_warn(dev, format, arg...) \
9520 - dev_printk(KERN_WARNING , dev , format , ## arg)
9521 + dev_printk_hash(KERN_WARNING , dev , format , ## arg)
9522 #define dev_notice(dev, format, arg...) \
9523 - dev_printk(KERN_NOTICE , dev , format , ## arg)
9524 + dev_printk_hash(KERN_NOTICE , dev , format , ## arg)
9525 #define dev_info(dev, format, arg...) \
9526 - dev_printk(KERN_INFO , dev , format , ## arg)
9527 + dev_printk_hash(KERN_INFO , dev , format , ## arg)
9530 #define dev_dbg(dev, format, arg...) \
9531 --- a/include/linux/kernel.h
9532 +++ b/include/linux/kernel.h
9533 @@ -296,28 +296,48 @@ static inline char *pack_hex_byte(char *
9537 +#ifdef KMSG_COMPONENT
9538 +#define pr_printk(level, format, ...) \
9539 + printk(level KMSG_COMPONENT ": " format, ##__VA_ARGS__)
9541 +#define pr_printk(level, format, ...) \
9542 + printk(level ": " format, ##__VA_ARGS__)
9545 +#if defined(__KMSG_CHECKER) && defined(KMSG_COMPONENT)
9546 +/* generate magic string for scripts/kmsg-doc to parse */
9547 +#define pr_printk_hash(level, format, ...) \
9548 + __KMSG_PRINT(level _FMT_ format _ARGS_ ##__VA_ARGS__ _END_)
9549 +#elif defined(CONFIG_KMSG_IDS) && defined(KMSG_COMPONENT)
9550 +int printk_hash(const char *, const char *, ...);
9551 +#define pr_printk_hash(level, format, ...) \
9552 + printk_hash(level KMSG_COMPONENT ".%06x" ": ", format, ##__VA_ARGS__)
9553 +#else /* !defined(CONFIG_KMSG_IDS) */
9554 +#define pr_printk_hash pr_printk
9557 #define pr_emerg(fmt, arg...) \
9558 - printk(KERN_EMERG fmt, ##arg)
9559 + pr_printk_hash(KERN_EMERG, fmt, ##arg)
9560 #define pr_alert(fmt, arg...) \
9561 - printk(KERN_ALERT fmt, ##arg)
9562 + pr_printk_hash(KERN_ALERT, fmt, ##arg)
9563 #define pr_crit(fmt, arg...) \
9564 - printk(KERN_CRIT fmt, ##arg)
9565 + pr_printk_hash(KERN_CRIT, fmt, ##arg)
9566 #define pr_err(fmt, arg...) \
9567 - printk(KERN_ERR fmt, ##arg)
9568 + pr_printk_hash(KERN_ERR, fmt, ##arg)
9569 #define pr_warning(fmt, arg...) \
9570 - printk(KERN_WARNING fmt, ##arg)
9571 + pr_printk_hash(KERN_WARNING, fmt, ##arg)
9572 #define pr_notice(fmt, arg...) \
9573 - printk(KERN_NOTICE fmt, ##arg)
9574 + pr_printk_hash(KERN_NOTICE, fmt, ##arg)
9575 #define pr_info(fmt, arg...) \
9576 - printk(KERN_INFO fmt, ##arg)
9577 + pr_printk_hash(KERN_INFO, fmt, ##arg)
9580 /* If you are writing a driver, please use dev_dbg instead */
9581 #define pr_debug(fmt, arg...) \
9582 - printk(KERN_DEBUG fmt, ##arg)
9583 + pr_printk(KERN_DEBUG, fmt, ##arg)
9585 #define pr_debug(fmt, arg...) \
9586 - ({ if (0) printk(KERN_DEBUG fmt, ##arg); 0; })
9587 + ({ if (0) pr_printk(KERN_DEBUG, fmt, ##arg); 0; })
9591 --- a/kernel/printk.c
9592 +++ b/kernel/printk.c
9594 #include <linux/security.h>
9595 #include <linux/bootmem.h>
9596 #include <linux/syscalls.h>
9597 +#include <linux/jhash.h>
9598 +#include <linux/device.h>
9600 #include <asm/uaccess.h>
9602 @@ -1353,3 +1355,46 @@ bool printk_timed_ratelimit(unsigned lon
9604 EXPORT_SYMBOL(printk_timed_ratelimit);
9607 +#if defined CONFIG_PRINTK && defined CONFIG_KMSG_IDS
9610 + * printk_hash - print a kernel message include a hash over the message
9611 + * @prefix: message prefix including the ".%06x" for the hash
9612 + * @fmt: format string
9614 +asmlinkage int printk_hash(const char *prefix, const char *fmt, ...)
9619 + r = printk(prefix, jhash(fmt, strlen(fmt), 0) & 0xffffff);
9620 + va_start(args, fmt);
9621 + r += vprintk(fmt, args);
9626 +EXPORT_SYMBOL(printk_hash);
9629 + * printk_dev_hash - print a kernel message include a hash over the message
9630 + * @prefix: message prefix including the ".%06x" for the hash
9631 + * @dev: device this printk is all about
9632 + * @fmt: format string
9634 +asmlinkage int printk_dev_hash(const char *prefix, const char *driver_name,
9635 + const char *fmt, ...)
9640 + r = printk(prefix, driver_name, jhash(fmt, strlen(fmt), 0) & 0xffffff);
9641 + va_start(args, fmt);
9642 + r += vprintk(fmt, args);
9647 +EXPORT_SYMBOL(printk_dev_hash);
9649 --- a/net/iucv/af_iucv.c
9650 +++ b/net/iucv/af_iucv.c
9652 * Author(s): Jennifer Hunt <jenhunt@us.ibm.com>
9655 +#define KMSG_COMPONENT "af_iucv"
9657 #include <linux/module.h>
9658 #include <linux/types.h>
9659 #include <linux/list.h>
9660 @@ -616,6 +618,8 @@ static int iucv_sock_sendmsg(struct kioc
9661 struct iucv_sock *iucv = iucv_sk(sk);
9662 struct sk_buff *skb;
9663 struct iucv_message txmsg;
9668 err = sock_error(sk);
9669 @@ -651,8 +655,15 @@ static int iucv_sock_sendmsg(struct kioc
9670 err = iucv_message_send(iucv->path, &txmsg, 0, 0,
9671 (void *) skb->data, skb->len);
9674 - printk(KERN_ERR "AF_IUCV msg limit exceeded\n");
9677 + memcpy(user_id, iucv->dst_user_id, 8);
9679 + memcpy(appl_id, iucv->dst_name, 8);
9680 + pr_err("Application %s on z/VM guest %s"
9681 + " exceeds message limit\n",
9682 + user_id, appl_id);
9684 skb_unlink(skb, &iucv->send_skb_q);
9687 @@ -1190,7 +1201,8 @@ static int __init afiucv_init(void)
9690 if (!MACHINE_IS_VM) {
9691 - printk(KERN_ERR "AF_IUCV connection needs VM as base\n");
9692 + pr_err("The af_iucv module cannot be loaded"
9693 + " without z/VM\n");
9694 err = -EPROTONOSUPPORT;
9697 --- a/net/iucv/iucv.c
9698 +++ b/net/iucv/iucv.c
9700 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
9703 +#define KMSG_COMPONENT "iucv"
9705 #include <linux/module.h>
9706 #include <linux/moduleparam.h>
9707 #include <linux/spinlock.h>
9708 @@ -424,8 +426,8 @@ static void iucv_declare_cpu(void *data)
9709 err = "Paging or storage error";
9712 - printk(KERN_WARNING "iucv_register: iucv_declare_buffer "
9713 - "on cpu %i returned error 0x%02x (%s)\n", cpu, rc, err);
9714 + pr_warning("Defining an interrupt buffer on CPU %i"
9715 + " failed with 0x%02x (%s)\n", cpu, rc, err);
9719 @@ -1572,7 +1574,7 @@ static void iucv_external_interrupt(u16
9720 BUG_ON(p->iptype < 0x01 || p->iptype > 0x09);
9721 work = kmalloc(sizeof(struct iucv_irq_list), GFP_ATOMIC);
9723 - printk(KERN_WARNING "iucv_external_interrupt: out of memory\n");
9724 + pr_warning("iucv_external_interrupt: out of memory\n");
9727 memcpy(&work->data, p, sizeof(work->data));
9728 --- a/scripts/Makefile.build
9729 +++ b/scripts/Makefile.build
9730 @@ -223,12 +223,14 @@ endef
9731 # Built-in and composite module parts
9732 $(obj)/%.o: $(src)/%.c FORCE
9733 $(call cmd,force_checksrc)
9734 + $(call cmd,force_check_kmsg)
9735 $(call if_changed_rule,cc_o_c)
9737 # Single-part modules are special since we need to mark them in $(MODVERDIR)
9739 $(single-used-m): $(obj)/%.o: $(src)/%.c FORCE
9740 $(call cmd,force_checksrc)
9741 + $(call cmd,force_check_kmsg)
9742 $(call if_changed_rule,cc_o_c)
9743 @{ echo $(@:.o=.ko); echo $@; } > $(MODVERDIR)/$(@F:.o=.mod)
9745 @@ -351,6 +353,18 @@ $(multi-used-m) : %.o: $(multi-objs-m) F
9747 targets += $(multi-used-y) $(multi-used-m)
9750 +ifneq ($(KBUILD_KMSG_CHECK),0)
9751 + ifeq ($(KBUILD_KMSG_CHECK),2)
9753 + quiet_cmd_force_check_kmsg = KMSG_PRINT $<
9754 + $(shell [ -d $(objtree)/man ] || mkdir -p $(objtree)/man)
9757 + quiet_cmd_force_check_kmsg = KMSG_CHECK $<
9759 + cmd_force_check_kmsg = $(KMSG_CHECK) $(kmsg_cmd) $(CC) $(c_flags) $< ;
9763 # ---------------------------------------------------------------------------
9765 +++ b/scripts/kmsg-doc
9769 +# kmsg kernel messages check and print tool.
9771 +# To check the source code for missing messages the script is called
9772 +# with check, the name compiler and the compile parameters
9773 +# kmsg-doc check $(CC) $(c_flags) $<
9774 +# To create man pages for the messages the script is called with
9775 +# kmsg-doc print $(CC) $(c_flags) $<
9777 +# Copyright IBM Corp. 2008
9778 +# Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
9779 +# Michael Holzheu <holzheu@linux.vnet.ibm.com>
9789 +my $kmsg_count = 0;
9791 +sub remove_quotes($)
9793 + my ($string) = @_;
9798 + foreach my $str (split(/([\\"])/, $string)) {
9799 + if ($inside && ($str ne "\"" || $slash)) {
9802 + # Check for backslash before quote
9803 + if ($str eq "\"") {
9805 + $inside = !$inside;
9808 + } elsif ($str eq "\\") {
9810 + } elsif ($str ne "") {
9817 +sub string_to_bytes($)
9819 + my ($string) = @_;
9820 + my %is_escape = ('"', 0x22, '\'', 0x27, 'n', 0x0a, 'r', 0x0d, 'b', 0x08,
9821 + 't', 0x09, 'f', 0x0c, 'a', 0x07, 'v', 0x0b, '?', 0x3f);
9822 + my (@ar, $slash, $len);
9824 + # scan string, interpret backslash escapes and write bytes to @ar
9826 + foreach my $ch (split(//, $string)) {
9827 + if ($ch eq '\\') {
9830 + $ar[$len] = ord('\\');
9833 + } elsif ($slash && defined $is_escape{$ch}) {
9834 + # C99 backslash escapes: \\ \" \' \n \r \b \t \f \a \v \?
9835 + $ar[$len] = $is_escape{$ch};
9838 + } elsif ($slash) {
9839 + # FIXME: C99 backslash escapes \nnn \xhh
9840 + die("Unknown backslash escape in message $string.");
9842 + # normal character
9843 + $ar[$len] = ord($ch);
9852 + my ($string) = @_;
9854 + my ($a, $b, $c, $i, $length, $len);
9856 + @ar = string_to_bytes($string);
9858 + # add dummy elements to @ar to avoid if then else hell
9859 + push @ar, (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
9864 + for ($len = $length + 12; $len >= 12; $len -= 12) {
9866 + # add length for last round
9869 + $a += $ar[$i] + ($ar[$i+1]<<8) + ($ar[$i+2]<<16) + ($ar[$i+3]<<24);
9870 + $b += $ar[$i+4] + ($ar[$i+5]<<8) + ($ar[$i+6]<<16) + ($ar[$i+7]<<24);
9872 + $c += $ar[$i+8] + ($ar[$i+9]<<8) + ($ar[$i+10]<<16) + ($ar[$i+11]<<24);
9874 + $c += ($ar[$i+8]<<8) + ($ar[$i+9]<<16) + ($ar[$i+10]<<24);
9876 + $a &= 0xffffffff; $b &= 0xffffffff; $c &= 0xffffffff;
9877 + $a -= $b; $a -= $c; $a ^= ($c >> 13); $a &= 0xffffffff;
9878 + $b -= $c; $b -= $a; $b ^= ($a << 8); $b &= 0xffffffff;
9879 + $c -= $a; $c -= $b; $c ^= ($b >> 13); $c &= 0xffffffff;
9880 + $a -= $b; $a -= $c; $a ^= ($c >> 12); $a &= 0xffffffff;
9881 + $b -= $c; $b -= $a; $b ^= ($a << 16); $b &= 0xffffffff;
9882 + $c -= $a; $c -= $b; $c ^= ($b >> 5); $c &= 0xffffffff;
9883 + $a -= $b; $a -= $c; $a ^= ($c >> 3); $a &= 0xffffffff;
9884 + $b -= $c; $b -= $a; $b ^= ($a << 10); $b &= 0xffffffff;
9885 + $c -= $a; $c -= $b; $c ^= ($b >> 15); $c &= 0xffffffff;
9891 +sub add_kmsg_desc($$$$$$)
9893 + my ($component, $text, $sev, $argv, $desc, $user) = @_;
9896 + $text = remove_quotes($text);
9897 + $hash = substr(sprintf("%08x", calc_jhash($text)), 2, 6);
9898 + $tag = $component . "." . $hash;
9900 + if ($kmsg_desc{$tag}) {
9901 + if ($text ne $kmsg_desc{$tag}->{'TEXT'}) {
9902 + warn "Duplicate message with tag $tag\n";
9903 + warn " --- $kmsg_desc{$tag}->{'TEXT'}\n";
9904 + warn " +++ $text\n";
9906 + warn "Duplicate message description for \"$text\"\n";
9911 + $kmsg_desc{$tag}->{'TEXT'} = $text;
9912 + $kmsg_desc{$tag}->{'SEV'} = $sev;
9913 + $kmsg_desc{$tag}->{'ARGV'} = $argv;
9914 + $kmsg_desc{$tag}->{'DESC'} = $desc;
9915 + $kmsg_desc{$tag}->{'USER'} = $user;
9918 +sub add_kmsg_print($$$$)
9920 + my ($component, $sev, $text, $argv) = @_;
9921 + my ($hash, $tag, $count, $parm);
9923 + $text = remove_quotes($text);
9924 + $hash = substr(sprintf("%08x", calc_jhash($text)), 2, 6);
9925 + $tag = $component . "." . $hash;
9927 + # Pretty print severity
9928 + $sev =~ s/"<0>"/Emerg/;
9929 + $sev =~ s/"<1>"/Alert/;
9930 + $sev =~ s/"<2>"/Critical/;
9931 + $sev =~ s/"<3>"/Error/;
9932 + $sev =~ s/"<4>"/Warning/;
9933 + $sev =~ s/"<5>"/Notice/;
9934 + $sev =~ s/"<6>"/Informational/;
9935 + $sev =~ s/"<7>"/Debug/;
9936 + $kmsg_print{$kmsg_count}->{'TAG'} = $tag;
9937 + $kmsg_print{$kmsg_count}->{'TEXT'} = $text;
9938 + $kmsg_print{$kmsg_count}->{'SEV'} = $sev;
9939 + $kmsg_print{$kmsg_count}->{'ARGV'} = $argv;
9943 +sub process_source_file($$)
9945 + my ($component, $file) = @_;
9947 + my ($text, $sev, $argv, $desc, $user);
9949 + if (!open(FD, "$file")) {
9956 + # kmsg message component: #define KMSG_COMPONENT "<component>"
9957 + if (/^#define\s+KMSG_COMPONENT\s+\"(.*)\"[^\"]*$/o) {
9960 + if ($state == 0) {
9961 + # single line kmsg for undocumented messages, format:
9962 + # /*? Text: "<message>" */
9963 + if (/^\s*\/\*\?\s*Text:\s*(\".*\")\s*\*\/\s*$/o) {
9964 + add_kmsg_desc($component, $1, "", "", "", "");
9966 + # kmsg message start: '/*?'
9967 + if (/^\s*\/\*\?\s*$/o) {
9969 + ($text, $sev, $argv, $desc, $user) = ( "", "", "", "", "" );
9971 + } elsif ($state == 1) {
9972 + # kmsg message end: ' */'
9973 + if (/^\s*\*\/\s*/o) {
9974 + add_kmsg_desc($component, $text, $sev, $argv, $desc, $user);
9977 + # kmsg message text: ' * Text: "<message>"'
9978 + elsif (/^\s*\*\s*Text:\s*(\".*\")\s*$/o) {
9981 + # kmsg message severity: ' * Severity: <sev>'
9982 + elsif (/^\s*\*\s*Severity:\s*(\S*)\s*$/o) {
9985 + # kmsg message parameter: ' * Parameter: <argv>'
9986 + elsif (/^\s*\*\s*Parameter:\s*(\S*)\s*$/o) {
9987 + if (!defined($1)) {
9994 + # kmsg message description start: ' * Description:'
9995 + elsif (/^\s*\*\s*Description:\s*(\S*)\s*$/o) {
9996 + if (!defined($1)) {
10003 + # kmsg has unrecognizable lines
10005 + warn "Warning(${file}:$.): Cannot understand $_";
10009 + } elsif ($state == 2) {
10010 + # kmsg message end: ' */'
10011 + if (/^\s*\*\//o) {
10012 + warn "Warning(${file}:$.): Missing description, skipping message";
10016 + # kmsg message description start: ' * Description:'
10017 + elsif (/^\s*\*\s*Description:\s*$/o) {
10021 + # kmsg message parameter line: ' * <argv>'
10022 + elsif (/^\s*\*(.*)$/o) {
10023 + $argv .= "\n" . $1;
10025 + warn "Warning(${file}:$.): Cannot understand $_";
10029 + } elsif ($state == 3) {
10030 + # kmsg message end: ' */'
10031 + if (/^\s*\*\/\s*/o) {
10032 + add_kmsg_desc($component, $text, $sev, $argv, $desc, $user);
10035 + # kmsg message description start: ' * User action:'
10036 + elsif (/^\s*\*\s*User action:\s*$/o) {
10040 + # kmsg message description line: ' * <text>'
10041 + elsif (/^\s*\*\s*(.*)$/o) {
10042 + $desc .= "\n" . $1;
10044 + warn "Warning(${file}:$.): Cannot understand $_";
10048 + } elsif ($state == 4) {
10049 + # kmsg message end: ' */'
10050 + if (/^\s*\*\/\s*/o) {
10051 + add_kmsg_desc($component, $text, $sev, $argv, $desc, $user);
10054 + # kmsg message user action line: ' * <text>'
10055 + elsif (/^\s*\*\s*(.*)$/o) {
10056 + $user .= "\n" . $1;
10058 + warn "Warning(${file}:$.): Cannot understand $_";
10064 + return $component;
10067 +sub process_cpp_file($$$$)
10069 + my ($cc, $options, $file, $component) = @_;
10071 + open(FD, "$cc $gcc_options|") or die ("Preprocessing failed.");
10075 + if (/.*__KMSG_PRINT\(\s*(\S*)\s*_FMT_(.*)_ARGS_\s*(.*)?_END_\s*\)/o) {
10076 + if ($component ne "") {
10077 + add_kmsg_print($component, $1, $2, $3);
10079 + warn "Error(${file}:$.): kmsg without component\n";
10082 + } elsif (/.*__KMSG_DEV\(\s*(\S*)\s*_FMT_(.*)_ARGS_\s*(.*)?_END_\s*\)/o) {
10083 + if ($component ne "") {
10084 + add_kmsg_print($component, $1, "\"%s: \"" . $2, $3);
10086 + warn "Error(${file}:$.): kmsg without component\n";
10093 +sub check_messages($)
10095 + my $component = "@_";
10098 + for ($i = 0; $i < $kmsg_count; $i++) {
10099 + $tag = $kmsg_print{$i}->{'TAG'};
10100 + if (!defined($kmsg_desc{$tag})) {
10101 + add_kmsg_desc($component,
10102 + "\"" . $kmsg_print{$i}->{'TEXT'} . "\"",
10103 + $kmsg_print{$i}->{'SEV'},
10104 + $kmsg_print{$i}->{'ARGV'},
10105 + "Please insert description here",
10106 + "What is the user supposed to do");
10107 + $kmsg_desc{$tag}->{'CHECK'} = 1;
10109 + warn "$component: Missing description for: $kmsg_desc{$tag}\n";
10113 + if ($kmsg_desc{$tag}->{'SEV'} ne "" &&
10114 + $kmsg_desc{$tag}->{'SEV'} ne $kmsg_print{$i}->{'SEV'}) {
10115 + warn "Message severity mismatch for \"$kmsg_print{$i}->{'TEXT'}\"\n";
10116 + warn " --- $kmsg_desc{$tag}->{'SEV'}\n";
10117 + warn " +++ $kmsg_print{$i}->{'SEV'}\n";
10123 +sub print_templates()
10125 + print "Templates for missing messages:\n";
10126 + foreach $tag ( sort { $kmsg_desc{$a} <=> $kmsg_desc{$b} } keys %kmsg_desc ) {
10127 + if (!defined($kmsg_desc{$tag}->{'CHECK'})) {
10131 + print " * Text: \"$kmsg_desc{$tag}->{'TEXT'}\"\n";
10132 + print " * Severity: $kmsg_desc{$tag}->{'SEV'}\n";
10133 + $argv = $kmsg_desc{$tag}->{'ARGV'};
10134 + if ($argv ne "") {
10135 + print " * Parameter:\n";
10136 + @parms = split(/\s*,\s*/,$kmsg_desc{$tag}->{'ARGV'});
10138 + foreach $parm (@parms) {
10140 + if (!($parm eq "")) {
10141 + print " * \@$count: $parm\n";
10145 + print " * Description:\n";
10146 + print " * $kmsg_desc{$tag}->{'DESC'}\n";
10147 + print " * User action:\n";
10148 + print " * $kmsg_desc{$tag}->{'USER'}\n";
10153 +sub write_man_pages()
10157 + for ($i = 0; $i < $kmsg_count; $i++) {
10158 + $tag = $kmsg_print{$i}->{'TAG'};
10159 + if (!defined($kmsg_desc{$tag}) ||
10160 + defined($kmsg_desc{$tag}->{'CHECK'}) ||
10161 + $kmsg_desc{$tag}->{'DESC'} eq "") {
10164 + $file = $objtree . "man/" . $tag . ".9";
10165 + if (!open(WR, ">$file")) {
10166 + warn "Error: Cannot open file $file\n";
10170 + print WR ".TH \"$tag\" 9 \"Linux Messages\" LINUX\n";
10171 + print WR ".SH Message\n";
10172 + print WR $tag . ": " . $kmsg_desc{$tag}->{'TEXT'} . "\n";
10173 + print WR ".SH Severity\n";
10174 + print WR "$kmsg_desc{$tag}->{'SEV'}\n";
10175 + $argv = $kmsg_desc{$tag}->{'ARGV'};
10176 + if ($argv ne "") {
10177 + print WR ".SH Parameters\n";
10178 + @parms = split(/\s*\n\s*/,$kmsg_desc{$tag}->{'ARGV'});
10179 + foreach $parm (@parms) {
10180 + $parm =~ s/^\s*(.*)\s*$/$1/;
10181 + if (!($parm eq "")) {
10182 + print WR "$parm\n\n";
10186 + print WR ".SH Description";
10187 + print WR "$kmsg_desc{$tag}->{'DESC'}\n";
10188 + $user = $kmsg_desc{$tag}->{'USER'};
10189 + if ($user ne "") {
10190 + print WR ".SH User action";
10191 + print WR "$user\n";
10196 +if (defined($ENV{'srctree'})) {
10197 + $srctree = "$ENV{'srctree'}" . "/";
10199 + $srctree = getcwd;
10202 +if (defined($ENV{'objtree'})) {
10203 + $objtree = "$ENV{'objtree'}" . "/";
10205 + $objtree = getcwd;
10208 +if (defined($ENV{'SRCARCH'})) {
10209 + $srcarch = "$ENV{'SRCARCH'}" . "/";
10211 + print "kmsg-doc called without a valid \$SRCARCH\n";
10218 +$gcc_options = "-E -D __KMSG_CHECKER ";
10219 +foreach $tmp (@ARGV) {
10220 + $tmp =~ s/\(/\\\(/;
10221 + $tmp =~ s/\)/\\\)/;
10222 + $gcc_options .= " $tmp";
10223 + $filename = $tmp;
10226 +$component = process_source_file("", $filename);
10227 +if ($component ne "") {
10228 + process_source_file($component, $srctree . "Documentation/kmsg/" .
10229 + $srcarch . $component);
10230 + process_source_file($component, $srctree . "Documentation/kmsg/" .
10234 +process_cpp_file($cc, $gcc_options, $filename, $component);
10235 +if ($option eq "check") {
10236 + if (check_messages($component)) {
10237 + print_templates();
10239 +} elsif ($option eq "print") {
10240 + write_man_pages();