Hi, all
My hardware is a PCI device, it’s a SD card reader, and I write a virtual SCSI miniport driver for it, but there is bug puzzled me. the issue is that when there is no card in the device, system return from stand by or hibernate, my driver doesn’t work any more, at that time, scan the hardware change can make it work again. What’s wrong about my driver? What should I do to fix the bug? Any reply is appreciated.
Regards
Felix
Just out of curiosity, can a system go to hibernate or standby with a
debugger attached? Second, if it can, if you set a break point prior too
this, when the system comes back up and your driver is getting the power
up stuff, the break point should still be there and fire, right?
Try this for me Felix, let me know…
m.
cracker_prince@163.com wrote:
Hi, all
My hardware is a PCI device, it’s a SD card reader, and I write a virtual SCSI miniport driver for it, but there is bug puzzled me. the issue is that when there is no card in the device, system return from stand by or hibernate, my driver doesn’t work any more, at that time, scan the hardware change can make it work again. What’s wrong about my driver? What should I do to fix the bug? Any reply is appreciated.
Regards
Felix
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
Okay, first, system can go to hibernate or standby with a debugger attached, at least it can when you use softice; second, unfortunately, when system come back from hibernate or standby, the break point can not work, perhaps the debugger comes up too late to catch the debug event, but I think you can use a host debugger to debug the target computer with WinDbg, it might work.
Felix
Ok thanks. I use a serial cable with WinDbg, and I know the target has
hibernate enabled but I’ve never seen it shutdown when a debugger is
attached.
m.
cracker_prince@163.com wrote:
Okay, first, system can go to hibernate or standby with a debugger attached, at least it can when you use softice; second, unfortunately, when system come back from hibernate or standby, the break point can not work, perhaps the debugger comes up too late to catch the debug event, but I think you can use a host debugger to debug the target computer with WinDbg, it might work.
Felix
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
So after you resume the device still shows up in device manager as active, but doesn’t work. How do you define “doesn’t work”?
Do you only expose a PDO for the media when there’s a card in the slot? Or do you expose the PDO all the time and set the removable media bit in its inquiry data? Or something else entirely?
SCSIPORT probably won’t power the adapter up unless there’s pending I/O on one of its devices. If you have no media in your reader then you have no active I/O so you may not see yourself turned back on.
You could run rescan.exe (if it’s still in the resource kit) or send your adapter an IOCTL_SCSI_RESCAN_BUS control and see if that gets it working again.
-p
From: xxxxx@lists.osr.com on behalf of cracker_prince@163.com
Sent: Wed 8/30/2006 2:52 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Why doesn’t my driver work after return from system standby or hibernate?
Okay, first, system can go to hibernate or standby with a debugger attached, at least it can when you use softice; second, unfortunately, when system come back from hibernate or standby, the break point can not work, perhaps the debugger comes up too late to catch the debug event, but I think you can use a host debugger to debug the target computer with WinDbg, it might work.
Felix
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
> Just out of curiosity, can a system go to hibernate or standby with a
debugger attached?
Yes it can.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
Hi, Peter, thanks for reply. “doesn’t work” means it can not arose any system IRQs when the SD card plug into the device, it can’t work. The “rescan.exe” works, it can “wake up” my adapter, so I want to write a service application to monitor system’s behavior, it can rescan the SCSI bus to make my adapter “wake up” when system return from standby or hibernate. Do you think this is a right way to fix the bug?
Regards
Felix
perhaps a scsi miniport is not the best model for your driver then. You could enumerate a PDO on your own and handle the SRBs and media state management yourself.
d