Can SCSI miniport support Message Signaled Interrupts(MSI)

hi:

MSI is supported in Storport, but now that the driver needs to support Windows XP, I can only use SCSI miniport.

How can I implement MSI in my driver?

What will the OS do if the PCIe device sends out a MSI?

> hi:

MSI is supported in Storport, but now that the driver needs to support
Windows
XP, I can only use SCSI miniport.

How can I implement MSI in my driver?

What will the OS do if the PCIe device sends out a MSI?

AFAIK, XP will just see it as if it was a PCI device and it will ‘just
work’.

James

> MSI is supported in Storport, but now that the driver needs to support Windows XP, I can only use

SCSI miniport.

XP does not support MSI at all. Completely.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

>What will the OS do if the PCIe device sends out a MSI?
In *.inf file you need to specify a section that sets up MSI support and put address of MSI routine in the field HwMSInterruptRoutine of PORT_CONFIGURATION_INFORMATION.

Igor Sharovar

To clarify… the answer is the union of Mr. Shatskih’s and Mr. Harper’s answers (both of which are correct, but you have to compile them together for the full picture).

There is no native support for MSI on XP. Therefore, your device won’t use MSIs on XP… because they won’t be configured by the system.

On XP, devices that support MSI should drop-back to using a Line Base Interrupt.

Hope that helps,

Peter
OSR

>>What will the OS do if the PCIe device sends out a MSI?

In *.inf file you need to specify a section that sets up MSI support and put address of MSI routine >in the field HwMSInterruptRoutine of PORT_CONFIGURATION_INFORMATION.
I am apologize for confusing but what I said is related to miniport StorPort driver not SCSI port.
I don’t see such set up in miniport SCSI driver.

Igor Sharovar

Thanks you all.

Now that XP can’t support MSI, how will it handle the PCIe error signlas PERR and SERR?

I can’t find a way to handle it in SCSI miniport.

If the command I sent to device is changed during the transmmission, device will treat it as a unrecogonized command and send out a error signal through SERR.

How will the driver know that a error happened?

PCIE is back word compatible to PCI, so the PCI configuration space Error Status Register is what you need to read to find if there are errors.

-pro

On Sep 14, 2010, at 8:17 PM, xxxxx@gmail.com wrote:

Thanks you all.

Now that XP can’t support MSI, how will it handle the PCIe error signlas PERR and SERR?

I can’t find a way to handle it in SCSI miniport.

If the command I sent to device is changed during the transmmission, device will treat it as a unrecogonized command and send out a error signal through SERR.

How will the driver know that a error happened?


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

Thanks.

If i want to read PCI configuration space, I have to use ScsiPortGetBusData.

But ScsiPortGetBusData can be called only from HwScsiFindAdapter routine or from HwScsiAdapterControl with control type be ScsiSetRunningConfig.

If I recieve an interrupt and goes to HwScsiInterrrupt routine, it can’t call ScsiPortGetBusData to get configuration information. How can the driver knows that a error happened?

PCIE is back word compatible to PCI, so the PCI configuration space Error Status
Register is what you need to read to find if there are errors.

-pro

If an error happened your read will most likely return FFFFFFFF.

So… to repeat what Mr. Sinha said: “PCIE is back word compatible to PCI” – XP will treat your PCIe device like it’s a PCI device.

In terms of querying the PCI configuration space Error Status Register, just forget that. Seriously.

If there’s an error, your DEVICE will have some status in ITS registers (not the PCI config space registers, the BARs on your device) that’ll let you distinguish the error state from the ordinary “transfer complete” state. Use that.

Peter
OSR

Thanks for Viscarola.

That’s the answer I need.

> If the command I sent to device is changed during the transmmission, device will treat it as a

unrecogonized command and send out a error signal through SERR.

This is against the PCI guidelines for Windows, since you use config space to report error conditions.

Report such errors by setting the value in control/status register accessible via BARs.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

> If I recieve an interrupt and goes to HwScsiInterrrupt routine, it can’t call ScsiPortGetBusData to get

configuration information. How can the driver knows that a error happened?

IIRC no version of Windows can read PCI config space in the interrupt handler.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

> This is against the PCI guidelines for Windows, since you use config space to
report error conditions.

Report such errors by setting the value in control/status register accessible
via BARs.

If the device send out a correct TLP, and it goes wrong during the transimmission, the root will recieve a wrong TLP. How will the root handle it?

Because device send out the TLP correctly, the application layer will report a SUCCESS status, and the driver will receive a SUCCESS status.

And how can the driver know there is an error in root?

wrote in message news:xxxxx@ntdev…

> If the device send out a correct TLP, and it goes wrong during the
> transimmission, the root will recieve a wrong TLP. How will the root
> handle it?
>

In our experience, on some platforms the root will raise NMI, which causes
BSOD on older OS (XP, maybe win2003 too).

– pa