|
@@ -545,7 +545,7 @@ static int ehci_enqueue ( struct ehci_device *ehci, struct ehci_ring *ring,
|
545
|
545
|
assert ( xfer->len <= EHCI_LEN_MASK );
|
546
|
546
|
assert ( EHCI_FL_TOGGLE == EHCI_LEN_TOGGLE );
|
547
|
547
|
desc->len = cpu_to_le16 ( xfer->len | toggle );
|
548
|
|
- desc->flags = xfer->flags;
|
|
548
|
+ desc->flags = ( xfer->flags | EHCI_FL_CERR_MAX );
|
549
|
549
|
|
550
|
550
|
/* Copy data to immediate data buffer (if requested) */
|
551
|
551
|
data = xfer->data;
|
|
@@ -902,19 +902,16 @@ static uint32_t ehci_endpoint_characteristics ( struct usb_endpoint *ep ) {
|
902
|
902
|
chr |= EHCI_CHR_TOGGLE;
|
903
|
903
|
|
904
|
904
|
/* Determine endpoint speed */
|
905
|
|
- switch ( usb->port->speed ) {
|
906
|
|
- case USB_SPEED_HIGH :
|
|
905
|
+ if ( usb->port->speed == USB_SPEED_HIGH ) {
|
907
|
906
|
chr |= EHCI_CHR_EPS_HIGH;
|
908
|
|
- break;
|
909
|
|
- case USB_SPEED_FULL :
|
910
|
|
- chr |= EHCI_CHR_EPS_FULL;
|
911
|
|
- break;
|
912
|
|
- default:
|
913
|
|
- assert ( usb->port->speed == USB_SPEED_LOW );
|
914
|
|
- chr |= EHCI_CHR_EPS_LOW;
|
|
907
|
+ } else {
|
|
908
|
+ if ( usb->port->speed == USB_SPEED_FULL ) {
|
|
909
|
+ chr |= EHCI_CHR_EPS_FULL;
|
|
910
|
+ } else {
|
|
911
|
+ chr |= EHCI_CHR_EPS_LOW;
|
|
912
|
+ }
|
915
|
913
|
if ( attr == USB_ENDPOINT_ATTR_CONTROL )
|
916
|
914
|
chr |= EHCI_CHR_CONTROL;
|
917
|
|
- break;
|
918
|
915
|
}
|
919
|
916
|
|
920
|
917
|
return chr;
|
|
@@ -927,6 +924,8 @@ static uint32_t ehci_endpoint_characteristics ( struct usb_endpoint *ep ) {
|
927
|
924
|
* @ret cap Endpoint capabilities
|
928
|
925
|
*/
|
929
|
926
|
static uint32_t ehci_endpoint_capabilities ( struct usb_endpoint *ep ) {
|
|
927
|
+ struct usb_device *usb = ep->usb;
|
|
928
|
+ struct usb_port *tt = usb_transaction_translator ( usb );
|
930
|
929
|
unsigned int attr = ( ep->attributes & USB_ENDPOINT_ATTR_TYPE_MASK );
|
931
|
930
|
uint32_t cap;
|
932
|
931
|
unsigned int i;
|
|
@@ -943,6 +942,15 @@ static uint32_t ehci_endpoint_capabilities ( struct usb_endpoint *ep ) {
|
943
|
942
|
}
|
944
|
943
|
}
|
945
|
944
|
|
|
945
|
+ /* Set transaction translator hub address and port, if applicable */
|
|
946
|
+ if ( tt ) {
|
|
947
|
+ assert ( tt->hub->usb );
|
|
948
|
+ cap |= ( EHCI_CAP_TT_HUB ( tt->hub->usb->address ) |
|
|
949
|
+ EHCI_CAP_TT_PORT ( tt->address ) );
|
|
950
|
+ if ( attr == USB_ENDPOINT_ATTR_INTERRUPT )
|
|
951
|
+ cap |= EHCI_CAP_SPLIT_SCHED_DEFAULT;
|
|
952
|
+ }
|
|
953
|
+
|
946
|
954
|
return cap;
|
947
|
955
|
}
|
948
|
956
|
|