@@ -491,11 +491,6 @@ def get_status_test(dev, log):
491
491
492
492
493
493
def set_clear_feature_test (dev , log ):
494
- # The state of the Direction bit is ignored if the wLength field is zero,
495
- # signifying there is no Data stage - see USB spec 9.3.1
496
- # according to this SET/CLEAR_FEATURE ignores direction bits and should
497
- # work for both CTRL_OUT and CTRL_IN
498
-
499
494
# Control OUT SET_FEATURE on endpoint - halt
500
495
request_type = build_request_type (CTRL_OUT , CTRL_TYPE_STANDARD ,
501
496
CTRL_RECIPIENT_ENDPOINT )
@@ -544,55 +539,6 @@ def set_clear_feature_test(dev, log):
544
539
if (ret != 0 ):
545
540
raise_unconditionally (lineno (), "endpoint unhalthalt failed" )
546
541
547
- # retest for CTRL_IN
548
- # Control IN SET_FEATURE on endpoint - halt
549
- request_type = build_request_type (CTRL_IN , CTRL_TYPE_STANDARD ,
550
- CTRL_RECIPIENT_ENDPOINT )
551
- request = REQUEST_SET_FEATURE
552
- value = FEATURE_ENDPOINT_HALT
553
- index = 1 # Endpoint index
554
- length = 0 # Always 0 for this request
555
- try :
556
- dev .ctrl_transfer (request_type , request , value , index , length )
557
- except usb .core .USBError :
558
- raise_unconditionally (lineno (), "endpoint halt failed" )
559
-
560
- # check if endpoint was halted
561
- request_type = build_request_type (CTRL_IN , CTRL_TYPE_STANDARD ,
562
- CTRL_RECIPIENT_ENDPOINT )
563
- request = REQUEST_GET_STATUS
564
- value = 0 # Always 0 for this request
565
- index = 1 # Endpoint index
566
- length = 2 # Always 2 for this request (size of return data)
567
- ret = dev .ctrl_transfer (request_type , request , value , index , length )
568
- ret = ret [0 ] | (ret [1 ] << 8 )
569
- if (ret != 1 ):
570
- raise_unconditionally (lineno (), "endpoint was not halted" )
571
-
572
- # Control IN CLEAR_FEATURE on endpoint - unhalt
573
- request_type = build_request_type (CTRL_IN , CTRL_TYPE_STANDARD ,
574
- CTRL_RECIPIENT_ENDPOINT )
575
- request = REQUEST_CLEAR_FEATURE
576
- value = FEATURE_ENDPOINT_HALT
577
- index = 1 # Endpoint index
578
- length = 0 # Always 0 for this request
579
- try :
580
- dev .ctrl_transfer (request_type , request , value , index , length )
581
- except usb .core .USBError :
582
- raise_unconditionally (lineno (), "endpoint was not unhalted" )
583
-
584
- # check if endpoint was unhalted
585
- request_type = build_request_type (CTRL_IN , CTRL_TYPE_STANDARD ,
586
- CTRL_RECIPIENT_ENDPOINT )
587
- request = REQUEST_GET_STATUS
588
- value = 0 # Always 0 for this request
589
- index = 1 # Endpoint index
590
- length = 2 # Always 2 for this request (size of return data)
591
- ret = dev .ctrl_transfer (request_type , request , value , index , length )
592
- ret = ret [0 ]
593
- if (ret != 0 ):
594
- raise_unconditionally (lineno (), "endpoint unhalthalt failed" )
595
-
596
542
597
543
def get_set_interface_test (dev , log ):
598
544
# Control IN GET_INTERFACE
0 commit comments