]> xenbits.xensource.com Git - xen.git/commitdiff
vscsiif.h: replace PAGE_SIZE with VSCSIIF_PAGE_SIZE
authorStefano Stabellini <sstabellini@kernel.org>
Wed, 19 Oct 2016 19:22:35 +0000 (12:22 -0700)
committerWei Liu <wei.liu2@citrix.com>
Fri, 21 Oct 2016 08:58:16 +0000 (09:58 +0100)
Do not reference PAGE_SIZE directly: it could be undefined, or it could
have different values in the frontend or in the backend.

Define VSCSIIF_PAGE_SIZE as 4096, assuming all users of vscsiif.h have
4K page granularity. Replace PAGE_SIZE with VSCSIIF_PAGE_SIZE.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
xen/include/public/io/vscsiif.h

index 0a4709f6fae4b5a308b0927273d31b28862cf3ba..d0bd3b589e9ae9989fba558fe2e8e0a838801998 100644 (file)
  */
 #define VSCSIIF_MAX_COMMAND_SIZE         16
 #define VSCSIIF_SENSE_BUFFERSIZE         96
+#define VSCSIIF_PAGE_SIZE              4096
 
 struct scsiif_request_segment {
     grant_ref_t gref;
@@ -256,7 +257,7 @@ struct scsiif_request_segment {
 };
 typedef struct scsiif_request_segment vscsiif_segment_t;
 
-#define VSCSIIF_SG_PER_PAGE (PAGE_SIZE / sizeof(struct scsiif_request_segment))
+#define VSCSIIF_SG_PER_PAGE (VSCSIIF_PAGE_SIZE / sizeof(struct scsiif_request_segment))
 
 /* Size of one request is 252 bytes */
 struct vscsiif_request {