@@ -249,6 +249,7 @@ static inline void ohci_intr_update(OHCIState *ohci)
249
249
(ohci -> intr_status & ohci -> intr ))
250
250
level = 1 ;
251
251
252
+ qemu_set_irq (ohci -> irq , 0 );
252
253
qemu_set_irq (ohci -> irq , level );
253
254
}
254
255
@@ -346,6 +347,7 @@ static void ohci_soft_reset(OHCIState *ohci)
346
347
ohci -> frame_number = 0 ;
347
348
ohci -> pstart = 0 ;
348
349
ohci -> lst = OHCI_LS_THRESH ;
350
+ printf ("OHCI RESET\n" );
349
351
}
350
352
351
353
void ohci_hard_reset (OHCIState * ohci )
@@ -573,12 +575,14 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed)
573
575
574
576
if (addr == 0 ) {
575
577
ohci_die (ohci );
578
+ printf ("%d\n" , __LINE__ );
576
579
return 1 ;
577
580
}
578
581
579
582
if (ohci_read_iso_td (ohci , addr , & iso_td )) {
580
583
trace_usb_ohci_iso_td_read_failed (addr );
581
584
ohci_die (ohci );
585
+ printf ("%d\n" , __LINE__ );
582
586
return 1 ;
583
587
}
584
588
@@ -599,6 +603,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed)
599
603
600
604
if (relative_frame_number < 0 ) {
601
605
trace_usb_ohci_iso_td_relative_frame_number_neg (relative_frame_number );
606
+ printf ("%d\n" , __LINE__ );
602
607
return 1 ;
603
608
} else if (relative_frame_number > frame_count ) {
604
609
/* ISO TD expired - retire the TD to the Done Queue and continue with
@@ -607,8 +612,13 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed)
607
612
frame_count );
608
613
if (OHCI_CC_DATAOVERRUN == OHCI_BM (iso_td .flags , TD_CC )) {
609
614
/* avoid infinite loop */
615
+ printf ("%d\n" , __LINE__ );
610
616
return 1 ;
611
617
}
618
+ dir = OHCI_BM (ed -> flags , ED_D );
619
+ printf ("OHCI_CC_DATAOVERRUN %d current_frame: %d starting_frame: %d. frame_count: %d, dir %d\n" ,
620
+ relative_frame_number , ohci -> frame_number , starting_frame , frame_count , dir );
621
+ assert (0 );
612
622
OHCI_SET_BM (iso_td .flags , TD_CC , OHCI_CC_DATAOVERRUN );
613
623
ed -> head &= ~OHCI_DPTR_MASK ;
614
624
ed -> head |= (iso_td .next & OHCI_DPTR_MASK );
@@ -640,11 +650,14 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed)
640
650
break ;
641
651
default :
642
652
trace_usb_ohci_iso_td_bad_direction (dir );
653
+ printf ("%d\n" , __LINE__ );
643
654
return 1 ;
644
655
}
645
656
646
657
if (!iso_td .bp || !iso_td .be ) {
647
658
trace_usb_ohci_iso_td_bad_bp_be (iso_td .bp , iso_td .be );
659
+ printf ("%d\n" , __LINE__ );
660
+ assert (0 );
648
661
return 1 ;
649
662
}
650
663
@@ -659,11 +672,13 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed)
659
672
((relative_frame_number < frame_count ) &&
660
673
!(OHCI_BM (next_offset , TD_PSW_CC ) & 0xe ))) {
661
674
trace_usb_ohci_iso_td_bad_cc_not_accessed (start_offset , next_offset );
675
+ printf ("%d\n" , __LINE__ );
662
676
return 1 ;
663
677
}
664
678
665
679
if ((relative_frame_number < frame_count ) && (start_offset > next_offset )) {
666
680
trace_usb_ohci_iso_td_bad_cc_overrun (start_offset , next_offset );
681
+ printf ("%d\n" , __LINE__ );
667
682
return 1 ;
668
683
}
669
684
@@ -691,7 +706,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed)
691
706
692
707
if (start_addr > end_addr ) {
693
708
trace_usb_ohci_iso_td_bad_cc_overrun (start_addr , end_addr );
694
- return 1 ;
709
+ // return 1;
695
710
}
696
711
697
712
if ((start_addr & OHCI_PAGE_MASK ) != (end_addr & OHCI_PAGE_MASK )) {
@@ -708,6 +723,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed)
708
723
if (ohci_copy_iso_td (ohci , start_addr , end_addr , buf , len ,
709
724
DMA_DIRECTION_TO_DEVICE )) {
710
725
ohci_die (ohci );
726
+ printf ("%d\n" , __LINE__ );
711
727
return 1 ;
712
728
}
713
729
}
@@ -1185,6 +1201,7 @@ static void ohci_frame_boundary(void *opaque)
1185
1201
if (ohci_read_hcca (ohci , ohci -> hcca , & hcca )) {
1186
1202
trace_usb_ohci_hcca_read_error (ohci -> hcca );
1187
1203
ohci_die (ohci );
1204
+ assert (0 );
1188
1205
return ;
1189
1206
}
1190
1207
@@ -1194,6 +1211,8 @@ static void ohci_frame_boundary(void *opaque)
1194
1211
1195
1212
n = ohci -> frame_number & 0x1f ;
1196
1213
ohci_service_ed_list (ohci , le32_to_cpu (hcca .intr [n ]));
1214
+ } else {
1215
+ assert (0 );
1197
1216
}
1198
1217
1199
1218
/* Cancel all pending packets if either of the lists has been disabled. */
0 commit comments