USB class driver

hii all
i have written a USB Class driver .it is working fine if i am transferring less number of data & also it is stable.if i am trying to write more number of datas It is working fine for the first time but when i am going to write again sometimes it is writting properly & sometimes it is showing error in URB status(bulk out) that is operation is not completed & the usb bulk pipe is stalled what might be the problem?
can anybody suggest some solutions to this problem.

with regards
anthony