This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

musb_ep_program rx2, packet/492 ready?

I got musb_ep_program rx2, packet/492 ready? under heavy usb traffic

512(wMaxPacketSize) - 492 = 20 and our package head size is 20bytes. What's the problem here?


/*                                                                                                                                 
 * Program an HDRC endpoint as per the given URB                                                                                   
 * @pThis: instance pointer                                                                                                        
 * @bEnd: local endpoint                                                                                                           
 * @pURB: URB pointer                                                                                                              
 * @is_out: zero for Rx; non-zero for Tx                                                                                           
 * @pBuffer: buffer pointer                                                                                                        
 * @dwLength: how many bytes to transmit or expect to receive                                                                      
 * Context: irqs blocked, controller lock held                                                                                     
 */
static void musb_ep_program(struct musb *pThis, u8 bEnd,
                               struct urb *pUrb, unsigned int is_out,
                               u8 * pBuffer, u32 dwLength)
{

 .................

               wCsr = MGC_ReadCsr16(pBase, MGC_O_HDRC_RXCSR, bEnd);
                if (wCsr & MGC_M_RXCSR_RXPKTRDY)
                        WARN("rx%d, packet/%d ready?\n", bEnd,
                                MGC_ReadCsr16(pBase, MGC_O_HDRC_RXCOUNT, bEnd));