Hi all,
My driver is a SCSIAdapter driver. Is there any way I can make disk class driver send a ioctl such as IOCTL_STORAGE_QUERY_PROPERTY to my driver, so I can update my driver’s information to the class driver?
Thanks & regards!
Since the source for disk.sys is located in the WDK, the obvious answer is yes. Make project out of that source code, add your code and then debug it. But the question is “Why!?!?” Why not simply send the IOCTL from an application or service running in usermode?
Gary G. Little
----- Original Message -----
From: kuangnuzhiren@163.com
To: “Windows System Software Devs Interest List”
Sent: Wednesday, April 6, 2011 10:48:44 PM
Subject: [ntdev] Make disk.sys send some IOCTLs?
Hi all,
My driver is a SCSIAdapter driver. Is there any way I can make disk class driver send a ioctl such as IOCTL_STORAGE_QUERY_PROPERTY to my driver, so I can update my driver’s information to the class driver?
Thanks & regards!
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Yikes… Under no circumstances do you want to replace the Windows Disk Class driver with your own driver as part of a PRODUCTION solution.
Why do you, specifically, want the DISK CLASS DRIVER to send the IOCTL?
As we so very frequently are forced to ask people here: PLEASE don’t start with an assumed solution, rather tell us what are you ultimately trying to accomplish so we can give you the best way to achieve your ultimate goal.
Peter
OSR
Disk class driver uses IOCTL_STORAGE_QUERY_PROPERTY to get information of my SCSIAdapter. Then my SCSIAdapter’s information changed, so I think I need disk class driver get this new information. If not, the disk class driver maybe can not read/write disks of my SCSIAdapter.
The class driver should store this information in the FDO’s device extension so its dispatch routines can ensure that all requests sent to the storage port driver conform to the size, number of physical breaks, and alignment requirements of the underlying HBA.
So I think I should update this information, and I think the only way to accomplish is let disk.sys send this ioctl again, no matter by resetting my SCSIAdapter or reporting my disks again. The final result what I need is disk.sys get the right information and all read/write requests sent to my driver is in the right size, number of physical breaks, and alignment requirements.
Why is the information changing in the first place?
d
debt from my phone
-----Original Message-----
From: kuangnuzhiren@163.com
Sent: Thursday, April 07, 2011 7:22 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Make disk.sys send some IOCTLs?
So I think I should update this information, and I think the only way to accomplish is let disk.sys send this ioctl again, no matter by resetting my SCSIAdapter or reporting my disks again. The final result what I need is disk.sys get the right information and all read/write requests sent to my driver is in the right size, number of physical breaks, and alignment requirements.
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Because I want it change. Is this information unchangeable? If hardware made some changes should this information change?
“Because I want to” is not a valid answer. What are you trying to accomplish?
d
debt from my phone
-----Original Message-----
From: kuangnuzhiren@163.com
Sent: Thursday, April 07, 2011 7:47 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Make disk.sys send some IOCTLs?
Because I want it change. Is this information unchangeable? If hardware made some changes should this information change?
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Fix this D1 stop error. http://support.microsoft.com/kb/969255
Sigh… please. Details, not one line posts. Please?
I guess we’ll have to get the information one question at a time.
OK. The natural next question here is:
Why not just not use HBAs that have different characteristics?
Peter
OSR
You need to come up with a better solution. One of these adapters is
under your control, I assume the other isn’t. So at install time,
before MPIO is set up, you need to adjust the reported characteristics
of your adapter to match those of the other adapter, and then you need
to either programatically disable/enable your adapter, or reboot the
platform to complete the reconfiguration, having preserved the new
configuration for the next appearance of your adapter.
This does not sound terribly complicated.
Mark Roddy
On Thu, Apr 7, 2011 at 10:21 PM, wrote:
> So I think I should update this information, and I think the only way to accomplish is let disk.sys send this ioctl again, no matter by resetting my SCSIAdapter or reporting my disks again. The final result what I need is disk.sys get the right information and all read/write requests sent to my driver is in the right size, number of physical breaks, and alignment requirements.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
Thanks everyone. But now I am implementing a virtual SCSIAdapter driver by myself. I cannot modify any configuration or disable/enable other’s adapter. I need to report to Windows a appropriate value to make IOs to both adapter in the right size. And when adapters added to the system, maybe I need to report a new value, so I think I need disk.sys ask me again.
At 08:57 09/04/2011, kuangnuzhiren@163.com wrote:
Thanks everyone. But now I am implementing a virtual SCSIAdapter
driver by myself. I cannot modify any configuration or
disable/enable other’s adapter. I need to report to Windows a
appropriate value to make IOs to both adapter in the right size. And
when adapters added to the system, maybe I need to report a new
value, so I think I need disk.sys ask me again.
No, you don’t ask Windows to change behaviour just to make your
solution work. Perhaps what you think you want will be implemented
in the Windows 10 time frame if Microsoft consider it a priority.
I forget who suggested it, but a solution has already been
suggested. On installation of your driver have something read the
values from any other HBAs in the host, work out what this means for
the values on your adapter and write them to your device parameters
registry. Reboot and pick up the values from registry.
In case a new HBA is added, provide a facility to reset the registry values.
Mark.
That was me, but the op has a solution, it isn’t a good solution, but
it is the op’s solution and he is sticking to it.
On Saturday, April 9, 2011, Mark S. Edwards wrote:
> At 08:57 09/04/2011, kuangnuzhiren@163.com wrote:
>
> Thanks everyone. But now I am implementing a virtual SCSIAdapter driver by myself. I cannot modify any configuration or disable/enable other’s adapter. I need to report to Windows a appropriate value to make IOs to both adapter in the right size. And when adapters added to the system, maybe I need to report a new value, so I think I need disk.sys ask me again.
>
> —
>
>
>
> No, you don’t ask Windows to change behaviour just to make your solution work. ?Perhaps what you think you want will be implemented in the Windows 10 time frame if Microsoft consider it a priority.
>
> I forget who suggested it, but a solution has already been suggested. ?On installation of your driver have something read the values from any other HBAs in the host, work out what this means for the values on your adapter and write them to your device parameters registry. ?Reboot and pick up the values from registry.
>
> In case a new HBA is added, provide a facility to reset the registry values.
>
> Mark.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
–
Mark Roddy
Oh well, some people just love to give themselves an extra 12 months
work to re-write o/s behaviour before finding out how flaky the solution is.
At 13:49 09/04/2011, Mark Roddy wrote:
That was me, but the op has a solution, it isn’t a good solution, but
it is the op’s solution and he is sticking to it.On Saturday, April 9, 2011, Mark S. Edwards wrote:
> > At 08:57 09/04/2011, kuangnuzhiren@163.com wrote:
> >
> > Thanks everyone. But now I am implementing a virtual SCSIAdapter
> driver by myself. I cannot modify any configuration or
> disable/enable other’s adapter. I need to report to Windows a
> appropriate value to make IOs to both adapter in the right size.
> And when adapters added to the system, maybe I need to report a new
> value, so I think I need disk.sys ask me again.
> >
> > —
> >
> >
> >
> > No, you don’t ask Windows to change behaviour just to make your
> solution work. Perhaps what you think you want will be implemented
> in the Windows 10 time frame if Microsoft consider it a priority.
> >
> > I forget who suggested it, but a solution has already been
> suggested. On installation of your driver have something read the
> values from any other HBAs in the host, work out what this means
> for the values on your adapter and write them to your device
> parameters registry. Reboot and pick up the values from registry.
> >
> > In case a new HBA is added, provide a facility to reset the
> registry values.
> >
> > Mark.
> >
> > —
> > NTDEV is sponsored by OSR
> >
> > For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
> >
> > To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
> >
>
>–
>Mark Roddy
>
>—
>NTDEV is sponsored by OSR
>
>For our schedule of WDF, WDM, debugging and other seminars visit:
>http://www.osr.com/seminars
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer
I think don’t use different type hbas will be a good solution, but my boss doesn’t. Thanks for the suggestions, I will have a try.