USB IRP_MJ_READ

Hello,
what does bus driver do when I want to read data. I can see traffic between the bus driver and device, but I send only one read IRP in my function driver down the stack. There are no data on the device to be transfered.
Does bus driver repeatly ask the device for data?

Jan Halama

what bus are we talking about?

=====================
Mark Roddy


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jan Halama
Sent: Tuesday, January 11, 2005 12:24 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB IRP_MJ_READ

Hello,
what does bus driver do when I want to read data. I can see traffic
between the bus driver and device, but I send only one read IRP in my
function driver down the stack. There are no data on the device to be
transfered.
Does bus driver repeatly ask the device for data?

Jan Halama

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Ah never mind I see we are talking about USB. The host (through the bus
driver and the chipset) controls all interactions and will poll device
endpoints to see if they something to send. Details depends on the type of
endpoint supported. See the USB 2.0 spec at usb.org for how this all works.

=====================
Mark Roddy


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Tuesday, January 11, 2005 12:29 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB IRP_MJ_READ

what bus are we talking about?

=====================
Mark Roddy


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jan Halama
Sent: Tuesday, January 11, 2005 12:24 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB IRP_MJ_READ

Hello,
what does bus driver do when I want to read data. I can see traffic
between the bus driver and device, but I send only one read IRP in my
function driver down the stack. There are no data on the device to be
transfered.
Does bus driver repeatly ask the device for data?

Jan Halama

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The host will only ask the device for information if there is a pending transfer sent from the host. If there is no pending transfer, no bus activity should occur. So, you must send a read continuously if your device is streaming data to the host.

d


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Tuesday, January 11, 2005 12:52 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB IRP_MJ_READ

Ah never mind I see we are talking about USB. The host (through the bus driver and the chipset) controls all interactions and will poll device endpoints?to see if they something to send. Details depends on the type of endpoint supported. See the USB 2.0 spec at usb.org for how this all works.
?

=====================
Mark Roddy
?


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Tuesday, January 11, 2005 12:29 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB IRP_MJ_READ
what bus are we talking about?
?

=====================
Mark Roddy
?


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Jan Halama
Sent: Tuesday, January 11, 2005 12:24 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB IRP_MJ_READ
Hello,
??? what does?bus driver?do when I want to read data. I can see traffic between the?bus driver?and device, but I send only one read IRP in my?function driver?down the stack. There are no data on the device to be transfered.
??? Does bus driver repeatly ask the device for data?
?
Jan Halama

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Thank you for answers.

I use usb bulk input endpoint.
I have problems with cancelation pending IRPs on this endpoint.
There are steps I do:

  1. My filter driver takes read request, sets a completion routine, marks the
    IRP pending, passes it down to the USBD and returns STATUS_PENDING
  2. I decided to cancel this pending IRP, and so I call IoCancelIrp
  3. My completion routine is called. I return STATUS_SUCCESS.

At this moment I thought that the IRP is canceled and that that there would
be no bus activity. But USBD continues asking device. I can’t reset or
abort this endpoint. The bus activity stops only if the device sends some
data to the host.

Jan

The host will only ask the device for information if there is a pending
transfer sent from the host. If there is no pending transfer, no bus
activity should occur. So, you must send a read continuously if your device
is streaming data to the host.

d


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Tuesday, January 11, 2005 12:52 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB IRP_MJ_READ

Ah never mind I see we are talking about USB. The host (through the bus
driver and the chipset) controls all interactions and will poll device
endpoints to see if they something to send. Details depends on the type of
endpoint supported. See the USB 2.0 spec at usb.org for how this all works.

=====================
Mark Roddy


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Tuesday, January 11, 2005 12:29 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB IRP_MJ_READ
what bus are we talking about?

=====================
Mark Roddy


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jan Halama
Sent: Tuesday, January 11, 2005 12:24 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB IRP_MJ_READ
Hello,
what does bus driver do when I want to read data. I can see traffic between
the bus driver and device, but I send only one read IRP in my function
driver down the stack. There are no data on the device to be transfered.
Does bus driver repeatly ask the device for data?

Jan Halama

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Are you indicating short transfer OK on the URB? (I have no idea if you
send a straight up buffer on read or if it still contains a pointer to
an urb like when you use IOCTL_INTERNAL_SUBIT_URB

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jan Halama
Sent: Thursday, January 13, 2005 1:14 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] USB IRP_MJ_READ

Thank you for answers.

I use usb bulk input endpoint.
I have problems with cancelation pending IRPs on this endpoint.
There are steps I do:

  1. My filter driver takes read request, sets a completion routine, marks
    the
    IRP pending, passes it down to the USBD and returns STATUS_PENDING
  2. I decided to cancel this pending IRP, and so I call IoCancelIrp
  3. My completion routine is called. I return STATUS_SUCCESS.

At this moment I thought that the IRP is canceled and that that there
would
be no bus activity. But USBD continues asking device. I can’t reset or
abort this endpoint. The bus activity stops only if the device sends
some
data to the host.

Jan

The host will only ask the device for information if there is a pending
transfer sent from the host. If there is no pending transfer, no bus
activity should occur. So, you must send a read continuously if your
device
is streaming data to the host.

d


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Tuesday, January 11, 2005 12:52 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB IRP_MJ_READ

Ah never mind I see we are talking about USB. The host (through the bus
driver and the chipset) controls all interactions and will poll device
endpoints to see if they something to send. Details depends on the type
of
endpoint supported. See the USB 2.0 spec at usb.org for how this all
works.

=====================
Mark Roddy


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Roddy, Mark
Sent: Tuesday, January 11, 2005 12:29 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] USB IRP_MJ_READ
what bus are we talking about?

=====================
Mark Roddy


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jan Halama
Sent: Tuesday, January 11, 2005 12:24 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB IRP_MJ_READ
Hello,
what does bus driver do when I want to read data. I can see traffic
between
the bus driver and device, but I send only one read IRP in my function
driver down the stack. There are no data on the device to be transfered.
Does bus driver repeatly ask the device for data?

Jan Halama

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com