阅读:1429回复:4
2000 WDM 驱动一问,但愿有人能帮我一把
我的驱动程序(WDM,2000 DDK)在单个设备(PCI)时
能够稳定的接收数据(设备支持DMA), 如果在设 备工作同时执行一次网络拷贝(网卡所用的中断 号和我的一样),就会死机,原因是中断无法撤 销。哪位大虾能够告诉我这可能是什么原因??? 谢谢!! Isr 函数: BOOLEAN PrivateInterruptService ( IN PKINTERRUPT Interrupt, IN PVOID ServiceContext ) /*++ Routine Description: This routine is called whenever our device assert INTA signal. Arguments: Return Value: --*/ { USHORT intcsr; PDEVICE_EXTENSION pdx; pdx = (PDEVICE_EXTENSION) ServiceContext; // Read INTCSR ( now is renamed INTSTATR ) . intcsr = READ_REGISTER_USHORT( (PUSHORT)(pdx->RegisterBaseAddr + NDPCI_INTCSR) ); // If it is not our device assert a INTA signal , then do nothing but return FALSE. if( intcsr == 0 ) return FALSE; KdPrint((DRIVERNAME \" - Got inerrupt , intcsr = %x- \\n\" , intcsr )); // Why do our device asserted interrupt ? // ... Because dma channel 0 transfer is complete. if( intcsr & NDPCI_DMA0_DONE ) { WRITE_REGISTER_UCHAR( pdx->RegisterBaseAddr + NDPCI_DMACSR0 , BIT1 ); KeInsertQueueDpc( &pdx->Dma0Dpc , NULL , NULL ); } // ... Because dma channel 1 transfer is complete. if( intcsr & NDPCI_DMA1_DONE ) { WRITE_REGISTER_UCHAR( pdx->RegisterBaseAddr + NDPCI_DMACSR1 , BIT1 ); KeInsertQueueDpc( &pdx->Dma1Dpc , NULL , NULL ); } // ... Because dma channel 2 transfer is complete. if( intcsr & NDPCI_DMA2_DONE ) { WRITE_REGISTER_UCHAR( pdx->RegisterBaseAddr + NDPCI_DMACSR2 , BIT1 ); KeInsertQueueDpc( &pdx->Dma2Dpc , NULL , NULL ); } return TRUE; } // PrivateInterruptService |
|
沙发#
发布于:2003-07-29 04:02
you can try this and see the output message:
if( intcsr == 0 ) { KdPrint((DRIVERNAME \" - Not My interrupt ,intcsr = %x- \\n\" , intcsr )); return FALSE; } |
|
板凳#
发布于:2003-07-29 08:57
我的驱动程序(WDM,2000 DDK) 中断的返回是,,return FALSE; 你可以试一下........ |
|
地板#
发布于:2003-07-29 11:40
感谢 hong 和 lstart 两位朋友的回复。
我将板卡插到另一台机器上发现和网卡能够同时正常工作, 目前还在进一步测试中。。。 怀疑问题和主板,bios 有关系,但还不能确定。 |
|
地下室#
发布于:2003-07-29 13:10
不知道你有没有看dump文件,因该帮助很大。
|
|