MdlAddress is NULL

Hello there,

I have written a lot of embedded kernel drivers and I am relatively new
to the Windows environment, I have run into a strange problem.

I have a USB driver and a serial port driver that communicates to my USB
driver. MY driver works on at least two machines (Both Windows XP). But
on one particular machine which is also Windows XP, my DispatchWrite
Function always gets a NULL MdlAdress i.e. Irp->MdlAddress is NULL. My
user mode application which is definitely attempting to write more than
10 Bytes. This seems to happen only on one particular Windows XP. I have
tried using WinDBG and also DebugView and the IRPTracker to track down
this problem but all my efforts have been in vain so far.

Any suggestion or ideas will be greatly appreciated.

Thanks

Angelo

Is DO_DIRECT_IO set on your device object? If so, when do you set the flag? In AddDevice or later on somewhere? Is serenum loaded on top of your serial driver (if you have one, that part is not clear if you are writing a serial port driver or not). You can see the entire stack by running !devstack

d

– I can spell, I just can’t type.
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Angelo Joseph
Sent: Wednesday, June 21, 2006 7:53 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] MdlAddress is NULL

Hello there,

I have written a lot of embedded kernel drivers and I am relatively new to the Windows environment, I have run into a strange problem.

I have a USB driver and a serial port driver that communicates to my USB driver. MY driver works on at least two machines (Both Windows XP). But on one particular machine which is also Windows XP, my DispatchWrite Function always gets a NULL MdlAdress i.e. Irp->MdlAddress is NULL. My user mode application which is definitely attempting to write more than 10 Bytes. This seems to happen only on one particular Windows XP. I have tried using WinDBG and also DebugView and the IRPTracker to track down this problem but all my efforts have been in vain so far.

Any suggestion or ideas will be greatly appreciated.

Thanks
Angelo
?


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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Thanks D. That clue set me on the correct path. On this one PC there was a Serial Monitor that was installing a FiDO above my serial FDO. Looks like my FDO is not able to handle any other driver above it. I have to look into that now but now I know why it is not working. I uninstalled the Serial Monitor and my driver was working

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Wednesday, June 21, 2006 9:49 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] MdlAddress is NULL

Is DO_DIRECT_IO set on your device object? If so, when do you set the flag? In AddDevice or later on somewhere? Is serenum loaded on top of your serial driver (if you have one, that part is not clear if you are writing a serial port driver or not). You can see the entire stack by running !devstack

d

– I can spell, I just can’t type.
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Angelo Joseph
Sent: Wednesday, June 21, 2006 7:53 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] MdlAddress is NULL

Hello there,

I have written a lot of embedded kernel drivers and I am relatively new to the Windows environment, I have run into a strange problem.

I have a USB driver and a serial port driver that communicates to my USB driver. MY driver works on at least two machines (Both Windows XP). But on one particular machine which is also Windows XP, my DispatchWrite Function always gets a NULL MdlAdress i.e. Irp->MdlAddress is NULL. My user mode application which is definitely attempting to write more than 10 Bytes. This seems to happen only on one particular Windows XP. I have tried using WinDBG and also DebugView and the IRPTracker to track down this problem but all my efforts have been in vain so far.

Any suggestion or ideas will be greatly appreciated.

Thanks
Angelo
?


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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

It is not your driver’s fault. The serial monitor filter driver should respect the underlying Flags on the device it attached to. The reason why the vendor for the port driver did not see this error previously is that the std serial port driver uses buffered io (DO_BUFFERED_IO) and the filter probably has that bit hard coded in its creation path instead of inspecting the attached device.

d

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Angelo Joseph
Sent: Wednesday, June 21, 2006 10:48 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] MdlAddress is NULL

Thanks D. That clue set me on the correct path. On this one PC there was a Serial Monitor that was installing a FiDO above my serial FDO. Looks like my FDO is not able to handle any other driver above it. I have to look into that now but now I know why it is not working. I uninstalled the Serial Monitor and my driver was working

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Wednesday, June 21, 2006 9:49 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] MdlAddress is NULL

Is DO_DIRECT_IO set on your device object? If so, when do you set the flag? In AddDevice or later on somewhere? Is serenum loaded on top of your serial driver (if you have one, that part is not clear if you are writing a serial port driver or not). You can see the entire stack by running !devstack

d

– I can spell, I just can’t type.
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Angelo Joseph
Sent: Wednesday, June 21, 2006 7:53 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] MdlAddress is NULL

Hello there,

I have written a lot of embedded kernel drivers and I am relatively new to the Windows environment, I have run into a strange problem.

I have a USB driver and a serial port driver that communicates to my USB driver. MY driver works on at least two machines (Both Windows XP). But on one particular machine which is also Windows XP, my DispatchWrite Function always gets a NULL MdlAdress i.e. Irp->MdlAddress is NULL. My user mode application which is definitely attempting to write more than 10 Bytes. This seems to happen only on one particular Windows XP. I have tried using WinDBG and also DebugView and the IRPTracker to track down this problem but all my efforts have been in vain so far.

Any suggestion or ideas will be greatly appreciated.

Thanks
Angelo
?


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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Doron,

Thanks once again. I will send an E-Mail to the driver vendor. ON a side note I installed the Serial Monitor on another machine that has an edgeport (one of those USB to Serial Converters) and everything works. The EdgePOrt serial driver was using BUFFERED_IO. This further confirms what you are saying.

Thanks
Angelo

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Wednesday, June 21, 2006 12:24 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] MdlAddress is NULL

It is not your driver’s fault. The serial monitor filter driver should respect the underlying Flags on the device it attached to. The reason why the vendor for the port driver did not see this error previously is that the std serial port driver uses buffered io (DO_BUFFERED_IO) and the filter probably has that bit hard coded in its creation path instead of inspecting the attached device.

d

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Angelo Joseph
Sent: Wednesday, June 21, 2006 10:48 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] MdlAddress is NULL

Thanks D. That clue set me on the correct path. On this one PC there was a Serial Monitor that was installing a FiDO above my serial FDO. Looks like my FDO is not able to handle any other driver above it. I have to look into that now but now I know why it is not working. I uninstalled the Serial Monitor and my driver was working

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Wednesday, June 21, 2006 9:49 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] MdlAddress is NULL

Is DO_DIRECT_IO set on your device object? If so, when do you set the flag? In AddDevice or later on somewhere? Is serenum loaded on top of your serial driver (if you have one, that part is not clear if you are writing a serial port driver or not). You can see the entire stack by running !devstack

d

– I can spell, I just can’t type.
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Angelo Joseph
Sent: Wednesday, June 21, 2006 7:53 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] MdlAddress is NULL

Hello there,

I have written a lot of embedded kernel drivers and I am relatively new to the Windows environment, I have run into a strange problem.

I have a USB driver and a serial port driver that communicates to my USB driver. MY driver works on at least two machines (Both Windows XP). But on one particular machine which is also Windows XP, my DispatchWrite Function always gets a NULL MdlAdress i.e. Irp->MdlAddress is NULL. My user mode application which is definitely attempting to write more than 10 Bytes. This seems to happen only on one particular Windows XP. I have tried using WinDBG and also DebugView and the IRPTracker to track down this problem but all my efforts have been in vain so far.

Any suggestion or ideas will be greatly appreciated.

Thanks
Angelo
?


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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer