Hi, I'm having problems with an NEC EHCI host controller on a Linux based embedded system. We're currently using version 2.4.32 of the kernel but have included the USB changes made to the 2.4.34 kernel.
In order to stress test the system, we stream a video directly from a USB memory stick. After a certain period of time, the system fails due to an I/O error. This is caused by a timeout during the submission of a URB. Despite attempting to resubmit the URB a number of times, the error persists. We believe that we have correctly traced this back to a host controller problem. When the problem occurs, we are able to dump out the queue heads and QTDs associated with the URB that was submitted to the NEC host controller. We have also seen this problem with devices other than memory sticks so the problem isn't isolated to these specifically. >From the traces we have observed, it would appear that the host controller is failing to overlay the QTD into the respective QH's overlay area. In the example below, the host is attempting to do an OUT transfer of 31 bytes. The QH associated with the OUT endpoint is QH number two. It would appear that the USB stack is correctly initializing the next QTD field to point to the QTD for the transfer (QTD number 3), but the overlay never occurs. I have done a trace using an external USB bus analyzer, but this does not indicate any problem occurring. The OUT transaction for the transfer never goes out onto the bus. I also do not get any error interrupts which may be indicative of a bus error occurring. I also dump out all of the EHCI host controller's registers when the problem occurs. These all seem correct apart from the async list address register which is set to zero. For debug purposes, I have attempted to manually write to the async list address register after the problem has occurred but this results in failure. Does this indicate that there is a problem with the host controller? Should it be possible to write to this register at any time? When the system is up and running, I can successfully write to this register. Any help on what may be wrong or on solutions to solve the problem would be greatly appreciated. Regards, Mark Leyden Trace Output: ------------------------------------------------------------------------ ----------------------------------------------- Doing an OUT transfer with 31 bytes usb_submit_urb_timeout: bulk_msg timeout usb_stor_bulk_msg: Submit failed. URB Status = -110 QH 0 Details (0x1827C0): --------------------------------- hw_next = 0x58C2 (QHLinkPtr=0x58C0, Type=1, T=0) hw_info1 = 0x8000 (RL=0, C=0, MaxPacketLength=0, H=1, DTC=0, EPS=0, Endpoint=0, I=0, Address=0) hw_info2 = 0x0 (Mult=0, PortNum=0, HubAddr=0, cMask=0, sMask=0) hw_current = 0x0 (CurrentQTDPtr=0x0) hw_qtd_next = 0x1 (NextQTDPtr=0x0, T=1) hw_alt_next = 0x5400 (AlternateNextQTDPtr=0x5400, NakCnt=0, T=0) hw_token = 0x40 (DT=0, BytesToTransfer=0, IOC=0, cPage=0, cErr=0, PID=0, Status=0x40) hw_buf[0]=0x0 (BufPtr[0]=0x0) hw_buf[1]=0x0 (BufPtr[1]=0x0) hw_buf[2]=0x0 (BufPtr[2]=0x0) hw_buf[3]=0x0 (BufPtr[3]=0x0) hw_buf[4]=0x0 (BufPtr[4]=0x0) qh_state = QH_STATE_UNLINK qh_dma = 0x57C0 qh_next = 0x1828C0 qtd_list = 0x18280C dummy = 0x182400 reclaim = 0x0 usb_device = 0x0 QH 1 Details (0x182840): --------------------------------- hw_next = 0x57C2 (QHLinkPtr=0x57C0, Type=1, T=0) hw_info1 = 0x40406002 (RL=4, C=0, MaxPacketLength=64, H=0, DTC=1, EPS=2, Endpoint=0, I=0, Address=2) hw_info2 = 0x40000000 (Mult=1, PortNum=0, HubAddr=0, cMask=0, sMask=0) hw_current = 0x55E0 (CurrentQTDPtr=0x55E0) hw_qtd_next = 0x5460 (NextQTDPtr=0x5460, T=0) hw_alt_next = 0x9 (AlternateNextQTDPtr=0x0, NakCnt=4, T=1) hw_token = 0x8D00 (DT=0, BytesToTransfer=0, IOC=1, cPage=0, cErr=3, PID=1, Status=0x0) hw_buf[0]=0x0 (BufPtr[0]=0x0) hw_buf[1]=0x0 (BufPtr[1]=0x0) hw_buf[2]=0x0 (BufPtr[2]=0x0) hw_buf[3]=0x0 (BufPtr[3]=0x0) hw_buf[4]=0x0 (BufPtr[4]=0x0) qh_state = QH_STATE_UNLINK_WAIT qh_dma = 0x5840 qh_next = 0x0 qtd_list = 0x18288C dummy = 0x182460 reclaim = 0x0 usb_device = 0x0 QH 2 Details (0x1828C0): --------------------------------- hw_next = 0x57C2 (QHLinkPtr=0x57C0, Type=1, T=0) hw_info1 = 0x42002202 (RL=4, C=0, MaxPacketLength=512, H=0, DTC=0, EPS=2, Endpoint=2, I=0, Address=2) hw_info2 = 0x40000000 (Mult=1, PortNum=0, HubAddr=0, cMask=0, sMask=0) hw_current = 0x5580 (CurrentQTDPtr=0x5580) hw_qtd_next = 0x5520 (NextQTDPtr=0x5520, T=0) hw_alt_next = 0x1 (AlternateNextQTDPtr=0x0, NakCnt=0, T=1) hw_token = 0x1 (DT=0, BytesToTransfer=0, IOC=0, cPage=0, cErr=0, PID=0, Status=0x1) hw_buf[0]=0x101F (BufPtr[0]=0x1) hw_buf[1]=0x0 (BufPtr[1]=0x0) hw_buf[2]=0x0 (BufPtr[2]=0x0) hw_buf[3]=0x0 (BufPtr[3]=0x0) hw_buf[4]=0x0 (BufPtr[4]=0x0) qh_state = QH_STATE_UNLINK qh_dma = 0x58C0 qh_next = 0x0 qtd_list = 0x182558 dummy = 0x182580 reclaim = 0x0 usb_device = 0x0 QH 3 Details (0x182940): --------------------------------- hw_next = 0x57C2 (QHLinkPtr=0x57C0, Type=1, T=0) hw_info1 = 0x42002102 (RL=4, C=0, MaxPacketLength=512, H=0, DTC=0, EPS=2, Endpoint=1, I=0, Address=2) hw_info2 = 0x40000000 (Mult=1, PortNum=0, HubAddr=0, cMask=0, sMask=0) hw_current = 0x5580 (CurrentQTDPtr=0x5580) hw_qtd_next = 0x54C0 (NextQTDPtr=0x54C0, T=0) hw_alt_next = 0x9 (AlternateNextQTDPtr=0x0, NakCnt=4, T=1) hw_token = 0x8D00 (DT=0, BytesToTransfer=0, IOC=1, cPage=0, cErr=3, PID=1, Status=0x0) hw_buf[0]=0x120D (BufPtr[0]=0x1) hw_buf[1]=0x0 (BufPtr[1]=0x0) hw_buf[2]=0x0 (BufPtr[2]=0x0) hw_buf[3]=0x0 (BufPtr[3]=0x0) hw_buf[4]=0x0 (BufPtr[4]=0x0) qh_state = QH_STATE_UNLINK_WAIT qh_dma = 0x5940 qh_next = 0x0 qtd_list = 0x18298C dummy = 0x1824C0 reclaim = 0x0 usb_device = 0x0 QTD 0 Details (0x182400): --------------------------------- hw_next = 0x1 (NextQTDPtr=0x0, T=1) hw_alt_next = 0x1 (AltNextQTDPtr=0x0, T=1) hw_token = 0x40 (DT=0, BytesToTransfer=0, IOC=0, cPage=0, cErr=0, PID=0, Status=0x40 hw_buf[0]=0x0 (BufPtr[0]=0x0) hw_buf[1]=0x0 (BufPtr[1]=0x0) hw_buf[2]=0x0 (BufPtr[2]=0x0) hw_buf[3]=0x0 (BufPtr[3]=0x0) hw_buf[4]=0x0 (BufPtr[4]=0x0) qtd_dma = 0x5400 qtd_list = 0x182438 urb = 0x0 length = 0 QTD 1 Details (0x182460): --------------------------------- hw_next = 0x1 (NextQTDPtr=0x0, T=1) hw_alt_next = 0x1 (AltNextQTDPtr=0x0, T=1) hw_token = 0x40 (DT=0, BytesToTransfer=0, IOC=0, cPage=0, cErr=0, PID=0, Status=0x40 hw_buf[0]=0x0 (BufPtr[0]=0x0) hw_buf[1]=0x0 (BufPtr[1]=0x0) hw_buf[2]=0x0 (BufPtr[2]=0x0) hw_buf[3]=0x0 (BufPtr[3]=0x0) hw_buf[4]=0x0 (BufPtr[4]=0x0) qtd_dma = 0x5460 qtd_list = 0x182498 urb = 0x0 length = 0 QTD 2 Details (0x1824C0): --------------------------------- hw_next = 0x1 (NextQTDPtr=0x0, T=1) hw_alt_next = 0x1 (AltNextQTDPtr=0x0, T=1) hw_token = 0x40 (DT=0, BytesToTransfer=0, IOC=0, cPage=0, cErr=0, PID=0, Status=0x40 hw_buf[0]=0x0 (BufPtr[0]=0x0) hw_buf[1]=0x0 (BufPtr[1]=0x0) hw_buf[2]=0x0 (BufPtr[2]=0x0) hw_buf[3]=0x0 (BufPtr[3]=0x0) hw_buf[4]=0x0 (BufPtr[4]=0x0) qtd_dma = 0x54C0 qtd_list = 0x1824F8 urb = 0x0 length = 0 QTD 3 Details (0x182520): --------------------------------- hw_next = 0x5580 (NextQTDPtr=0x5580, T=0) hw_alt_next = 0x1 (AltNextQTDPtr=0x0, T=1) hw_token = 0x1F8C80 (DT=0, BytesToTransfer=31, IOC=1, cPage=0, cErr=3, PID=0, Status=0x80 hw_buf[0]=0x1000 (BufPtr[0]=0x1) hw_buf[1]=0x0 (BufPtr[1]=0x0) hw_buf[2]=0x0 (BufPtr[2]=0x0) hw_buf[3]=0x0 (BufPtr[3]=0x0) hw_buf[4]=0x0 (BufPtr[4]=0x0) qtd_dma = 0x5520 qtd_list = 0x18290C urb = 0x7C14EA8 length = 31 QTD 4 Details (0x182580): --------------------------------- hw_next = 0x1 (NextQTDPtr=0x0, T=1) hw_alt_next = 0x1 (AltNextQTDPtr=0x0, T=1) hw_token = 0x40 (DT=0, BytesToTransfer=0, IOC=0, cPage=0, cErr=0, PID=0, Status=0x40 hw_buf[0]=0x0 (BufPtr[0]=0x0) hw_buf[1]=0x0 (BufPtr[1]=0x0) hw_buf[2]=0x0 (BufPtr[2]=0x0) hw_buf[3]=0x0 (BufPtr[3]=0x0) hw_buf[4]=0x0 (BufPtr[4]=0x0) qtd_dma = 0x5580 qtd_list = 0x1825B8 urb = 0x0 length = 0 ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel