Sertousb can’t cancel the IRP…I will try to explain my
understanding…your driver(Mydriver.sys) has built an IRP,some other
driver(sertousb.sys) can’t cancel the IRP because it is not the owner…so
you try to cancel the irp you have allocated by yourself…i.e.,you might
register for the plugplay notification on guid of sertousb and on
removal,cancel the IRP you had allocated.
Regs,
sai
-----Original Message-----
From: Seshagiri_Babu [mailto:xxxxx@Satyam.com]
Sent: Friday, August 02, 2002 12:24 PM
To: NT Developers Interest List
Subject: [ntdev] RE: system crash when serial driver calls IoCancelIrp
Let me explain the problem clearly.
Say the serial to usb converter driver is sertousb.sys. It exposes a
new COM port on my PC whenever the cable is plugged in. Let us name my
driver as mydriver.sys.
Now mydriver.sys keeps only one Read Irp posted to sertousb.sys all
the time. ie, posts a new read irp as soon as it gets completed.
Now when i surprise remove the cable, sertousb.sys gets
IRP_MN_SURPRISE_REMOVAL pnp Irp. In the handler, sertousb.sys tries to
cancel all the pending IRP’s.
It is at this stage that the crash is occuring on a call to
IoCancelIrp by sertousb.sys.
Now i would like to know what care i should take in mydriver.sys so
that when sertousb.sys calls IoCancelIrp on the Irp allocated by
mydriver.sys will not crash the system.
thanks
Sesha.
From: Sai Prasad P[SMTP:xxxxx@ssdi.sharp.co.in]
Reply To: NT Developers Interest List
Sent: 2002"N8OEZ2"? 12:29
To: NT Developers Interest List
Subject: [ntdev] RE: system crash when serial driver calls
IoCancelIrp
Hi Giri,
What ever crash has happened seems logical 'coz you have allocated IRP
and have passed to the Ser-USB Converter.Now it is handling PNP Irp’s and
on
receiving IRP_MN_REMOVE it is probably checking the pending IRP’s with it
and trying to cancel them all…what you can do is handle PNP Irp’s in ur
driver and cancel the IRP urself,in which case the IO Manager would free
the
IRP and the Serial-USB Converter driver doesn’t again call IoCancelIrp
after
checking for NULL condition.
This is what I thought logically,try it.
Regs,
sai
-----Original Message-----
From: Seshagiri_Babu [mailto:xxxxx@Satyam.com]
Sent: Thursday, August 01, 2002 3:51 PM
To: NT Developers Interest List
Subject: [ntdev] system crash when serial driver calls IoCancelIrp
Dear All,
I have a pointer driver for Serial port. The Port is enumerated by
Serial to USB Convertor driver. Now i post a Read Irp, after registering a
Completion Routine to the Sertousb convertor driver.
When there’s no data coming from the device, i surprise remove the
sertousb cable. Now the system crashes. When i see the stack, the top
function is IoCancelIrp called by the sertousb driver.
I read in ddk documentation that when a driver which doesn’t own an
Irp cancels the Irp, the results are unpredictable. But the cancelling of
the Irp (not owned by it) by sertousb driver seems to be logically fine.
Now what care should i take in my driver so that IoCancelIrp call by
the sertousb driver doesn’t crash the system?
Thanks
Sesha.
**************************************************************************
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying
or
distribution or forwarding of any or all of the contents in this message
is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************
You are currently subscribed to ntdev as: xxxxx@ssdi.sharp.co.in
To unsubscribe send a blank email to %%email.unsub%%
You are currently subscribed to ntdev as: xxxxx@satyam.com
To unsubscribe send a blank email to %%email.unsub%%
**************************************************************************
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************
You are currently subscribed to ntdev as: xxxxx@ssdi.sharp.co.in
To unsubscribe send a blank email to %%email.unsub%%