[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.6] usbif.h: replace PAGE_SIZE with USBIF_RING_SIZE



commit b7b99116e72299e15b9ecb58cfd579028e9686f1
Author:     Stefano Stabellini <sstabellini@xxxxxxxxxx>
AuthorDate: Tue Oct 25 17:19:12 2016 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Oct 25 17:19:12 2016 +0200

    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 <sstabellini@xxxxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    master commit: 04535bee06858fd949c743cfecc4d7b96333a16c
    master date: 2016-10-21 09:57:55 +0100
---
 xen/include/public/io/usbif.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/include/public/io/usbif.h b/xen/include/public/io/usbif.h
index 9ef0cdc..4b0e66d 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.
@@ -225,7 +226,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
@@ -247,6 +248,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__ */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.6

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.