Hi, all,
Nice to see you.
Recently, I write a USB driver, the enumerate part is ok, and get the pipe handle for bulk in and out.
While at first, I construct a URB and also allocate a IRP, then forward the irp(urb) to the bulk out pipe, in the completion routine, this irp return with the status == 0, it is a successfully irp.
But when I reuse the URB and the IRP, only the different lies in the URB
with different pipe, it is bulk in pipe now
and also the buffer(MDL), buffer length, and also flag (in, and short ok).
for the first URB, I use a none paged pool memory buffer, and its length, with flag is 0, and bulk out pipe.
for the second URB, I use pScsi_request_block->DataBuffer , databufferlength, flag in and short ok, and bulk in pipe, and always in the completion routine, the irp return with status = STATUS_INVALID_PARAMETER.
So I change the URB buffer parameter to NULL and with the MDL(2nd method)
and also I also allocate a buffer from none paged pool, and as the buffer parameter(3 method)
all of the three method for bulk in transfer is failed, with IRP status =STATUS_INVALID_PARAMETER.
Can any body tell me the reason:
- how to fix this bug?
- how to use the Windbg to figure out which parameter is invalid?
by the way
as for the SCSI_REQUEST_BLOCK i get from dispatch routine
and i stall this pointer for later use.
I have question
I found that the scsi_request_block->databuffer address = 0xba4f3960
does this address is a system address or a process specific address
because it is higher than 0x8000,0000, So i think it is a sysmte address, so i can use in arbitrary context, right?