Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > IoConnectInterruptEx- MessageBased - API issues

Reply
Thread Tools Display Modes

IoConnectInterruptEx- MessageBased - API issues

 
 
ManiS
Guest
Posts: n/a

 
      07-16-2010
I have a hardware that exhibits only MSI-X (4 vectors) and no INTX support,
and am developing a Win Server 2008 x64 driver for it.
I tried using this IoConnectInterruptEx with MessageBased option with fields
filled in:
struct {
PDEVICE_OBJECT PhysicalDeviceObject; == PDO of my device
union {
PVOID *Generic; == ptr to my IntMessageTable
PIO_INTERRUPT_MESSAGE_INFO *InterruptMessageTable;
PKINTERRUPT *InterruptObject;
} ConnectionContext;
PKMESSAGE_SERVICE_ROUTINE MessageServiceRoutine; = my int handler code
PVOID ServiceContext; == my FDO
PKSPIN_LOCK SpinLock; = NULL
KIRQL SynchronizeIrql; == PassiveLevel
BOOLEAN FloatingSave; = 0
PKSERVICE_ROUTINE FallBackServiceRoutine; = NULL
} MessageBased;

This does work in most cases and I do get my MSI-X interrupts allocated and
driver loads.
But in cases when I introduce other hardware in the server that also use
MSI-X, my driver fails to load with code 10 (IoCOnnectInterruptEx fails with
error code 0xc000 00bb - STATUS_NOT_SUPPORTED).
After some more hours of debugging, I decided to put in a dummy function
pointer for the FALLBACKSERVICEROUTINE pointer in the MessageBased Structure
- And that helped! Now my driver loads always without any issues and it only
gets MSI-X vectors.

This seems strange that I have to give a line based interrupt handling
function pointer when I know my hardware only supports MSI-x and I am also
asking only for MSI-X.

Anybody has seen this?

Thanks
Mani
 
Reply With Quote
 
 
 
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      07-16-2010
> This seems strange that I have to give a line based interrupt handling
> function pointer when I know my hardware only supports MSI-x and I am also
> asking only for MSI-X.


I think that Windows cannot guarantee to grant all MSI requests, so sometimes the hardware will be switched to the usual line-based interrupt mode.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
 
Pavel A.
Guest
Posts: n/a

 
      07-16-2010
This is well known, see here for example:
http://blogs.msdn.com/b/doronh/archi...on-part-3.aspx

<quote> If there are enough free IDT entries .... then the first claim gets
satisfied. If not, it goes for the single message claim. If that can't be
satisfied, it will back off to the line-based interrupt, which is usually
shared with something else and will almost certainly succeed. </quote>

So if this device really has no INTX support, blame the hardware designer.

-- pa


"ManiS" <> wrote in message
news:5C288904-4662-4378-94C3-...
> I have a hardware that exhibits only MSI-X (4 vectors) and no INTX
> support,
> and am developing a Win Server 2008 x64 driver for it.
> I tried using this IoConnectInterruptEx with MessageBased option with
> fields
> filled in:
> struct {
> PDEVICE_OBJECT PhysicalDeviceObject; == PDO of my device
> union {
> PVOID *Generic; == ptr to my IntMessageTable
> PIO_INTERRUPT_MESSAGE_INFO *InterruptMessageTable;
> PKINTERRUPT *InterruptObject;
> } ConnectionContext;
> PKMESSAGE_SERVICE_ROUTINE MessageServiceRoutine; = my int handler
> code
> PVOID ServiceContext; == my FDO
> PKSPIN_LOCK SpinLock; = NULL
> KIRQL SynchronizeIrql; == PassiveLevel
> BOOLEAN FloatingSave; = 0
> PKSERVICE_ROUTINE FallBackServiceRoutine; = NULL
> } MessageBased;
>
> This does work in most cases and I do get my MSI-X interrupts allocated
> and
> driver loads.
> But in cases when I introduce other hardware in the server that also use
> MSI-X, my driver fails to load with code 10 (IoCOnnectInterruptEx fails
> with
> error code 0xc000 00bb - STATUS_NOT_SUPPORTED).
> After some more hours of debugging, I decided to put in a dummy function
> pointer for the FALLBACKSERVICEROUTINE pointer in the MessageBased
> Structure
> - And that helped! Now my driver loads always without any issues and it
> only
> gets MSI-X vectors.
>
> This seems strange that I have to give a line based interrupt handling
> function pointer when I know my hardware only supports MSI-x and I am also
> asking only for MSI-X.
>
> Anybody has seen this?
>
> Thanks
> Mani


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SBS 2003 (not R2) Exchange ActiveSync issues with WM6.1 device (AT&T Tilt) Chuck Windows Small Business Server 5 12-23-2009 06:08 AM
Re: Newbie with issues concerning WSUS, clients, GPOs and SBS 2008 Cliff Galiher Windows Small Business Server 0 12-19-2009 07:43 PM
Corrupt Files juerg Windows Vista Installation 10 07-12-2007 04:38 PM
ISSUES ISSUES ISSUES! Johnsabu Windows Vista Installation 7 03-02-2007 04:19 AM
Performance Issues RMWChaos Windows Vista Hardware 0 08-23-2006 04:41 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59