Author: fireball
Date: Thu Aug 24 16:58:52 2006
New Revision: 23685
URL:
http://svn.reactos.org/svn/reactos?rev=23685&view=rev
Log:
Fix a lot of annoying warnings, leaving basically only ehci.c and gendrv.c as big warnings
providers
Modified:
trunk/reactos/drivers/usb/nt4compat/usbdriver/bulkonly.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/cbi.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/compdrv.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/devmgr.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/devmgr.h
trunk/reactos/drivers/usb/nt4compat/usbdriver/dmgrdisp.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.h
trunk/reactos/drivers/usb/nt4compat/usbdriver/etd.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/events.h
trunk/reactos/drivers/usb/nt4compat/usbdriver/gendrv.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/hcd.h
trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.h
trunk/reactos/drivers/usb/nt4compat/usbdriver/irplist.h
trunk/reactos/drivers/usb/nt4compat/usbdriver/roothub.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/td.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/td.h
trunk/reactos/drivers/usb/nt4compat/usbdriver/uhci.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/umss.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/umss.h
trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.h
trunk/reactos/drivers/usb/nt4compat/usbdriver/usbdriver.h
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/bulkonly.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/bulkonly.c (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/bulkonly.c Thu Aug 24 16:58:52 2006
@@ -25,7 +25,7 @@
#define OLYMPUS_CSW( pdev_EXT, staTUS ) \
( ( ( pdev_EXT )->flags & UMSS_DEV_FLAG_OLYMPUS_DEV ) ? ( ( staTUS ) ==
CSW_OLYMPUS_SIGNATURE ) : FALSE )
-BOOL umss_clear_pass_through_length(PIO_PACKET io_packet);
+BOOLEAN umss_clear_pass_through_length(PIO_PACKET io_packet);
NTSTATUS umss_bulkonly_send_sense_req(PUMSS_DEVICE_EXTENSION pdev_ext);
@@ -665,7 +665,7 @@
return buffer;
}
-BOOL
+BOOLEAN
umss_bulkonly_build_sense_cdb(PUMSS_DEVICE_EXTENSION pdev_ext, PCOMMAND_BLOCK_WRAPPER
cbw)
{
UCHAR sub_class;
@@ -744,14 +744,14 @@
return status;
}
-BOOL
+BOOLEAN
umss_clear_pass_through_length(PIO_PACKET io_packet)
{
//
// clear the respective data length to meet request of scsi pass through
requirement.
//
- BOOL sense_stage;
+ BOOLEAN sense_stage;
ULONG ctrl_code;
PIO_STACK_LOCATION cur_stack;
PSCSI_PASS_THROUGH pass_through;
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/cbi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/cbi.c (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/cbi.c Thu Aug 24 16:58:52 2006
@@ -83,11 +83,8 @@
umss_cbi_send_adsc_complete(PURB purb, PVOID context)
{
NTSTATUS status;
- PIO_STACK_LOCATION irpStack;
PUMSS_DEVICE_EXTENSION pdev_ext;
PIO_PACKET io_packet;
- ULONG bytes_to_transfer;
- PUCHAR buf;
pdev_ext = (PUMSS_DEVICE_EXTENSION) context;
io_packet = &pdev_ext->io_packet;
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/compdrv.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/compdrv.c (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/compdrv.c Thu Aug 24 16:58:52 2006
@@ -24,11 +24,11 @@
VOID compdev_set_cfg_completion(PURB purb, PVOID context);
VOID compdev_select_driver(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
-BOOL compdev_connect(PCONNECT_DATA param, DEV_HANDLE dev_handle);
-BOOL compdev_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
-BOOL compdev_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
-
-BOOL
+BOOLEAN compdev_connect(PCONNECT_DATA param, DEV_HANDLE dev_handle);
+BOOLEAN compdev_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
+BOOLEAN compdev_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
+
+BOOLEAN
compdev_driver_init(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver)
{
if (dev_mgr == NULL || pdriver == NULL)
@@ -63,20 +63,20 @@
return TRUE;
}
-BOOL
+BOOLEAN
compdev_driver_destroy(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver)
{
return TRUE;
}
-BOOL
+BOOLEAN
compdev_connect(PCONNECT_DATA param, DEV_HANDLE dev_handle)
{
PURB purb;
PUSB_CTRL_SETUP_PACKET psetup;
NTSTATUS status;
PUCHAR buf;
- LONG credit, i, j, match;
+ LONG credit, i, j;
PUSB_CONFIGURATION_DESC pconfig_desc;
PUSB_INTERFACE_DESC pif_desc;
PUSB_DEV_MANAGER dev_mgr;
@@ -195,7 +195,6 @@
{
PUSB_DEV_MANAGER dev_mgr;
DEV_HANDLE dev_handle;
- PUMSS_CREATE_DATA cd;
if (pdev == NULL)
return;
@@ -209,14 +208,13 @@
return;
}
-BOOL
+BOOLEAN
compdev_post_event_select_driver(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle)
{
PUSB_EVENT pevent;
- BOOL bret;
+ BOOLEAN bret;
PUSB_DEV pdev;
-
- USE_IRQL;
+ USE_BASIC_NON_PENDING_IRQL;
if (dev_mgr == NULL || dev_handle == 0)
return FALSE;
@@ -265,12 +263,10 @@
{
DEV_HANDLE dev_handle;
PUSB_DEV_MANAGER dev_mgr;
- PWORK_QUEUE_ITEM pwork_item;
PUSB_DRIVER pdriver;
NTSTATUS status;
PUSB_DEV pdev;
-
- USE_IRQL;
+ USE_BASIC_NON_PENDING_IRQL;
if (purb == NULL || context == NULL)
return;
@@ -337,8 +333,6 @@
PUSB_INTERFACE_DESC pif_desc;
PUSB_CONFIGURATION_DESC pconfig_desc;
PUSB_DEV pdev;
-
- USE_IRQL;
usb_dbg_print(DBGLVL_MAXIMUM, ("compdev_select_driver(): entering...\n"));
@@ -425,7 +419,7 @@
return;
}
-BOOL
+BOOLEAN
compdev_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle)
{
PUSB_DEV pdev;
@@ -446,7 +440,7 @@
{
for(i = 0; i < pdev->usb_config->if_count; i++)
{
- if (pdrv = pdev->usb_config->interf[i].pif_drv)
+ if ((pdrv = pdev->usb_config->interf[i].pif_drv))
{
pdrv->disp_tbl.dev_stop(dev_mgr, usb_make_handle(dev_id, i, 0));
}
@@ -460,7 +454,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
compdev_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle)
{
PUSB_DEV pdev;
@@ -481,7 +475,7 @@
{
for(i = 0; i < pdev->usb_config->if_count; i++)
{
- if (pdrv = pdev->usb_config->interf[i].pif_drv)
+ if ((pdrv = pdev->usb_config->interf[i].pif_drv))
{
pdrv->disp_tbl.dev_disconnect(dev_mgr, usb_make_handle(dev_id, i,
0));
}
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/devmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/devmgr.c (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/devmgr.c Thu Aug 24 16:58:52 2006
@@ -28,7 +28,7 @@
//----------------------------------------------------------
-BOOL
+BOOLEAN
dev_mgr_set_if_driver(PUSB_DEV_MANAGER dev_mgr,
DEV_HANDLE if_handle,
PUSB_DRIVER pdriver,
@@ -65,7 +65,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
dev_mgr_set_driver(PUSB_DEV_MANAGER dev_mgr,
DEV_HANDLE dev_handle,
PUSB_DRIVER pdriver,
@@ -101,7 +101,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
dev_mgr_post_event(PUSB_DEV_MANAGER dev_mgr, PUSB_EVENT event)
{
KIRQL old_irql;
@@ -143,7 +143,7 @@
pdrvr[GEN_IF_DRIVER_IDX].driver_destroy = gendrv_if_driver_destroy;
}
-BOOL
+BOOLEAN
dev_mgr_strobe(PUSB_DEV_MANAGER dev_mgr)
{
PUSB_EVENT pevent;
@@ -174,7 +174,7 @@
pevent->event = USB_EVENT_INIT_DEV_MGR;
pevent->process_queue = event_list_default_process_queue;
- pevent->process_event = dev_mgr_event_init;
+ pevent->process_event = (PROCESS_EVENT)dev_mgr_event_init;
pevent->context = (ULONG) dev_mgr;
@@ -196,7 +196,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
dev_mgr_event_init(PUSB_DEV pdev, //always null. we do not use this param
ULONG event, ULONG context, ULONG param)
{
@@ -285,6 +285,7 @@
}
VOID
+NTAPI
dev_mgr_thread(PVOID context)
{
PUSB_DEV_MANAGER dev_mgr;
@@ -293,7 +294,7 @@
USB_EVENT usb_event;
LARGE_INTEGER time_out;
NTSTATUS status;
- BOOL dev_mgr_inited;
+ BOOLEAN dev_mgr_inited;
KIRQL old_irql;
LONG i;
@@ -372,6 +373,7 @@
}
VOID
+NTAPI
dev_mgr_timer_dpc_callback(PKDPC Dpc, PVOID context, PVOID SystemArgument1, PVOID
SystemArgument2)
{
PUSB_DEV_MANAGER dev_mgr;
@@ -421,7 +423,7 @@
}
-BOOL
+BOOLEAN
dev_mgr_request_timer_svc(PUSB_DEV_MANAGER dev_mgr,
PUSB_DEV pdev, ULONG context, ULONG due_time, TIMER_SVC_HANDLER
handler)
{
@@ -458,7 +460,7 @@
return hcd->hcd_alloc_addr(hcd);
}
-BOOL
+BOOLEAN
dev_mgr_free_addr(PUSB_DEV_MANAGER dev_mgr, PUSB_DEV pdev, BYTE addr)
{
PHCD hcd;
@@ -539,10 +541,9 @@
PLIST_ENTRY pthis, pnext;
PHUB2_EXTENSION phub_ext = NULL;
PUSB_CONFIGURATION pconfig;
- PUSB_INTERFACE pif;
PUSB_DEV_MANAGER dev_mgr;
PHCD hcd;
- BOOL is_hub, found;
+ BOOLEAN is_hub, found;
ULONG dev_id;
int i;
@@ -623,7 +624,7 @@
if ((((PUSB_EVENT) pthis)->flags & USB_EVENT_FLAG_QUE_TYPE) !=
USB_EVENT_FLAG_NOQUE)
{
//has a queue, re-insert the queue
- if (p1 = (PLIST_ENTRY) ((PUSB_EVENT) pthis)->pnext)
+ if ((p1 = (PLIST_ENTRY) ((PUSB_EVENT) pthis)->pnext))
{
InsertHeadList(&dev_mgr->event_list, p1);
free_event(&dev_mgr->event_pool, struct_ptr(pthis, USB_EVENT,
event_link));
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/devmgr.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/devmgr.h (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/devmgr.h Thu Aug 24 16:58:52 2006
@@ -9,9 +9,9 @@
} CONNECT_DATA, *PCONNECT_DATA;
-typedef BOOL ( *PDEV_CONNECT_EX )( PCONNECT_DATA init_param, DEV_HANDLE dev_handle );
-typedef BOOL ( *PDEV_CONNECT )( struct _USB_DEV_MANAGER *dev_mgr, DEV_HANDLE dev_handle
);
-typedef BOOL ( *PDRVR_INIT )( struct _USB_DEV_MANAGER *dev_mgr, struct _USB_DRIVER
*pdriver );
+typedef BOOLEAN ( *PDEV_CONNECT_EX )( PCONNECT_DATA init_param, DEV_HANDLE dev_handle );
+typedef BOOLEAN ( *PDEV_CONNECT )( struct _USB_DEV_MANAGER *dev_mgr, DEV_HANDLE
dev_handle );
+typedef BOOLEAN ( *PDRVR_INIT )( struct _USB_DEV_MANAGER *dev_mgr, struct _USB_DRIVER
*pdriver );
typedef struct _PNP_DISPATCH
{
@@ -88,7 +88,7 @@
//PDEVICE_EXTENSION pdev_ext;
PVOID pthread;
- BOOL term_flag;
+ BOOLEAN term_flag;
KEVENT wake_up_event;
KSPIN_LOCK event_list_lock;
@@ -115,13 +115,13 @@
} USB_DEV_MANAGER, *PUSB_DEV_MANAGER;
-BOOL
+BOOLEAN
dev_mgr_post_event(
PUSB_DEV_MANAGER dev_mgr,
PUSB_EVENT event
);
-BOOL
+BOOLEAN
dev_mgr_init(
PUSB_DEV dev, //always null. we do not use this param
ULONG event,
@@ -133,12 +133,12 @@
PUSB_DEV_MANAGER dev_mgr
);
-VOID
+VOID NTAPI
dev_mgr_thread(
PVOID dev_mgr
);
-VOID
+VOID NTAPI
dev_mgr_timer_dpc_callback(
PKDPC Dpc,
PVOID DeferredContext,
@@ -146,7 +146,7 @@
PVOID SystemArgument2
);
-BOOL
+BOOLEAN
dev_mgr_request_timer_svc(
PUSB_DEV_MANAGER dev_mgr,
PUSB_DEV pdev,
@@ -161,7 +161,7 @@
PHCD hcd
);
-BOOL
+BOOLEAN
dev_mgr_free_addr(
PUSB_DEV_MANAGER dev_mgr,
PUSB_DEV pdev,
@@ -185,7 +185,7 @@
PUSB_DEV pdev
);
-BOOL
+BOOLEAN
dev_mgr_strobe(
PUSB_DEV_MANAGER dev_mgr
);
@@ -210,7 +210,7 @@
IN PIRP irp
);
-BOOL
+BOOLEAN
dev_mgr_register_irp(
PUSB_DEV_MANAGER dev_mgr,
PIRP pirp,
@@ -230,7 +230,7 @@
PUSB_INTERFACE_DESC pif_desc
);
-BOOL
+BOOLEAN
dev_mgr_set_driver(
PUSB_DEV_MANAGER dev_mgr,
DEV_HANDLE dev_handle,
@@ -238,7 +238,7 @@
PUSB_DEV pdev //if pdev != NULL, we use pdev instead if_handle
);
-BOOL
+BOOLEAN
dev_mgr_set_if_driver(
PUSB_DEV_MANAGER dev_mgr,
DEV_HANDLE if_handle,
@@ -256,8 +256,8 @@
PUSB_DEV_MANAGER dev_mgr
);
-BOOL dev_mgr_start_config_dev(PUSB_DEV pdev);
-BOOL dev_mgr_event_init(PUSB_DEV dev, //always null. we do not use this param
+BOOLEAN dev_mgr_start_config_dev(PUSB_DEV pdev);
+BOOLEAN dev_mgr_event_init(PUSB_DEV dev, //always null. we do not use this param
ULONG event,
ULONG context,
ULONG param);
@@ -265,7 +265,7 @@
VOID dev_mgr_event_select_driver(PUSB_DEV pdev, ULONG event, ULONG context, ULONG
param);
LONG dev_mgr_score_driver_for_dev(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver,
PUSB_DEVICE_DESC pdev_desc);
NTSTATUS dev_mgr_destroy_usb_config(PUSB_CONFIGURATION pcfg);
-BOOL dev_mgr_start_select_driver(PUSB_DEV pdev);
+BOOLEAN dev_mgr_start_select_driver(PUSB_DEV pdev);
VOID dev_mgr_cancel_irp(PDEVICE_OBJECT pdev_obj, PIRP pirp);
#endif
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/dmgrdisp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/dmgrdisp.c (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/dmgrdisp.c Thu Aug 24 16:58:52 2006
@@ -24,7 +24,6 @@
VOID
disp_urb_completion(PURB purb, PVOID context)
{
- PUSB_CTRL_SETUP_PACKET psetup;
PUSB_DEV_MANAGER dev_mgr;
ULONG ctrl_code;
NTSTATUS status;
@@ -141,7 +140,7 @@
PIO_STACK_LOCATION irp_stack;
NTSTATUS status;
ULONG ctrl_code;
- USE_IRQL;
+ USE_NON_PENDING_IRQL;
if (dev_mgr == NULL || irp == NULL)
{
@@ -261,7 +260,6 @@
{
GET_DEV_DESC_REQ gddr;
PUSB_DESC_HEADER pusb_desc_header;
- KIRQL old_irql;
PUSB_DEV pdev;
LONG buf_size;
@@ -357,16 +355,12 @@
case IOCTL_SUBMIT_URB_WR:
case IOCTL_SUBMIT_URB_NOIO:
{
- LONG buf_size;
PURB purb;
- KIRQL old_irql;
ULONG endp_idx, if_idx, user_buffer_length = 0;
PUCHAR user_buffer = NULL;
PUSB_DEV pdev;
DEV_HANDLE endp_handle;
PUSB_ENDPOINT pendp;
-
- PUSB_CTRL_SETUP_PACKET psetup;
if (irp_stack->Parameters.DeviceIoControl.InputBufferLength <
sizeof(URB))
{
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.c (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.c Thu Aug 24 16:58:52 2006
@@ -277,13 +277,13 @@
PDEVICE_OBJECT
ehci_alloc(PDRIVER_OBJECT drvr_obj, PUNICODE_STRING reg_path, ULONG bus_addr,
PUSB_DEV_MANAGER dev_mgr);
-BOOL ehci_init_schedule(PEHCI_DEV ehci, PADAPTER_OBJECT padapter);
-
-BOOL ehci_release(PDEVICE_OBJECT pdev);
+BOOLEAN ehci_init_schedule(PEHCI_DEV ehci, PADAPTER_OBJECT padapter);
+
+BOOLEAN ehci_release(PDEVICE_OBJECT pdev);
static VOID ehci_stop(PEHCI_DEV ehci);
-BOOL ehci_destroy_schedule(PEHCI_DEV ehci);
+BOOLEAN ehci_destroy_schedule(PEHCI_DEV ehci);
BOOLEAN NTAPI ehci_sync_insert_urb_schedule(PVOID context);
@@ -305,7 +305,7 @@
static ULONG ehci_scan_iso_error(PEHCI_DEV ehci, PURB purb);
-BOOL ehci_claim_bandwidth(PEHCI_DEV ehci, PURB purb, BOOL claim_bw); //true to claim
band-width, false to free band-width
+BOOLEAN ehci_claim_bandwidth(PEHCI_DEV ehci, PURB purb, BOOLEAN claim_bw); //true to
claim band-width, false to free band-width
static VOID ehci_insert_bulk_schedule(PEHCI_DEV ehci, PURB purb);
@@ -321,13 +321,13 @@
PDEVICE_OBJECT ehci_create_device(PDRIVER_OBJECT drvr_obj, PUSB_DEV_MANAGER dev_mgr);
-BOOL ehci_delete_device(PDEVICE_OBJECT pdev);
+BOOLEAN ehci_delete_device(PDEVICE_OBJECT pdev);
VOID ehci_get_capabilities(PEHCI_DEV ehci, PBYTE base);
BOOLEAN NTAPI ehci_isr(PKINTERRUPT interrupt, PVOID context);
-BOOL ehci_start(PHCD hcd);
+BOOLEAN ehci_start(PHCD hcd);
extern VOID rh_timer_svc_reset_port_completion(PUSB_DEV dev, PVOID context);
@@ -355,7 +355,7 @@
return;
}
-BOOL
+BOOLEAN
init_pending_endp_pool(PUHCI_PENDING_ENDP_POOL pool)
{
int i;
@@ -378,7 +378,7 @@
}
-BOOL
+BOOLEAN
free_pending_endp(PUHCI_PENDING_ENDP_POOL pool, PUHCI_PENDING_ENDP pending_endp)
{
if (pool == NULL || pending_endp == NULL)
@@ -408,7 +408,7 @@
return new;
}
-BOOL
+BOOLEAN
destroy_pending_endp_pool(PUHCI_PENDING_ENDP_POOL pool)
{
if (pool == NULL)
@@ -426,13 +426,13 @@
#define ehci_wait_ms uhci_wait_ms
extern VOID uhci_wait_ms(PEHCI_DEV ehci, LONG ms);
-extern BOOL init_pending_endp_pool(PUHCI_PENDING_ENDP_POOL pool);
-
-extern BOOL free_pending_endp(PUHCI_PENDING_ENDP_POOL pool, PUHCI_PENDING_ENDP
pending_endp);
+extern BOOLEAN init_pending_endp_pool(PUHCI_PENDING_ENDP_POOL pool);
+
+extern BOOLEAN free_pending_endp(PUHCI_PENDING_ENDP_POOL pool, PUHCI_PENDING_ENDP
pending_endp);
extern PUHCI_PENDING_ENDP alloc_pending_endp(PUHCI_PENDING_ENDP_POOL pool, LONG count);
-extern BOOL destroy_pending_endp_pool(PUHCI_PENDING_ENDP_POOL pool);
+extern BOOLEAN destroy_pending_endp_pool(PUHCI_PENDING_ENDP_POOL pool);
#endif
@@ -444,7 +444,7 @@
PLIST_ENTRY abort_list;
PUSB_DEV pdev;
PURB purb;
- USE_IRQL;
+ USE_BASIC_NON_PENDING_IRQL;
abort_list = (PLIST_ENTRY) Parameter;
@@ -468,7 +468,7 @@
return;
}
-static BOOL
+static BOOLEAN
ehci_process_pending_endp(PEHCI_DEV ehci)
{
PUSB_DEV pdev;
@@ -476,12 +476,12 @@
PLIST_ENTRY pthis;
PURB purb;
PUSB_ENDPOINT pendp;
- BOOL can_submit = FALSE;
+ NTSTATUS can_submit = STATUS_SUCCESS;
PWORK_QUEUE_ITEM pwork_item;
PLIST_ENTRY cancel_list;
PUSB_DEV pparent = NULL;
UCHAR port_idx = 0;
- BOOL tt_needed;
+ BOOLEAN tt_needed;
UCHAR hub_addr = 0;
USE_IRQL;
@@ -682,7 +682,7 @@
return TRUE;
}
-BOOL
+NTSTATUS
ehci_submit_urb(PEHCI_DEV ehci, PUSB_DEV pdev, PUSB_ENDPOINT pendp, PURB purb)
{
int i;
@@ -940,7 +940,7 @@
PUSB_DEV pdev;
PUSB_ENDPOINT pendp;
- BOOL finished;
+ BOOLEAN finished;
LONG i;
ULONG ehci_status, urb_status;
@@ -1254,7 +1254,7 @@
return (UCHAR) (sync_param->ret = TRUE);
}
-BOOL
+BOOLEAN
ehci_remove_device(PEHCI_DEV ehci, PUSB_DEV dev)
{
PUHCI_PENDING_ENDP ppending_endp;
@@ -1352,7 +1352,7 @@
return TRUE;
}
-static BOOL
+static BOOLEAN
ehci_insert_urb_schedule(PEHCI_DEV ehci, PURB purb)
// must have dev_lock( ehci_process_pending_endp ) and frame_list_lock acquired
{
@@ -1387,7 +1387,7 @@
return TRUE;
}
-static BOOL
+static BOOLEAN
ehci_insert_tds_qh(PEHCI_DEV ehci, PEHCI_QH pqh, PEHCI_QTD td_chain)
{
if (pqh == NULL || td_chain == NULL)
@@ -1400,7 +1400,7 @@
return TRUE;
}
-static BOOL
+static BOOLEAN
ehci_insert_qh_urb(PURB purb, PEHCI_QH pqh)
{
PLIST_ENTRY pthis, pnext;
@@ -1452,7 +1452,7 @@
}\
}
-static BOOL
+static BOOLEAN
ehci_fill_td_buf_ptr(PURB purb, LONG start_addr, // start idx into
purb->data_buffer
PLIST_ENTRY td_list, LONG td_count, ULONG toggle)
// fill the tds' bytes_to_transfer and hw_buf, return next toggle value: true 1,
false 0
@@ -1560,7 +1560,7 @@
PEHCI_QTD ptd;
PEHCI_QH pqh;
LIST_ENTRY td_list, *pthis, *pnext;
- BOOL old_toggle, toggle, ret;
+ BOOLEAN old_toggle, toggle, ret;
UCHAR pid;
LONG i, j;
PURB_HS_PIPE_CONTENT pipe_content;
@@ -1763,7 +1763,7 @@
PEHCI_QH pqh;
PEHCI_QH_CONTENT pqhc;
UCHAR dev_addr;
- BOOL ret;
+ BOOLEAN ret;
PURB_HS_PIPE_CONTENT pipe_content;
PEHCI_QTD_CONTENT ptdc;
PEHCI_ELEM_LINKS pelnk;
@@ -1963,7 +1963,7 @@
{
LONG i, max_packet_size;
PEHCI_QTD ptd;
- BOOL ret;
+ BOOLEAN ret;
PUSB_DEV pdev;
PURB_HS_PIPE_CONTENT pipe_content;
UCHAR mult_trans, toggle, old_toggle;
@@ -2199,7 +2199,7 @@
PEHCI_SITD_CONTENT psitdc;
PEHCI_ITD_CONTENT pitdc;
LIST_ENTRY td_list, *pthis, *pnext, *pprev;
- BOOL ret;
+ BOOLEAN ret;
PURB_HS_PIPE_CONTENT pipe_content;
PUSB_DEV pdev;
PEHCI_ELEM_LINKS pelnk;
@@ -2721,7 +2721,7 @@
PSYNC_PARAM sync_param;
PURB purb2, dest_urb;
PLIST_ENTRY pthis, pnext;
- BOOL found = FALSE;
+ BOOLEAN found = FALSE;
if (context == NULL)
return FALSE;
@@ -2759,7 +2759,7 @@
//note any fields of the purb can not be referenced unless it is found in some queue
{
PLIST_ENTRY pthis, pnext;
- BOOL found;
+ BOOLEAN found;
PURB purb2;
SYNC_PARAM sync_param;
@@ -2838,7 +2838,7 @@
ehci_generic_urb_completion(PURB purb, PVOID context)
{
PUSB_DEV pdev;
- BOOL is_ctrl = FALSE;
+ BOOLEAN is_ctrl = FALSE;
USE_IRQL;
old_irql = KeGetCurrentIrql();
@@ -3165,7 +3165,7 @@
}
//must have rh dev_lock acquired
-BOOL
+BOOLEAN
ehci_rh_reset_port(PHCD hcd, UCHAR port_idx)
{
ULONG i;
@@ -3326,7 +3326,7 @@
return;
}
-BOOL
+BOOLEAN
ehci_remove_device2(PHCD hcd, PUSB_DEV pdev)
{
if (hcd == NULL || pdev == NULL)
@@ -3335,7 +3335,7 @@
return ehci_remove_device(ehci_from_hcd(hcd), pdev);
}
-BOOL
+BOOLEAN
ehci_hcd_release(PHCD hcd)
{
PEHCI_DEV ehci;
@@ -3360,7 +3360,7 @@
return ehci_cancel_urb(ehci, pdev, pendp, purb);
}
-BOOL
+BOOLEAN
ehci_rh_get_dev_change(PHCD hcd, PBYTE buf) //must have the rh dev_lock acquired
{
PEHCI_DEV ehci;
@@ -3767,11 +3767,11 @@
ehci->hcd_interf.flags = HCD_TYPE_EHCI; //hcd types | hcd id
}
-BOOL
+BOOLEAN
ehci_init_schedule(PEHCI_DEV ehci, PADAPTER_OBJECT padapter)
{
PEHCI_DEVICE_EXTENSION pdev_ext;
- BOOL ret = TRUE;
+ BOOLEAN ret = TRUE;
LONG i;
PEHCI_QH_CONTENT pqh_content;
PEHCI_QH pqh;
@@ -3890,7 +3890,7 @@
return FALSE;
}
-BOOL
+BOOLEAN
ehci_destroy_schedule(PEHCI_DEV ehci)
{
LONG i;
@@ -3987,7 +3987,7 @@
return;
}
-BOOL
+BOOLEAN
ehci_delete_device(PDEVICE_OBJECT pdev)
{
STRING string;
@@ -4032,7 +4032,7 @@
EHCI_WRITE_PORT_ULONG((PULONG) (base + EHCI_USBCMD), tmp);
}
-BOOL
+BOOLEAN
ehci_release(PDEVICE_OBJECT pdev)
{
PEHCI_DEVICE_EXTENSION pdev_ext;
@@ -4072,7 +4072,7 @@
}
-BOOL
+BOOLEAN
ehci_start(PHCD hcd)
{
ULONG tmp;
@@ -4143,7 +4143,7 @@
}
VOID
-ehci_run_stop(PEHCI_DEV ehci, BOOL start)
+ehci_run_stop(PEHCI_DEV ehci, BOOLEAN start)
{
PEHCI_USBCMD_CONTENT usbcmd;
PEHCI_USBSTS_CONTENT usbsts;
@@ -4185,14 +4185,14 @@
return;
}
-BOOL
-ehci_claim_bw_for_int(PEHCI_DEV ehci, PURB purb, BOOL release)
+BOOLEAN
+ehci_claim_bw_for_int(PEHCI_DEV ehci, PURB purb, BOOLEAN release)
// should have pending_endp_list_lock acquired, and purb->pipe prepared
{
PURB_HS_PIPE_CONTENT pipe_content;
LONG i, j;
ULONG interval, bus_time, ss_time, cs_time;
- BOOL bw_avail;
+ BOOLEAN bw_avail;
ULONG max_packet_size;
if (ehci == NULL || purb == NULL)
@@ -4412,13 +4412,13 @@
#define iso_uframes_data_load( dir, data_load, uf_cnt )
-BOOL
-ehci_claim_bw_for_iso(PEHCI_DEV ehci, PURB purb, BOOL release)
+BOOLEAN
+ehci_claim_bw_for_iso(PEHCI_DEV ehci, PURB purb, BOOLEAN release)
{
PURB_HS_PIPE_CONTENT pipe_content;
LONG i, j, k;
ULONG interval, bus_time, ss_time, cs_time, remainder;
- BOOL bw_avail;
+ BOOLEAN bw_avail;
ULONG cur_uframe, start_uframe = 0, max_time, max_packet_size;
PBYTE base;
if (ehci == NULL || purb == NULL)
@@ -4638,7 +4638,7 @@
}
else // take the pain to find one
{
- BOOL large;
+ BOOLEAN large;
long temp, base;
for(j = (cur_uframe >> 3) + 2; j != (LONG) (cur_uframe >> 3); j =
(j + 1) % ehci->frame_count)
@@ -4767,12 +4767,12 @@
return bw_avail;
}
-BOOL
-ehci_claim_bandwidth(PEHCI_DEV ehci, PURB purb, BOOL claim_bw) //true to claim
band-width, false to free band-width
+BOOLEAN
+ehci_claim_bandwidth(PEHCI_DEV ehci, PURB purb, BOOLEAN claim_bw) //true to claim
band-width, false to free band-width
// should have pending_endp_list_lock acquired, and purb->pipe prepared
{
PURB_HS_PIPE_CONTENT pipe_content;
- BOOL ret;
+ BOOLEAN ret;
if (ehci == NULL || purb == NULL)
return FALSE;
@@ -4792,8 +4792,8 @@
return ret;
}
-BOOL
-ehci_can_remove(PURB purb, BOOL door_bell_rings, ULONG cur_frame)
+BOOLEAN
+ehci_can_remove(PURB purb, BOOLEAN door_bell_rings, ULONG cur_frame)
// test if the purb can be removed from the schedule, by current frame index and
// purb states
{
@@ -5788,7 +5788,7 @@
}
NTSTATUS
-ehci_isr_removing_urb(PEHCI_DEV ehci, PURB purb, BOOL doorbell_rings, ULONG cur_frame)
+ehci_isr_removing_urb(PEHCI_DEV ehci, PURB purb, BOOLEAN doorbell_rings, ULONG
cur_frame)
{
UCHAR type;
PLIST_ENTRY pthis;
@@ -6062,7 +6062,7 @@
ULONG status, urb_count;
PLIST_ENTRY pthis, pnext;
PURB purb;
- BOOL door_bell_rings;
+ BOOLEAN door_bell_rings;
ULONG cur_frame;
/*
* Read the interrupt status, and write it back to clear the
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.h (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.h Thu Aug 24 16:58:52 2006
@@ -101,25 +101,25 @@
} EHCI_ELEM_LIST, *PEHCI_ELEM_LIST;
-BOOL elem_pool_init_pool( struct _EHCI_ELEM_POOL* pool, LONG flags, PVOID context);
+BOOLEAN elem_pool_init_pool( struct _EHCI_ELEM_POOL* pool, LONG flags, PVOID context);
VOID elem_pool_destroy_pool ( struct _EHCI_ELEM_POOL* pool );
PEHCI_ELEM_LINKS elem_pool_alloc_elem ( struct _EHCI_ELEM_POOL* pool );
VOID elem_pool_free_elem ( PEHCI_ELEM_LINKS elem_link );
LONG elem_pool_get_total_count ( struct _EHCI_ELEM_POOL* pool );
-BOOL elem_pool_is_empty ( struct _EHCI_ELEM_POOL* pool );
+BOOLEAN elem_pool_is_empty ( struct _EHCI_ELEM_POOL* pool );
LONG elem_pool_get_free_count ( struct _EHCI_ELEM_POOL* pool );
LONG elem_pool_get_link_offset ( struct _EHCI_ELEM_POOL* pool );
PEHCI_ELEM_LINKS elem_pool_alloc_elems ( struct _EHCI_ELEM_POOL* pool, LONG count );
-BOOL elem_pool_free_elems( PEHCI_ELEM_LINKS elem_chains );
+BOOLEAN elem_pool_free_elems( PEHCI_ELEM_LINKS elem_chains );
LONG elem_pool_get_type( struct _EHCI_ELEM_POOL* pool );
// the following are private functions
-BOOL elem_pool_expand_pool( struct _EHCI_ELEM_POOL* pool, LONG elem_count );
-BOOL elem_pool_collect_garbage( struct _EHCI_ELEM_POOL* pool );
+BOOLEAN elem_pool_expand_pool( struct _EHCI_ELEM_POOL* pool, LONG elem_count );
+BOOLEAN elem_pool_collect_garbage( struct _EHCI_ELEM_POOL* pool );
// lock operations
-BOOL elem_pool_lock( struct _EHCI_ELEM_POOL* pool, BOOL at_dpc );
-BOOL elem_pool_unlock( struct _EHCI_ELEM_POOL* pool, BOOL at_dpc );
+BOOLEAN elem_pool_lock( struct _EHCI_ELEM_POOL* pool, BOOLEAN at_dpc );
+BOOLEAN elem_pool_unlock( struct _EHCI_ELEM_POOL* pool, BOOLEAN at_dpc );
// helper
LONG get_elem_phys_part_size( ULONG type );
@@ -737,7 +737,7 @@
EHCI_CAPS ehci_caps;
PHYSICAL_ADDRESS ehci_reg_base; // io space
- BOOL port_mapped;
+ BOOLEAN port_mapped;
PBYTE port_base; // note: added by ehci_caps.length, operational regs base
addr, not the actural base
ULONG frame_count;
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/etd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/etd.c (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/etd.c Thu Aug 24 16:58:52 2006
@@ -83,8 +83,8 @@
LONG elem_list_get_ref(PEHCI_ELEM_LIST plist);
-BOOL
-elem_pool_lock(PEHCI_ELEM_POOL pool, BOOL at_dpc)
+BOOLEAN
+elem_pool_lock(PEHCI_ELEM_POOL pool, BOOLEAN at_dpc)
{
UNREFERENCED_PARAMETER(pool);
UNREFERENCED_PARAMETER(at_dpc);
@@ -92,8 +92,8 @@
return TRUE;
}
-BOOL
-elem_pool_unlock(PEHCI_ELEM_POOL pool, BOOL at_dpc)
+BOOLEAN
+elem_pool_unlock(PEHCI_ELEM_POOL pool, BOOLEAN at_dpc)
{
UNREFERENCED_PARAMETER(pool);
UNREFERENCED_PARAMETER(at_dpc);
@@ -129,7 +129,7 @@
return size;
}
-BOOL
+BOOLEAN
elem_list_init_elem_list(PEHCI_ELEM_LIST plist, LONG init_flags, PVOID context, LONG
count)
{
LONG pages, i, j, elms_per_page;
@@ -342,10 +342,9 @@
// pool methods
//
-BOOL
+BOOLEAN
elem_pool_init_pool(PEHCI_ELEM_POOL pool, LONG flags, PVOID context)
{
- PADAPTER_OBJECT padapter;
INIT_ELEM_LIST_CONTEXT init_ctx;
if (pool == NULL || context == NULL)
@@ -458,7 +457,7 @@
return;
}
-BOOL
+BOOLEAN
elem_pool_is_empty(PEHCI_ELEM_POOL pool)
{
PEHCI_ELEM_LIST pel;
@@ -522,7 +521,7 @@
return elnk;
}
-BOOL
+BOOLEAN
elem_pool_free_elems(PEHCI_ELEM_LINKS elem_chains)
{
// note: no list head exists.
@@ -546,7 +545,7 @@
return (pool->flags & 0xf);
}
-BOOL
+BOOLEAN
elem_pool_expand_pool(PEHCI_ELEM_POOL pool, LONG elem_count)
{
LONG elem_cnt_list, list_count, i, j;
@@ -590,7 +589,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
elem_pool_collect_garbage(PEHCI_ELEM_POOL pool)
{
LONG i, j, k, fl;
@@ -626,7 +625,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
elem_pool_can_transfer(PEHCI_ELEM_POOL pool, LONG td_count)
{
LONG i;
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/events.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/events.h (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/events.h Thu Aug 24 16:58:52 2006
@@ -56,12 +56,12 @@
} USB_EVENT_POOL, *PUSB_EVENT_POOL;
-BOOL
+BOOLEAN
init_event_pool(
PUSB_EVENT_POOL pool
);
-BOOL
+BOOLEAN
free_event(
PUSB_EVENT_POOL pool,
PUSB_EVENT pevent
@@ -73,7 +73,7 @@
LONG count
); //null if failed
-BOOL
+BOOLEAN
destroy_event_pool(
PUSB_EVENT_POOL pool
);
@@ -114,11 +114,11 @@
} TIMER_SVC_POOL, *PTIMER_SVC_POOL;
-BOOL
+BOOLEAN
init_timer_svc_pool(
PTIMER_SVC_POOL pool
);
-BOOL
+BOOLEAN
free_timer_svc(
PTIMER_SVC_POOL pool,
PTIMER_SVC ptimer
@@ -130,7 +130,7 @@
LONG count
); //null if failed
-BOOL
+BOOLEAN
destroy_timer_svc_pool(
PTIMER_SVC_POOL pool
);
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/gendrv.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/gendrv.c (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/gendrv.c Thu Aug 24 16:58:52 2006
@@ -71,19 +71,19 @@
IN ACCESS_MASK DesiredAccess OPTIONAL,
IN OUT PVOID ParseContext OPTIONAL, OUT PHANDLE Handle);
-BOOL gendrv_if_driver_destroy(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver);
+BOOLEAN gendrv_if_driver_destroy(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver);
VOID gendrv_set_cfg_completion(PURB purb, PVOID context);
-BOOL gendrv_connect(PCONNECT_DATA param, DEV_HANDLE dev_handle);
-
-BOOL gendrv_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
-
-BOOL gendrv_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
+BOOLEAN gendrv_connect(PCONNECT_DATA param, DEV_HANDLE dev_handle);
+
+BOOLEAN gendrv_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
+
+BOOLEAN gendrv_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
VOID gendrv_startio(IN PDEVICE_OBJECT dev_obj, IN PIRP irp);
-VOID gendrv_cancel_queued_irp(PDEVICE_OBJECT pdev_obj, PIRP pirp);
+VOID NTAPI gendrv_cancel_queued_irp(PDEVICE_OBJECT pdev_obj, PIRP pirp);
VOID gendrv_release_ext_drvr_entry(PGENDRV_DRVR_EXTENSION pdrvr_ext,
PGENDRV_EXT_DRVR_ENTRY pentry);
@@ -101,13 +101,13 @@
IN HANDLE base_handle OPTIONAL,
IN PUNICODE_STRING keyname, IN ACCESS_MASK desired_access, IN BOOLEAN
create);
-BOOL gendrv_do_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE if_handle, BOOL is_if);
-
-BOOL gendrv_do_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle, BOOL is_if);
+BOOLEAN gendrv_do_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE if_handle, BOOLEAN
is_if);
+
+BOOLEAN gendrv_do_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle, BOOLEAN is_if);
NTSTATUS gendrv_send_pnp_msg(ULONG msg, PDEVICE_OBJECT pdev_obj, PVOID pctx);
-BOOL gendrv_delete_device(PUSB_DEV_MANAGER dev_mgr, PDEVICE_OBJECT dev_obj);
+BOOLEAN gendrv_delete_device(PUSB_DEV_MANAGER dev_mgr, PDEVICE_OBJECT dev_obj);
PDEVICE_OBJECT gendrv_create_device(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER gen_drvr,
DEV_HANDLE dev_handle);
@@ -117,7 +117,7 @@
ULONG gendrv_make_key(PUSB_DESC_HEADER pdesc);
-BOOL
+BOOLEAN
gendrv_driver_init(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver)
{
PGENDRV_DRVR_EXTENSION pdrvr_ext;
@@ -161,13 +161,13 @@
return TRUE;
}
-BOOL
+BOOLEAN
gendrv_driver_destroy(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver)
{
return gendrv_if_driver_destroy(dev_mgr, pdriver);
}
-BOOL
+BOOLEAN
gendrv_connect(PCONNECT_DATA param, DEV_HANDLE dev_handle)
{
PURB purb;
@@ -265,7 +265,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
gendrv_event_select_driver(PUSB_DEV pdev, //always null. we do not use this param
ULONG event, ULONG context, ULONG param)
{
@@ -456,7 +456,7 @@
}
-BOOL
+BOOLEAN
gendrv_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle)
{
if (dev_mgr == NULL)
@@ -464,7 +464,7 @@
return gendrv_do_stop(dev_mgr, dev_handle, FALSE);
}
-BOOL
+BOOLEAN
gendrv_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle)
{
if (dev_mgr == NULL)
@@ -472,7 +472,7 @@
return gendrv_do_disconnect(dev_mgr, dev_handle, FALSE);
}
-BOOL
+BOOLEAN
gendrv_build_reg_string(PUSB_DESC_HEADER pdesc, PUNICODE_STRING pus)
{
@@ -712,7 +712,7 @@
}
-BOOL
+BOOLEAN
gendrv_if_connect(PCONNECT_DATA params, DEV_HANDLE if_handle)
{
//
@@ -845,8 +845,8 @@
return FALSE;
}
-BOOL
-gendrv_do_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle, BOOL is_if)
+BOOLEAN
+gendrv_do_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle, BOOLEAN is_if)
{
PUSB_DEV pdev;
PDEVICE_OBJECT pdev_obj;
@@ -875,7 +875,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
gendrv_if_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle)
{
if (dev_mgr == NULL)
@@ -884,8 +884,8 @@
return gendrv_do_stop(dev_mgr, dev_handle, TRUE);
}
-BOOL
-gendrv_do_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE if_handle, BOOL is_if)
+BOOLEAN
+gendrv_do_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE if_handle, BOOLEAN is_if)
{
PUSB_DEV pdev;
PDEVICE_OBJECT dev_obj = NULL;
@@ -938,13 +938,13 @@
return TRUE;
}
-BOOL
+BOOLEAN
gendrv_if_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE if_handle)
{
return gendrv_do_disconnect(dev_mgr, if_handle, TRUE);
}
-BOOL
+BOOLEAN
gendrv_if_driver_init(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver)
{
PGENDRV_DRVR_EXTENSION pdrvr_ext;
@@ -989,7 +989,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
gendrv_if_driver_destroy(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver)
{
PGENDRV_DRVR_EXTENSION pdrvr_ext;
@@ -1068,7 +1068,7 @@
return pdrvr;
}
-BOOL
+BOOLEAN
gendrv_close_ext_driver(PDRIVER_OBJECT pdrvr)
{
if (pdrvr == NULL)
@@ -1206,7 +1206,7 @@
return STATUS_NOT_SUPPORTED;
}
-BOOL
+BOOLEAN
gendrv_init_dev_ext_hdr(PDEVICE_OBJECT dev_obj, PUSB_DEV_MANAGER dev_mgr)
{
PDEVEXT_HEADER dev_hdr = NULL;
@@ -1223,7 +1223,7 @@
PDEVICE_OBJECT
gendrv_create_device(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER gen_drvr, DEV_HANDLE
dev_handle)
{
- BOOL is_if;
+ BOOLEAN is_if;
PDEVICE_OBJECT pdev;
PGENDRV_DEVICE_EXTENSION pdev_ext;
ULONG dev_id;
@@ -1333,10 +1333,10 @@
return;
}
-BOOL
+BOOLEAN
gendrv_delete_device(PUSB_DEV_MANAGER dev_mgr, PDEVICE_OBJECT dev_obj)
{
- BOOL is_if;
+ BOOLEAN is_if;
PUSB_DRIVER pdrvr;
PGENDRV_DEVICE_EXTENSION pdev_ext;
UCHAR dev_name[64];
@@ -1784,6 +1784,7 @@
}
VOID
+NTAPI
gendrv_cancel_queued_irp(PDEVICE_OBJECT dev_obj, PIRP pirp)
{
// cancel routine for irps queued in the device queue
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/hcd.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/hcd.h (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/hcd.h Thu Aug 24 16:58:52 2006
@@ -10,10 +10,6 @@
#define usb2( hCD ) ( hcd_type( hCD ) == HCD_TYPE_EHCI )
#define HCD_ID_MASK 0xf
-
-#ifndef BOOL
-#define BOOL ULONG
-#endif
#define HCD_DISP_READ_PORT_COUNT 1 // the param is a pointer to UCHAR
#define HCD_DISP_READ_RH_DEV_CHANGE 2 // the param is a buffer to hold conn change on
all the port
@@ -36,11 +32,11 @@
typedef VOID ( *PHCD_GENERIC_URB_COMPLETION )( struct _URB *purb, PVOID context ); //we
can get te hcd from purb
typedef struct _USB_DEV* ( *PHCD_GET_ROOT_HUB )( struct _HCD* hcd );
typedef VOID ( *PHCD_SET_ROOT_HUB )( struct _HCD* hcd, struct _USB_DEV *root_hub );
-typedef BOOL ( *PHCD_REMOVE_DEVICE )( struct _HCD* hcd, struct _USB_DEV *pdev );
-typedef BOOL ( *PHCD_RH_RESET_PORT )( struct _HCD* hcd, UCHAR port_idx ); //must have
the rh dev_lock acquired
-typedef BOOL ( *PHCD_RELEASE )( struct _HCD* hcd ); //must have the rh dev_lock
acquired
+typedef BOOLEAN ( *PHCD_REMOVE_DEVICE )( struct _HCD* hcd, struct _USB_DEV *pdev );
+typedef BOOLEAN ( *PHCD_RH_RESET_PORT )( struct _HCD* hcd, UCHAR port_idx ); //must
have the rh dev_lock acquired
+typedef BOOLEAN ( *PHCD_RELEASE )( struct _HCD* hcd ); //must have the rh dev_lock
acquired
typedef NTSTATUS( *PHCD_CANCEL_URB)( struct _HCD* hcd, struct _USB_DEV *pdev, struct
_USB_ENDPOINT* pendp, struct _URB *purb );
-typedef BOOL ( *PHCD_START )( struct _HCD* hcd ); //must have the rh dev_lock acquired
+typedef BOOLEAN ( *PHCD_START )( struct _HCD* hcd ); //must have the rh dev_lock
acquired
typedef NTSTATUS ( *PHCD_DISPATCH )( struct _HCD* hcd, LONG disp_code, PVOID param ); //
locking depends on type of code
typedef struct _HCD
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.c (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.c Thu Aug 24 16:58:52 2006
@@ -63,9 +63,9 @@
extern ULONG cpu_clock_freq;
-BOOL hub_check_reset_port_status(PUSB_DEV pdev, LONG port_idx);
-
-VOID hub_reexamine_port_status_queue(PUSB_DEV hub_dev, ULONG port_idx, BOOL from_dpc);
+BOOLEAN hub_check_reset_port_status(PUSB_DEV pdev, LONG port_idx);
+
+VOID hub_reexamine_port_status_queue(PUSB_DEV hub_dev, ULONG port_idx, BOOLEAN
from_dpc);
void hub_int_completion(PURB purb, PVOID pcontext);
@@ -95,17 +95,17 @@
NTSTATUS hub_start_int_request(PUSB_DEV pdev);
-BOOL hub_connect(PCONNECT_DATA init_param, DEV_HANDLE dev_handle);
-
-BOOL hub_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
-
-BOOL hub_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
+BOOLEAN hub_connect(PCONNECT_DATA init_param, DEV_HANDLE dev_handle);
+
+BOOLEAN hub_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
+
+BOOLEAN hub_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
NTSTATUS hub_disable_port_request(PUSB_DEV pdev, UCHAR port_idx);
VOID hub_start_reset_port_completion(PURB purb, PVOID context);
-BOOL
+BOOLEAN
init_event_pool(PUSB_EVENT_POOL pool)
{
int i;
@@ -129,7 +129,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
free_event(PUSB_EVENT_POOL pool, PUSB_EVENT pevent)
{
if (pool == NULL || pevent == NULL)
@@ -165,7 +165,7 @@
return NewEvent;
}
-BOOL
+BOOLEAN
destroy_event_pool(PUSB_EVENT_POOL pool)
{
if (pool == NULL)
@@ -187,7 +187,7 @@
//----------------------------------------------------------
//timer_svc pool routines
-BOOL
+BOOLEAN
init_timer_svc_pool(PTIMER_SVC_POOL pool)
{
int i;
@@ -209,7 +209,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
free_timer_svc(PTIMER_SVC_POOL pool, PTIMER_SVC ptimer)
{
if (pool == NULL || ptimer == NULL)
@@ -240,7 +240,7 @@
}
-BOOL
+BOOLEAN
destroy_timer_svc_pool(PTIMER_SVC_POOL pool)
{
if (pool == NULL)
@@ -271,7 +271,7 @@
return;
}
-BOOL
+BOOLEAN
psq_enqueue(PPORT_STATUS_QUEUE psq, ULONG status)
{
if (psq == NULL)
@@ -319,7 +319,7 @@
return status;
}
-BOOL
+BOOLEAN
psq_push(PPORT_STATUS_QUEUE psq, ULONG status)
{
if (psq == NULL)
@@ -338,7 +338,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
hub_driver_init(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver)
{
//init driver structure, no PNP table functions
@@ -373,7 +373,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
hub_driver_destroy(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver)
{
pdriver->driver_ext = NULL;
@@ -715,7 +715,7 @@
{
BYTE port_idx;
LONG i;
- BOOL event_post, brh;
+ BOOLEAN event_post, brh;
ULONG pc;
PHCD hcd;
NTSTATUS status;
@@ -1182,7 +1182,7 @@
PHUB2_EXTENSION hub_ext;
PUSB_EVENT pevent, pevent1;
PLIST_ENTRY pthis, pnext;
- BOOL que_exist;
+ BOOLEAN que_exist;
PHCD hcd;
PUSB_DEV_MANAGER dev_mgr;
NTSTATUS status;
@@ -1520,13 +1520,13 @@
}
-BOOL
-hub_remove_reset_event(PUSB_DEV pdev, ULONG port_idx, BOOL from_dpc)
+BOOLEAN
+hub_remove_reset_event(PUSB_DEV pdev, ULONG port_idx, BOOLEAN from_dpc)
{
PUSB_DEV_MANAGER dev_mgr;
PLIST_ENTRY pthis, pnext;
PUSB_EVENT pevent, pnext_event;
- BOOL found;
+ BOOLEAN found;
KIRQL old_irql = 0;
@@ -1576,16 +1576,16 @@
return found;
}
-BOOL
-hub_start_next_reset_port(PUSB_DEV_MANAGER dev_mgr, BOOL from_dpc)
+BOOLEAN
+hub_start_next_reset_port(PUSB_DEV_MANAGER dev_mgr, BOOLEAN from_dpc)
{
PLIST_ENTRY pthis, pnext;
PUSB_EVENT pevent, pnext_event;
PUSB_DEV pdev = NULL;
PHUB2_EXTENSION hub_ext;
- BOOL bret;
+ BOOLEAN bret;
PURB purb = NULL;
- BOOL processed;
+ BOOLEAN processed;
PUSB_CTRL_SETUP_PACKET psetup;
PHCD hcd = NULL;
@@ -1722,12 +1722,12 @@
}
// called only in hub_clear_port_feature_completion
-BOOL
+BOOLEAN
hub_check_reset_port_status(PUSB_DEV pdev, LONG port_idx)
{
PUSB_DEV_MANAGER dev_mgr;
PHUB2_EXTENSION hub_ext;
- BOOL bReset;
+ BOOLEAN bReset;
USB_PORT_STATUS port_status;
PUSB_DEV pdev2;
PURB purb2;
@@ -1864,7 +1864,7 @@
}
VOID
-hub_reexamine_port_status_queue(PUSB_DEV hub_dev, ULONG port_idx, BOOL from_dpc)
+hub_reexamine_port_status_queue(PUSB_DEV hub_dev, ULONG port_idx, BOOLEAN from_dpc)
{
PHUB2_EXTENSION hub_ext;
@@ -1908,7 +1908,7 @@
}
//called in hub_set_address_completion
-BOOL
+BOOLEAN
dev_mgr_start_config_dev(PUSB_DEV pdev)
{
PBYTE data_buf;
@@ -2167,12 +2167,12 @@
return;
}
-BOOL
+BOOLEAN
dev_mgr_start_select_driver(PUSB_DEV pdev)
{
PUSB_DEV_MANAGER dev_mgr;
PUSB_EVENT pevent;
- BOOL bret;
+ BOOLEAN bret;
USE_BASIC_NON_PENDING_IRQL;;
@@ -2214,7 +2214,7 @@
return bret;
}
-BOOL
+BOOLEAN
dev_mgr_connect_to_dev(PVOID Parameter)
{
PUSB_DEV pdev;
@@ -2315,7 +2315,7 @@
return;
}
-BOOL
+BOOLEAN
dev_mgr_build_usb_endp(PUSB_INTERFACE pif, PUSB_ENDPOINT pendp, PUSB_ENDPOINT_DESC
pendp_desc)
{
if (pendp == NULL || pif == NULL || pendp_desc == NULL)
@@ -2328,8 +2328,8 @@
return TRUE;
}
-BOOL
-dev_mgr_build_usb_if(PUSB_CONFIGURATION pcfg, PUSB_INTERFACE pif, PUSB_INTERFACE_DESC
pif_desc, BOOL alt_if)
+BOOLEAN
+dev_mgr_build_usb_if(PUSB_CONFIGURATION pcfg, PUSB_INTERFACE pif, PUSB_INTERFACE_DESC
pif_desc, BOOLEAN alt_if)
{
LONG i;
PUSB_ENDPOINT_DESC pendp_desc;
@@ -2566,7 +2566,7 @@
return dev_mgr->hcd_count - 1;
}
-BOOL
+BOOLEAN
dev_mgr_register_irp(PUSB_DEV_MANAGER dev_mgr, PIRP pirp, PURB purb)
{
if (dev_mgr == NULL)
@@ -2657,7 +2657,7 @@
return;
}
-BOOL
+BOOLEAN
hub_connect(PCONNECT_DATA param, DEV_HANDLE dev_handle)
{
URB urb, *purb;
@@ -2779,7 +2779,7 @@
UCHAR if_idx = 0;
PUSB_DEV pdev;
PUSB_INTERFACE pif;
- BOOL high_speed, multiple_tt;
+ BOOLEAN high_speed, multiple_tt;
NTSTATUS status;
USE_BASIC_NON_PENDING_IRQL;;
@@ -3105,13 +3105,13 @@
return;
}
-BOOL
+BOOLEAN
hub_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle)
{
return TRUE;
}
-BOOL
+BOOLEAN
hub_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle)
{
PUSB_DEV pdev;
@@ -3130,8 +3130,8 @@
return TRUE;
}
-static BOOL
-hub_lock_unlock_tt(PUSB_DEV pdev, UCHAR port_idx, UCHAR type, BOOL lock)
+static BOOLEAN
+hub_lock_unlock_tt(PUSB_DEV pdev, UCHAR port_idx, UCHAR type, BOOLEAN lock)
{
PHUB2_EXTENSION dev_ext;
PULONG pmap = NULL;
@@ -3181,7 +3181,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
hub_lock_tt(PUSB_DEV pdev,
UCHAR port_idx,
UCHAR type // transfer type
@@ -3190,7 +3190,7 @@
return hub_lock_unlock_tt(pdev, port_idx, type, TRUE);
}
-BOOL
+BOOLEAN
hub_unlock_tt(PUSB_DEV pdev, UCHAR port_idx, UCHAR type)
{
return hub_lock_unlock_tt(pdev, port_idx, type, FALSE);
@@ -3223,7 +3223,7 @@
}
// send CLEAR_TT_BUFFER to the hub
-BOOL
+BOOLEAN
hub_clear_tt_buffer(PUSB_DEV pdev, URB_HS_PIPE_CONTENT pipe_content, UCHAR port_idx)
{
PURB purb;
@@ -3356,7 +3356,7 @@
return;
}
-BOOL
+BOOLEAN
init_irp_list(PIRP_LIST irp_list)
{
LONG i;
@@ -3389,7 +3389,7 @@
return;
}
-BOOL
+BOOLEAN
add_irp_to_list(PIRP_LIST irp_list, PIRP pirp, PURB purb)
{
KIRQL old_irql;
@@ -3509,22 +3509,22 @@
return purb;
}
-BOOL
+BOOLEAN
irp_list_empty(PIRP_LIST irp_list)
{
KIRQL old_irql;
- BOOL ret;
+ BOOLEAN ret;
KeAcquireSpinLock(&irp_list->irp_list_lock, &old_irql);
ret = (irp_list->irp_free_list_count == MAX_IRP_LIST_SIZE);
KeReleaseSpinLock(&irp_list->irp_list_lock, old_irql);
return ret;
}
-BOOL
+BOOLEAN
irp_list_full(PIRP_LIST irp_list)
{
KIRQL old_irql;
- BOOL ret;
+ BOOLEAN ret;
KeAcquireSpinLock(&irp_list->irp_list_lock, &old_irql);
ret = (irp_list->irp_free_list_count == 0);
KeReleaseSpinLock(&irp_list->irp_list_lock, old_irql);
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.h (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.h Thu Aug 24 16:58:52 2006
@@ -141,7 +141,7 @@
PPORT_STATUS_QUEUE psq
);
-BOOL
+BOOLEAN
psq_enqueue(
PPORT_STATUS_QUEUE psq,
ULONG status
@@ -151,7 +151,7 @@
PPORT_STATUS_QUEUE psq
); //return 0xffffffff if no element
-BOOL
+BOOLEAN
psq_push(
PPORT_STATUS_QUEUE psq,
ULONG status
@@ -238,19 +238,19 @@
#define RH_INTERVAL ( USB_HUB_INTERVAL / DEV_MGR_TIMER_INTERVAL_MS )
-BOOL
+BOOLEAN
rh_driver_destroy(
PUSB_DEV_MANAGER dev_mgr,
PUSB_DRIVER pdriver
);
-BOOL
+BOOLEAN
rh_driver_init(
PUSB_DEV_MANAGER dev_mgr,
PUSB_DRIVER pdriver
);
-BOOL
+BOOLEAN
rh_destroy(
PUSB_DEV pdev
);
@@ -261,30 +261,30 @@
PVOID context
);
-BOOL
+BOOLEAN
rh_submit_urb(
PUSB_DEV pdev,
PURB urb
);
-BOOL
+BOOLEAN
hub_init(
PUSB_DEV pdev
);
-BOOL
+BOOLEAN
hub_destroy(
PUSB_DEV pdev
);
-BOOL
+BOOLEAN
hub_lock_tt(
PUSB_DEV pdev,
UCHAR port_idx,
UCHAR type // transfer type
);
-BOOL
+BOOLEAN
hub_unlock_tt(
PUSB_DEV pdev,
UCHAR port_idx,
@@ -299,46 +299,47 @@
ULONG pipe
);
-BOOL
+BOOLEAN
compdev_driver_init(
PUSB_DEV_MANAGER dev_mgr,
PUSB_DRIVER pdriver
);
-BOOL
+BOOLEAN
compdev_driver_destroy(
PUSB_DEV_MANAGER dev_mgr,
PUSB_DRIVER pdriver
);
-BOOL
+BOOLEAN
gendrv_driver_init(
PUSB_DEV_MANAGER dev_mgr,
PUSB_DRIVER pdriver
);
-BOOL
+BOOLEAN
gendrv_driver_destroy(
PUSB_DEV_MANAGER dev_mgr,
PUSB_DRIVER pdriver
);
-BOOL
+BOOLEAN
gendrv_if_driver_init(
PUSB_DEV_MANAGER dev_mgr,
PUSB_DRIVER pdriver
);
-BOOL
+BOOLEAN
gendrv_if_driver_destroy(
PUSB_DEV_MANAGER dev_mgr,
PUSB_DRIVER pdriver
);
-BOOL hub_driver_init(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver);
-BOOL hub_driver_destroy(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver);
-BOOL hub_remove_reset_event(PUSB_DEV pdev, ULONG port_idx, BOOL from_dpc);
-BOOL hub_start_next_reset_port(PUSB_DEV_MANAGER dev_mgr, BOOL from_dpc);
+BOOLEAN hub_driver_init(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver);
+BOOLEAN hub_driver_destroy(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver);
+BOOLEAN hub_remove_reset_event(PUSB_DEV pdev, ULONG port_idx, BOOLEAN from_dpc);
+BOOLEAN hub_start_next_reset_port(PUSB_DEV_MANAGER dev_mgr, BOOLEAN from_dpc);
+NTSTATUS hub_start_int_request(PUSB_DEV pdev);
#endif
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/irplist.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/irplist.h (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/irplist.h Thu Aug 24 16:58:52 2006
@@ -21,7 +21,7 @@
} IRP_LIST, *PIRP_LIST;
-BOOL
+BOOLEAN
init_irp_list(
PIRP_LIST irp_list
);
@@ -31,7 +31,7 @@
PIRP_LIST irp_list
);
-BOOL
+BOOLEAN
add_irp_to_list(
PIRP_LIST irp_list,
PIRP pirp,
@@ -45,12 +45,12 @@
struct _USB_DEV_MANAGER *dev_mgr
);
-BOOL
+BOOLEAN
irp_list_empty(
PIRP_LIST irp_list
);
-BOOL
+BOOLEAN
irp_list_full(
PIRP_LIST irp_list
);
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/roothub.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/roothub.c (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/roothub.c Thu Aug 24 16:58:52 2006
@@ -23,7 +23,7 @@
//----------------------------------------------------------
-BOOL
+BOOLEAN
rh_driver_destroy(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver)
{
LONG i;
@@ -42,7 +42,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
rh_driver_init(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver)
{
@@ -54,8 +54,6 @@
PUSB_INTERFACE pif;
PUSB_ENDPOINT pendp;
PHUB2_EXTENSION phub_ext;
- PTIMER_SVC ptimer;
- PURB purb;
NTSTATUS status;
PHCD hcd;
LONG i;
@@ -248,11 +246,10 @@
//to be the reverse of what init does, we assume that the timer is now killed
//int is disconnected and the hub thread will not process event anymore
-BOOL
+BOOLEAN
rh_destroy(PUSB_DEV pdev)
{
PUSB_DEV rh;
- PLIST_ENTRY pthis, pnext;
PUSB_DEV_MANAGER dev_mgr;
if (pdev == NULL)
@@ -275,11 +272,9 @@
VOID
rh_timer_svc_int_completion(PUSB_DEV pdev, PVOID context)
{
- PUSB_EVENT pevent;
PURB purb;
- ULONG status, i;
PHCD hcd;
- USE_IRQL;
+ USE_BASIC_NON_PENDING_IRQL;
if (pdev == NULL || context == NULL)
return;
@@ -332,13 +327,12 @@
{
PURB purb;
ULONG i;
- USHORT port_num;
PHUB2_EXTENSION hub_ext;
PLIST_ENTRY pthis, pnext;
PUSB_DEV_MANAGER dev_mgr;
PUSB_CTRL_SETUP_PACKET psetup;
- USE_IRQL;
+ USE_BASIC_NON_PENDING_IRQL;
if (pdev == NULL || context == NULL)
return;
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/td.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/td.c (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/td.c Thu Aug 24 16:58:52 2006
@@ -23,17 +23,16 @@
#define UHCI_MIN_TD_POOLS 4
-BOOL free_td_to_pool(PUHCI_TD_POOL ptd_pool, PUHCI_TD ptd); //add tds till pnext ==
NULL
+BOOLEAN free_td_to_pool(PUHCI_TD_POOL ptd_pool, PUHCI_TD ptd); //add tds till pnext
== NULL
PUHCI_QH alloc_qh(PUHCI_QH_POOL pqh_pool); //null if failed
-BOOL
+BOOLEAN
init_td_pool(PUHCI_TD_POOL ptd_pool)
{
int i, pages;
PTD_EXTENSION ptde;
- PHYSICAL_ADDRESS phys_addr;
if (ptd_pool == NULL)
return FALSE;
@@ -109,7 +108,7 @@
}
//add tds till pnext == NULL
-BOOL
+BOOLEAN
free_td_to_pool(PUHCI_TD_POOL ptd_pool, PUHCI_TD ptd)
{
if (ptd_pool == NULL || ptd == NULL)
@@ -159,7 +158,7 @@
}
//test whether the pool is all free
-BOOL
+BOOLEAN
is_pool_free(PUHCI_TD_POOL pool)
{
if (pool == NULL)
@@ -171,7 +170,7 @@
return FALSE;
}
-BOOL
+BOOLEAN
is_pool_empty(PUHCI_TD_POOL pool)
{
if (pool == NULL)
@@ -180,7 +179,7 @@
return (pool->free_count == 0);
}
-BOOL
+BOOLEAN
destroy_td_pool(PUHCI_TD_POOL ptd_pool)
{
int i, pages;
@@ -213,7 +212,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
init_td_pool_list(PUHCI_TD_POOL_LIST pool_list, PADAPTER_OBJECT padapter)
{
int i;
@@ -234,7 +233,7 @@
return expand_pool_list(pool_list, UHCI_MIN_TD_POOLS);
}
-BOOL
+BOOLEAN
destroy_td_pool_list(PUHCI_TD_POOL_LIST pool_list)
{
PUHCI_TD_POOL pool;
@@ -248,7 +247,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
expand_pool_list(PUHCI_TD_POOL_LIST pool_list, LONG pool_count) //private
{
PUHCI_TD_POOL pool;
@@ -279,7 +278,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
collect_garbage(PUHCI_TD_POOL_LIST pool_list)
{
PLIST_ENTRY prev, next;
@@ -329,7 +328,7 @@
}
//add tds till pnext == NULL
-BOOL
+BOOLEAN
free_td(PUHCI_TD_POOL_LIST pool_list, PUHCI_TD ptd)
{
if (pool_list == NULL || ptd == NULL)
@@ -443,7 +442,7 @@
-BOOL
+BOOLEAN
can_transfer(PUHCI_TD_POOL_LIST pool_list, LONG td_count)
{
if (td_count > get_max_free_tds(pool_list))
@@ -453,7 +452,7 @@
}
VOID
-lock_td_pool(PUHCI_TD_POOL_LIST pool_list, BOOL at_dpc)
+lock_td_pool(PUHCI_TD_POOL_LIST pool_list, BOOLEAN at_dpc)
{
//if( !at_dpc )
// KeAcquireSpinLock( &pool_list->pool_lock );
@@ -462,7 +461,7 @@
}
VOID
-unlock_td_pool(PUHCI_TD_POOL_LIST pool_list, BOOL at_dpc)
+unlock_td_pool(PUHCI_TD_POOL_LIST pool_list, BOOLEAN at_dpc)
{
//if( !at_dpc )
// KeReleaseSpinLock( &pool_list->pool_lock );
@@ -470,7 +469,7 @@
// KeReleaseSpinLockFromDpcLevel( &pool_list->pool_lock );
}
-BOOL
+BOOLEAN
init_qh_pool(PUHCI_QH_POOL pqh_pool, PADAPTER_OBJECT padapter)
{
PQH_EXTENSION pqhe;
@@ -526,7 +525,7 @@
}
//add qhs till pnext == NULL
-BOOL
+BOOLEAN
free_qh(PUHCI_QH_POOL pqh_pool, PUHCI_QH pqh)
{
if (pqh_pool == NULL || pqh == NULL)
@@ -564,11 +563,9 @@
}
-BOOL
+BOOLEAN
destroy_qh_pool(PUHCI_QH_POOL pqh_pool)
{
- int i;
-
if (pqh_pool)
{
usb_free_mem(pqh_pool->qhe_array);
@@ -587,7 +584,7 @@
}
VOID
-lock_qh_pool(PUHCI_QH_POOL pool, BOOL at_dpc)
+lock_qh_pool(PUHCI_QH_POOL pool, BOOLEAN at_dpc)
{
//if( !at_dpc )
// KeAcquireSpinLock( &pool->pool_lock );
@@ -596,7 +593,7 @@
}
VOID
-unlock_qh_pool(PUHCI_QH_POOL pool, BOOL at_dpc)
+unlock_qh_pool(PUHCI_QH_POOL pool, BOOLEAN at_dpc)
{
//if( !at_dpc )
// KeReleaseSpinLock( &pool->pool_lock );
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/td.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/td.h (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/td.h Thu Aug 24 16:58:52 2006
@@ -5,7 +5,6 @@
#ifndef __UHCI_H__
#define __UHCI_H__
-#define BOOL ULONG
#define LIST_HEAD LIST_ENTRY
#define PLIST_HEAD PLIST_ENTRY
#define BYTE UCHAR
@@ -230,12 +229,12 @@
} UHCI_TD_POOL, *PUHCI_TD_POOL;
-BOOL
+BOOLEAN
init_td_pool(
PUHCI_TD_POOL pool
);
-BOOL
+BOOLEAN
free_td_to_pool(
PUHCI_TD_POOL pool,
PUHCI_TD ptd
@@ -246,17 +245,17 @@
PUHCI_TD_POOL ptd_pool
); //null if failed]
-BOOL
+BOOLEAN
is_pool_free(
PUHCI_TD_POOL pool
); //test whether the pool is all free
-BOOL
+BOOLEAN
is_pool_full(
PUHCI_TD_POOL pool
);
-BOOL
+BOOLEAN
destroy_td_pool(
PUHCI_TD_POOL pool
);
@@ -272,44 +271,44 @@
} UHCI_TD_POOL_LIST, *PUHCI_TD_POOL_LIST;
-BOOL
+BOOLEAN
init_td_pool_list(
PUHCI_TD_POOL_LIST pool_list,
PADAPTER_OBJECT padapter
);
-BOOL
+BOOLEAN
destroy_td_pool_list(
PUHCI_TD_POOL_LIST pool_list
);
-BOOL
+BOOLEAN
expand_pool_list(
PUHCI_TD_POOL_LIST pool_list,
LONG pool_count
); //private
-BOOL
+BOOLEAN
collect_garbage(
PUHCI_TD_POOL_LIST pool_list
);
-static LONG
+LONG
get_free_tds(
PUHCI_TD_POOL_LIST pool_list
); //private
-static LONG
+LONG
get_max_free_tds(
PUHCI_TD_POOL_LIST pool_list
); //private
-BOOL
+BOOLEAN
can_transfer(
PUHCI_TD_POOL_LIST pool_list,
LONG td_count);
-BOOL
+BOOLEAN
free_td(
PUHCI_TD_POOL_LIST pool_list,
PUHCI_TD ptd
@@ -323,13 +322,13 @@
VOID
lock_td_pool(
PUHCI_TD_POOL_LIST pool_list,
-BOOL at_dpc
+BOOLEAN at_dpc
);
VOID
unlock_td_pool(
PUHCI_TD_POOL_LIST pool_list,
-BOOL at_dpc
+BOOLEAN at_dpc
);
typedef struct _UHCI_QH
@@ -371,13 +370,13 @@
} UHCI_QH_POOL, *PUHCI_QH_POOL;
-BOOL
+BOOLEAN
init_qh_pool(
PUHCI_QH_POOL pool,
PADAPTER_OBJECT padapter
);
-BOOL
+BOOLEAN
free_qh(
PUHCI_QH_POOL pool,
PUHCI_QH ptd
@@ -388,7 +387,7 @@
PUHCI_QH_POOL pool
); //null if failed
-BOOL
+BOOLEAN
destroy_qh_pool(
PUHCI_QH_POOL pool
);
@@ -396,13 +395,13 @@
VOID
lock_qh_pool(
PUHCI_QH_POOL pool,
-BOOL at_dpc
+BOOLEAN at_dpc
);
VOID
unlock_qh_pool(
PUHCI_QH_POOL pool,
-BOOL at_dpc
+BOOLEAN at_dpc
);
/*
@@ -421,6 +420,7 @@
* and we should meet that frequency when requested to do so.
* This will require some change(s) to the UHCI skeleton.
*/
+#if 0
static int __interval_to_skel(int interval)
{
if (interval < 16) {
@@ -442,6 +442,7 @@
return 6; /* int64 for 64-127 ms */
return 7; /* int128 for 128-255 ms (Max.) */
}
+#endif
#define USB_ENDP_FLAG_BUSY_MASK 0x0000ff00
#define USB_ENDP_FLAG_STAT_MASK 0xff
@@ -615,12 +616,12 @@
} UHCI_PENDING_ENDP_POOL, *PUHCI_PENDING_ENDP_POOL;
-BOOL
+BOOLEAN
init_pending_endp_pool(
PUHCI_PENDING_ENDP_POOL pool
);
-BOOL
+BOOLEAN
free_pending_endp(
PUHCI_PENDING_ENDP_POOL pool,
PUHCI_PENDING_ENDP pending_endp
@@ -632,7 +633,7 @@
LONG count
);
-BOOL
+BOOLEAN
destroy_pending_endp_pool(
PUHCI_PENDING_ENDP_POOL pool
);
@@ -662,7 +663,7 @@
typedef struct _UHCI
{
PHYSICAL_ADDRESS uhci_reg_base; // io space
- BOOL port_mapped;
+ BOOLEAN port_mapped;
PBYTE port_base;
PHYSICAL_ADDRESS io_buf_logic_addr;
@@ -836,25 +837,25 @@
PUHCI_TD ptd
);
-BOOL
+BOOLEAN
uhci_init(
PUHCI_DEV uhci,
PADAPTER_OBJECT padapter
);
-BOOL
+BOOLEAN
uhci_destroy(
PUHCI_DEV uhci
);
// funcitons exported to dev-manager
-BOOL
+BOOLEAN
uhci_add_device(
PUHCI_DEV uhci,
PUSB_DEV dev
);
-BOOL
+BOOLEAN
uhci_remove_device(
PUHCI_DEV uhci,
PUSB_DEV dev
@@ -869,6 +870,7 @@
PVOID sysarg2
);
+#if 0
static VOID
uhci_flush_adapter_buf()
{
@@ -876,6 +878,7 @@
__asm invd;
#endif
}
+#endif
NTSTATUS
uhci_submit_urb(
@@ -886,31 +889,31 @@
);
//must have dev_lock acquired
-static NTSTATUS
+NTSTATUS
uhci_internal_submit_bulk(
PUHCI_DEV uhci,
struct _URB *urb
);
-static NTSTATUS
+NTSTATUS
uhci_internal_submit_iso(
PUHCI_DEV uhci,
struct _URB *urb
);
-static NTSTATUS
+NTSTATUS
uhci_internal_submit_ctrl(
PUHCI_DEV uhci,
struct _URB *urb
);
-static NTSTATUS
+NTSTATUS
uhci_internal_submit_int(
PUHCI_DEV uhci,
struct _URB *urb
);
-static BOOL
+BOOLEAN
uhci_remove_bulk_from_schedule(
PUHCI_DEV uhci,
struct _URB *urb
@@ -918,61 +921,61 @@
#define uhci_remove_ctrl_from_schedule uhci_remove_bulk_from_schedule
-static BOOL
+BOOLEAN
uhci_remove_iso_from_schedule(
PUHCI_DEV uhci,
struct _URB *urb
);
-static BOOL
+BOOLEAN
uhci_remove_int_from_schedule(
PUHCI_DEV uhci,
struct _URB *urb
);
-static BOOL
+BOOLEAN
uhci_remove_urb_from_schedule(
PUHCI_DEV uhci,
struct _URB *urb
);
-static BOOL
+BOOLEAN
uhci_is_xfer_finished( //will set urb error code here
struct _URB *urb
);
-static NTSTATUS
+NTSTATUS
uhci_set_error_code(
struct _URB *urb,
ULONG raw_status
);
-static BOOL
+BOOLEAN
uhci_insert_tds_qh(
PUHCI_QH pqh,
PUHCI_TD td_chain
);
-static BOOL
+BOOLEAN
uhci_insert_qh_urb(
struct _URB *urb,
PUHCI_QH qh_chain
);
-static BOOL
+BOOLEAN
uhci_insert_urb_schedule(
PUHCI_DEV uhci,
struct _URB *urb
);
-static BOOL
+BOOLEAN
uhci_claim_bandwidth(
PUHCI_DEV uhci,
struct _URB *urb,
-BOOL claim_bw
-);
-
-static BOOL
+BOOLEAN claim_bw
+);
+
+BOOLEAN
uhci_process_pending_endp(
PUHCI_DEV uhci
);
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/uhci.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/uhci.c (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/uhci.c Thu Aug 24 16:58:52 2006
@@ -108,15 +108,15 @@
PDEVICE_OBJECT
uhci_alloc(PDRIVER_OBJECT drvr_obj, PUNICODE_STRING reg_path, ULONG bus_addr,
PUSB_DEV_MANAGER dev_mgr);
-BOOL uhci_init_schedule(PUHCI_DEV uhci, PADAPTER_OBJECT padapter);
-
-BOOL uhci_release(PDEVICE_OBJECT pdev);
+BOOLEAN uhci_init_schedule(PUHCI_DEV uhci, PADAPTER_OBJECT padapter);
+
+BOOLEAN uhci_release(PDEVICE_OBJECT pdev);
static VOID uhci_stop(PUHCI_DEV uhci);
-BOOL uhci_destroy_schedule(PUHCI_DEV uhci);
-
-BOOL NTAPI uhci_sync_insert_urb_schedule(PVOID context);
+BOOLEAN uhci_destroy_schedule(PUHCI_DEV uhci);
+
+BOOLEAN NTAPI uhci_sync_insert_urb_schedule(PVOID context);
VOID uhci_init_hcd_interface(PUHCI_DEV uhci);
@@ -148,7 +148,7 @@
return;
}
-BOOL
+BOOLEAN
init_pending_endp_pool(PUHCI_PENDING_ENDP_POOL pool)
{
int i;
@@ -171,7 +171,7 @@
}
-BOOL
+BOOLEAN
free_pending_endp(PUHCI_PENDING_ENDP_POOL pool, PUHCI_PENDING_ENDP pending_endp)
{
if (pool == NULL || pending_endp == NULL)
@@ -201,7 +201,7 @@
return new;
}
-BOOL
+BOOLEAN
destroy_pending_endp_pool(PUHCI_PENDING_ENDP_POOL pool)
{
if (pool == NULL)
@@ -227,7 +227,7 @@
td->buffer = buffer;
}
-BOOL
+BOOLEAN
uhci_insert_td_fl(PUHCI_TD prev_td, PUHCI_TD ptd)
{
PLIST_ENTRY temp_entry;
@@ -244,7 +244,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
uhci_remove_td_fl(PUHCI_TD ptd)
{
PUHCI_TD prev_td;
@@ -261,7 +261,7 @@
return FALSE;
}
-BOOL
+BOOLEAN
uhci_insert_qh_fl(PVOID prev_item, PUHCI_QH pqh)
{
//only horizontal link allowed
@@ -295,7 +295,7 @@
return FALSE;
}
-BOOL
+BOOLEAN
uhci_remove_qh_fl(PUHCI_QH pqh)
{
PVOID prev_item;
@@ -326,7 +326,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
uhci_init_frame_list(PUHCI_DEV uhci, PADAPTER_OBJECT padapter)
{
int i;
@@ -373,7 +373,7 @@
}
-BOOL
+BOOLEAN
uhci_destroy_frame_list(PUHCI_DEV uhci)
{
if (uhci == NULL)
@@ -472,7 +472,7 @@
return pdev;
}
-BOOL
+BOOLEAN
uhci_delete_device(PDEVICE_OBJECT pdev)
{
STRING string;
@@ -864,7 +864,7 @@
return pdev;
}
-BOOL
+BOOLEAN
uhci_release(PDEVICE_OBJECT pdev)
{
PDEVICE_EXTENSION pdev_ext;
@@ -909,7 +909,7 @@
// send cmds to start the uhc
// shamelessly copied from linux's uhci.c
-BOOL
+BOOLEAN
uhci_start(PHCD hcd)
{
PUHCI_DEV uhci;
@@ -1007,7 +1007,7 @@
}
-BOOL
+BOOLEAN
uhci_init_schedule(PUHCI_DEV uhci, PADAPTER_OBJECT padapter)
{
int i, irq;
@@ -1112,10 +1112,10 @@
return TRUE;
}
-BOOL
+BOOLEAN
uhci_destroy_schedule(PUHCI_DEV uhci)
{
- BOOL ret;
+ BOOLEAN ret;
ret = uhci_destroy_frame_list(uhci);
ret = destroy_qh_pool(&uhci->qh_pool);
@@ -1155,7 +1155,7 @@
return;
}
-BOOL
+BOOLEAN
uhci_process_pending_endp(PUHCI_DEV uhci)
{
PUSB_DEV pdev;
@@ -1163,7 +1163,7 @@
PLIST_ENTRY pthis;
PURB purb;
PUSB_ENDPOINT pendp;
- BOOL can_submit = FALSE;
+ NTSTATUS can_submit = STATUS_UNSUCCESSFUL;
PWORK_QUEUE_ITEM pwork_item;
PLIST_ENTRY cancel_list;
USE_IRQL;
@@ -1519,7 +1519,7 @@
PUSB_DEV pdev;
PUSB_ENDPOINT pendp;
- BOOL finished;
+ BOOLEAN finished;
LONG i, j;
ULONG uhci_status, urb_status, toggle = 0;
@@ -1731,7 +1731,7 @@
return;
}
-BOOL
+BOOLEAN
uhci_add_device(PUHCI_DEV uhci, PUSB_DEV dev)
{
if (dev == NULL || uhci == NULL)
@@ -1777,7 +1777,7 @@
return (UCHAR) (sync_param->ret = TRUE);
}
-BOOL
+BOOLEAN
uhci_remove_device(PUHCI_DEV uhci, PUSB_DEV dev)
{
PUHCI_PENDING_ENDP ppending_endp;
@@ -1892,7 +1892,7 @@
PUHCI_TD ptd;
PUHCI_QH pqh;
LIST_ENTRY td_list, *pthis, *pnext;
- BOOL old_toggle, toggle, ret;
+ BOOLEAN old_toggle, toggle, ret;
UCHAR pid;
if (uhci == NULL || urb == NULL)
@@ -2043,7 +2043,7 @@
PUHCI_QH pqh;
ULONG dev_addr;
PUSB_DEV pdev;
- BOOL ret;
+ BOOLEAN ret;
if (uhci == NULL || urb == NULL)
return STATUS_INVALID_PARAMETER;
@@ -2216,7 +2216,7 @@
LONG toggle = 0;
LONG max_packet_size;
PUHCI_TD ptd;
- BOOL ret;
+ BOOLEAN ret;
if (uhci == NULL || urb == NULL)
return STATUS_INVALID_PARAMETER;
@@ -2312,7 +2312,7 @@
PUHCI_TD ptd;
LIST_ENTRY td_list, *pthis, *pnext;
int i;
- BOOL toggle, ret;
+ BOOLEAN toggle, ret;
if (uhci == NULL || urb == NULL)
return STATUS_INVALID_PARAMETER;
@@ -2406,12 +2406,12 @@
}
// runs in uhci_isr
-BOOL
+BOOLEAN
uhci_is_xfer_finished(PURB urb)
{
PLIST_ENTRY pthis, pnext;
PUHCI_TD ptd;
- BOOL ret = TRUE;
+ BOOLEAN ret = TRUE;
PTD_EXTENSION ptde;
if (urb->last_finished_td == NULL)
@@ -2472,10 +2472,10 @@
// never try to acquire any spin-lock
// remove the bulk urb from schedule, and mark it not in
// the schedule
-BOOL
+BOOLEAN
uhci_remove_urb_from_schedule(PUHCI_DEV uhci, PURB urb)
{
- BOOL ret = FALSE;
+ BOOLEAN ret = FALSE;
{
switch (urb->pipe & USB_ENDPOINT_XFERTYPE_MASK)
{
@@ -2508,7 +2508,7 @@
// never try to acquire any spin-lock
// remove the bulk urb from schedule, and mark it not in
// the schedule
-BOOL
+BOOLEAN
uhci_remove_bulk_from_schedule(PUHCI_DEV uhci, PURB urb)
{
@@ -2559,7 +2559,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
uhci_remove_iso_from_schedule(PUHCI_DEV uhci, PURB urb)
{
PUHCI_TD ptd, pprev_td;
@@ -2600,7 +2600,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
uhci_remove_int_from_schedule(PUHCI_DEV uhci, PURB urb)
{
PUHCI_TD ptd, pnext_td, pprev_td;
@@ -2649,7 +2649,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
uhci_insert_tds_qh(PUHCI_QH pqh, PUHCI_TD td_chain)
{
if (pqh == NULL || td_chain == NULL)
@@ -2660,7 +2660,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
uhci_insert_qh_urb(PURB urb, PUHCI_QH qh_chain)
{
if (urb == NULL || qh_chain == NULL)
@@ -2672,7 +2672,7 @@
}
// must have dev_lock and frame_list_lock acquired
-BOOL
+BOOLEAN
uhci_insert_urb_schedule(PUHCI_DEV uhci, PURB urb)
{
PUHCI_QH pqh, pskel_qh, pnext_qh;
@@ -2811,7 +2811,7 @@
}
//this function used as the KeSynchronizeExecution param to delegate control to
uhci_insert_urb_schedule
-BOOL NTAPI
+BOOLEAN NTAPI
uhci_sync_insert_urb_schedule(PVOID context)
{
PSYNC_PARAM sync_param;
@@ -2832,15 +2832,15 @@
}
// be sure pending_endp_list_lock acquired
-BOOL
+BOOLEAN
uhci_claim_bandwidth(PUHCI_DEV uhci,
PURB urb,
- BOOL claim_bw //true to claim bandwidth, false to free bandwidth
+ BOOLEAN claim_bw //true to claim bandwidth, false to free
bandwidth
)
{
UCHAR type;
- BOOL ls, can_alloc;
+ BOOLEAN ls, can_alloc;
LONG bus_time, us;
LONG i, idx, j, start_frame, interval;
@@ -2962,7 +2962,7 @@
PSYNC_PARAM sync_param;
PURB purb2, dest_urb;
PLIST_ENTRY pthis, pnext;
- BOOL found = FALSE;
+ BOOLEAN found = FALSE;
if (context == NULL)
return FALSE;
@@ -2998,7 +2998,7 @@
uhci_cancel_urb(PUHCI_DEV uhci, PUSB_DEV pdev, PUSB_ENDPOINT pendp, PURB purb)
{
PLIST_ENTRY pthis, pnext;
- BOOL found;
+ BOOLEAN found;
PURB purb2;
SYNC_PARAM sync_param;
@@ -3415,7 +3415,7 @@
}
//must have rh dev_lock acquired
-BOOL
+BOOLEAN
uhci_rh_reset_port(PHCD hcd, UCHAR port_idx)
{
LONG i;
@@ -3602,7 +3602,7 @@
return;
}
-BOOL
+BOOLEAN
uhci_remove_device2(struct _HCD * hcd, PUSB_DEV pdev)
{
if (hcd == NULL || pdev == NULL)
@@ -3611,7 +3611,7 @@
return uhci_remove_device(uhci_from_hcd(hcd), pdev);
}
-BOOL
+BOOLEAN
uhci_hcd_release(struct _HCD * hcd)
{
PUHCI_DEV uhci;
@@ -3638,7 +3638,7 @@
return uhci_cancel_urb(uhci, pdev, pendp, purb);
}
-BOOL
+BOOLEAN
uhci_rh_get_dev_change(PHCD hcd, PBYTE buf)
{
PUHCI_DEV uhci;
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/umss.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/umss.c (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/umss.c Thu Aug 24 16:58:52 2006
@@ -21,12 +21,6 @@
#include "usbdriver.h"
-// Hack for __field_ecount for a new WDK
-//FIXME: Move to a header file later
-#ifndef __field_ecount
-# define __field_ecount(x)
-#endif
-
#include <srb.h>
#include <ntddscsi.h>
#include <scsi.h>
@@ -69,32 +63,19 @@
IN ACCESS_MASK DesiredAccess OPTIONAL,
IN OUT PVOID ParseContext OPTIONAL, OUT PHANDLE Handle);
-VOID umss_start_io(IN PDEVICE_OBJECT dev_obj, IN PIRP irp);
-
+VOID NTAPI umss_start_io(IN PDEVICE_OBJECT dev_obj, IN PIRP irp);
NTSTATUS umss_port_dispatch_routine(PDEVICE_OBJECT pdev_obj, PIRP irp);
-
-BOOL umss_connect(PCONNECT_DATA dev_mgr, DEV_HANDLE dev_handle);
-
-BOOL umss_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
-
-BOOL umss_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
-
+BOOLEAN umss_connect(PCONNECT_DATA dev_mgr, DEV_HANDLE dev_handle);
+BOOLEAN umss_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
+BOOLEAN umss_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
NTSTATUS umss_dispatch_routine(PDEVICE_OBJECT pdev_obj, PIRP irp);
-
VOID umss_set_cfg_completion(PURB purb, PVOID pcontext);
-
-VOID umss_start_create_device(IN PVOID Parameter);
-
-BOOL umss_delete_device(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdrvr, PDEVICE_OBJECT
dev_obj, BOOL is_if);
-
-BOOL umss_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
-
+VOID NTAPI umss_start_create_device(IN PVOID Parameter);
+BOOLEAN umss_delete_device(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdrvr, PDEVICE_OBJECT
dev_obj, BOOLEAN is_if);
+BOOLEAN umss_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle);
NTSTATUS umss_process_srb(PDEVICE_OBJECT dev_obj, PIRP irp);
-
VOID umss_load_class_driver(PVOID context);
-
-BOOL umss_tsc_to_sff(PIO_PACKET io_packet);
-
+BOOLEAN umss_tsc_to_sff(PIO_PACKET io_packet);
VOID umss_fix_sff_result(PIO_PACKET io_packet, SCSI_REQUEST_BLOCK * srb);
PDEVICE_OBJECT
@@ -152,7 +133,7 @@
return pdev;
}
-BOOL
+BOOLEAN
umss_delete_port_device(PDEVICE_OBJECT dev_obj)
{
UCHAR dev_name[64];
@@ -184,14 +165,11 @@
NTSTATUS
umss_port_dispatch_routine(PDEVICE_OBJECT pdev_obj, PIRP irp)
{
- KIRQL irql;
ULONG ctrl_code;
NTSTATUS status;
PIO_STACK_LOCATION irp_stack;
PUMSS_PORT_DEV_EXT pdev_ext;
PUMSS_DRVR_EXTENSION pdrvr_ext;
-
- USE_IRQL;
if (pdev_obj == NULL || irp == NULL)
return STATUS_INVALID_PARAMETER;
@@ -246,12 +224,10 @@
EXIT_DISPATCH(STATUS_INVALID_DEVICE_REQUEST, irp);
}
-BOOL
+BOOLEAN
umss_driver_init(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver)
{
PUMSS_DRVR_EXTENSION pdrvr_ext;
- UNICODE_STRING unicode_string;
- NTSTATUS status;
if (dev_mgr == NULL || pdriver == NULL)
return FALSE;
@@ -306,7 +282,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
umss_driver_destroy(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver)
{
PUMSS_DRVR_EXTENSION pdrvr_ext;
@@ -326,7 +302,7 @@
}
PDEVICE_OBJECT
-umss_create_device(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER umss_drvr, DEV_HANDLE
dev_handle, BOOL is_if)
+umss_create_device(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER umss_drvr, DEV_HANDLE
dev_handle, BOOLEAN is_if)
{
UCHAR dev_name[64], dev_id;
@@ -407,7 +383,7 @@
return pdev;
}
-BOOL
+BOOLEAN
umss_connect(PCONNECT_DATA param, DEV_HANDLE dev_handle)
{
PURB purb;
@@ -529,7 +505,7 @@
ExQueueWorkItem(pwork_item, DelayedWorkQueue);
}
-VOID
+VOID NTAPI
umss_start_create_device(IN PVOID Parameter)
{
LONG i;
@@ -546,7 +522,7 @@
PUMSS_DEVICE_EXTENSION pdev_ext;
PUSB_CONFIGURATION_DESC pconfig_desc;
- USE_IRQL;
+ USE_BASIC_NON_PENDING_IRQL;
if (Parameter == NULL)
return;
@@ -651,13 +627,13 @@
return;
}
-BOOL
+BOOLEAN
umss_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle)
{
return TRUE;
}
-BOOL
+BOOLEAN
umss_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE dev_handle)
{
PDEVICE_OBJECT dev_obj;
@@ -727,14 +703,12 @@
return;
}
-BOOL
-umss_delete_device(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdrvr, PDEVICE_OBJECT dev_obj,
BOOL is_if)
+BOOLEAN
+umss_delete_device(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdrvr, PDEVICE_OBJECT dev_obj,
BOOLEAN is_if)
{
UCHAR dev_name[64];
STRING string;
UNICODE_STRING symb_link;
-
- NTSTATUS status;
PUMSS_DEVICE_EXTENSION pdev_ext;
PUMSS_DRVR_EXTENSION pdrvr_ext;
@@ -827,9 +801,9 @@
}
VOID
+NTAPI
umss_start_io(IN PDEVICE_OBJECT dev_obj, IN PIRP irp)
{
- KIRQL irql;
ULONG ctrl_code;
NTSTATUS status;
PIO_STACK_LOCATION irp_stack;
@@ -837,8 +811,6 @@
IO_PACKET io_packet;
PUSER_IO_PACKET user_io_packet;
- USE_IRQL;
-
if (dev_obj == NULL || irp == NULL)
return;
@@ -865,8 +837,6 @@
case IOCTL_UMSS_SUBMIT_CDB_OUT:
case IOCTL_UMSS_SUBMIT_CDB:
{
- PUSB_DEV pdev;
-
if (irp_stack->Parameters.DeviceIoControl.InputBufferLength <
sizeof(USER_IO_PACKET))
{
UMSS_COMPLETE_START_IO(dev_obj, STATUS_INVALID_PARAMETER, irp);
@@ -1012,13 +982,11 @@
NTSTATUS
umss_dispatch_routine(PDEVICE_OBJECT pdev_obj, PIRP irp)
{
- KIRQL irql;
ULONG ctrl_code;
NTSTATUS status;
PIO_STACK_LOCATION irp_stack;
PUMSS_DEVICE_EXTENSION pdev_ext;
-
- USE_IRQL;
+ USE_BASIC_NON_PENDING_IRQL;
if (pdev_obj == NULL || irp == NULL)
return STATUS_INVALID_PARAMETER;
@@ -1049,7 +1017,6 @@
{
PDEVICE_OBJECT fdo;
PUSB_DEV pdev;
- USE_IRQL;
if (irp_stack->Parameters.DeviceIoControl.InputBufferLength <
sizeof(PDEVICE_OBJECT))
{
@@ -1125,8 +1092,6 @@
}
case IOCTL_GET_DEV_HANDLE:
{
- PUCHAR user_buffer;
- ULONG user_buffer_length;
if (irp_stack->Parameters.DeviceIoControl.OutputBufferLength <
sizeof(LONG))
EXIT_DISPATCH(STATUS_INVALID_PARAMETER, irp);
@@ -1285,7 +1250,6 @@
{
NTSTATUS status;
PUSB_DEV pdev;
- PUSB_ENDPOINT pendp;
if (pdev_ext == NULL)
return STATUS_INVALID_PARAMETER;
@@ -1306,7 +1270,7 @@
return status;
}
-BOOL
+BOOLEAN
umss_gen_result_srb(PIO_PACKET io_packet, PSCSI_REQUEST_BLOCK srb, NTSTATUS status)
{
@@ -1395,7 +1359,7 @@
return TRUE;
}
-BOOL
+BOOLEAN
umss_gen_result_ctrl(PDEVICE_OBJECT dev_obj, PIRP irp, NTSTATUS status)
{
PIO_STACK_LOCATION irp_stack;
@@ -1508,7 +1472,7 @@
return;
}
-BOOL
+BOOLEAN
umss_if_connect(PCONNECT_DATA params, DEV_HANDLE if_handle)
{
PURB purb;
@@ -1524,9 +1488,9 @@
PUSB_DEV_MANAGER dev_mgr;
PUSB_ENDPOINT_DESC pendp_desc;
PUMSS_DRVR_EXTENSION pdrvr_ext;
-
PDEVICE_OBJECT pdev_obj;
- USE_IRQL;
+ USE_BASIC_NON_PENDING_IRQL;
+
//configuration is already set
purb = NULL;
desc_buf = NULL;
@@ -1702,7 +1666,7 @@
return FALSE;
}
-BOOL
+BOOLEAN
umss_if_disconnect(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE if_handle)
{
LONG if_idx;
@@ -1748,7 +1712,7 @@
return umss_delete_device(dev_mgr, pdrvr, dev_obj, TRUE);
}
-BOOL
+BOOLEAN
umss_if_stop(PUSB_DEV_MANAGER dev_mgr, DEV_HANDLE if_handle)
{
LONG if_idx;
@@ -1758,8 +1722,7 @@
PDEVICE_OBJECT dev_obj = NULL;
PUMSS_DRVR_EXTENSION pdrvr_ext;
PUMSS_DEVICE_EXTENSION pdev_ext;
-
- USE_IRQL;
+ USE_BASIC_NON_PENDING_IRQL;
if (dev_mgr == NULL || if_handle == 0)
return FALSE;
@@ -1813,12 +1776,10 @@
("umss_load_class_driver(): try to load class driver,
status=0x%x\n", status));
}
-BOOL
+BOOLEAN
umss_if_driver_init(PUSB_DEV_MANAGER dev_mgr, PUSB_DRIVER pdriver)
{
PUMSS_DRVR_EXTENSION pdrvr_ext;
- UNICODE_STRING unicode_string;
- NTSTATUS status;
if (dev_mgr == NULL || pdriver == NULL)
return FALSE;
@@ -1890,7 +1851,7 @@
{
PUMSS_DRVR_EXTENSION drvr_ext;
ULONG if_idx;
- USE_IRQL;
+ USE_BASIC_NON_PENDING_IRQL;
if_idx = if_idx_from_handle(if_handle);
if (if_idx >= 4) // max interfaces per config supports. defined in
td.h
@@ -1923,7 +1884,7 @@
return &drvr_ext->class_driver_info;
}
-VOID
+VOID NTAPI
umss_worker(IN PVOID reference)
{
PUMSS_WORKER_PACKET worker_packet;
@@ -1962,11 +1923,11 @@
FALSE if work item not queued
--*/
-BOOL
+BOOLEAN
umss_schedule_workitem(PVOID context,
UMSS_WORKER_ROUTINE completion, PUSB_DEV_MANAGER dev_mgr,
DEV_HANDLE dev_handle)
{
- BOOL ret_val = TRUE;
+ BOOLEAN ret_val = TRUE;
PWORK_QUEUE_ITEM workitem;
PUMSS_WORKER_PACKET worker_packet;
@@ -2205,7 +2166,7 @@
return status;
}
-BOOL
+BOOLEAN
umss_tsc_to_sff(PIO_PACKET io_packet)
{
if (io_packet == NULL)
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/umss.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/umss.h (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/umss.h Thu Aug 24 16:58:52 2006
@@ -234,7 +234,7 @@
KEVENT sync_event; //for umss_sync_submit_urb
KSPIN_LOCK dev_lock;
IO_PACKET io_packet;
- BOOL retry;
+ BOOLEAN retry;
PUSB_DRIVER pdriver; //used by umss_delete_device
NTSTATUS reset_pipe_status;
@@ -263,19 +263,19 @@
} UMSS_WORKER_PACKET, *PUMSS_WORKER_PACKET;
-BOOL
+BOOLEAN
umss_driver_init(
PUSB_DEV_MANAGER dev_mgr,
PUSB_DRIVER pdriver
);
-BOOL
+BOOLEAN
umss_if_driver_init(
PUSB_DEV_MANAGER dev_mgr,
PUSB_DRIVER pdriver
);
-BOOL
+BOOLEAN
umss_driver_destroy(
PUSB_DEV_MANAGER dev_mgr,
PUSB_DRIVER pdriver
@@ -283,7 +283,7 @@
#define umss_if_driver_destroy umss_driver_destroy
-BOOL
+BOOLEAN
umss_if_driver_destroy(
PUSB_DEV_MANAGER dev_mgr,
PUSB_DRIVER pdriver
@@ -316,7 +316,7 @@
IN PURBCOMPLETION completion
);
-BOOL
+BOOLEAN
umss_schedule_workitem(
PVOID context,
UMSS_WORKER_ROUTINE completion,
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.c (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.c Thu Aug 24 16:58:52 2006
@@ -116,7 +116,7 @@
int i;
PLIST_ENTRY pthis, pnext;
PUSB_DEV pdev = NULL;
- BOOL valid_dev;
+ BOOLEAN valid_dev;
USE_NON_PENDING_IRQL;
@@ -357,10 +357,10 @@
}
//used to check descriptor validity
-BOOL
-is_header_match(PBYTE pbuf, ULONG type)
-{
- BOOL ret;
+BOOLEAN
+is_header_match(PUCHAR pbuf, ULONG type)
+{
+ BOOLEAN ret;
PUSB_DESC_HEADER phdr;
phdr = (PUSB_DESC_HEADER) pbuf;
@@ -392,7 +392,7 @@
return ret;
}
-BOOL
+BOOLEAN
usb_skip_endp_desc(PBYTE * pbUF, LONG n)
{
if (is_header_match(*pbUF, USB_DT_ENDPOINT))
@@ -403,10 +403,10 @@
return FALSE;
}
-BOOL
+BOOLEAN
usb_skip_if_desc(PBYTE * pBUF)
{
- BOOL ret;
+ BOOLEAN ret;
PUSB_INTERFACE_DESC pif_desc = (PUSB_INTERFACE_DESC) * pBUF;
LONG endp_count;
ret = is_header_match((PBYTE) * pBUF, USB_DT_INTERFACE);
@@ -426,10 +426,10 @@
return ret;
}
-BOOL
+BOOLEAN
usb_skip_if_and_altif(PUCHAR * pdesc_BUF)
{
- BOOL ret;
+ BOOLEAN ret;
PUSB_INTERFACE_DESC pif_desc1 = (PUSB_INTERFACE_DESC) * pdesc_BUF;
ret = is_header_match(*pdesc_BUF, USB_DT_INTERFACE);
if (ret == TRUE)
@@ -449,11 +449,11 @@
return ret;
}
-BOOL
+BOOLEAN
usb_skip_one_config(PUCHAR *pconfig_desc_BUF)
{
LONG if_count, i;
- BOOL ret;
+ BOOLEAN ret;
PUSB_CONFIGURATION_DESC pcfg_DESC = (PUSB_CONFIGURATION_DESC) * pconfig_desc_BUF;
PUSB_INTERFACE_DESC pif_desc2 = (PUSB_INTERFACE_DESC) & pcfg_DESC[1];
@@ -487,7 +487,7 @@
usb_find_config_desc_by_idx(PUCHAR pbuf, LONG idx, LONG cfg_count)
{
LONG i;
- BOOL ret;
+ BOOLEAN ret;
PUSB_CONFIGURATION_DESC pcfg_desc = (PUSB_CONFIGURATION_DESC) pbuf;
if (pcfg_desc == NULL)
return NULL;
@@ -514,7 +514,7 @@
usb_find_config_desc_by_val(PBYTE pbuf, LONG val, LONG cfg_count)
{
LONG i;
- BOOL ret;
+ BOOLEAN ret;
PUSB_CONFIGURATION_DESC pcfg_desc = (PUSB_CONFIGURATION_DESC) pbuf;
if (pcfg_desc == NULL)
return NULL;
@@ -733,7 +733,7 @@
else if (psetup->bmRequestType == 0x02 && psetup->bRequest ==
USB_REQ_CLEAR_FEATURE && psetup->wValue == 0) //reset pipe
{
ULONG endp_addr;
- BOOL found;
+ BOOLEAN found;
endp_addr = psetup->wIndex;
if ((endp_addr & 0xf) == 0)
{
@@ -978,10 +978,10 @@
}
// checks if processor supports Time Stamp Counter
-__inline BOOL
+__inline BOOLEAN
usb_query_clicks(PLARGE_INTEGER clicks)
{
- BOOL ret_val;
+ BOOLEAN ret_val;
//so we have to use intel's cpu???
ret_val = FALSE;
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.h (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/usb.h Thu Aug 24 16:58:52 2006
@@ -4,10 +4,6 @@
* Some USB bandwidth allocation constants.
*/
-#ifndef BOOL
-#define BOOL ULONG
-#endif
-
typedef unsigned long ULONG_PTR, *PULONG_PTR;
#define USB2_HOST_DELAY 5 /* nsec, guess */
@@ -43,7 +39,7 @@
#define endp_from_handle( pDEV, hanDLE, peNDP ) \
{\
LONG if_idx, endp_idx;\
- BOOL def_endp; \
+ BOOLEAN def_endp; \
endp_idx = endp_idx_from_handle( hanDLE );\
if_idx = if_idx_from_handle( hanDLE );\
def_endp = ( ( hanDLE & 0xffff ) == 0xffff ); \
@@ -1020,12 +1016,12 @@
LONG cfg_count
);
-ULONG
+BOOLEAN
usb_skip_if_and_altif(
PUCHAR* pdesc_BUF
);
-ULONG
+BOOLEAN
usb_skip_one_config(
PUCHAR* pconfig_desc_BUF
);
@@ -1040,7 +1036,7 @@
ULONG us
);
-ULONG
+BOOLEAN
usb_query_clicks(
PLARGE_INTEGER clicks
);
@@ -1061,7 +1057,7 @@
PURB purb
);
-BOOL
+BOOLEAN
is_header_match(
PUCHAR pbuf,
ULONG type
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/usbdriver.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/usbdriver.h (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/usbdriver.h Thu Aug 24 16:58:52 2006
@@ -10,6 +10,10 @@
#define __struct_bcount(x)
#define __inexpressible_readableTo(x)
#define __deref_volatile
+#ifndef __field_ecount
+# define __field_ecount(x)
+#endif
+
#include <ntddk.h>
#include <stdio.h>