SCSI miniport driver initialization problem with 64-bit (amd-64)

Hi All,

I am trying to port a SCSI miniport driver for a
virtual HBA that is working
without
any problem in 32-bit to 64-bit. When I install the
HBA (by plugging it to a
virtual
bus which is created using toaster sample), the
DriverEntry() is called
followed
by FindAdapter(). after that the driver is unloaded
and the device manager
gives
the CM error code 10. (failed to start).

The miniport driver is not using any resources.
Following are the values I
use
for the HW_INITIALIZATION_DATA and
PORT_CONFIGURATION_INFORMATION:

HW_INITIALIZATION_DATA:

  1. HwInterrupt(), HwDmaStarted() and HwAdapterState()
    are not used (set to
    NULL). Other functions are used.
  2. NeedPhysicalAddresses is set to FALSE.
  3. MapBuffers is set to TRUE.
  4. NumberOfAccessRanges is set to 0.
  5. TaggedQueuing is set to FALSE
  6. MultipleRequestsPerLu is set to FALSE.
  7. AutoRequestSense is set to FALSE.
  8. ReceiveEvent is set to FALSE.
  9. AdapterInterfaceType is set to Isa.

One thing I noticed is that the ScsiPortInitialize()
returns STATUS_SUCCESS…

In PORT_CONFIGURATION_INFORMATION,

  1. InterruptMode is set to LevelSensitive.
  2. CachesData is set to FALSE.
  3. MaximumNumberOfTargets = 6 (just for testing)
  4. BufferAccessScsiPortControlled = TRUE
  5. ScatterGather = FALSE
  6. MapBuffers = TRUE
  7. NeedPhysicalAddresses = FALSE
  8. TaggedQueuing = FALSE
  9. MultipleRequestsPerLu = FALSE
  10. AutoRequestSense = FALSE
  11. Master = FALSE.

Actually After FindAdapter(), the IRP_MN_REMOVE_DEVICE
is called for the
adapter in the bus driver which unloads the driver.
So, there should be some
problem in FindAdapter() that causes this. But same
code works fine in 32-bit
without any problem.

When I examined the event log, I got following error:

Driver detected an internal error in its data
structures for
\Device\Scsi\MyDrv1.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

0000: 00 00 00 00 01 00 56 00 …V.
0008: 00 00 00 00 04 00 04 c0 …À
0010: df fa ff ff bb 00 00 c0 ßúÿÿ»…À
0018: 00 00 00 00 00 00 00 00 …
0020: 00 00 00 00 00 00 00 00 …

Thanks,
Janardhanan.R.


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Did your toaster bus driver report it as a ISA bus?


Best Regards,
hanzhu

Janardhanan R. дµÀ:

Hi All,

I am trying to port a SCSI miniport driver for a
virtual HBA that is working
without
any problem in 32-bit to 64-bit. When I install the
HBA (by plugging it to a
virtual
bus which is created using toaster sample), the
DriverEntry() is called
followed
by FindAdapter(). after that the driver is unloaded
and the device manager
gives
the CM error code 10. (failed to start).

The miniport driver is not using any resources.
Following are the values I
use
for the HW_INITIALIZATION_DATA and
PORT_CONFIGURATION_INFORMATION:

HW_INITIALIZATION_DATA:

  1. HwInterrupt(), HwDmaStarted() and HwAdapterState()
    are not used (set to
    NULL). Other functions are used.
  2. NeedPhysicalAddresses is set to FALSE.
  3. MapBuffers is set to TRUE.
  4. NumberOfAccessRanges is set to 0.
  5. TaggedQueuing is set to FALSE
  6. MultipleRequestsPerLu is set to FALSE.
  7. AutoRequestSense is set to FALSE.
  8. ReceiveEvent is set to FALSE.
  9. AdapterInterfaceType is set to Isa.

One thing I noticed is that the ScsiPortInitialize()
returns STATUS_SUCCESS…

In PORT_CONFIGURATION_INFORMATION,

  1. InterruptMode is set to LevelSensitive.
  2. CachesData is set to FALSE.
  3. MaximumNumberOfTargets = 6 (just for testing)
  4. BufferAccessScsiPortControlled = TRUE
  5. ScatterGather = FALSE
  6. MapBuffers = TRUE
  7. NeedPhysicalAddresses = FALSE
  8. TaggedQueuing = FALSE
  9. MultipleRequestsPerLu = FALSE
  10. AutoRequestSense = FALSE
  11. Master = FALSE.

