All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] PVUSB update and bugfix: interface header
@ 2009-10-07  7:28 Noboru Iwamatsu
  0 siblings, 0 replies; only message in thread
From: Noboru Iwamatsu @ 2009-10-07  7:28 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 60 bytes --]

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>


[-- Attachment #2: usbif-v2.patch --]
[-- Type: text/plain, Size: 2800 bytes --]

diff -r 4ac3e1d6605c -r 3be939975ad6 include/xen/interface/io/usbif.h
--- a/include/xen/interface/io/usbif.h	Tue Sep 29 11:23:06 2009 +0100
+++ b/include/xen/interface/io/usbif.h	Tue Oct 06 15:18:27 2009 +0900
@@ -31,6 +31,13 @@
 #include "ring.h"
 #include "../grant_table.h"
 
+enum usb_spec_version {
+	USB_VER_UNKNOWN = 0,
+	USB_VER_USB11,
+	USB_VER_USB20,
+	USB_VER_USB30,	/* not supported yet */
+};
+
 /*
  *  USB pipe in usbif_request
  *
@@ -57,21 +64,26 @@
  *                           10 = control, 11 = bulk)
  */
 #define usbif_pipeportnum(pipe) ((pipe) & 0x1f)
-#define usbif_setportnum_pipe(pipe,portnum) \
+#define usbif_setportnum_pipe(pipe, portnum) \
 	((pipe)|(portnum))
+
 #define usbif_pipeunlink(pipe) ((pipe) & 0x20)
+#define usbif_pipesubmit(pipe) (!usbif_pipeunlink(pipe))
 #define usbif_setunlink_pipe(pipe) ((pipe)|(0x20))
 
 #define USBIF_BACK_MAX_PENDING_REQS (128)
-#define USBIF_MAX_SEGMENTS_PER_REQUEST (10)
+#define USBIF_MAX_SEGMENTS_PER_REQUEST (16)
 
+/*
+ * RING for transferring urbs.
+ */
 struct usbif_request_segment {
 	grant_ref_t gref;
 	uint16_t offset;
 	uint16_t length;
 };
 
-struct usbif_request {
+struct usbif_urb_request {
 	uint16_t id; /* request id */
 	uint16_t nr_buffer_segs; /* number of urb->transfer_buffer segments */
 
@@ -104,18 +116,36 @@
 	/* urb data segments */
 	struct usbif_request_segment seg[USBIF_MAX_SEGMENTS_PER_REQUEST];
 };
-typedef struct usbif_request usbif_request_t;
+typedef struct usbif_urb_request usbif_urb_request_t;
 
-struct usbif_response {
+struct usbif_urb_response {
 	uint16_t id; /* request id */
 	uint16_t start_frame;  /* start frame (ISO) */
 	int32_t status; /* status (non-ISO) */
 	int32_t actual_length; /* actual transfer length */
 	int32_t error_count; /* number of ISO errors */
 };
-typedef struct usbif_response usbif_response_t;
+typedef struct usbif_urb_response usbif_urb_response_t;
 
-DEFINE_RING_TYPES(usbif, struct usbif_request, struct usbif_response);
-#define USB_RING_SIZE __RING_SIZE((struct usbif_sring *)0, PAGE_SIZE)
+DEFINE_RING_TYPES(usbif_urb, struct usbif_urb_request, struct usbif_urb_response);
+#define USB_URB_RING_SIZE __RING_SIZE((struct usbif_urb_sring *)0, PAGE_SIZE)
+
+/*
+ * RING for notifying connect/disconnect events to frontend
+ */
+struct usbif_conn_request {
+	uint16_t id;
+};
+typedef struct usbif_conn_request usbif_conn_request_t;
+
+struct usbif_conn_response {
+	uint16_t id; /* request id */
+	uint8_t portnum; /* port number */
+	uint8_t speed; /* usb_device_speed */
+};
+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 __RING_SIZE((struct usbif_conn_sring *)0, PAGE_SIZE)
 
 #endif /* __XEN_PUBLIC_IO_USBIF_H__ */

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-07  7:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-07  7:28 [PATCH 3/3] PVUSB update and bugfix: interface header Noboru Iwamatsu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.