SCSI MiniPort Help Needed

I have written a basic SCSI MiniPort driver that will not load in Windows XP. Running the dependency walker for my new driver reveals that the sytem cannot find STORPORT.SYS. For some reason the system is searching for the function ScsiPortNotification in this system file rather than SCSIPORT.SYS. Any ideas why this would happen? Thanks in advance.

What are the contents of your source file?

Mark Roddy

On Thu, Oct 13, 2011 at 10:55 AM, wrote:
> I have written a basic SCSI MiniPort driver that will not load in Windows XP. Running the dependency walker for my new driver reveals that the sytem cannot find STORPORT.SYS. For some reason the system is searching for the function ScsiPortNotification in this system file rather than SCSIPORT.SYS. Any ideas why this would happen? Thanks in advance.
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>

Driver mostly contains basic structure. Wanted to get this basic shell working first.

[sourcecode language=“css”]
#include <miniport.h>
#include <scsi.h>
#include “ssd.h”

void memset(void dest, int c, unsigned count);
#pragma intrinsic (memset)

ULONG DriverEntry(IN PVOID Argument1, IN PVOID Argument2)
{
HW_INITIALIZATION_DATA hwInitializationData;
Ssd_DeviceExt SsdDevExt;
ULONG uStatus;

ScsiDebugPrint(3, “SSD: " FUNCTION”++“);
ScsiDebugPrint(3, “Compiled at %s on %s”, TIME , DATE );

memset(&hwInitializationData, 0, sizeof(hwInitializationData));

// data
hwInitializationData.HwInitializationDataSize = sizeof(HW_INITIALIZATION_DATA);
hwInitializationData.AdapterInterfaceType = Isa;

// entry points
hwInitializationData.HwInitialize = SsdInitialize; // required
hwInitializationData.HwResetBus = SsdResetBus; // required
hwInitializationData.HwStartIo = SsdStartIo; // required
hwInitializationData.HwFindAdapter = SsdFindAdapter; // required
hwInitializationData.HwInterrupt = NULL; // no interrupts used
hwInitializationData.HwDmaStarted = NULL; // no dma used
hwInitializationData.HwAdapterState = NULL; // no bios
hwInitializationData.HwAdapterControl = NULL; // only for PnP

// data
hwInitializationData.DeviceExtensionSize = sizeof(Ssd_DeviceExt); // ScsiPortInitialize allocates space
hwInitializationData.SpecificLuExtensionSize = 0;//sizeof(Ssd_LunExt);
hwInitializationData.SrbExtensionSize = 0;
hwInitializationData.NumberOfAccessRanges = 1; // only I/O range
hwInitializationData.MapBuffers = FALSE;
hwInitializationData.NeedPhysicalAddresses = TRUE;
hwInitializationData.TaggedQueuing = FALSE; // no scsi tagged queuing
hwInitializationData.AutoRequestSense = FALSE;

// initialize device extension
SsdDevExt.ioAddr = ScsiPortConvertUlongToPhysicalAddress(0x210);
SsdDevExt.ioSize = 6;

uStatus = ScsiPortInitialize(Argument1, Argument2, &hwInitializationData, &SsdDevExt);

ScsiDebugPrint(3, FUNCTION”–. STATUS %x", uStatus);

return uStatus;
}

ULONG SsdFindAdapter(IN PVOID DeviceExtension, IN PVOID Context, IN PVOID BusInformation,
IN PCHAR ArgumentString, IN OUT PPORT_CONFIGURATION_INFORMATION ConfigInfo, OUT PBOOLEAN Again)
{
PVOID portAddr;
Ssd_DeviceExt * pExt = (Ssd_DeviceExt )DeviceExtension;

// check PORT_CONFIGURATION_INFORMATION length
if (ConfigInfo->Length != sizeof(PORT_CONFIGURATION_INFORMATION))
{
ScsiDebugPrint(3, “SsdFindAdapter: Invalid structure length”);
return SP_RETURN_BAD_CONFIG;
}

// check access ranges
if (ConfigInfo->AccessRanges != NULL)
{
ScsiDebugPrint(3, “SsdFindAdapter: Access range provided by OS”);
return SP_RETURN_BAD_CONFIG;
}
// is required io space available?
if (ScsiPortValidateRange(
pExt,
ConfigInfo->AdapterInterfaceType,
ConfigInfo->SystemIoBusNumber,
pExt->ioAddr,
pExt->ioSize,
TRUE) == TRUE)
{
// address is available
portAddr = ScsiPortGetDeviceBase(
pExt,
ConfigInfo->AdapterInterfaceType,
ConfigInfo->SystemIoBusNumber,
pExt->ioAddr,
pExt->ioSize,
TRUE);

// is address range available?
if (portAddr == NULL)
{
ScsiDebugPrint(3, “SsdFindAdapter: Address range at 0x%04X not available”, pExt->ioAddr);
return SP_RETURN_BAD_CONFIG;
}
else
ScsiDebugPrint(3, “SsdFindAdapter: Address range 0x%04X-0x%03X%01X assigned”,
pExt->ioAddr, pExt->ioAddr, pExt->ioSize);

// fill in access range
(ConfigInfo->AccessRanges)[0].RangeStart = pExt->ioAddr;
(ConfigInfo->AccessRanges)[0].RangeLength = pExt->ioSize;
(ConfigInfo->AccessRanges)[0].RangeInMemory = FALSE;
}
else
{
// address is not available
return SP_RETURN_BAD_CONFIG;
}

ConfigInfo->MaximumTransferLength = 1;
ConfigInfo->NumberOfPhysicalBreaks = 0;
ConfigInfo->NumberOfBuses = 1;
ConfigInfo->MaximumNumberOfTargets = 1;

Again = FALSE; // only do once

return SP_RETURN_FOUND;
}

BOOLEAN SsdInitialize(IN PVOID DeviceExtension)
{
PUCHAR Port;

Ssd_DeviceExt * pExt = (Ssd_DeviceExt )DeviceExtension;

// initialize address
Port = (PUCHAR) ScsiPortConvertPhysicalAddressToUlong(pExt->ioAddr);

ScsiPortWritePortUchar(Port, 0);
ScsiPortWritePortUchar(Port + 1, 0);

return TRUE;
}

BOOLEAN SsdResetBus(IN PVOID HwDeviceExtension, IN ULONG PathId)
{
return TRUE;
}

BOOLEAN SsdStartIo(IN PVOID DeviceExtension, IN PSCSI_REQUEST_BLOCK pSrb)
{
Ssd_DeviceExt * pExt = (Ssd_DeviceExt )DeviceExtension;
BOOLEAN Ret = TRUE;
pSrb->SrbStatus = SRB_STATUS_SUCCESS;
pSrb->ScsiStatus = TRUE;

ScsiPortNotification(NextRequest,
DeviceExtension);

switch (pSrb->Function) {
case SRB_FUNCTION_SHUTDOWN:
ScsiDebugPrint(3, "SsdStartIo
SHUTDOWN");
break;

case SRB_FUNCTION_FLUSH:
ScsiDebugPrint(3, "SsdStartIo
FLUSH");
break;

case SRB_FUNCTION_ABORT_COMMAND:
ScsiDebugPrint(3, "SsdStartIo
ABORT_COMMAND");
break;

case SRB_FUNCTION_RESET_BUS:
ScsiDebugPrint(3, “SsdStartIoRESET_BUS");
break;

case SRB_FUNCTION_EXECUTE_SCSI:
ScsiDebugPrint(3, "SsdStartIo
EXECUTE_SCSI”);
Ret = DoScsiCommand(pExt, pSrb);
break;

case SRB_FUNCTION_IO_CONTROL:
ScsiDebugPrint(3, “SsdStartIoIO_CONTROL");
break;

default:
ScsiDebugPrint(3, "SsdStartIo
UNSUPPORTED”);
pSrb->SrbStatus = SRB_STATUS_INVALID_REQUEST;
}

ScsiPortNotification(RequestComplete,
DeviceExtension,
pSrb);

return Ret;
}

BOOLEAN DoScsiCommand(Ssd_DeviceExt * pExt, PSCSI_REQUEST_BLOCK pSrb)
{
BOOLEAN ScRet = TRUE;

// valid command?
if(pSrb->Cdb[0] > MAX_SCSI_CMD)
{
ScsiDebugPrint(3, “DoScsiCommandILLEGAL");
pSrb->SrbStatus = SRB_STATUS_INVALID_REQUEST;
return ScRet;
}

// SCSI commands
switch (pSrb->Cdb[0])
{
case INQUIRY: // 0x12
ScsiDebugPrint(3, "DoScsiCommand
INQUIRY”);

ScRet = Inquiry(pExt, pSrb);

break;

case READ_CAPACITY: // 0x25
ScsiDebugPrint(3, “DoScsiCommandREAD CAPACITY");

ScRet = ReadCapacity(pExt, pSrb);

break;

case READ: // 0x08
ScsiDebugPrint(3, "DoScsiCommand
READ”);
break;

case WRITE: // 0x0A
ScsiDebugPrint(3, “DoScsiCommandWRITE");
break;

case TEST_UNIT_READY: // 0x00
ScsiDebugPrint(3, "DoScsiCommand
TEST UNIT READY”);
break;

case VERIFY: // 0x2F
ScsiDebugPrint(3, “DoScsiCommandVERIFY");
break;

default:
ScsiDebugPrint(3, "DoScsiCommand
UNSUPPORTED”);
pSrb->SrbStatus = SRB_STATUS_INVALID_REQUEST;
}

return ScRet;
}

BOOLEAN Inquiry(Ssd_DeviceExt * pExt, PSCSI_REQUEST_BLOCK pSrb)
{
return TRUE;
}

BOOLEAN ReadCapacity(Ssd_DeviceExt * pExt, PSCSI_REQUEST_BLOCK pSrb)
{
// read capacity structure
RdCapacity * pCap = (RdCapacity *)pSrb->DataBuffer;

// 8 bytes in data buffer
pSrb->DataTransferLength = 8;

// build capacity structure
pCap->LogBlkAddr = pSrb->Cdb[2];
pCap->BlkLength = (ULONG) SSD_BLOCK_LENGTH;

return TRUE;
}
[/sourcecode]</scsi.h></miniport.h>

No I meant the file named “Sources” which ought to contain a line like this:
TARGETLIBS=$(TARGETLIBS) $(DDK_LIB_PATH)\scsiport.lib

But I suspect instead it contains:
TARGETLIBS=$(TARGETLIBS) $(DDK_LIB_PATH)\storport.lib

Mark Roddy

On Thu, Oct 13, 2011 at 11:26 AM, wrote:
> Driver mostly contains basic structure. Wanted to get this basic shell working first.
>
> [sourcecode language=“css”]
> #include <miniport.h>
> #include <scsi.h>
> #include “ssd.h”
>
> void memset(void dest, int c, unsigned count);
> #pragma intrinsic (memset)
>
> ULONG DriverEntry(IN PVOID Argument1, IN PVOID Argument2)
> {
> ? ?HW_INITIALIZATION_DATA hwInitializationData;
> ? ?Ssd_DeviceExt SsdDevExt;
> ? ? ? ?ULONG uStatus;
>
> ? ? ? ?ScsiDebugPrint(3, “SSD: " FUNCTION”++“);
> ? ? ? ?ScsiDebugPrint(3, “Compiled at %s on %s”, TIME , DATE );
>
> ? ? ? ?memset(&hwInitializationData, 0, sizeof(hwInitializationData));
>
> ? ? ? ?// data
> ? ?hwInitializationData.HwInitializationDataSize = sizeof(HW_INITIALIZATION_DATA);
> ? ?hwInitializationData.AdapterInterfaceType = Isa;
>
> ? ? ? ?// entry points
> ? ? ? ?hwInitializationData.HwInitialize = SsdInitialize; ? ? ?// required
> ? ?hwInitializationData.HwResetBus = SsdResetBus; ? ? ?// required
> ? ?hwInitializationData.HwStartIo = SsdStartIo; ? ? ? ?// required
> ? ? ? ?hwInitializationData.HwFindAdapter = SsdFindAdapter; ? ?// required
> ? ? ? ?hwInitializationData.HwInterrupt = NULL; ? ? ? ?// no interrupts used
> ? ? ? ?hwInitializationData.HwDmaStarted = NULL; ? ? ? // no dma used
> ? ? ? ?hwInitializationData.HwAdapterState = NULL; ? ? ? ? ? ? // no bios
> ? ? ? ?hwInitializationData.HwAdapterControl = NULL; ? // only for PnP
>
> ? ? ? ?// data
> ? ?hwInitializationData.DeviceExtensionSize = sizeof(Ssd_DeviceExt); ? // ScsiPortInitialize allocates space
> ? ?hwInitializationData.SpecificLuExtensionSize = 0;//sizeof(Ssd_LunExt);
> ? ?hwInitializationData.SrbExtensionSize = 0;
> ? ?hwInitializationData.NumberOfAccessRanges = 1; ?// ?only I/O range
> ? ?hwInitializationData.MapBuffers = FALSE;
> ? ? ? ?hwInitializationData.NeedPhysicalAddresses = TRUE;
> ? ? ? ?hwInitializationData.TaggedQueuing = FALSE; ? ? // no scsi tagged queuing
> ? ? ? ?hwInitializationData.AutoRequestSense = FALSE;
>
> ? ? ? ?// initialize device extension
> ? ? ? ?SsdDevExt.ioAddr = ScsiPortConvertUlongToPhysicalAddress(0x210);
> ? ? ? ?SsdDevExt.ioSize = 6;
>
> ? ? ? ?uStatus = ScsiPortInitialize(Argument1, Argument2, &hwInitializationData, &SsdDevExt);
>
> ? ? ? ?ScsiDebugPrint(3, FUNCTION”–. STATUS %x", uStatus);
>
> ? ? ? ?return uStatus;
> }
>
> ULONG SsdFindAdapter(IN PVOID DeviceExtension, IN PVOID Context, IN PVOID BusInformation,
> ? ?IN PCHAR ArgumentString, IN OUT PPORT_CONFIGURATION_INFORMATION ConfigInfo, OUT PBOOLEAN Again)
> {
> ? ? ? ?PVOID portAddr;
> ? ? ? ?Ssd_DeviceExt * pExt = (Ssd_DeviceExt )DeviceExtension;
>
> ? ? ? ?// check PORT_CONFIGURATION_INFORMATION length
> ? ? ? ?if (ConfigInfo->Length != sizeof(PORT_CONFIGURATION_INFORMATION))
> ? ? ? ?{
> ? ? ? ? ? ? ? ?ScsiDebugPrint(3, “SsdFindAdapter: Invalid structure length”);
> ? ? ? ? ? ? ? ?return SP_RETURN_BAD_CONFIG;
> ? ? ? ?}
>
> ? ? ? ?// check access ranges
> ? ? ? ?if (ConfigInfo->AccessRanges != NULL)
> ? ? ? ?{
> ? ? ? ? ? ? ? ?ScsiDebugPrint(3, “SsdFindAdapter: Access range provided by OS”);
> ? ? ? ? ? ? ? ?return SP_RETURN_BAD_CONFIG;
> ? ? ? ?}
> ? ? ? ?// is required io space available?
> ? ? ? ?if (ScsiPortValidateRange(
> ? ? ? ? ? ? ? ? ? ? ? ?pExt,
> ? ? ? ? ? ? ? ? ? ? ? ?ConfigInfo->AdapterInterfaceType,
> ? ? ? ? ? ? ? ? ? ? ? ?ConfigInfo->SystemIoBusNumber,
> ? ? ? ? ? ? ? ? ? ? ? ?pExt->ioAddr,
> ? ? ? ? ? ? ? ? ? ? ? ?pExt->ioSize,
> ? ? ? ? ? ? ? ? ? ? ? ?TRUE) == TRUE)
> ? ? ? ?{
> ? ? ? ? ? ? ? ?// address is available
> ? ? ? ? ? ? ? ?portAddr = ScsiPortGetDeviceBase(
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?pExt,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ConfigInfo->AdapterInterfaceType,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ConfigInfo->SystemIoBusNumber,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?pExt->ioAddr,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?pExt->ioSize,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?TRUE);
>
> ? ? ? ? ? ? ? ?// is address range available?
> ? ? ? ? ? ? ? ?if (portAddr == NULL)
> ? ? ? ? ? ? ? ?{
> ? ? ? ? ? ? ? ? ? ? ? ?ScsiDebugPrint(3, “SsdFindAdapter: Address range at 0x%04X not available”, pExt->ioAddr);
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?return SP_RETURN_BAD_CONFIG;
> ? ? ? ? ? ? ? ?}
> ? ? ? ? ? ? ? ?else
> ? ? ? ? ? ? ? ? ? ? ? ?ScsiDebugPrint(3, “SsdFindAdapter: Address range 0x%04X-0x%03X%01X assigned”,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?pExt->ioAddr, pExt->ioAddr, pExt->ioSize);
>
> ? ? ? ? ? ? ? ? ? ? ? ?// fill in access range
> ? ? ? ? ? ? ? ? ? ? ? ?(ConfigInfo->AccessRanges)[0].RangeStart = pExt->ioAddr;
> ? ? ? ? ? ? ? ? ? ? ? ?(ConfigInfo->AccessRanges)[0].RangeLength = pExt->ioSize;
> ? ? ? ? ? ? ? ? ? ? ? ?(ConfigInfo->AccessRanges)[0].RangeInMemory = FALSE;
> ? ? ? ?}
> ? ? ? ?else
> ? ? ? ?{
> ? ? ? ? ? ? ? ?// address is not available
> ? ? ? ? ? ? ? ?return SP_RETURN_BAD_CONFIG;
> ? ? ? ?}
>
> ? ? ? ?ConfigInfo->MaximumTransferLength = 1;
> ? ? ? ?ConfigInfo->NumberOfPhysicalBreaks = 0;
> ? ? ? ?ConfigInfo->NumberOfBuses = 1;
> ? ? ? ?ConfigInfo->MaximumNumberOfTargets = 1;
>
> ? ? ? ?Again = FALSE; ? // only do once
>
> ? ? ? ?return SP_RETURN_FOUND;
> }
>
> BOOLEAN SsdInitialize(IN PVOID DeviceExtension)
> {
> ? ? ? ?PUCHAR Port;
>
> ? ? ? ?Ssd_DeviceExt * pExt = (Ssd_DeviceExt )DeviceExtension;
>
> ? ? ? ?// initialize address
> ? ? ? ?Port = (PUCHAR) ScsiPortConvertPhysicalAddressToUlong(pExt->ioAddr);
>
> ? ? ? ?ScsiPortWritePortUchar(Port, 0);
> ? ? ? ?ScsiPortWritePortUchar(Port + 1, 0);
>
> ? ? ? ?return TRUE;
> }
>
> BOOLEAN SsdResetBus(IN PVOID HwDeviceExtension, IN ULONG PathId)
> {
> ? ?return TRUE;
> }
>
>
> BOOLEAN SsdStartIo(IN PVOID DeviceExtension, IN PSCSI_REQUEST_BLOCK pSrb)
> {
> ? ? ? ?Ssd_DeviceExt * pExt = (Ssd_DeviceExt )DeviceExtension;
> ? ? ? ?BOOLEAN Ret = TRUE;
> ? ? ? ?pSrb->SrbStatus = SRB_STATUS_SUCCESS;
> ? ? ? ?pSrb->ScsiStatus = TRUE;
>
> ? ?ScsiPortNotification(NextRequest,
> ? ? ? ?DeviceExtension);
>
> ? ? ? ?switch (pSrb->Function) {
> ? ? ? ? ? ? ? ?case SRB_FUNCTION_SHUTDOWN:
> ? ? ? ? ? ? ? ? ? ? ? ?ScsiDebugPrint(3, "SsdStartIo
SHUTDOWN");
> ? ? ? ? ? ? ? ? ? ? ? ?break;
>
> ? ? ? ? ? ? ? ?case SRB_FUNCTION_FLUSH:
> ? ? ? ? ? ? ? ? ? ? ? ?ScsiDebugPrint(3, "SsdStartIo
FLUSH");
> ? ? ? ? ? ? ? ? ? ? ? ?break;
>
> ? ? ? ? ? ? ? ?case SRB_FUNCTION_ABORT_COMMAND:
> ? ? ? ? ? ? ? ? ? ? ? ?ScsiDebugPrint(3, "SsdStartIo
ABORT_COMMAND");
> ? ? ? ? ? ? ? ? ? ? ? ?break;
>
> ? ? ? ? ? ? ? ?case SRB_FUNCTION_RESET_BUS:
> ? ? ? ? ? ? ? ? ? ? ? ?ScsiDebugPrint(3, “SsdStartIoRESET_BUS");
> ? ? ? ? ? ? ? ? ? ? ? ?break;
>
> ? ? ? ? ? ? ? ?case SRB_FUNCTION_EXECUTE_SCSI:
> ? ? ? ? ? ? ? ? ? ? ? ?ScsiDebugPrint(3, "SsdStartIo
EXECUTE_SCSI”);
> ? ? ? ? ? ? ? ? ? ? ? ?Ret = DoScsiCommand(pExt, pSrb);
> ? ? ? ? ? ? ? ? ? ? ? ?break;
>
> ? ? ? ? ? ? ? ?case SRB_FUNCTION_IO_CONTROL:
> ? ? ? ? ? ? ? ? ? ? ? ?ScsiDebugPrint(3, “SsdStartIoIO_CONTROL");
> ? ? ? ? ? ? ? ? ? ? ? ?break;
>
> ? ? ? ? ? ? ? ?default:
> ? ? ? ? ? ? ? ? ? ? ? ?ScsiDebugPrint(3, "SsdStartIo
UNSUPPORTED”);
> ? ? ? ? ? ? ? ? ? ? ? ?pSrb->SrbStatus = SRB_STATUS_INVALID_REQUEST;
> ? ? ? ?}
>
> ? ?ScsiPortNotification(RequestComplete,
> ? ? ? ?DeviceExtension,
> ? ? ? ?pSrb);
>
> ? ? ? ?return Ret;
> }
>
> BOOLEAN DoScsiCommand(Ssd_DeviceExt * pExt, PSCSI_REQUEST_BLOCK pSrb)
> {
> ? ? ? ?BOOLEAN ScRet = TRUE;
>
> ? ? ? ?// valid command?
> ? ? ? ?if(pSrb->Cdb[0] > MAX_SCSI_CMD)
> ? ?{
> ? ? ? ? ? ? ? ?ScsiDebugPrint(3, “DoScsiCommandILLEGAL");
> ? ? ? ? ? ? ? ?pSrb->SrbStatus = SRB_STATUS_INVALID_REQUEST;
> ? ? ? ?return ScRet;
> ? ?}
>
> ? ? ? ?// SCSI commands
> ? ? ? ?switch (pSrb->Cdb[0])
> ? ? ? ?{
> ? ? ? ? ? ? ? ?case INQUIRY: ? // 0x12
> ? ? ? ? ? ? ? ? ? ? ? ?ScsiDebugPrint(3, "DoScsiCommand
INQUIRY”);
>
> ? ? ? ? ? ? ? ? ? ? ? ?ScRet = Inquiry(pExt, pSrb);
>
> ? ? ? ? ? ? ? ? ? ? ? ?break;
>
> ? ? ? ? ? ? ? ?case READ_CAPACITY: ? ? // 0x25
> ? ? ? ? ? ? ? ? ? ? ? ?ScsiDebugPrint(3, “DoScsiCommandREAD CAPACITY");
>
> ? ? ? ? ? ? ? ? ? ? ? ?ScRet = ReadCapacity(pExt, pSrb);
>
> ? ? ? ? ? ? ? ? ? ? ? ?break;
>
> ? ? ? ? ? ? ? ?case READ: ? ? ?// 0x08
> ? ? ? ? ? ? ? ? ? ? ? ?ScsiDebugPrint(3, "DoScsiCommand
READ”);
> ? ? ? ? ? ? ? ? ? ? ? ?break;
>
> ? ? ? ? ? ? ? ?case WRITE: ? ? // 0x0A
> ? ? ? ? ? ? ? ? ? ? ? ?ScsiDebugPrint(3, “DoScsiCommandWRITE");
> ? ? ? ? ? ? ? ? ? ? ? ?break;
>
> ? ? ? ? ? ? ? ?case TEST_UNIT_READY: ? // 0x00
> ? ? ? ? ? ? ? ? ? ? ? ?ScsiDebugPrint(3, "DoScsiCommand
TEST UNIT READY”);
> ? ? ? ? ? ? ? ? ? ? ? ?break;
>
> ? ? ? ? ? ? ? ?case VERIFY: ? ?// 0x2F
> ? ? ? ? ? ? ? ? ? ? ? ?ScsiDebugPrint(3, “DoScsiCommandVERIFY");
> ? ? ? ? ? ? ? ? ? ? ? ?break;
>
> ? ? ? ? ? ? ? ?default:
> ? ? ? ? ? ? ? ? ? ? ? ?ScsiDebugPrint(3, "DoScsiCommand
UNSUPPORTED”);
> ? ? ? ? ? ? ? ? ? ? ? ?pSrb->SrbStatus = SRB_STATUS_INVALID_REQUEST;
> ? ? ? ?}
>
> ? ?return ScRet;
> }
>
> BOOLEAN Inquiry(Ssd_DeviceExt * pExt, PSCSI_REQUEST_BLOCK pSrb)
> {
> ? ? ? ?return TRUE;
> }
>
> BOOLEAN ReadCapacity(Ssd_DeviceExt * pExt, PSCSI_REQUEST_BLOCK pSrb)
> {
> ? ? ? ?// read capacity structure
> ? ? ? ?RdCapacity * pCap = (RdCapacity *)pSrb->DataBuffer;
>
> ? ? ? ?// 8 bytes in data buffer
> ? ? ? ?pSrb->DataTransferLength = 8;
>
> ? ? ? ?// build capacity structure
> ? ? ? ?pCap->LogBlkAddr = pSrb->Cdb[2];
> ? ? ? ?pCap->BlkLength = (ULONG) SSD_BLOCK_LENGTH;
>
> ? ? ? ?return TRUE;
> }
> [/sourcecode]
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
></scsi.h></miniport.h>

It contains both. I assume I have to drop one of them?

TARGETNAME=Ssd
TARGETTYPE=MINIPORT

INCLUDES=…..\inc

TARGETLIBS=$(DDK_LIB_PATH)\storport.lib \
$(DDK_LIB_PATH)\scsiport.lib

SOURCES= ssd.c

TARGET_DESTINATION=ssd

yeah if you are a scsiport miniport you cannot link with storport.
Mark Roddy

On Thu, Oct 13, 2011 at 11:35 AM, wrote:
> It contains both. I assume I have to drop one of them?
>
> TARGETNAME=Ssd
> TARGETTYPE=MINIPORT
>
> INCLUDES=…..\inc
>
> TARGETLIBS=$(DDK_LIB_PATH)\storport.lib <br>> ? ? ? ? ? ? ? ? ? $(DDK_LIB_PATH)\scsiport.lib
>
> SOURCES= ssd.c
>
> TARGET_DESTINATION=ssd
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>

I removed the stroprt.lib line and now all my dependencies are good. On to the next bug. Thanks for your help!