Actually After FindAdapter(), the IRP_MN_REMOVE_DEVICE
is called for the
adapter in the bus driver which unloads the driver.
So, there should be some
problem in FindAdapter() that causes this. But same
code works fine in 32-bit
without any problem.

When I examined the event log, I got following error:

Driver detected an internal error in its data
structures for
\Device\Scsi\MyDrv1.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

0000: 00 00 00 00 01 00 56 00 …V.
0008: 00 00 00 00 04 00 04 c0 …
0010: df fa ff ff bb 00 00 c0 ßú…
0018: 00 00 00 00 00 00 00 00 …
0020: 00 00 00 00 00 00 00 00 …

Thanks,
Janardhanan.R.


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Yes.

— hanzhu wrote:

> Did your toaster bus driver report it as a ISA bus?
>
>
_______________________________________________________
> Best Regards,
> hanzhu
>
>
> Janardhanan R. дµÀ:
> > Hi All,
> >
> > I am trying to port a SCSI miniport driver for a
> > virtual HBA that is working
> > without
> > any problem in 32-bit to 64-bit. When I install
> the
> > HBA (by plugging it to a
> > virtual
> > bus which is created using toaster sample), the
> > DriverEntry() is called
> > followed
> > by FindAdapter(). after that the driver is
> unloaded
> > and the device manager
> > gives
> > the CM error code 10. (failed to start).
> >
> > The miniport driver is not using any resources.
> > Following are the values I
> > use
> > for the HW_INITIALIZATION_DATA and
> > PORT_CONFIGURATION_INFORMATION:
> >
> > HW_INITIALIZATION_DATA:
> >
> > 1. HwInterrupt(), HwDmaStarted() and
> HwAdapterState()
> > are not used (set to
> > NULL). Other functions are used.
> > 2. NeedPhysicalAddresses is set to FALSE.
> > 3. MapBuffers is set to TRUE.
> > 4. NumberOfAccessRanges is set to 0.
> > 5. TaggedQueuing is set to FALSE
> > 6. MultipleRequestsPerLu is set to FALSE.
> > 7. AutoRequestSense is set to FALSE.
> > 8. ReceiveEvent is set to FALSE.
> > 9. AdapterInterfaceType is set to Isa.
> >
> > One thing I noticed is that the
> ScsiPortInitialize()
> > returns STATUS_SUCCESS…
> >
> > In PORT_CONFIGURATION_INFORMATION,
> > 1. InterruptMode is set to LevelSensitive.
> > 2. CachesData is set to FALSE.
> > 3. MaximumNumberOfTargets = 6 (just for testing)
> > 4. BufferAccessScsiPortControlled = TRUE
> > 5. ScatterGather = FALSE
> > 6. MapBuffers = TRUE
> > 7. NeedPhysicalAddresses = FALSE
> > 8. TaggedQueuing = FALSE
> > 9. MultipleRequestsPerLu = FALSE
> > 10. AutoRequestSense = FALSE
> > 11. Master = FALSE.
> >
> > Actually After FindAdapter(), the
> IRP_MN_REMOVE_DEVICE
> > is called for the
> > adapter in the bus driver which unloads the
> driver.
> > So, there should be some
> > problem in FindAdapter() that causes this. But
> same
> > code works fine in 32-bit
> > without any problem.
> >
> > When I examined the event log, I got following
> error:
> >
> > Driver detected an internal error in its data
> > structures for
> > \Device\Scsi\MyDrv1.
> >
> > For more information, see Help and Support Center
> at
> > http://go.microsoft.com/fwlink/events.asp.
> >
> > 0000: 00 00 00 00 01 00 56 00 …V.
> > 0008: 00 00 00 00 04 00 04 c0 …
> > 0010: df fa ff ff bb 00 00 c0 ßú…
> > 0018: 00 00 00 00 00 00 00 00 …
> > 0020: 00 00 00 00 00 00 00 00 …
> >
> > Thanks,
> > Janardhanan.R.
> >
> >
> >__________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > To unsubscribe, visit the List Server section of
> OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
> >
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR
> Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com