mirror-linux/drivers/s390/cio
Peter Oberparleiter 32ae4a2992 s390/cio: Fix CHPID "configure" attribute caching
In some environments, the SCLP firmware interface used to query a
CHPID's configured state is not supported. On these environments,
rapidly reading the corresponding sysfs attribute produces inconsistent
results:

  $ cat /sys/devices/css0/chp0.00/configure
  cat: /sys/devices/css0/chp0.00/configure: Operation not supported
  $ cat /sys/devices/css0/chp0.00/configure
  3

This occurs for example when Linux is run as a KVM guest. The
inconsistency is a result of CIO using cached results for generating
the value of the "configure" attribute while failing to handle the
situation where no data was returned by SCLP.

Fix this by not updating the cache-expiration timestamp when SCLP
returns no data. With the fix applied, the system response is
consistent:

  $ cat /sys/devices/css0/chp0.00/configure
  cat: /sys/devices/css0/chp0.00/configure: Operation not supported
  $ cat /sys/devices/css0/chp0.00/configure
  cat: /sys/devices/css0/chp0.00/configure: Operation not supported

Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Tested-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2025-02-11 19:35:08 +01:00
..
Makefile
airq.c s390/irq: Set CIF_NOHZ_DELAY in do_io_irq() 2024-05-14 20:19:46 +02:00
blacklist.c
blacklist.h
ccwgroup.c s390/cio/ccwgroup: Switch over to sysfs_emit() 2024-10-25 16:03:25 +02:00
ccwreq.c
chp.c s390/cio: Fix CHPID "configure" attribute caching 2025-02-11 19:35:08 +01:00
chp.h s390/cio: Externalize full CMG characteristics 2024-11-13 14:31:31 +01:00
chsc.c s390/cio: Externalize full CMG characteristics 2024-11-13 14:31:31 +01:00
chsc.h s390/cio: Externalize full CMG characteristics 2024-11-13 14:31:31 +01:00
chsc_sch.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
chsc_sch.h
cio.c s390/cio: Do not unregister the subchannel based on DNV 2024-10-25 16:03:23 +02:00
cio.h s390/cio: Correct some typos in comments 2024-10-10 15:32:44 +02:00
cio_debug.h
cio_debugfs.c
cio_inject.c s390/cio: Ensure the copied buf is NUL terminated 2024-04-29 19:21:34 +02:00
cio_inject.h
cmf.c s390/cio/cmf: Switch over to sysfs_emit() 2024-10-25 16:03:25 +02:00
crw.c
css.c s390/cio/css: Switch over to sysfs_emit() 2024-10-25 16:03:25 +02:00
css.h driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
device.c s390/cio/device: Switch over to sysfs_emit() 2024-10-25 16:03:25 +02:00
device.h
device_fsm.c s390/cio: log fake IRB events 2024-04-12 16:13:03 +02:00
device_id.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
device_ops.c s390/cio: Use array indices instead of pointer arithmetic 2025-01-03 11:00:53 +01:00
device_pgid.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
device_status.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
eadm_sch.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
eadm_sch.h
fcx.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
idset.c bitmap: introduce generic optimized bitmap_size() 2024-04-01 10:49:28 +01:00
idset.h
io_sch.h
ioasm.c s390/cio/ioasm: Convert to use flag output macros 2024-11-13 14:31:34 +01:00
ioasm.h
isc.c
itcw.c
orb.h
qdio.h s390/qdio: Move memory alloc/pointer arithmetic for slib and sl into one place 2025-01-03 11:00:53 +01:00
qdio_debug.c
qdio_debug.h
qdio_main.c s390/cio/qdio: Convert to use flag output macros 2024-11-13 14:31:34 +01:00
qdio_setup.c s390/qdio: Move memory alloc/pointer arithmetic for slib and sl into one place 2025-01-03 11:00:53 +01:00
qdio_thinint.c s390/drivers: Replace S390_lowcore by get_lowcore() 2024-06-18 17:01:33 +02:00
scm.c s390/cio/scm: Switch over to sysfs_emit() 2024-10-25 16:03:25 +02:00
trace.c
trace.h s390/drivers: Replace S390_lowcore by get_lowcore() 2024-06-18 17:01:33 +02:00
vfio_ccw_async.c
vfio_ccw_chp.c
vfio_ccw_cp.c s390/vfio_ccw: Fix target addresses of TIC CCWs 2024-07-03 12:05:32 +02:00
vfio_ccw_cp.h
vfio_ccw_drv.c s390/cio: Add missing MODULE_DESCRIPTION() macros 2024-07-31 16:30:20 +02:00
vfio_ccw_fsm.c
vfio_ccw_ops.c
vfio_ccw_private.h
vfio_ccw_trace.c
vfio_ccw_trace.h