people/sha0/winvblock.git
10 years ago[driver] Rename driver__dispatch_not_supported_ to WvIrpNotSupported
Shao Miller [Sun, 2 Jan 2011 12:03:38 +0000 (07:03 -0500)]
[driver] Rename driver__dispatch_not_supported_ to WvIrpNotSupported

And use DRIVER_DISPATCH instead of driver__dispatch_func.

10 years ago[aoe] Rename AoeDriverIrpDevCtl_ to AoeIrpDevCtl
Shao Miller [Sun, 2 Jan 2011 12:00:18 +0000 (07:00 -0500)]
[aoe] Rename AoeDriverIrpDevCtl_ to AoeIrpDevCtl

And use DRIVER_UNLOAD prototype.
Also removed an unused AoeDriverUnload_ declaration.

10 years ago[aoe] Rename AoeDriverIrpNotSupported_ to AoeIrpNotSupported
Shao Miller [Sun, 2 Jan 2011 11:55:34 +0000 (06:55 -0500)]
[aoe] Rename AoeDriverIrpNotSupported_ to AoeIrpNotSupported

And use DRIVER_DISPATCH instead of driver__dispatch_func.

10 years ago[aoe] Rename AoeDriverIrpPnp_ to AoeIrpPnp
Shao Miller [Sun, 2 Jan 2011 11:53:34 +0000 (06:53 -0500)]
[aoe] Rename AoeDriverIrpPnp_ to AoeIrpPnp

And use DRIVER_DISPATCH instead of driver__dispatch_func.

10 years ago[aoe] Rename AoeDriverIrpScsi_ to AoeIrpScsi
Shao Miller [Sun, 2 Jan 2011 11:51:42 +0000 (06:51 -0500)]
[aoe] Rename AoeDriverIrpScsi_ to AoeIrpScsi

And use DRIVER_DISPATCH instead of driver__dispatch_func.

10 years ago[aoe] Rename AoeDriverIrpDevCtl_ to AoeIrpDevCtl
Shao Miller [Sun, 2 Jan 2011 11:48:52 +0000 (06:48 -0500)]
[aoe] Rename AoeDriverIrpDevCtl_ to AoeIrpDevCtl

And use DRIVER_DISPATCH instead of driver__dispatch_func.

10 years ago[aoe] Rename AoeDriverIrpSysCtl_ to AoeIrpSysCtl
Shao Miller [Sun, 2 Jan 2011 11:43:52 +0000 (06:43 -0500)]
[aoe] Rename AoeDriverIrpSysCtl_ to AoeIrpSysCtl

And use DRIVER_DISPATCH instead of driver__dispatch_func.

10 years ago[aoe] Rename AoeDriverIrpCreateClose_ to AoeIrpCreateClose
Shao Miller [Sun, 2 Jan 2011 11:41:18 +0000 (06:41 -0500)]
[aoe] Rename AoeDriverIrpCreateClose_ to AoeIrpCreateClose

And use DRIVER_DISPATCH instead of driver__dispatch_func.

10 years ago[aoe] Rename AoeDriverIrpPower_ to AoeIrpPower
Shao Miller [Sun, 2 Jan 2011 11:36:45 +0000 (06:36 -0500)]
[aoe] Rename AoeDriverIrpPower_ to AoeIrpPower

And use DRIVER_DISPATCH instead of driver__dispatch_func.

10 years ago[driver] Use DRIVER_INITIALIZE prototype in header
Shao Miller [Sun, 2 Jan 2011 11:26:46 +0000 (06:26 -0500)]
[driver] Use DRIVER_INITIALIZE prototype in header

10 years ago[driver,debug] Move WvlError into debug TU
Shao Miller [Sun, 2 Jan 2011 11:22:00 +0000 (06:22 -0500)]
[driver,debug] Move WvlError into debug TU

After all the fuss and bother of commit 3c588de9,
the NTSTATUS typedefs are removed from the user-land
utilities and WvlError() now resides in debug.c.

10 years ago[driver,irp] Move driver__complete_irp as WvlIrpComplete
Shao Miller [Sun, 2 Jan 2011 11:15:41 +0000 (06:15 -0500)]
[driver,irp] Move driver__complete_irp as WvlIrpComplete

This means the bus library can drop its driver.h #include,
though many .c source files must now #include irp.h.

10 years ago[irp] (Re-)Introduce IRP header and source files
Shao Miller [Sun, 2 Jan 2011 11:00:34 +0000 (06:00 -0500)]
[irp] (Re-)Introduce IRP header and source files

IRP completion helper functions, etc. can go here.

10 years ago[driver] Remove WV_DEV_T forward declaration
Shao Miller [Sun, 2 Jan 2011 10:35:50 +0000 (05:35 -0500)]
[driver] Remove WV_DEV_T forward declaration

All pointers to structs have the same representation
and alignment requirements. :)

10 years ago[project] Rename Error to WvlError
Shao Miller [Sun, 2 Jan 2011 10:27:10 +0000 (05:27 -0500)]
[project] Rename Error to WvlError

Also moved the declaration into winvblock.h, which
meant moving the portable.h #include before it in
every .c file, as well adding NTSTATUS typedefs in
the user-land utilities.

10 years ago[bus/pnp] Rename functions, change debug messages
Shao Miller [Sun, 2 Jan 2011 09:37:51 +0000 (04:37 -0500)]
[bus/pnp] Rename functions, change debug messages

10 years ago[bus] Rename WvBus* functions to WvlBus*
Shao Miller [Sun, 2 Jan 2011 09:30:10 +0000 (04:30 -0500)]
[bus] Rename WvBus* functions to WvlBus*

And drop underscore suffix convention, except where there
is both an exported library function and an internal one.

10 years ago[bus] Rename WvBusGetNodeCount to WvlBusGetNodeCount
Shao Miller [Sun, 2 Jan 2011 09:15:53 +0000 (04:15 -0500)]
[bus] Rename WvBusGetNodeCount to WvlBusGetNodeCount

10 years ago[bus] Rename WvBusGetNodePdo to WvlBusGetNodePdo
Shao Miller [Sun, 2 Jan 2011 09:14:42 +0000 (04:14 -0500)]
[bus] Rename WvBusGetNodePdo to WvlBusGetNodePdo

10 years ago[bus] Rename WvBusGetNextNode to WvlBusGetNextNode
Shao Miller [Sun, 2 Jan 2011 09:11:34 +0000 (04:11 -0500)]
[bus] Rename WvBusGetNextNode to WvlBusGetNextNode

10 years ago[bus] Rename WvBusPnp and WvBusGetNodeNum
Shao Miller [Sun, 2 Jan 2011 09:10:04 +0000 (04:10 -0500)]
[bus] Rename WvBusPnp and WvBusGetNodeNum

To WvlBusPnpIrp and WvlBusGetNodeNum, respectively.

10 years ago[bus] Rename WvBusPower to WvlBusPower
Shao Miller [Sun, 2 Jan 2011 09:01:26 +0000 (04:01 -0500)]
[bus] Rename WvBusPower to WvlBusPower

10 years ago[bus] Rename WvBusSysCtl to WvlBusSysCtl
Shao Miller [Sun, 2 Jan 2011 09:00:24 +0000 (04:00 -0500)]
[bus] Rename WvBusSysCtl to WvlBusSysCtl

10 years ago[bus] Rename WvBusEnqueueCustomWorkItem to WvlBusEnqueueCustomWorkItem
Shao Miller [Sun, 2 Jan 2011 08:58:47 +0000 (03:58 -0500)]
[bus] Rename WvBusEnqueueCustomWorkItem to WvlBusEnqueueCustomWorkItem

10 years ago[bus] Rename WvBusEnqueueIrp to WvlBusEnqueueIrp
Shao Miller [Sun, 2 Jan 2011 08:57:15 +0000 (03:57 -0500)]
[bus] Rename WvBusEnqueueIrp to WvlBusEnqueueIrp

10 years ago[bus] Rename WvBusRemoveNode to WvlBusRemoveNode
Shao Miller [Sun, 2 Jan 2011 08:55:52 +0000 (03:55 -0500)]
[bus] Rename WvBusRemoveNode to WvlBusRemoveNode

10 years ago[bus] Rename WvBusAddNode to WvlBusAddNode
Shao Miller [Sun, 2 Jan 2011 08:54:05 +0000 (03:54 -0500)]
[bus] Rename WvBusAddNode to WvlBusAddNode

10 years ago[bus] Rename WvBusStartThread to WvlBusStartThread
Shao Miller [Sun, 2 Jan 2011 08:51:27 +0000 (03:51 -0500)]
[bus] Rename WvBusStartThread to WvlBusStartThread

Although, perhaps the thread logic should be decoupled
from the bus library.

10 years ago[bus] Rename WvBusCancelWorkItems to WvlBusCancelWorkItems
Shao Miller [Sun, 2 Jan 2011 08:49:47 +0000 (03:49 -0500)]
[bus] Rename WvBusCancelWorkItems to WvlBusCancelWorkItems

10 years ago[bus] Rename WvBusProcessWorkItems to WvlBusProcessWorkItems
Shao Miller [Sun, 2 Jan 2011 08:47:42 +0000 (03:47 -0500)]
[bus] Rename WvBusProcessWorkItems to WvlBusProcessWorkItems

10 years ago[bus] Remove unused WvBusCreate function
Shao Miller [Sun, 2 Jan 2011 08:45:07 +0000 (03:45 -0500)]
[bus] Remove unused WvBusCreate function

Its pretty easy to have one static bus in a driver.

10 years ago[bus] Rename WvBusInit to WvlBusInit
Shao Miller [Sun, 2 Jan 2011 08:43:29 +0000 (03:43 -0500)]
[bus] Rename WvBusInit to WvlBusInit

10 years ago[bus] Rename WvBusInitNode to WvlBusInitNode
Shao Miller [Sun, 2 Jan 2011 08:42:16 +0000 (03:42 -0500)]
[bus] Rename WvBusInitNode to WvlBusInitNode

10 years ago[project] Change void usage to VOID
Shao Miller [Sun, 2 Jan 2011 08:02:11 +0000 (03:02 -0500)]
[project] Change void usage to VOID

Where possible.  And 'void *' to PVOID, too.

10 years ago[bus] Fix typo in WVL_S_BUS_NODE definition
Shao Miller [Sun, 2 Jan 2011 07:46:58 +0000 (02:46 -0500)]
[bus] Fix typo in WVL_S_BUS_NODE definition

10 years ago[project] Use PROJECT_WV instead of PROJECT_BUS
Shao Miller [Sun, 2 Jan 2011 07:38:20 +0000 (02:38 -0500)]
[project] Use PROJECT_WV instead of PROJECT_BUS

In our WVL_M_LIB macro for library importing/exporting.

10 years ago[header] Remove unused winvblock__def_enum macro
Shao Miller [Sun, 2 Jan 2011 07:33:25 +0000 (02:33 -0500)]
[header] Remove unused winvblock__def_enum macro

10 years ago[header] Remove winvblock__any_ptr, winvblock__def_type
Shao Miller [Sun, 2 Jan 2011 07:32:35 +0000 (02:32 -0500)]
[header] Remove winvblock__any_ptr, winvblock__def_type

Use PVOID instead of winvblock__any_ptr.  With this removal,
there's no longer any use of the winvblock__def_type() macro.
Some editors can't grok winvblock__def_type()'s intentions.

10 years ago[project] Rename winvblock__bool back to BOOLEAN
Shao Miller [Sun, 2 Jan 2011 07:27:06 +0000 (02:27 -0500)]
[project] Rename winvblock__bool back to BOOLEAN

Heh.

10 years ago[project] Rename winvblock__uint16 back to UINT16
Shao Miller [Sun, 2 Jan 2011 07:20:48 +0000 (02:20 -0500)]
[project] Rename winvblock__uint16 back to UINT16

Heh.

10 years ago[project] Rename winvblock__uint32 back to UINT32
Shao Miller [Sun, 2 Jan 2011 07:15:57 +0000 (02:15 -0500)]
[project] Rename winvblock__uint32 back to UINT32

Heh.

10 years ago[project] Rename winvblock__uint64 back to UINT64
Shao Miller [Sun, 2 Jan 2011 07:04:39 +0000 (02:04 -0500)]
[project] Rename winvblock__uint64 back to UINT64

Heh.

10 years ago[project] Rename winvblock__uint8 back to UCHAR
Shao Miller [Sun, 2 Jan 2011 07:02:53 +0000 (02:02 -0500)]
[project] Rename winvblock__uint8 back to UCHAR

Heh.

10 years ago[header] Remove winvblock__def_struct
Shao Miller [Sun, 2 Jan 2011 06:51:34 +0000 (01:51 -0500)]
[header] Remove winvblock__def_struct

Some editors are not able to grok this macro.

10 years ago[filedisk/grub4dos] Rename drive_file_set struct type
Shao Miller [Sun, 2 Jan 2011 06:49:30 +0000 (01:49 -0500)]
[filedisk/grub4dos] Rename drive_file_set struct type

To WV_S_FILEDISK_GRUB4DOS_DRIVE_FILE_SET.

10 years ago[filedisk] Rename thread_req to WV_S_FILEDISK_THREAD_REQ
Shao Miller [Sun, 2 Jan 2011 06:44:06 +0000 (01:44 -0500)]
[filedisk] Rename thread_req to WV_S_FILEDISK_THREAD_REQ

10 years ago[disk] Rename fat_super to WV_S_DISK_FAT_SUPER
Shao Miller [Sun, 2 Jan 2011 06:29:34 +0000 (01:29 -0500)]
[disk] Rename fat_super to WV_S_DISK_FAT_SUPER

10 years ago[disk] Rename fat_extra to WV_S_DISK_FAT_EXTRA
Shao Miller [Sun, 2 Jan 2011 06:26:50 +0000 (01:26 -0500)]
[disk] Rename fat_extra to WV_S_DISK_FAT_EXTRA

10 years ago[util] Rename option type to WVU_S_OPTION
Shao Miller [Sun, 2 Jan 2011 06:21:44 +0000 (01:21 -0500)]
[util] Rename option type to WVU_S_OPTION

10 years ago[ramdisk] Rename ramdisk__type to WV_S_RAMDISK_T
Shao Miller [Sun, 2 Jan 2011 06:17:13 +0000 (01:17 -0500)]
[ramdisk] Rename ramdisk__type to WV_S_RAMDISK_T

10 years ago[msvhd] Rename msvhd__footer to WV_S_MSVHD_FOOTER
Shao Miller [Sun, 2 Jan 2011 06:11:55 +0000 (01:11 -0500)]
[msvhd] Rename msvhd__footer to WV_S_MSVHD_FOOTER

10 years ago[util] Fix search'n'replace failures for recent commits
Shao Miller [Sun, 2 Jan 2011 06:05:37 +0000 (01:05 -0500)]
[util] Fix search'n'replace failures for recent commits

Same subjects as 03704bb78bd74cb8281e246be5883feb22cb185f.

10 years ago[mount] Rename mount__filedisk to WV_S_MOUNT_DISK
Shao Miller [Sun, 2 Jan 2011 06:03:51 +0000 (01:03 -0500)]
[mount] Rename mount__filedisk to WV_S_MOUNT_DISK

10 years ago[mdi] Rename structures
Shao Miller [Sun, 2 Jan 2011 05:55:25 +0000 (00:55 -0500)]
[mdi] Rename structures

mdi__patch_area to WV_S_MDI_PATCH_AREA and mdi__mbft
to WV_S_MDI_MBFT.

10 years ago[grub4dos] Rename grub4dos__drive_mapping to WV_S_GRUB4DOS_DRIVE_MAPPING
Shao Miller [Sun, 2 Jan 2011 05:43:52 +0000 (00:43 -0500)]
[grub4dos] Rename grub4dos__drive_mapping to WV_S_GRUB4DOS_DRIVE_MAPPING

10 years ago[filedisk] Rename filedisk__type to WV_S_FILEDISK_T
Shao Miller [Sun, 2 Jan 2011 05:37:09 +0000 (00:37 -0500)]
[filedisk] Rename filedisk__type to WV_S_FILEDISK_T

10 years ago[driver] Rename driver__dev_ext to WV_S_DEV_EXT
Shao Miller [Sun, 2 Jan 2011 05:31:16 +0000 (00:31 -0500)]
[driver] Rename driver__dev_ext to WV_S_DEV_EXT

10 years ago[disk] Rename mbr to WVL_S_DISK_MBR
Shao Miller [Sun, 2 Jan 2011 05:26:14 +0000 (00:26 -0500)]
[disk] Rename mbr to WVL_S_DISK_MBR

10 years ago[aoe] Fix search'n'replace failures for recent commits
Shao Miller [Sun, 2 Jan 2011 05:25:49 +0000 (00:25 -0500)]
[aoe] Fix search'n'replace failures for recent commits

10 years ago[aoe] Rename aoe__mount_disk to AOE_S_MOUNT_DISK
Shao Miller [Sun, 2 Jan 2011 05:07:00 +0000 (00:07 -0500)]
[aoe] Rename aoe__mount_disk to AOE_S_MOUNT_DISK

10 years ago[aoe] Rename aoe__mount_disks to AOE_S_MOUNT_DISKS
Shao Miller [Sun, 2 Jan 2011 05:05:31 +0000 (00:05 -0500)]
[aoe] Rename aoe__mount_disks to AOE_S_MOUNT_DISKS

10 years ago[aoe] Rename aoe__mount_target to AOE_S_MOUNT_TARGET
Shao Miller [Sun, 2 Jan 2011 05:02:26 +0000 (00:02 -0500)]
[aoe] Rename aoe__mount_target to AOE_S_MOUNT_TARGET

10 years ago[aoe] Rename aoe__mount_targets to AOE_S_MOUNT_TARGETS
Shao Miller [Sun, 2 Jan 2011 05:00:30 +0000 (00:00 -0500)]
[aoe] Rename aoe__mount_targets to AOE_S_MOUNT_TARGETS

10 years ago[header,aoe] Rename winvblock__literal* and abft
Shao Miller [Sun, 2 Jan 2011 04:55:35 +0000 (23:55 -0500)]
[header,aoe] Rename winvblock__literal* and abft

Unfortunately, this should actually be two separate
commits.

Rename winvblock__literal to WVL_M_LIT.  Rename
winvblock__literal_w to WVL_M_WLIT.

Rename abft to AOE_S_ABFT.

10 years ago[header] Rename winvblock__lib_func to WVL_M_LIB
Shao Miller [Sun, 2 Jan 2011 04:32:16 +0000 (23:32 -0500)]
[header] Rename winvblock__lib_func to WVL_M_LIB

10 years ago[header] Change #include guard
Shao Miller [Sun, 2 Jan 2011 04:26:43 +0000 (23:26 -0500)]
[header] Change #include guard

10 years ago[bus] Rename WV_S_BUS_CUSTOM_WORK_ITEM to WVL_S_BUS_CUSTOM_WORK_ITEM
Shao Miller [Sun, 2 Jan 2011 04:24:47 +0000 (23:24 -0500)]
[bus] Rename WV_S_BUS_CUSTOM_WORK_ITEM to WVL_S_BUS_CUSTOM_WORK_ITEM

10 years ago[bus] Rename WV_F_BUS_WORK_ITEM to WVL_F_BUS_WORK_ITEM
Shao Miller [Sun, 2 Jan 2011 04:22:41 +0000 (23:22 -0500)]
[bus] Rename WV_F_BUS_WORK_ITEM to WVL_F_BUS_WORK_ITEM

10 years ago[bus] Rename WV_S_BUS_NODE to WVL_S_BUS_NODE
Shao Miller [Sun, 2 Jan 2011 04:18:11 +0000 (23:18 -0500)]
[bus] Rename WV_S_BUS_NODE to WVL_S_BUS_NODE

10 years ago[bus] Rename WV_S_BUS_T to WVL_S_BUS_T
Shao Miller [Sun, 2 Jan 2011 04:14:10 +0000 (23:14 -0500)]
[bus] Rename WV_S_BUS_T to WVL_S_BUS_T

10 years ago[bus] Rename WV_E_BUS_STATE to WVL_E_BUS_STATE
Shao Miller [Sun, 2 Jan 2011 04:07:41 +0000 (23:07 -0500)]
[bus] Rename WV_E_BUS_STATE to WVL_E_BUS_STATE

Along with enumeration values from WvBusState*
to WvlBusState*.

10 years ago[bus] Rename WV_F_BUS_PNP to WVL_F_BUS_PNP
Shao Miller [Sun, 2 Jan 2011 04:04:03 +0000 (23:04 -0500)]
[bus] Rename WV_F_BUS_PNP to WVL_F_BUS_PNP

10 years ago[bus] Rename WV_F_BUS_THREAD to WVL_F_BUS_THREAD
Shao Miller [Sun, 2 Jan 2011 04:02:06 +0000 (23:02 -0500)]
[bus] Rename WV_F_BUS_THREAD to WVL_F_BUS_THREAD

10 years ago[bus] Change #include guard
Shao Miller [Sun, 2 Jan 2011 03:57:33 +0000 (22:57 -0500)]
[bus] Change #include guard

It's quite possible that I'll never settle on a naming
convention.

WVL_* and Wvl* for WinVBlock library stuff.  Then we
can remove the underscore suffix convention, which has
so far been in place to denote functions and objects
with translation unit-internal linkage.  Since these
outnumber those which are library exports, it might
make more sense to denote library exports.

10 years ago[aoe] Add disks to the AoE bus
Shao Miller [Sun, 2 Jan 2011 03:27:57 +0000 (22:27 -0500)]
[aoe] Add disks to the AoE bus

Instead of the WinVBlock bus.

10 years ago[aoe] Process bus work items in thread
Shao Miller [Sun, 2 Jan 2011 02:41:12 +0000 (21:41 -0500)]
[aoe] Process bus work items in thread

10 years ago[aoe] Fix UNICODE_STRING initialization
Shao Miller [Sun, 2 Jan 2011 02:25:31 +0000 (21:25 -0500)]
[aoe] Fix UNICODE_STRING initialization

10 years ago[driver] Fix UNICODE_STRING initialization
Shao Miller [Sun, 2 Jan 2011 02:25:15 +0000 (21:25 -0500)]
[driver] Fix UNICODE_STRING initialization

10 years ago[util] Use appropriate bus for each command
Shao Miller [Sun, 2 Jan 2011 02:00:35 +0000 (21:00 -0500)]
[util] Use appropriate bus for each command

AoE commands should send IOCTLs to the AoE bus and
WinVBlock commands should be sent to its bus.

10 years ago[util] Show error messages instead of error codes
Shao Miller [Sun, 2 Jan 2011 00:02:56 +0000 (19:02 -0500)]
[util] Show error messages instead of error codes

10 years ago[util] Don't use command_decl macro
Shao Miller [Sat, 1 Jan 2011 23:39:15 +0000 (18:39 -0500)]
[util] Don't use command_decl macro

And dont pass boot_bus around, just make it a global.

10 years ago[util] Minor, cosmetic changes
Shao Miller [Fri, 31 Dec 2010 22:37:06 +0000 (17:37 -0500)]
[util] Minor, cosmetic changes

10 years ago[util] Rename mount.c to winvblk.c
Shao Miller [Fri, 31 Dec 2010 21:48:37 +0000 (16:48 -0500)]
[util] Rename mount.c to winvblk.c

It's a bit more than just a mounting utility, perhaps.

10 years ago[util] Fix LIB path in MAKEUTILS.BAT
Shao Miller [Fri, 31 Dec 2010 21:43:45 +0000 (16:43 -0500)]
[util] Fix LIB path in MAKEUTILS.BAT

10 years ago[aoe] Use floating FDO strategy
Shao Miller [Fri, 31 Dec 2010 21:10:49 +0000 (16:10 -0500)]
[aoe] Use floating FDO strategy

The idea is:

The AoE bus and its FDO will be created during
driver startup.  It won't be attached to any PDO.
Having a device should prevent the AoE driver from
being subsequently unloaded.

The AoE thread will be started during driver startup.
The thread will request a PDO from WinVBlock.

When the PDO is associated with the AoE driver, either
through a CriticalDeviceDatabase entry or via .INF and
the setup API, the "floating" FDO for the AoE bus will
then be attached to the device tree. :)

To do: We need to handle removal and unload.  We should
remove the dummy PDO we requested of WinVBlock.

10 years ago[bus] Rename PhysicalDeviceObject member to Pdo
Shao Miller [Fri, 31 Dec 2010 20:24:07 +0000 (15:24 -0500)]
[bus] Rename PhysicalDeviceObject member to Pdo

10 years ago[bus,driver] Revisit driver unload and thread exit
Shao Miller [Fri, 31 Dec 2010 20:05:10 +0000 (15:05 -0500)]
[bus,driver] Revisit driver unload and thread exit

These changes allow for some really nice test successes
for starting the service, updating the driver, uninstalling,
using the Add Hardware Wizard, etc.

10 years ago[driver] Wait for bus thread to terminate on unload
Shao Miller [Fri, 31 Dec 2010 12:19:01 +0000 (07:19 -0500)]
[driver] Wait for bus thread to terminate on unload

10 years ago[driver] Do not create the bus PDO again and again
Shao Miller [Fri, 31 Dec 2010 12:00:07 +0000 (07:00 -0500)]
[driver] Do not create the bus PDO again and again

Long overdue, we now check a 'PdoDone' Registry DWORD
value to determine if we should create a root-enumerated
PDO for our bus.

To do: Create this Registry value as part of the .INF
for when the bus is installed using the Add Hardware
Wizard or devcon.exe.

10 years ago[registry] Add WvlRegFetchDword function
Shao Miller [Fri, 31 Dec 2010 11:37:07 +0000 (06:37 -0500)]
[registry] Add WvlRegFetchDword function

10 years ago[registry] Cosmetic touch-ups
Shao Miller [Fri, 31 Dec 2010 11:19:46 +0000 (06:19 -0500)]
[registry] Cosmetic touch-ups

It's possibly more than cosmetic, but hopefully not.

Also, a typo of STDCALL in WvDriverBusEstablish_ is
fixed.  I'm not sure how that snuck past the build test.

10 years ago[driver] Rename driver__create_bus_ to WvDriverBusEstablish_
Shao Miller [Fri, 31 Dec 2010 09:54:58 +0000 (04:54 -0500)]
[driver] Rename driver__create_bus_ to WvDriverBusEstablish_

10 years ago[driver,aoe] Use WV_S_DRIVER_DUMMY_IDS for PnP ID queries
Shao Miller [Fri, 31 Dec 2010 08:59:20 +0000 (03:59 -0500)]
[driver,aoe] Use WV_S_DRIVER_DUMMY_IDS for PnP ID queries

Fix sizeof usage with WCHAR (oops).

Change WvDriverAddDummy() to take a WV_S_DRIVER_DUMMY_IDS
instead of a function pointer.

The AoE sub-bus is starting to behave better.  Now it's
time to address the challenge of duplicate PDO creation.

10 years ago[aoe/bus] Generate a WV_S_DRIVER_DUMMY_IDS instance
Shao Miller [Fri, 31 Dec 2010 07:39:02 +0000 (02:39 -0500)]
[aoe/bus] Generate a WV_S_DRIVER_DUMMY_IDS instance

10 years ago[driver] Introduce WV_S_DRIVER_DUMMY_IDS and related
Shao Miller [Fri, 31 Dec 2010 07:38:26 +0000 (02:38 -0500)]
[driver] Introduce WV_S_DRIVER_DUMMY_IDS and related

Introduce a structure for carrying around PnP IDs.  It uses
offsets and lengths into a referenced static WCHAR array.

Included in this commit are macros for generating an
instance of such a structure, using x-macros.

Also included is WvDriverDummyIds() which will handle a
PnP ID query IRP using a WV_S_DRIVER_DUMMY_IDS.

10 years ago[aoe] Add explicit IRP dispatch, AddDevice routines
Shao Miller [Fri, 31 Dec 2010 04:45:17 +0000 (23:45 -0500)]
[aoe] Add explicit IRP dispatch, AddDevice routines

Lots of copying and pasting in this commit.  The idea is
to make the AoE driver slightly less dependent on the
WinVBlock driver.  We will request a PDO of the WinVBlock
bus, then when our driver's AddDevice callback is invoked
on that PDO, we establish the FDO and our AoE bus.

We will handle IRPs with our own IRP dispatch functions.
For bus IRPs, we use the WinVBlock bus library or our own
IRP_MJ_DEVICE_CONTROL handling.  For disk IRPs, we continue
to use the WinVBlock device and disk structures.

We aren't quite functional yet, as the PnpId logic needs to
be revisited.  If the AoE driver is unloaded after it has
created a PDO on the WinVBlock bus, a PnP ID query for that
PDO will attempt to call the PnpId routine in the unloaded
AoE driver (which is a bad thing).

10 years ago[driver] Remove unused dev_name local from driver__attach_fdo_
Shao Miller [Thu, 30 Dec 2010 20:44:00 +0000 (15:44 -0500)]
[driver] Remove unused dev_name local from driver__attach_fdo_

10 years ago[aoe] Produce a PDO for the sub-bus
Shao Miller [Thu, 30 Dec 2010 20:10:18 +0000 (15:10 -0500)]
[aoe] Produce a PDO for the sub-bus

Using WvDriverAddDummy()

10 years ago[driver] Introduce the dummy device feature
Shao Miller [Thu, 30 Dec 2010 20:09:34 +0000 (15:09 -0500)]
[driver] Introduce the dummy device feature

A driver can use WvDriverAddDummy() to produce a PDO on
the main WinVBlock bus.  The key point is that the PDO
will respond to PnP ID queries using a handler provided
by whichever driver calls WvDriverAddDummy().  This allows
for a driver to produce PDOs with arbitrary PnP IDs, which
is perhaps a bit better than IoReportDetectedDevice() for
our purposes.  The AoE driver could produce a bus PDO
using this technique, then attach an FDO to it.

10 years ago[bus] Add custom work items to WvBusProcessWorkItems
Shao Miller [Thu, 30 Dec 2010 14:58:21 +0000 (09:58 -0500)]
[bus] Add custom work items to WvBusProcessWorkItems

To be honest, a bus probably shouldn't be particularly
concerned with providing a default thread; it should be
up to the driver using the bus to ensure a single,
controlling thread for those operations which deal with
subjects such as the list of child nodes on the bus.

But for now, since there's already a mechanism in place
to enqueue work items for execution in a bus'
controlling thread, we abuse it to allow a driver to
enqueue their own driver-specific work item.  Use the
new WvBusEnqueueCustomWorkItem() function and the new
WV_S_BUS_CUSTOM_WORK_ITEM type.

This might change at some point, such as if thread
subject matter is removed from the bus library.