mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
Build usbdriver without warning, at least with gcc 3.4.2
svn path=/trunk/; revision=23687
This commit is contained in:
parent
6db46bea8e
commit
71391c6a4f
|
@ -483,7 +483,7 @@ ehci_process_pending_endp(PEHCI_DEV ehci)
|
|||
UCHAR port_idx = 0;
|
||||
BOOLEAN tt_needed;
|
||||
UCHAR hub_addr = 0;
|
||||
USE_IRQL;
|
||||
USE_BASIC_IRQL;
|
||||
|
||||
if (ehci == NULL)
|
||||
return FALSE;
|
||||
|
@ -688,7 +688,7 @@ ehci_submit_urb(PEHCI_DEV ehci, PUSB_DEV pdev, PUSB_ENDPOINT pendp, PURB purb)
|
|||
int i;
|
||||
PUHCI_PENDING_ENDP pending_endp;
|
||||
NTSTATUS status;
|
||||
USE_IRQL;
|
||||
USE_BASIC_IRQL;
|
||||
|
||||
if (ehci == NULL)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
@ -946,7 +946,7 @@ ehci_dpc_callback(PKDPC dpc, PVOID context, PVOID sysarg1, PVOID sysarg2)
|
|||
|
||||
SYNC_PARAM sync_param;
|
||||
UCHAR ep_type;
|
||||
USE_IRQL;
|
||||
USE_BASIC_NON_PENDING_IRQL;
|
||||
|
||||
ehci = (PEHCI_DEV) context;
|
||||
if (ehci == NULL)
|
||||
|
@ -1264,7 +1264,7 @@ ehci_remove_device(PEHCI_DEV ehci, PUSB_DEV dev)
|
|||
int i, j, k;
|
||||
SYNC_PARAM sync_param;
|
||||
|
||||
USE_IRQL;
|
||||
USE_BASIC_IRQL;
|
||||
|
||||
if (ehci == NULL || dev == NULL)
|
||||
return FALSE;
|
||||
|
@ -2764,7 +2764,7 @@ ehci_cancel_urb(PEHCI_DEV ehci, PUSB_DEV pdev, PUSB_ENDPOINT pendp, PURB purb)
|
|||
|
||||
SYNC_PARAM sync_param;
|
||||
|
||||
USE_IRQL;
|
||||
USE_BASIC_NON_PENDING_IRQL;
|
||||
|
||||
if (ehci == NULL || purb == NULL || pdev == NULL || pendp == NULL)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
@ -2839,7 +2839,7 @@ ehci_generic_urb_completion(PURB purb, PVOID context)
|
|||
{
|
||||
PUSB_DEV pdev;
|
||||
BOOLEAN is_ctrl = FALSE;
|
||||
USE_IRQL;
|
||||
USE_NON_PENDING_IRQL;
|
||||
|
||||
old_irql = KeGetCurrentIrql();
|
||||
if (old_irql > DISPATCH_LEVEL)
|
||||
|
@ -2933,7 +2933,7 @@ ehci_rh_submit_urb(PUSB_DEV pdev, PURB purb)
|
|||
LONG i;
|
||||
UCHAR port_count;
|
||||
|
||||
USE_IRQL;
|
||||
USE_NON_PENDING_IRQL;
|
||||
if (pdev == NULL || purb == NULL)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
||||
|
|
|
@ -297,7 +297,8 @@ gendrv_event_select_driver(PUSB_DEV pdev, //always null. we do not use thi
|
|||
usb_dbg_print(DBGLVL_MAXIMUM, ("gendrv_event_select_driver(): entering...\n"));
|
||||
|
||||
pdrvr = (PUSB_DRIVER) param;
|
||||
pconfig_desc = (PUSB_CONFIGURATION_DESC) pdev->desc_buf[sizeof(USB_DEVICE_DESC)];
|
||||
//original code: pconfig_desc = (PUSB_CONFIGURATION_DESC) pdev->desc_buf[sizeof(USB_DEVICE_DESC)];
|
||||
pconfig_desc = (PUSB_CONFIGURATION_DESC) &pdev->desc_buf[sizeof(USB_DEVICE_DESC)];
|
||||
pdrvr_ext = (PGENDRV_DRVR_EXTENSION) pdrvr->driver_ext;
|
||||
|
||||
//
|
||||
|
@ -1105,9 +1106,9 @@ gendrv_dispatch(PDEVICE_OBJECT dev_obj, PIRP irp)
|
|||
case IRP_MJ_INTERNAL_DEVICE_CONTROL:
|
||||
{
|
||||
status = STATUS_NOT_SUPPORTED;
|
||||
if (irpstack->MinorFunction == IOCTL_SUBMIT_URB_RD ||
|
||||
irpstack->MinorFunction == IOCTL_SUBMIT_URB_WR ||
|
||||
irpstack->MinorFunction == IOCTL_SUBMIT_URB_NOIO)
|
||||
if (irpstack->Parameters.DeviceIoControl.IoControlCode == IOCTL_SUBMIT_URB_RD ||
|
||||
irpstack->Parameters.DeviceIoControl.IoControlCode == IOCTL_SUBMIT_URB_WR ||
|
||||
irpstack->Parameters.DeviceIoControl.IoControlCode == IOCTL_SUBMIT_URB_NOIO)
|
||||
{
|
||||
PURB purb;
|
||||
DEV_HANDLE endp_handle;
|
||||
|
@ -1123,7 +1124,7 @@ gendrv_dispatch(PDEVICE_OBJECT dev_obj, PIRP irp)
|
|||
endp_handle = purb->endp_handle;
|
||||
if (purb->data_buffer == NULL || purb->data_length == 0)
|
||||
{
|
||||
if (irpstack->MinorFunction != IOCTL_SUBMIT_URB_NOIO)
|
||||
if (irpstack->Parameters.DeviceIoControl.IoControlCode != IOCTL_SUBMIT_URB_NOIO)
|
||||
{
|
||||
GENDRV_EXIT_DISPATCH(dev_obj, STATUS_INVALID_PARAMETER, irp);
|
||||
}
|
||||
|
@ -1137,12 +1138,12 @@ gendrv_dispatch(PDEVICE_OBJECT dev_obj, PIRP irp)
|
|||
|
||||
GENDRV_EXIT_DISPATCH(dev_obj, STATUS_PENDING, irp);
|
||||
}
|
||||
else if (irpstack->MinorFunction == IOCTL_GET_DEV_DESC)
|
||||
else if (irpstack->Parameters.DeviceIoControl.IoControlCode == IOCTL_GET_DEV_DESC)
|
||||
{
|
||||
// this is a synchronous call, route to dev_mgr_dispatch
|
||||
return dev_mgr_dispatch(dev_mgr, irp);
|
||||
}
|
||||
else if (irpstack->MinorFunction == IOCTL_GET_DEV_HANDLE)
|
||||
else if (irpstack->Parameters.DeviceIoControl.IoControlCode == IOCTL_GET_DEV_HANDLE)
|
||||
{
|
||||
PGENDRV_DEVICE_EXTENSION pdev_ext;
|
||||
pdev_ext = dev_obj->DeviceExtension;
|
||||
|
@ -1158,9 +1159,9 @@ gendrv_dispatch(PDEVICE_OBJECT dev_obj, PIRP irp)
|
|||
case IRP_MJ_DEVICE_CONTROL:
|
||||
{
|
||||
status = STATUS_NOT_SUPPORTED;
|
||||
if (irpstack->MinorFunction == IOCTL_SUBMIT_URB_RD ||
|
||||
irpstack->MinorFunction == IOCTL_SUBMIT_URB_WR ||
|
||||
irpstack->MinorFunction == IOCTL_SUBMIT_URB_NOIO)
|
||||
if (irpstack->Parameters.DeviceIoControl.IoControlCode == IOCTL_SUBMIT_URB_RD ||
|
||||
irpstack->Parameters.DeviceIoControl.IoControlCode == IOCTL_SUBMIT_URB_WR ||
|
||||
irpstack->Parameters.DeviceIoControl.IoControlCode == IOCTL_SUBMIT_URB_NOIO)
|
||||
{
|
||||
PURB purb;
|
||||
DEV_HANDLE endp_handle;
|
||||
|
@ -1183,12 +1184,12 @@ gendrv_dispatch(PDEVICE_OBJECT dev_obj, PIRP irp)
|
|||
|
||||
GENDRV_EXIT_DISPATCH(dev_obj, STATUS_PENDING, irp);
|
||||
}
|
||||
else if (irpstack->MinorFunction == IOCTL_GET_DEV_DESC)
|
||||
else if (irpstack->Parameters.DeviceIoControl.IoControlCode == IOCTL_GET_DEV_DESC)
|
||||
{
|
||||
// this is a synchronous call, route to dev_mgr_dispatch
|
||||
return dev_mgr_dispatch(dev_mgr, irp);
|
||||
}
|
||||
else if (irpstack->MinorFunction == IOCTL_GET_DEV_HANDLE)
|
||||
else if (irpstack->Parameters.DeviceIoControl.IoControlCode == IOCTL_GET_DEV_HANDLE)
|
||||
{
|
||||
PGENDRV_DEVICE_EXTENSION pdev_ext;
|
||||
pdev_ext = dev_obj->DeviceExtension;
|
||||
|
|
|
@ -3278,7 +3278,7 @@ hub_clear_tt_buffer(PUSB_DEV pdev, URB_HS_PIPE_CONTENT pipe_content, UCHAR port_
|
|||
if (purb == NULL)
|
||||
{
|
||||
unlock_dev(pdev, FALSE);
|
||||
return STATUS_NO_MEMORY;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
purb->flags = 0;
|
||||
|
|
|
@ -507,6 +507,9 @@ typedef struct _USB_CONFIGURATION
|
|||
#define USE_IRQL \
|
||||
KIRQL _pending_endp_lock_old_irql=0, _pending_endp_list_lock_old_irql=0, _dev_lock_old_irql=0, old_irql=0;
|
||||
|
||||
#define USE_BASIC_IRQL \
|
||||
KIRQL _pending_endp_list_lock_old_irql=0, _dev_lock_old_irql=0;
|
||||
|
||||
#define USE_NON_PENDING_IRQL \
|
||||
KIRQL _dev_lock_old_irql=0, old_irql=0;
|
||||
|
||||
|
|
|
@ -1166,7 +1166,7 @@ uhci_process_pending_endp(PUHCI_DEV uhci)
|
|||
NTSTATUS can_submit = STATUS_UNSUCCESSFUL;
|
||||
PWORK_QUEUE_ITEM pwork_item;
|
||||
PLIST_ENTRY cancel_list;
|
||||
USE_IRQL;
|
||||
USE_BASIC_IRQL;
|
||||
|
||||
if (uhci == NULL)
|
||||
return FALSE;
|
||||
|
@ -1313,7 +1313,7 @@ uhci_submit_urb(PUHCI_DEV uhci, PUSB_DEV pdev, PUSB_ENDPOINT pendp, PURB purb)
|
|||
int i;
|
||||
PUHCI_PENDING_ENDP pending_endp;
|
||||
NTSTATUS status;
|
||||
USE_IRQL;
|
||||
USE_BASIC_IRQL;
|
||||
|
||||
if (uhci == NULL || pdev == NULL || pendp == NULL || purb == NULL)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
@ -1787,7 +1787,7 @@ uhci_remove_device(PUHCI_DEV uhci, PUSB_DEV dev)
|
|||
int i, j, k;
|
||||
SYNC_PARAM sync_param;
|
||||
|
||||
USE_IRQL;
|
||||
USE_BASIC_IRQL;
|
||||
|
||||
if (uhci == NULL || dev == NULL)
|
||||
return FALSE;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<module name="usbdriver" type="kernelmodedriver" installbase="system32/drivers" installname="usbdriver.sys" allowwarnings="true">
|
||||
<module name="usbdriver" type="kernelmodedriver" installbase="system32/drivers" installname="usbdriver.sys">
|
||||
<define name="INCLUDE_EHCI" />
|
||||
<include base="usbdriver">.</include>
|
||||
<library>ntoskrnl</library>
|
||||
|
|
Loading…
Reference in a new issue