Questions about FSG, pls help me(platform:s3c2440 and linux2.6.26)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
 
Hi, everyone:
 
I use the s3c2410_udc.c, file_storage.c and others in drivers/usb/gadget to make my PDA acts as a USB disk to PC.
When my PDA is connected with PC, it can be realized as a usb disk, I can also copy files from PDA to PC.But the question is:files cann't be copied from PC to PDA.After use BUS HOUND and printk, I found some reasons, but don't know how to do next.
1. when receive WRITE(10) from PC, PDA do as follow(it's defined in file_storage.c)
1.1 check buffer 1 is empty?--yes-->receive data from usb, and save data to buffer 1
1.2 check buffer 2 is empty?--yes-->receive data from usb, and save data to buffer 2
1.3 check buffer 1 is full?--yes-->write data in buffer 1 to Flash
1.4 check buffer 2 is full?--yes-->write data in buffer 2 to Flash
1.5 go back to 1.1, until data ends
The question is :in step 1.1, for example, when receive 4096 bytes data from PC, PDA only receive 4032 bytes(receive 63 tims, for each 64 bytes), the last bulk_out interrupt is not received but receive a interrupt (EP_INT_REG=USB_INT_REG=0, PWR_REG=0, EP0_CSR=0) and after some seconds, a reset interrupt with bulk_out interrupt is received and usb bus is reset.
Who can tell me how the interrupt (EP_INT_REG=USB_INT_REG=0, PWR_REG=0, EP0_CSR=0)  is produced when it's not EP interrupt or USB interrupt?
Who can tell me why the last bulk_out interrupt is not received by PDA?
 
thanks in advance!
 
Yours 施金前
 
2009-03-24

snoppy1314
 
 

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux