Shao Miller [Wed, 29 Dec 2010 04:33:12 +0000 (23:33 -0500)]
[driver] Use the static bus in detach function
Also rename WvDriverBusDevCtlDiskDetach() to
WvDriverBusDevCtlDetach().
Shao Miller [Wed, 29 Dec 2010 04:15:40 +0000 (23:15 -0500)]
[disk,device] Move BootDrive as Boot property
Remove the BootDrive boolean from WV_S_DISK_T and into
WV_S_DEV_T. Devices established at boot time should
have this set to TRUE.
Shao Miller [Tue, 28 Dec 2010 22:37:15 +0000 (17:37 -0500)]
[bus] Remove unused WvBusIrpMj_
The WinVBlock driver establishes the IRP handlers now.
Shao Miller [Tue, 28 Dec 2010 22:35:19 +0000 (17:35 -0500)]
[bus/dev_ctl,driver] Move IRP_MJ_DEVICE_CONTROL handler
A driver using the bus library should implement their own
IRP_MJ_DEVICE_CONTROL handler for a bus instance; these
device controls will be driver-specific.
Shao Miller [Tue, 28 Dec 2010 21:59:42 +0000 (16:59 -0500)]
[bus] Remove WvBusFree_ and WvBusThreadFree_
Since we use a static bus, we don't free anything.
Shao Miller [Tue, 28 Dec 2010 21:51:04 +0000 (16:51 -0500)]
[bus] Remove WvBusCreatePdo_
We'll never really use it.
Shao Miller [Tue, 28 Dec 2010 21:41:44 +0000 (16:41 -0500)]
[aoe] Fix up extern and use static bus in aoe__show
Shao Miller [Tue, 28 Dec 2010 21:37:08 +0000 (16:37 -0500)]
[bus] Use the static bus in AoeBusDevCtlDispatch_
Shao Miller [Tue, 28 Dec 2010 21:01:59 +0000 (16:01 -0500)]
[aoe/bus] Use static bus for the AoE bus
Shao Miller [Tue, 28 Dec 2010 20:04:35 +0000 (15:04 -0500)]
[driver,bus] Move WvBusAddChild as WvDriverBusAddDev
Trying to move WV_S_DEV_T usage out of the bus module.
Shao Miller [Fri, 24 Dec 2010 15:30:09 +0000 (10:30 -0500)]
[disk] Remove prev_free member
Since the device structure is right inside the disk
structure, we shouldn't try to free the device data.
Shao Miller [Fri, 24 Dec 2010 15:25:00 +0000 (10:25 -0500)]
[memdisk] Minor, cosmetic touch-ups
Shao Miller [Fri, 24 Dec 2010 15:02:24 +0000 (10:02 -0500)]
[disk] Put the device structure right in the disk structure
Shao Miller [Fri, 24 Dec 2010 14:53:44 +0000 (09:53 -0500)]
[bus/pnp] Enumerate new child PDO node devices
For IRP_MN_QUERY_DEVICE_RELATIONS
Shao Miller [Fri, 24 Dec 2010 14:52:38 +0000 (09:52 -0500)]
[bus] Initialize child PDO node list head
Shao Miller [Fri, 24 Dec 2010 01:53:59 +0000 (20:53 -0500)]
[bus/pnp] Add new child PDO node removal logic
To WvBusPnpRemoveDev_(). It will walk the new child PDO
node list and drop references for each PDO.
Shao Miller [Fri, 24 Dec 2010 01:43:51 +0000 (20:43 -0500)]
[bus] Add an internal-use WvBusRemoveNode_ function
Called by WvBusProcessWorkItems() to remove a node.
Shao Miller [Fri, 24 Dec 2010 01:30:00 +0000 (20:30 -0500)]
[bus/pnp] Fix IRP_MJ_ typo in debug message
Shao Miller [Fri, 24 Dec 2010 01:29:04 +0000 (20:29 -0500)]
[bus/pnp] Enqueue IRP_MN_REMOVE_DEVICE
Shao Miller [Thu, 23 Dec 2010 20:34:08 +0000 (15:34 -0500)]
[bus/pnp] Change functions to take bus parameter
Though there is still some use of WV_S_DEV_T within.
Shao Miller [Thu, 23 Dec 2010 20:18:17 +0000 (15:18 -0500)]
[bus,driver] Put bus IRP_MJ_PNP handler in driver
Shao Miller [Thu, 23 Dec 2010 17:15:57 +0000 (12:15 -0500)]
[bus,driver] Put bus IRP_MJ_POWER handler in driver
Shao Miller [Thu, 23 Dec 2010 17:07:38 +0000 (12:07 -0500)]
[bus,driver] Put bus IRP_MJ_SYSTEM_CONTROL handler in driver
If the bus library is going to be used by any driver, it should
be the driver's responsibility to dispatch IRPs to a bus using
an interface provided by the bus library.
Shao Miller [Thu, 23 Dec 2010 16:14:43 +0000 (11:14 -0500)]
[driver] Use a static bus for the main bus
Shao Miller [Thu, 23 Dec 2010 15:25:37 +0000 (10:25 -0500)]
[driver] Rename Driver_CompletePendingIrp to WvDriverCompletePendingIrp
Shao Miller [Thu, 23 Dec 2010 14:43:39 +0000 (09:43 -0500)]
[driver] Rename globals
driver__state_handle_ to WvDriverStateHandle_
driver__started_ to WvDriverStarted_
driver__bus_fdo_ to WvDriverBusFdo_
driver__bus_fdo_lock_ to WvDriverBusFdoLock_
driver__os_load_opts_ tp WvDriverOsLoadOpts_
WvBusName_ to WvDriverBusName_
WvBusDosname_ to WvDriverBusDosname_
Shao Miller [Thu, 23 Dec 2010 14:38:31 +0000 (09:38 -0500)]
[driver] Rename driver__obj_ptr to WvDriverObj
Shao Miller [Thu, 23 Dec 2010 14:19:34 +0000 (09:19 -0500)]
[driver] Set IsBus flag on the main bus FDO
Shao Miller [Thu, 23 Dec 2010 13:56:12 +0000 (08:56 -0500)]
[bus] Add child PDO node unit number logic
The same kind of effort as we see in WvBusAddChild().
The point is for a move away from WV_S_DEV_T and towards
a bus library that can be used by any driver, so some
things will go in WV_S_BUS_NODE, instead.
Shao Miller [Tue, 21 Dec 2010 21:44:49 +0000 (16:44 -0500)]
[bus] Add FDO member to bus structure
In a possibly eventual effort to move away from WV_S_DEV_T
Shao Miller [Tue, 21 Dec 2010 20:55:44 +0000 (15:55 -0500)]
[project,bus] Two commits: #inclusion and bus freeing
Unfortunately, this is two commits as one.
A bus thread will not attempt to free the bus, making a
caller or another thread responsible.
Make header #include guards consistently named.
Shao Miller [Tue, 21 Dec 2010 15:21:34 +0000 (10:21 -0500)]
[bus] Put the device right in the bus
Instead of a pointer and a separate allocation, put
the device structure right inside the bus structure.
Now when we free, we simply free the bus structure.
Shao Miller [Tue, 21 Dec 2010 15:03:31 +0000 (10:03 -0500)]
[aoe] Move registry setup into new registry TU
Introduce registry.c translation unit and move setup_reg()
into it as AoeRegSetup().
Shao Miller [Tue, 21 Dec 2010 14:53:14 +0000 (09:53 -0500)]
[aoe] Rename aoe__get_ to AoeDiskFromDev_
Shao Miller [Tue, 21 Dec 2010 14:48:56 +0000 (09:48 -0500)]
[aoe] Rename globals
Shao Miller [Tue, 21 Dec 2010 14:26:05 +0000 (09:26 -0500)]
[aoe] Rename aoe__target_list_ to AOE_S_TARGET_LIST_
Shao Miller [Tue, 21 Dec 2010 14:21:41 +0000 (09:21 -0500)]
[aoe] Rename aoe__search_state_ to AOE_E_SEARCH_STATE_
Along with the value identifiers.
Shao Miller [Tue, 21 Dec 2010 14:15:29 +0000 (09:15 -0500)]
[aoe] Rename aoe__disk_search_ to AOE_S_DISK_SEARCH_
Shao Miller [Tue, 21 Dec 2010 14:08:30 +0000 (09:08 -0500)]
[aoe] Rename aoe__work_tag_ to AOE_S_WORK_TAG_
Shao Miller [Tue, 21 Dec 2010 14:04:16 +0000 (09:04 -0500)]
[aoe] Rename aoe__io_req_ to AOE_S_IO_REQ_
Shao Miller [Tue, 21 Dec 2010 14:01:15 +0000 (09:01 -0500)]
[aoe] Rename aoe__packet_ to AOE_S_PACKET_
Shao Miller [Tue, 21 Dec 2010 13:57:44 +0000 (08:57 -0500)]
[aoe] Rename aoe__tag_type_ to AOE_E_TAG_TYPE_
Shao Miller [Tue, 21 Dec 2010 13:54:01 +0000 (08:54 -0500)]
[aoe] Rename close to AoeDiskClose_
Shao Miller [Tue, 21 Dec 2010 13:53:09 +0000 (08:53 -0500)]
[aoe] Rename init to AoeDiskInit_
Shao Miller [Tue, 21 Dec 2010 13:52:12 +0000 (08:52 -0500)]
[aoe] Rename max_xfer_len to AoeDiskMaxXferLen_
Shao Miller [Tue, 21 Dec 2010 13:50:58 +0000 (08:50 -0500)]
[aoe] Rename io to AoeDiskIo_
Shao Miller [Tue, 21 Dec 2010 13:44:52 +0000 (08:44 -0500)]
[aoe] Rename aoe__create_disk_ to AoeDiskCreate_
As well as aoe__free_disk_ to AoeDiskFree_
Shao Miller [Tue, 21 Dec 2010 13:44:01 +0000 (08:44 -0500)]
[aoe] Rename aoe__unload_ to AoeUnload_
Shao Miller [Tue, 21 Dec 2010 13:43:13 +0000 (08:43 -0500)]
[aoe] Rename aoe__process_abft_ to AoeProcessAbft_
Shao Miller [Tue, 21 Dec 2010 13:41:38 +0000 (08:41 -0500)]
[aoe] Rename aoe__thread_ to AoeThread_
Shao Miller [Tue, 21 Dec 2010 13:38:16 +0000 (08:38 -0500)]
[aoe] Rename aoe__disk_type_ to AOE_S_DISK_
Shao Miller [Tue, 21 Dec 2010 13:27:41 +0000 (08:27 -0500)]
[aoe/bus] Rename functions and other identifiers
Shao Miller [Tue, 21 Dec 2010 13:24:35 +0000 (08:24 -0500)]
[aoe] Rename aoe_bus to AoeBusMain
Shao Miller [Tue, 21 Dec 2010 04:50:38 +0000 (23:50 -0500)]
[disk] Minor, cosmetic touch-ups
Shao Miller [Mon, 20 Dec 2010 23:32:09 +0000 (18:32 -0500)]
[disk] Rename device member to Dev
Shao Miller [Mon, 20 Dec 2010 23:01:58 +0000 (18:01 -0500)]
[disk] Rename disk__ops to WV_S_DISK_OPS
As well as renaming its members.
Shao Miller [Mon, 20 Dec 2010 22:54:41 +0000 (17:54 -0500)]
[disk] Use typedef instead of macro for disk close func.
Instead of disk__close_decl(), use WV_F_DISK_CLOSE
Shao Miller [Mon, 20 Dec 2010 22:45:03 +0000 (17:45 -0500)]
[disk] Use typedef instead of macro for disk init. func.
Instead of disk__init_decl(), use WV_F_DISK_INIT
Shao Miller [Mon, 20 Dec 2010 22:32:19 +0000 (17:32 -0500)]
[disk] Use typedef instead of macro for disk max. xfer. len. func.
Instead of disk__max_xfer_len_decl(), use WV_F_DISK_MAX_XFER_LEN
Shao Miller [Mon, 20 Dec 2010 22:19:43 +0000 (17:19 -0500)]
[disk] Use typedef instead of macro for disk I/O functions
Instead of disk__io_decl(), use WV_F_DISK_IO
Shao Miller [Mon, 20 Dec 2010 22:06:19 +0000 (17:06 -0500)]
[disk] Rename disk__type to WV_S_DISK_T
Shao Miller [Mon, 20 Dec 2010 21:47:52 +0000 (16:47 -0500)]
[disk] Minor, cosmetic touch-ups
Shao Miller [Mon, 20 Dec 2010 21:23:39 +0000 (16:23 -0500)]
[disk] Rename disk__io_mode to WV_E_DISK_IO_MODE
Shao Miller [Mon, 20 Dec 2010 21:16:15 +0000 (16:16 -0500)]
[disk] Rename disk__boot_sect_ptr to WV_AP_DISK_BOOT_SECT
Shao Miller [Mon, 20 Dec 2010 21:07:15 +0000 (16:07 -0500)]
[disk] Rename disk__compat_ids to WvDiskCompatIds
Shao Miller [Mon, 20 Dec 2010 21:05:25 +0000 (16:05 -0500)]
[disk] Rename disk__removable to WvDiskIsRemovable
Shao Miller [Mon, 20 Dec 2010 21:01:16 +0000 (16:01 -0500)]
[disk] Rename disk__media to WV_E_DISK_MEDIA_TYPE
Shao Miller [Mon, 20 Dec 2010 20:51:47 +0000 (15:51 -0500)]
[disk] Change macro for header inclusion
Shao Miller [Mon, 20 Dec 2010 20:45:49 +0000 (15:45 -0500)]
[device] Rename two functions
device__free_dev_ to WvDevFreeDev_ and
device__make_pdo_ to WvDevMakePdo_
Shao Miller [Mon, 20 Dec 2010 20:33:06 +0000 (15:33 -0500)]
[device] Many more cosmetic changes
Even more to come.
Shao Miller [Mon, 20 Dec 2010 19:35:39 +0000 (14:35 -0500)]
[device] Many cosmetic changes
More to come.
Shao Miller [Mon, 20 Dec 2010 16:18:03 +0000 (11:18 -0500)]
[probe] Minor, cosmetic touch-ups
Rename some functions and local identifiers, etc.
Shao Miller [Mon, 20 Dec 2010 16:08:12 +0000 (11:08 -0500)]
[bus/pnp,dev_ctl] Rename functions
Shao Miller [Mon, 20 Dec 2010 05:42:54 +0000 (00:42 -0500)]
[bus/pnp] Enqueue IRP_MN_QUERY_DEVICE_RELATIONS IRP
Shao Miller [Mon, 20 Dec 2010 05:32:16 +0000 (00:32 -0500)]
[bus] Fix the thread stop condition
Oops.
Shao Miller [Mon, 20 Dec 2010 05:12:39 +0000 (00:12 -0500)]
[bus] Introduce WvBusEnqueueIrp function
For a threaded bus, it is handy to keep all operations
that walk the list of child devices or use their count
in the thread to avoid race conditions and holding locks.
A IRP such as IRP_MN_QUERY_DEVICE_RELATIONS needs to
allocate a response whose size depends on the count of
child devices, for instance. Such an IRP would be nice
to enqueue for the thread.
Shao Miller [Sun, 19 Dec 2010 17:00:52 +0000 (12:00 -0500)]
[bus] Minor cosmetic touch-ups
Shao Miller [Sun, 19 Dec 2010 16:36:40 +0000 (11:36 -0500)]
[bus] Rename bus__thread_ to WvBusThread_
Shao Miller [Sun, 19 Dec 2010 16:34:26 +0000 (11:34 -0500)]
[bus] Rename bus__thread_free_ to WvBusThreadFree_
Shao Miller [Sun, 19 Dec 2010 16:32:44 +0000 (11:32 -0500)]
[bus] Rename bus__init_ to WvBusDevInit_
Shao Miller [Sun, 19 Dec 2010 16:31:06 +0000 (11:31 -0500)]
[bus] Rename bus__irp_mj to WvBusIrpMj_
Shao Miller [Sun, 19 Dec 2010 16:29:43 +0000 (11:29 -0500)]
[bus] Rename bus__get_work_item_ to WvBusGetWorkItem_
Shao Miller [Sun, 19 Dec 2010 16:28:36 +0000 (11:28 -0500)]
[bus] Rename bus__add_work_item_ to WvBusAddWorkItem_
Shao Miller [Sun, 19 Dec 2010 16:27:16 +0000 (11:27 -0500)]
[bus] Rename bus__default_thread_ to WvBusDefaultThread_
Shao Miller [Sun, 19 Dec 2010 16:26:12 +0000 (11:26 -0500)]
[bus] Remove undefined function declaration
Shao Miller [Sun, 19 Dec 2010 16:24:26 +0000 (11:24 -0500)]
[bus] Rename bus__sys_ctl_ to WvBusSysCtl_
Shao Miller [Sun, 19 Dec 2010 16:23:25 +0000 (11:23 -0500)]
[bus] Rename bus__power_ to WvBusPower_
Shao Miller [Sun, 19 Dec 2010 16:22:28 +0000 (11:22 -0500)]
[bus] Rename bus__create_pdo_ to WvBusCreatePdo_
Shao Miller [Sun, 19 Dec 2010 16:21:31 +0000 (11:21 -0500)]
[bus] Rename bus__free_ to WvBusFree_
Shao Miller [Sun, 19 Dec 2010 16:06:23 +0000 (11:06 -0500)]
[bus] Rename bus_pnp__dispatch to WvBusPnpDispatch
Shao Miller [Sun, 19 Dec 2010 16:03:11 +0000 (11:03 -0500)]
[bus] Rename bus_dev_ctl__dispatch to WvBusDevCtlDispatch
Shao Miller [Sun, 19 Dec 2010 15:56:46 +0000 (10:56 -0500)]
[bus] Remove unused member SpinLock
Shao Miller [Sun, 19 Dec 2010 15:49:05 +0000 (10:49 -0500)]
[bus] Introduce WvBusCancelWorkItems
A bus thread routine or whichever thread calls
WvBusProcessWorkItems() should call this new function
if the bus is to be stopped. It frees the memory
allocated for each pending work item.
Also fix the comments for WvBusStartThread().
Shao Miller [Sun, 19 Dec 2010 15:25:15 +0000 (10:25 -0500)]
[bus] Use Stop member instead of Thread for thread shutdown
Shao Miller [Sun, 19 Dec 2010 15:20:44 +0000 (10:20 -0500)]
[bus] Rename member thread to Thread
Yippee.
Shao Miller [Sun, 19 Dec 2010 15:18:25 +0000 (10:18 -0500)]
[bus] Move work_items and work_items_lock as private
Move these members into the "private" section of the bus
structure. They're renamed, as well.
Also, rename work_signal to ThreadSignal. It should
remain "public," since one can override a bus' thread
routine (so one should be able to use that signal).
Shao Miller [Sun, 19 Dec 2010 15:07:20 +0000 (10:07 -0500)]
[bus] Remove members dev_name and dos_dev_name
Move responsibility for bus device naming out of the bus
module and into the caller.
The AoE module is a bit mixed-up just now and doesn't
work. It's currently going to try to create a symlink
but the PDO for the AoE bus is not going to have been
named by the bus module. What we really want is for the
AoE bus' _FDO_ to be the named device... I think.
Shao Miller [Sun, 19 Dec 2010 07:42:32 +0000 (02:42 -0500)]
[bus] Move member prev_free to BusPrivate_.PrevFree
Only the bus module should really manipulate this member.
Shao Miller [Sun, 19 Dec 2010 07:38:48 +0000 (02:38 -0500)]
[bus] Remove unused member tracking
Shao Miller [Sun, 19 Dec 2010 07:37:53 +0000 (02:37 -0500)]
[bus] Remove unused member ext