|
@@ -351,8 +351,7 @@ static void usbio_control_poll ( struct usbio_endpoint *endpoint ) {
|
351
|
351
|
}
|
352
|
352
|
|
353
|
353
|
/* Construct transfer */
|
354
|
|
- assert ( iob_len ( iobuf ) >= sizeof ( *msg ) );
|
355
|
|
- msg = iobuf->data;
|
|
354
|
+ msg = iob_push ( iobuf, sizeof ( *msg ) );
|
356
|
355
|
iob_pull ( iobuf, sizeof ( *msg ) );
|
357
|
356
|
request = le16_to_cpu ( msg->setup.request );
|
358
|
357
|
len = iob_len ( iobuf );
|
|
@@ -995,6 +994,11 @@ static int usbio_endpoint_enqueue ( struct usb_endpoint *ep,
|
995
|
994
|
*/
|
996
|
995
|
static int usbio_endpoint_message ( struct usb_endpoint *ep,
|
997
|
996
|
struct io_buffer *iobuf ) {
|
|
997
|
+ struct usb_setup_packet *setup;
|
|
998
|
+
|
|
999
|
+ /* Adjust I/O buffer to start of data payload */
|
|
1000
|
+ assert ( iob_len ( iobuf ) >= sizeof ( *setup ) );
|
|
1001
|
+ iob_pull ( iobuf, sizeof ( *setup ) );
|
998
|
1002
|
|
999
|
1003
|
/* Enqueue transfer */
|
1000
|
1004
|
return usbio_endpoint_enqueue ( ep, iobuf, USBIO_MESSAGE );
|