Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > BusFilter on XP

Reply
Thread Tools Display Modes

BusFilter on XP

 
 
Clark Kent
Guest
Posts: n/a

 
      02-26-2004
Hi,

I've just written a dummy pass-through bus filter that works fine on
Windows 2000 but on Windows XP crashes when ASPI driver sends a
request.
Has anyone of you met this problem ? Thanks.

Clark
 
Reply With Quote
 
 
 
 
Brian Catlin
Guest
Posts: n/a

 
      02-26-2004
"Clark Kent" <> wrote in message
news: m...
> Hi,
>
> I've just written a dummy pass-through bus filter that works fine on
> Windows 2000 but on Windows XP crashes when ASPI driver sends a
> request.
> Has anyone of you met this problem ? Thanks.


What type of crash?

-Brian

Brian Catlin, Sannas Consulting 310-944-9492
Windows Network, Video, WDM Device Driver Training & Consulting
See WWW.AZIUS.COM.bad for courses and scheduling
REMOVE .BAD FROM EMAIL AND WEB ADDRESS


 
Reply With Quote
 
Clark Kent
Guest
Posts: n/a

 
      02-27-2004
Thanks for your reply. I forgot the relevant information.
So, there is an XP professional SP1 and ASPI v4.71. As I told you the
driver a simple pass-through one. Here is its general dispatch routine
(appart from PnP and power handling ones):

NTSTATUS DispatchGeneral( IN PDEVICE_OBJECT pDeviceObject, IN PIRP
pIrp )
{
PDEVICE_EXTENSION pDeviceExtension = (PDEVICE_EXTENSION)
pDeviceObject->DeviceExtension;
PIO_STACK_LOCATION pStack = IoGetCurrentIrpStackLocation( pIrp );

//

NTSTATUS ntStatus;
ntStatus = IoAcquireRemoveLock( &pDeviceExtension->RemoveLock, pIrp
);

if( !NT_SUCCESS( ntStatus ) )
{
return CompleteRequest( pIrp, ntStatus );
}

// Pass request down without additional processing

IoSkipCurrentIrpStackLocation( pIrp );
ntStatus = IoCallDriver( pDeviceExtension->pLowerDeviceObject, pIrp
);
IoReleaseRemoveLock( &pDeviceExtension->RemoveLock, pIrp );

//

return ntStatus;
}

The crash is DRIVER_IRQL_NOT_LESS_OR_EQUAL inside ATAPI.SYS. After
the parameters passed to BugCheckEx I can see that ATAPI.SYS tries to
READ some invalid memory (0x00000018) at DISPATCH_LEVEL. The stack
trace shows that after my "IoCallDriver" call, ATAPI.SYS crashes when
calls IdeStartDirectIo or something like that.
Very strange as long as the driver works fine with IRPs from usal
driver stacks, but not ASPI. And ASPI works fine without my driver.

Thanks,
Clark



"Brian Catlin" <> wrote in message news:<ujjZcJL$>...
> "Clark Kent" <> wrote in message
> news: m...
> > Hi,
> >
> > I've just written a dummy pass-through bus filter that works fine on
> > Windows 2000 but on Windows XP crashes when ASPI driver sends a
> > request.
> > Has anyone of you met this problem ? Thanks.

>
> What type of crash?
>
> -Brian
>
> Brian Catlin, Sannas Consulting 310-944-9492
> Windows Network, Video, WDM Device Driver Training & Consulting
> See WWW.AZIUS.COM.bad for courses and scheduling
> REMOVE .BAD FROM EMAIL AND WEB ADDRESS

 
Reply With Quote
 
Brian Catlin
Guest
Posts: n/a

 
      02-27-2004
Hmmm. Nothing jumps out at me as being obviously wrong. Try running with
Driver Verifier turned on

-Brian

Brian Catlin, Sannas Consulting 310-944-9492
Windows Network, Video, WDM Device Driver Training & Consulting
See WWW.AZIUS.COM.bad for courses and scheduling
REMOVE .BAD FROM EMAIL AND WEB ADDRESS

