On Sun, 8 Oct 2006, JackRain wrote: > linux-usb-users£¬ÄúºÃ£¡ > > I have a question about the host/device disagreement on data > transfer stage: > > 1/ the usb device is capable to receive ,saying 8192 Bytes data ,and > process it (writing to nand flash ), > but host is indicating 65536 Bytes /*(cmd[7] < < 8) | cmd[8]) > *BLOCK_SIZE */ to send to device. > > how can I balance the speed difference between host and device ? > I want the usb device finish processing the received data > > before the host send out data ,so that device can handle the > incoming data and won't cause a TIMEOUT reset.
You don't have to do anything. The host will wait for the device to be ready. The timeout period is very long, several seconds. The device certainly ought to be able to write a few KB to flash in one second. > 2/ when copy a little several MB file to U-disk,it won't crash ,and > very fast,the speed is up to 780KB/s in Full-speed. > > right now,my usb device driver will crash if repeat copy & delete > the file on the U-disk or copy a huge file to U-disk from PC. It sounds like there's a bug in your device driver. > I found the system memory is very low after this operation,from 18MB > to 370KB. > > someone told me that it is caused by the filesystem cache which > too much data in ,but can't write to nand flash inmediately. What is your question? Alan Stern ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users