I have seen a smilar behaviour. When the device is loaded (In my case a COM device) and when it is not used by any apps, the OS sends it to power down mode IRP_MN_SET_POWER D3 and then Bus Master Enable bit will be disabled by the PCI bus driver. If u open the driver with any of ur application (say hyperterminal), PCI bus driver will re-enable the bit, and ur IRP_MN_SET_POWER D0 will be called. This is in accordance with PCI power management specifications. May be something similar may be happening in your case. Or your device may not be bus master capable ? regards, Anoop NeST www.nesttech.com -----Original Message----- From: Nitin Porwal, Noida [mailto:nitinp@xxxxxxxxxxxxxxxxx] Sent: Monday, March 01, 2004 9:34 AM To: 'wdmaudiodev@xxxxxxxxxxxxx ' Subject: [wdmaudiodev] Writing to PCI configuration space??? Hi, I am writing a driver for PCI based device. I am having some problem writing PCI configuration space. I have to write 0x0006 to Command register of PCI config space. but when i read back the written values it shows 0x0002. Does anybody have any idea why this happens. There is also a strange thing happening to me, when i reboot the system the PCI config space's command register value comes as 0x0002 (before writing to it), but when i load the driver through device manager i get the value 0x0. when i write 0x0006 to command register and read it back, i get 0x0002 every time. I am using PCI_COMMON_CONFIG structure to write to PCI config space, i just create an IRP packet and pass it to low level driver i.e. bus driver. To read it i use IRP_MN_READ and to write i use IRP_MN_WRITE minor functions. If anybody have any idea about it please revert back to me. Thanks Nitin ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.de/ ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.de/