Hi,
As you said, host
eventually times out and proceeds with USB bus reset .My question is
1. why the last bulk out
doesn't happen?
2. As I said in last letter,
after receive 4032 bytes, controller receive an
interrupt(EP_INT_REG=USB_INT_REG=0, PWR_REG=0, EP0_CSR=0), and this bulk out
translation is ended. How does the interrupt(EP_INT_REG=USB_INT_REG=0,
PWR_REG=0, EP0_CSR=0) happens?
2009-03-24
snoppy1314
发件人: Kalpesh Rathod
发送时间: 2009-03-24 15:57:38
收件人: snoppy1314
抄送: kernelnewbies; linux-usb
主题: Re: Questions about FSG, pls
help me(platform:s3c2440 andlinux2.6.26)
Hi snoopy,
I don't have answer to you question but just sharing my thoughts. Though double buffering is used, there will be cases when your both buffer are filled by host and FSG has not taken data from either. In that case OUT transactions should be NAKed by the your controller. This is generally taken care by the controller itself in hardware. IMHO, your last bulk out transaction is neither ACKed or NAKed by your controller. Hence, host eventually times out and proceeds with USB bus reset. ACK/NAK of transaction is controller h/w job. I don't know s3c2410 h/w but it should have some status indication for FIFO busy status for both the buffers. Check these values when your transaction fails. As, a trial you can make your code to respond faster. Remove all printks in write_10 path. Even remove call to vfs_write and from file_storage.c and simply return success there. This may lead to knew code insight as host will receive data in sufficient time. Thanks, Kalpesh 2009/3/24 snoppy1314 <snoppy1314@xxxxxxx>
|