win-pvdrivers

view xenscsi/xenscsi.c @ 382:ecfd4ddaaf3d

remove dead code
author Andy Grover <andy.grover@oracle.com>
date Wed Jul 09 12:35:41 2008 -0700 (2008-07-09)
parents a55d72ac422f
children 88cf95a1b34a
line source
1 /*
2 PV Drivers for Windows Xen HVM Domains
3 Copyright (C) 2007 James Harper
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
20 #include "xenscsi.h"
21 #include <io/blkif.h>
22 #include <scsi.h>
23 #include <ntddscsi.h>
24 #include <ntdddisk.h>
25 #include <stdlib.h>
26 #include <xen_public.h>
27 #include <io/xenbus.h>
28 #include <io/protocols.h>
30 #pragma warning(disable: 4127)
32 DRIVER_INITIALIZE DriverEntry;
34 static ULONG
35 XenScsi_HwScsiFindAdapter(PVOID DeviceExtension, PVOID HwContext, PVOID BusInformation, PCHAR ArgumentString, PPORT_CONFIGURATION_INFORMATION ConfigInfo, PBOOLEAN Again);
36 static BOOLEAN
37 XenScsi_HwScsiInitialize(PVOID DeviceExtension);
38 static BOOLEAN
39 XenScsi_HwScsiStartIo(PVOID DeviceExtension, PSCSI_REQUEST_BLOCK Srb);
40 static BOOLEAN
41 XenScsi_HwScsiInterrupt(PVOID DeviceExtension);
42 static BOOLEAN
43 XenScsi_HwScsiResetBus(PVOID DeviceExtension, ULONG PathId);
44 static BOOLEAN
45 XenScsi_HwScsiAdapterState(PVOID DeviceExtension, PVOID Context, BOOLEAN SaveState);
46 static SCSI_ADAPTER_CONTROL_STATUS
47 XenScsi_HwScsiAdapterControl(PVOID DeviceExtension, SCSI_ADAPTER_CONTROL_TYPE ControlType, PVOID Parameters);
49 #ifdef ALLOC_PRAGMA
50 #pragma alloc_text (INIT, DriverEntry)
51 #endif
53 NTSTATUS
54 DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
55 {
56 ULONG Status;
57 HW_INITIALIZATION_DATA HwInitializationData;
59 KdPrint((__DRIVER_NAME " --> "__FUNCTION__ "\n"));
60 KdPrint((__DRIVER_NAME " IRQL = %d\n", KeGetCurrentIrql()));
62 RtlZeroMemory(&HwInitializationData, sizeof(HW_INITIALIZATION_DATA));
64 HwInitializationData.HwInitializationDataSize = sizeof(HW_INITIALIZATION_DATA);
65 HwInitializationData.AdapterInterfaceType = Internal;
66 HwInitializationData.HwDmaStarted = NULL;
67 HwInitializationData.DeviceExtensionSize = sizeof(XENSCSI_DEVICE_DATA);
68 HwInitializationData.SpecificLuExtensionSize = 0;
69 HwInitializationData.SrbExtensionSize = 0;
70 HwInitializationData.NumberOfAccessRanges = 1;
71 HwInitializationData.MapBuffers = TRUE;
72 HwInitializationData.NeedPhysicalAddresses = FALSE;
73 HwInitializationData.TaggedQueuing = TRUE;
74 HwInitializationData.AutoRequestSense = TRUE;
75 HwInitializationData.MultipleRequestPerLu = TRUE;
76 HwInitializationData.ReceiveEvent = FALSE;
77 HwInitializationData.VendorIdLength = 0;
78 HwInitializationData.VendorId = NULL;
79 HwInitializationData.DeviceIdLength = 0;
80 HwInitializationData.DeviceId = NULL;
82 XenScsi_FillInitCallbacks(&HwInitializationData);
84 Status = ScsiPortInitialize(DriverObject, RegistryPath, &HwInitializationData, NULL);
86 if(!NT_SUCCESS(Status))
87 {
88 KdPrint((__DRIVER_NAME " ScsiPortInitialize failed with status 0x%08x\n", Status));
89 }
91 KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
93 return Status;
94 }