Author: ekohl
Date: Sat Aug 1 18:02:45 2015
New Revision: 68588
URL:
http://svn.reactos.org/svn/reactos?rev=68588&view=rev
Log:
[PARPORT]
- Add support for IRP_MJ_READ.
- IRP_MJ_READ and IRP_MJ_WRITE return STATUS_NOT_SUPPORTED for FDO devices.
Modified:
trunk/reactos/drivers/parallel/parport/fdo.c
trunk/reactos/drivers/parallel/parport/parport.c
trunk/reactos/drivers/parallel/parport/parport.h
trunk/reactos/drivers/parallel/parport/pdo.c
Modified: trunk/reactos/drivers/parallel/parport/fdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/parallel/parport/f…
==============================================================================
--- trunk/reactos/drivers/parallel/parport/fdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/parallel/parport/fdo.c [iso-8859-1] Sat Aug 1 18:02:45 2015
@@ -473,15 +473,29 @@
NTSTATUS
NTAPI
+FdoRead(IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp)
+{
+ DPRINT("FdoRead()\n");
+
+ Irp->IoStatus.Information = 0;
+ Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
+ IoCompleteRequest(Irp, IO_NO_INCREMENT);
+ return STATUS_NOT_SUPPORTED;
+}
+
+
+NTSTATUS
+NTAPI
FdoWrite(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
DPRINT("FdoWrite()\n");
Irp->IoStatus.Information = 0;
- Irp->IoStatus.Status = STATUS_SUCCESS;
+ Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
- return STATUS_SUCCESS;
+ return STATUS_NOT_SUPPORTED;
}
Modified: trunk/reactos/drivers/parallel/parport/parport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/parallel/parport/p…
==============================================================================
--- trunk/reactos/drivers/parallel/parport/parport.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/parallel/parport/parport.c [iso-8859-1] Sat Aug 1 18:02:45
2015
@@ -68,6 +68,19 @@
static
NTSTATUS
NTAPI
+DispatchRead(IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp)
+{
+ if (((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->Common.IsFDO)
+ return FdoRead(DeviceObject, Irp);
+ else
+ return PdoRead(DeviceObject, Irp);
+}
+
+
+static
+NTSTATUS
+NTAPI
DispatchWrite(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
@@ -122,7 +135,7 @@
DriverObject->MajorFunction[IRP_MJ_CREATE] = DispatchCreate;
DriverObject->MajorFunction[IRP_MJ_CLOSE] = DispatchClose;
DriverObject->MajorFunction[IRP_MJ_CLEANUP] = DispatchCleanup;
-// DriverObject->MajorFunction[IRP_MJ_READ] = DispatchRead;
+ DriverObject->MajorFunction[IRP_MJ_READ] = DispatchRead;
DriverObject->MajorFunction[IRP_MJ_WRITE] = DispatchWrite;
// DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = DispatchDeviceControl;
// DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] =
DispatchQueryInformation;
Modified: trunk/reactos/drivers/parallel/parport/parport.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/parallel/parport/p…
==============================================================================
--- trunk/reactos/drivers/parallel/parport/parport.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/parallel/parport/parport.h [iso-8859-1] Sat Aug 1 18:02:45
2015
@@ -88,6 +88,11 @@
NTSTATUS
NTAPI
+FdoRead(IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp);
+
+NTSTATUS
+NTAPI
FdoWrite(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
@@ -135,6 +140,11 @@
NTSTATUS
NTAPI
+PdoRead(IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp);
+
+NTSTATUS
+NTAPI
PdoWrite(IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp);
Modified: trunk/reactos/drivers/parallel/parport/pdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/parallel/parport/p…
==============================================================================
--- trunk/reactos/drivers/parallel/parport/pdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/parallel/parport/pdo.c [iso-8859-1] Sat Aug 1 18:02:45 2015
@@ -68,6 +68,20 @@
IN PIRP Irp)
{
DPRINT("PdoCleanup()\n");
+
+ Irp->IoStatus.Information = 0;
+ Irp->IoStatus.Status = STATUS_SUCCESS;
+ IoCompleteRequest(Irp, IO_NO_INCREMENT);
+ return STATUS_SUCCESS;
+}
+
+
+NTSTATUS
+NTAPI
+PdoRead(IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp)
+{
+ DPRINT("PdoRead()\n");
Irp->IoStatus.Information = 0;
Irp->IoStatus.Status = STATUS_SUCCESS;