usb bulk transfer driver crash



Hi, all,

I create a usb bulk transfer driver based on the example in DDK. It normally
works greate except:

1. When driver has to split a big data into small transfers usbd can accept
(4K on my computer). I continue the next small transfers in
ReadWriteCompletion just like the example. After transfering a big file
around 500M for 1M packet each to eventually split into 4k's in driver, the
driver crashes. I understand most likely it's caused by virtual memory
mapping. Where on Completion function (running DISPATCH_LEVEL), access to
user memory is not safe. (although I create a internal MDL to map to that
memory). Am I correct here?

I rewote my code to split the packet from user mode in Read/Write Irp
function and set a loop there to complete until all data are transfered.
Surprisingly enough, the driver still crashes. What could be possible reason
here?

Anybody writing usb bulk drivers, how do you handle big data and split them?

thanks for all comments.
.



Relevant Pages

  • RE: usb bulk transfer driver crash
    ... Oney's usb driver example. ... When driver has to split a big data into small transfers usbd can accept ... I understand most likely it's caused by virtual memory ...
    (microsoft.public.development.device.drivers)
  • How to setup large & fast DMA transfers?
    ... I am developing a driver for a PCI Bus Master device. ... that multiple hundreds of megabytes be transfered in a single continous DMA ... 64Mb transfers apparently due to the MDL's size field (thanks to Maxim ... Because of my limited understanding of Windows Memory Managment ...
    (microsoft.public.win32.programmer.kernel)
  • [RFC v3 7/7] Atmel MCI: Driver for Atmel on-chip MMC controllers
    ... This driver has been around for a while in BSPs and kernel sources ... but this particular version uses the generic DMA ... This driver can also use PIO transfers when no DMA channels are ... +struct atmel_mci_dma { ...
    (Linux-Kernel)
  • Re: [PATCH] SPI: turn transfers from arrays to linked lists
    ... This makes the SPI core and its users access transfers in the SPI message ... * underlying driver uses dma. ... - * insulate against future API updates. ...
    (Linux-Kernel)
  • [PATCH v5] Atmel MCI: Driver for Atmel on-chip MMC controllers
    ... entirely clear if it's worth merging this with the at91_mci driver. ... provided by Atmel, but this particular version uses the generic DMA ... This driver can also use PIO transfers when no DMA channels are ...
    (Linux-Kernel)