"Clark Kent" <> wrote in message
news: om...
> Thanks for your reply. I forgot the relevant information.
> So, there is an XP professional SP1 and ASPI v4.71. As I told you the
> driver a simple pass-through one. Here is its general dispatch routine
> (appart from PnP and power handling ones):
>
> NTSTATUS DispatchGeneral( IN PDEVICE_OBJECT pDeviceObject, IN PIRP
> pIrp )
> {
> PDEVICE_EXTENSION pDeviceExtension = (PDEVICE_EXTENSION)
> pDeviceObject->DeviceExtension;
> PIO_STACK_LOCATION pStack = IoGetCurrentIrpStackLocation( pIrp );
>
> //
>
> NTSTATUS ntStatus;
> ntStatus = IoAcquireRemoveLock( &pDeviceExtension->RemoveLock, pIrp
> );
>
> if( !NT_SUCCESS( ntStatus ) )
> {
> return CompleteRequest( pIrp, ntStatus );
> }
>
> // Pass request down without additional processing
>
> IoSkipCurrentIrpStackLocation( pIrp );
> ntStatus = IoCallDriver( pDeviceExtension->pLowerDeviceObject, pIrp
> );
> IoReleaseRemoveLock( &pDeviceExtension->RemoveLock, pIrp );
>
> //
>
> return ntStatus;
> }
>
> The crash is DRIVER_IRQL_NOT_LESS_OR_EQUAL inside ATAPI.SYS. After
> the parameters passed to BugCheckEx I can see that ATAPI.SYS tries to
> READ some invalid memory (0x00000018) at DISPATCH_LEVEL. The stack
> trace shows that after my "IoCallDriver" call, ATAPI.SYS crashes when
> calls IdeStartDirectIo or something like that.
> Very strange as long as the driver works fine with IRPs from usal
> driver stacks, but not ASPI. And ASPI works fine without my driver.
>
> Thanks,
> Clark
>
>
>
> "Brian Catlin" <> wrote in message
> news:<ujjZcJL$>...
>> "Clark Kent" <> wrote in message
>> news: m...
>> > Hi,
>> >
>> > I've just written a dummy pass-through bus filter that works fine on
>> > Windows 2000 but on Windows XP crashes when ASPI driver sends a
>> > request.
>> > Has anyone of you met this problem ? Thanks.

>>
>> What type of crash?
>>
>> -Brian
>>
>> Brian Catlin, Sannas Consulting 310-944-9492
>> Windows Network, Video, WDM Device Driver Training & Consulting
>> See WWW.AZIUS.COM.bad for courses and scheduling
>> REMOVE .BAD FROM EMAIL AND WEB ADDRESS



 
Reply With Quote
 
Eliyas Yakub [MSFT]
Guest
Posts: n/a

 
      02-28-2004
Show us the entire stack trace.

--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/hwdev/driver/kb-drv.mspx


 
Reply With Quote
 
Clark Kent
Guest
Posts: n/a

 
      02-28-2004
Using SoftIce I found out that in atapi.sys, in IdePortStartIo,
pIrp->MdlAddress is NULL when accessed. And it is a direct I/O

So the quest is: where and who made it NULL ? Or maybe there is a
setting that I'm not aware of.

DriverVerifier found my driver OK.

So, I keep on digging with SoftIce and I'm going to let you know the
status

Thanks,
Clark
 
Reply With Quote
 
Gary G. Little
Guest
Posts: n/a

 
      03-01-2004
You just might be interested in an ATAPI hot fix that is available for such
things as pass through. The same hotfix is also available in XP SP2 Beta.
Maybe Elyas can build a fire under the storage boys and girls, or at least
let them know folks are looking for same.

--
Gary G. Little
Seagate Technologies, LLC

"Clark Kent" <> wrote in message
news: om...
> Using SoftIce I found out that in atapi.sys, in IdePortStartIo,
> pIrp->MdlAddress is NULL when accessed. And it is a direct I/O
>
> So the quest is: where and who made it NULL ? Or maybe there is a
> setting that I'm not aware of.
>
> DriverVerifier found my driver OK.
>
> So, I keep on digging with SoftIce and I'm going to let you know the
> status
>
> Thanks,
> Clark



 
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




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