参考Mainstone平台驱动,修改注册表项
[HKEY_LOCAL_MACHINE/Comm/SMSC91181/Parms]
"BusNumber"=dword:0
"BusType"=dword:0
"InterruptNumber"=dword:0 ; Dummy Value
"IoBaseAddress"=dword:14000000 ; ETHERNET_BASE (Physical Addr)
;"SysIntr"=dword:1E ; SYSINTR for 118 (Mainstone CE.NET 5.0)
"PhyAddress"=dword:20 ; PHY address (0x20:Auto, 0xFF:Internal)
"RxDMAMode"=dword:0 ; 1-DMA, 0-PIO
"TxDMAMode"=dword:0 ; 1-DMA, 0-PIO
"FlowControl"=dword:1 ; 1-Enabled, 0-Disabled
; LinkMode will replace Duplex, Speed and FlowControl
; bit7: RESERVED, bit6: ANEG, bit5: ASymmetric Pause, bit4: Symmetric Pause
; bit3: 100FD, bit2: 100HD, bit1: 10FD, bit0: 10HD
"LinkMode"=dword:7F
; Setting Auto-Mdix Status
; 0: Override strap, Disable Auto Mdix, straight cable
; 1: Override strap, Disable Auto Mdix, CrossOver cable
; 2: Override strap, Enable Auto Mdix
; Others or No Keyword: AutoMdix controlled by strap
"AutoMdix"=dword:3
; INT_CFG value applied following HW_CFG_SRST_. Note valid settings below:
"IntCfg"=dword:0 ; bit4:IRQ_POL, bit0:IRQ_TYP (11/10/1/0)
这里的SysIntr可以屏蔽掉,因为调用如下函数可以,根据NDIS可以根据irq自己注册一个sysintr
NdisMRegisterInterrupt (&(pAdapter->Interrupt),
pAdapter->hMiniportAdapterHandle,
(UINT)pAdapter->ucInterruptNumber,
(UINT)pAdapter->ucInterruptNumber,
(BOOLEAN)TRUE,
(BOOLEAN)TRUE,
NdisInterruptLatched);
主要ap的gpio中断要在NdisMRegisterInterrupt 函数之后enable,否则产生的中断并未跟sysintr绑定NDIS将不会调用Smsc9118Isr中断线程没清9221的中断寄存器将直接导致不再产生中断。