linux_dsm_epyc7002/drivers/s390/cio
Jan Höppner dd4b3c83b9 s390/dasd/cio: Interpret ccw_device_get_mdc return value correctly
The max data count (mdc) is an unsigned 16-bit integer value as per AR
documentation and is received via ccw_device_get_mdc() for a specific
path mask from the CIO layer. The function itself also always returns a
positive mdc value or 0 in case mdc isn't supported or couldn't be
determined.

Though, the comment for this function describes a negative return value
to indicate failures.

As a result, the DASD device driver interprets the return value of
ccw_device_get_mdc() incorrectly. The error case is essentially a dead
code path.

To fix this behaviour, check explicitly for a return value of 0 and
change the comment for ccw_device_get_mdc() accordingly.

This fix merely enables the error code path in the DASD functions
get_fcx_max_data() and verify_fcx_max_data(). The actual functionality
stays the same and is still correct.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-12-20 11:52:01 -07:00
..
airq.c
blacklist.c
blacklist.h
ccwgroup.c
ccwreq.c
chp.c
chp.h
chsc_sch.c
chsc_sch.h
chsc.c
chsc.h
cio_debug.h
cio.c
cio.h s390/cio: fix virtio-ccw DMA without PV 2019-10-10 10:49:46 +02:00
cmf.c
crw.c
css.c s390/cio: fix virtio-ccw DMA without PV 2019-10-10 10:49:46 +02:00
css.h
device_fsm.c
device_id.c
device_ops.c s390/dasd/cio: Interpret ccw_device_get_mdc return value correctly 2019-12-20 11:52:01 -07:00
device_pgid.c
device_status.c
device.c s390/cio: fix virtio-ccw DMA without PV 2019-10-10 10:49:46 +02:00
device.h
eadm_sch.c
eadm_sch.h
fcx.c
idset.c
idset.h
io_sch.h
ioasm.c
ioasm.h
isc.c
itcw.c
Makefile vfio-ccw: Refactor how the traces are built 2019-10-17 11:35:56 +02:00
orb.h
qdio_debug.c
qdio_debug.h
qdio_main.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2019-11-25 20:02:57 -08:00
qdio_setup.c s390/qdio: simplify thinint device registration 2019-10-31 17:20:51 +01:00
qdio_thinint.c s390/qdio: simplify thinint device registration 2019-10-31 17:20:51 +01:00
qdio.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2019-11-25 20:02:57 -08:00
scm.c
trace.c
trace.h
vfio_ccw_async.c
vfio_ccw_cp.c
vfio_ccw_cp.h vfio-ccw: Refactor how the traces are built 2019-10-17 11:35:56 +02:00
vfio_ccw_drv.c
vfio_ccw_fsm.c vfio-ccw: Rework the io_fctl trace 2019-10-17 11:37:24 +02:00
vfio_ccw_ops.c
vfio_ccw_private.h vfio-ccw: Trace the FSM jumptable 2019-10-17 11:36:29 +02:00
vfio_ccw_trace.c vfio-ccw: Rework the io_fctl trace 2019-10-17 11:37:24 +02:00
vfio_ccw_trace.h vfio-ccw: Rework the io_fctl trace 2019-10-17 11:37:24 +02:00