aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/s390-ccw/s390-ccw.h
diff options
context:
space:
mode:
authorEric Farman <farman@linux.vnet.ibm.com>2017-05-10 17:53:54 +0200
committerCornelia Huck <cornelia.huck@de.ibm.com>2017-05-19 12:29:01 +0200
commit5ffd4a3c2d75db3ed31752d0936f96719ee0257b (patch)
tree5f640f88de5eaad9a03950f5535a48b88421fa28 /pc-bios/s390-ccw/s390-ccw.h
parent98d3c524359fda04337c8369b617f2d5ef37bf5f (diff)
pc-bios/s390-ccw: Break up virtio-scsi read into multiples
A virtio-scsi request that goes through the host sd driver and exceeds the maximum transfer size is automatically broken up for us. But the equivalent request going to the sg driver presumes that any length requirements have already been honored. Let's use the max_sectors field on the virtio-scsi controller device, and break up all requests (both sd and sg) to avoid this problem. Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com> Message-Id: <20170510155359.32727-4-farman@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'pc-bios/s390-ccw/s390-ccw.h')
-rw-r--r--pc-bios/s390-ccw/s390-ccw.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h
index 07d8cbcb20..2089274842 100644
--- a/pc-bios/s390-ccw/s390-ccw.h
+++ b/pc-bios/s390-ccw/s390-ccw.h
@@ -42,6 +42,13 @@ typedef unsigned long long __u64;
#ifndef NULL
#define NULL 0
#endif
+#ifndef MIN
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#endif
+#ifndef MIN_NON_ZERO
+#define MIN_NON_ZERO(a, b) ((a) == 0 ? (b) : \
+ ((b) == 0 ? (a) : (MIN(a, b))))
+#endif
#include "cio.h"
#include "iplb.h"