From: Stefano Stabellini Date: Wed, 19 Oct 2016 19:22:34 +0000 (-0700) Subject: usbif.h: replace PAGE_SIZE with USBIF_RING_SIZE X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~164 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=04535bee06858fd949c743cfecc4d7b96333a16c;p=xen.git usbif.h: replace PAGE_SIZE with USBIF_RING_SIZE Do not reference PAGE_SIZE directly: it could be undefined, or it could have different values in the frontend or in the backend. Define USBIF_RING_SIZE as 4096, assuming all users of usbif.h have 4K page granularity. Replace PAGE_SIZE with USBIF_RING_SIZE. Signed-off-by: Stefano Stabellini Acked-by: Andrew Cooper Acked-by: Wei Liu Release-acked-by: Wei Liu --- diff --git a/xen/include/public/io/usbif.h b/xen/include/public/io/usbif.h index 4053c246f3..c6a58639d6 100644 --- a/xen/include/public/io/usbif.h +++ b/xen/include/public/io/usbif.h @@ -170,6 +170,7 @@ enum usb_spec_version { #define USBIF_MAX_SEGMENTS_PER_REQUEST (16) #define USBIF_MAX_PORTNR 31 +#define USBIF_RING_SIZE 4096 /* * RING for transferring urbs. @@ -226,7 +227,7 @@ struct usbif_urb_response { typedef struct usbif_urb_response usbif_urb_response_t; DEFINE_RING_TYPES(usbif_urb, struct usbif_urb_request, struct usbif_urb_response); -#define USB_URB_RING_SIZE __CONST_RING_SIZE(usbif_urb, PAGE_SIZE) +#define USB_URB_RING_SIZE __CONST_RING_SIZE(usbif_urb, USBIF_RING_SIZE) /* * RING for notifying connect/disconnect events to frontend @@ -248,6 +249,6 @@ struct usbif_conn_response { typedef struct usbif_conn_response usbif_conn_response_t; DEFINE_RING_TYPES(usbif_conn, struct usbif_conn_request, struct usbif_conn_response); -#define USB_CONN_RING_SIZE __CONST_RING_SIZE(usbif_conn, PAGE_SIZE) +#define USB_CONN_RING_SIZE __CONST_RING_SIZE(usbif_conn, USBIF_RING_SIZE) #endif /* __XEN_PUBLIC_IO_USBIF_H__ */