linux-kernelorg-stable/drivers
Vineeth Vijayan a4f17cc726 s390/cio: add CRW inject functionality
This patch introduces the mechanism to inject artificial events to the
CIO layer.

One of the main-event type which triggers the CommonIO operations are
Channel Report events. When a malfunction or other condition affecting
channel-subsystem operation is recognized, a Channel Report Word
(consisting of one or more CRWs) describing the condition is made
pending for retrieval and analysis by the program. The CRW contains
information concerning the identity and state of a facility following
the detection of the malfunction or other condition.

The patch introduces two debugfs interfaces which can be used to inject
'artificial' events from the userspace. It is intended to provide an easy
means to increase the test coverage for CIO code. And this functionality
can be enabled via a new configuration option CONFIG_CIO_INJECT.

The newly introduces debugfs interfaces can be used as mentioned below
to generate different fake-events. To use the crw_inject, first we should
enable it by using enable_inject interface.
i.e

echo 1 > /sys/kernel/debug/s390/cio/enable_inject

After the first step, user can simulate CRW as follows:

echo <solicited> <overflow> <chaining> <rsc> <ancillary> <erc> <rsid> \
                               > /sys/kernel/debug/s390/cio/crw_inject

Example:
A permanent error ERC on CHPID 0x60 would look like this:

  echo 0 0 0 4 0 6 0x60 > /sys/kernel/debug/s390/cio/crw_inject

and an initialized ERC on the same CHPID:

  echo 0 0 0 4 0 2 0x60 > /sys/kernel/debug/s390/cio/crw_inject

Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2021-03-22 11:36:04 +01:00
..
accessibility
acpi
amba
android
ata
atm
auxdisplay
base Revert "PM: runtime: Update device status before letting suppliers suspend" 2021-03-19 16:35:47 +01:00
bcma
block
bluetooth
bus
cdrom
char
clk
clocksource
connector
counter
cpufreq
cpuidle
crypto
cxl
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware Another couple of EFI fixes for v5.12-rc: 2021-03-19 14:23:46 +01:00
fpga
fsi
gnss
gpio
gpu nouveau: Skip unvailable ttm page entries 2021-03-19 10:38:31 +10:00
greybus
hid
hsi
hv
hwmon
hwspinlock
hwtracing
i2c
i3c
ide
idle
iio
infiniband
input
interconnect
iommu iommu/tegra-smmu: Make tegra_smmu_probe_device() to handle all IOMMU phandles 2021-03-18 11:31:12 +01:00
ipack
irqchip
isdn
leds
lightnvm
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd
misc
mmc
most
mtd
mux
net
nfc
ntb
nubus
nvdimm
nvme nvmet-tcp: fix kmap leak when data digest in use 2021-03-18 05:39:18 +01:00
nvmem
of
opp
parisc
parport
pci s390/pci: refactor zpci function states 2021-03-22 11:36:03 +01:00
pcmcia
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 s390/cio: add CRW inject functionality 2021-03-22 11:36:04 +01:00
sbus
scsi SCSI fixes on 20210320 2021-03-20 10:57:10 -07:00
sh
siox
slimbus
soc
soundwire
spi
spmi
ssb
staging Staging/IIO driver fixes for 5.12-rc4 2021-03-21 11:54:04 -07:00
target
tc
tee
thermal
thunderbolt
tty
uio
usb USB / Thunderbolt driver fixes for 5.12-rc4 2021-03-21 11:49:16 -07:00
vdpa
vfio
vhost virtio: fixes, cleanups 2021-03-18 11:20:35 -07:00
video
virt
virtio virtio: fixes, cleanups 2021-03-18 11:20:35 -07:00
visorbus
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile