SMSC9118 NDIS ethernet driver, to connect LAN9115 directly to a PXA270 (no glue logic like cpld)



Hi,
I am trying to integrate in windows ce5.0 smsc driver for 911x family.
The driver from SMSC is built for MAINSTONE II bsp, but I connected the
chip directly to a GPIO that I configure as an INT source for PXA270.
1- I defined a new phisycal code for the new int source
2- I defined a new SYSINTR and assigned it to the SMSC with the proper
registry key
3- I configured the PXA270 pin as in input irq active of falling edge
4- I manage the pin from BSPIntrEnableIrq, BSPIntrDisableIrq and
BSPIntrDoneIrq functions
5- I modified the original smsc911x driver to work with edge level
triggered interrupt instead of level-interrupt.

- The Driver is able to initialize the chip succesfully (see debug
messages below), activity led flashes correctly.
- Using breakpoint I see that the Smsc11xISR handler is executed 2
times,
- I see the SMSC911x1 interface under "Network and Dial Up connections"

BUT (both DEBUG and RELEASE version)
- the chip does not reply nor to PING nor to ARP requests.
- If I try to change the IP address right clicking on the SMSC911x1
adapter, then the pointer turns into a hour glass forever.

Can anyone please help me with any hint?
Thanks in advance
Marco
AXESS TMC Italy
Here below some relevant debug messages:

******** INITIALIZATION *******************
ndisMInitializeAdapter: Miniport 0003B9C0,
==>ndisQueueMiniportOnDriver: Miniport 0003B9C0, MiniBlock 0003B620
<==ndisQueueMiniportOnDriver: Miniport 0003B9C0, MiniBlock 0003B620, rc
1
==>NdisMSetAttributesEx: Miniport 0003B9C0
>>> Loading module smsc911x.dll at address 0x01BD0000-0x01BEC000
Loaded symbols for
'C:\WINCE500\PBWORKSPACES\CORSOCE\RELDIR\ARROW_ARMV4I_DEBUG\SMSC911X.DLL'
DRIVER_VERSION : 103,
BUILD # : 111705
==>NdisInitializeWrapper
<==NdisInitializeWrapper
==>NdisMRegisterMiniport: NdisWrapperHandle 0003C320
==>ndisRegisterMiniportDriver: NdisWrapperHandle 0003C320
<==ndisRegisterMiniportDriver: MiniBlock 0003C390
NdisMRegisterMiniport: MiniBlock 0003C390
<==NdisMRegisterMiniport: MiniBlock 0003C390, Status 0

ndisMInitializeAdapter: Miniport 0003C5A8,
==>ndisQueueMiniportOnDriver: Miniport 0003C5A8, MiniBlock 0003C390
<==ndisQueueMiniportOnDriver: Miniport 0003C5A8, MiniBlock 0003C390, rc
1
Rx DMA
Tx DMA
16Bit Mode
Lan9115 identified. ID_REV = 0x01150001
==>NdisMSetAttributesEx: Miniport 0003C5A8
***NDIS*** (a, 534)
==>NdisMRegisterInterrupt: Miniport 0003C5A8 Vector 0
NDIS:: CeConnectInterrupt() --> IRQ[0] SYSINTR[31]
***NDIS*** (a, 753)
<==NdisMRegisterInterrupt: Miniport 0003C5A8, Status 0
SMSC_WARNING:
ExtPhy is not detected. Switch to Internal Phy
SMSC_WARNING:
Passed Loop Back Test, reset 0 times

==>NdisMRegisterAdapterShutdownHandler: Miniport 0003C5A8
<==NdisMRegisterAdapterShutdownHandler: Miniport 0003C5A8
NDIS: Adapter SMSC911X1 - NOT using OPTIMIZED RX handler
NDIS:: CE_DeleteBusFriendlyNames() failed deleting
[HKLM\Comm\BusFriendlyNames]

................

TCPIP.Register()
DEVICE!RegReadActivationValues
RegQueryValueEx(TCPIP\IPDevice\BusPrefix) returned 2
DEVICE!I_ActivateDeviceEx: couldn't activate: prefix IPD, index 0, dll
tcpstk.dll, context 0x802dd7c
DEVICE!RegReadActivationValues
RegQueryValueEx(TCPIP\TCPDevice\BusPrefix) returned 2
DEVICE!I_ActivateDeviceEx: couldn't activate: prefix TCP, index 0, dll
tcpstk.dll, context 0x802dd7c
TCPIP.About to register
CreateInterface(IF 2/001FC8F0):
\DEVICE\TCPIP6_{48fce3fc-ec30-e50e-f1a7-71172aeee3ae} -> 0
CreateInterface(IF 3/001FCB50):
\DEVICE\TCPIP6_{a995346e-9f3e-2edb-47d1-9cc7ba01cd73} -> 0
CreateInterface(IF 4/001FCD50):
\DEVICE\TCPIP6_{bade68b3-9fc9-5e9e-6285-d4f8e3e476dd} -> 0
MIPV6: Could not open registry key... skipping
CreateInterface(IF 5/001FD6D0):
\DEVICE\TCPIP6_{4886981f-ebb8-e501-17ba-38966bfd4e6d} -> 0
CreateNTE(IF 5/001FD6D0, Addr fe80::280:fff:fe11:7000) -> NTE 001FD990
*v6CreatInterface: setting v6IPTimerOn to 1
SynchronizeMulticastAddresses(IF 001FD6D0) 0 + 2 + 0

......................................

Ndisuio:
 Status: Open 004678F0 in power state 0, Status 40010004 ignored
 LanStatus(001FCF50) - start reset
 NDIS: Adapter SMSC911X1 - NOT using OPTIMIZED RX handler
 ***NDIS*** (10, 2021)
 Bad driver, indicating broadcast when not set to.
 ***NDIS*** (10, 2021)
 Bad driver, indicating broadcast when not set to.
 ***NDIS*** (10, 2021)
 Bad driver, indicating broadcast when not set to.
 ***NDIS*** (10, 2021)
 Bad driver, indicating broadcast when not set to.
 LanRegister: Adapter failed to initialize. Status = 0xc0010019
 LanPnPEvent(00000000) - binds complete
==>ndisMKillOpen: Open 004603B0
<==ndisMKillOpen: Open 004603B0, rc 0
 UIO:: NdisRequest() failed.  pOpenContext [0x4678f0] retry [1]
SynchronizeMulticastAddresses(001FD6D0) -> 10003
 [NOTIFY] HandleSystemEvent 5 none
 [NOTIFY] HandleSystemEvent 7 /ADD UIO1:
 SNMP: Initialization Complete
 DEVICE!RegReadActivationValues
RegQueryValueEx(Drivers\BuiltIn\autoras\BusPrefix) returned 2
 AUTORAS:: ARS_Init()..
 AUTORAS:: Reg[Dialer] = [rnaapp.exe]
 AUTORAS:: Reg[RasEntryOpt] = [-e]
 AUTORAS:: Reg[NoPromptOpt] = [-p]
 UIO:: WARNING! Failed OID_GEN_MAC_OPTIONS for [SMSC911X1]
 UIO:: Exiting ndisuioWaitForPendingIO with [0] pending TX.
 ==>ndisMKillOpen: Open 00469290
 <==ndisMKillOpen: Open 00469290, rc 0
 [NOTIFY] HandleSystemEvent 7 /ADD ARS1:

..........................................................

Loaded symbols for
'C:\WINCE500\PBWORKSPACES\CORSOCE\RELDIR\ARROW_ARMV4I_DEBUG\NSPM.DLL'
DEVICE!RegReadActivationValues
RegQueryValueEx(Drivers\BuiltIn\Ethman\BusPrefix) returned 2
>>> Loading module ethman.dll at address 0x03BC0000-0x03BC7000 (RW data at 0x01FC5000-0x01FC5554)
Loaded symbols for
'C:\WINCE500\PBWORKSPACES\CORSOCE\RELDIR\ARROW_ARMV4I_DEBUG\ETHMAN.DLL'
UIO:: WARNING! Failed OID_GEN_MAC_OPTIONS for [SMSC911X1]
UIO:: Exiting ndisuioWaitForPendingIO with [0] pending TX.
==>ndisMKillOpen: Open 00465F40
<==ndisMKillOpen: Open 00465F40, rc 0
DEVICE!RegReadActivationValues
RegQueryValueEx(Drivers\BuiltIn\credsvc\BusPrefix) returned 2
[NOTIFY] HandleSystemEvent 7 /ADD ETM1:


****** TRIED TO CHANGE IP FROM SMSC911x1 ADAPTER PROPERTIES ********
******** POINTER TURNS INTO HOUR GLASS FOREVER **********

NETUI detach called
 UIO:: UIO_Close() called..
 UIO:: $$$ User Context [0x4725a0] deleted $$$
 <<< Unloading module netui.dll at address 0x03BD0000-0x03C27000 (RW
data at 0x01FC7000-0x01FCD7E8)
Unloaded symbols for
'C:\WINCE500\PBWORKSPACES\CORSOCE\RELDIR\ARROW_ARMV4I_DEBUG\NETUI.DLL'
==>ndisCloseMiniportBindings, Miniport 0003C5A8
==>ndisUnbindProtocol: Open 0005E610, Notify 0
==>ndisReferenceProtocol
    Protocol:
TCPIP6
, RefCount: 3
<==ndisReferenceProtocol
DestroyIF(IF 5/001FD6D0) -> disabled
DestroyNTE(NTE 001FD990, Addr fe80::280:fff:fe11:7000) -> invalid
Route RTE 001FDBA0 ff00::/8 -> IF 001FD6D0 released
Route RTE 001FDA20 fe80::280:fff:fe11:7000/128 -> NCE 001FC820 released
[NOTIFY] HandleSystemEvent 6 none
NetTableCleanup(NTE 001FD990, Addr fe80::280:fff:fe11:7000) ->
destroyed
SynchronizeMulticastContext(IF 001FD6D0) - disabled (1 refs)
InterfaceCleanup(IF 5/001FD6D0) -> destroyed
DeregisterInterfaceWorker(IF 5/001FD6D0) -> freed
==>NdisCloseAdapter
    Protocol:
TCPIP6
 is closing Adapter:
SMSC911X1

==>ndisMKillOpen: Open 0005E610
***NDIS*** (b, 2912)
==>ndisMQueueWorkItem
***NDIS*** (b, 2945)
<==ndisMQueueWorkItem
!=0 Open 0x5e610 References 0x3
- Open 0x5e610 Reference 0x3
***NDIS*** (c, 712)
==>ndisMDoRequests
***NDIS*** (c, 1072)
<==ndisMDoRequests
<==ndisMKillOpen: Open 0005E610, rc 0
<==NdisCloseAdapter

.



Relevant Pages

  • Re: Loading Unloading NDIS Intermediate Dirver
    ... Each miniport adapter must have a unique name. ... driver inserts itself between an underlying adapter and a protocol driver, ...
    (microsoft.public.windowsce.platbuilder)
  • Re: WDF storage driver is a dead-end street
    ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... AHCI controller card, etc. ... Since the extension is passed in the miniport at ... So I need to create a virtual adapter out of two physical adapters. ...
    (microsoft.public.development.device.drivers)
  • Re: NetBIOS Routing
    ... of its virtual adapter instances. ... device gets plugged in our out, you simply talk to whichever miniport ... And one MUX IM driver, ... >>> In this type of setup is the mux miniport not used. ...
    (microsoft.public.development.device.drivers)
  • Re: virtual NIC question
    ... A virtual network adapter driver, i.e. an NDIS miniport driver, that ... needs to talk to a physical NIC (or any other underlying adapter) ... NDIS intermediate drivers implement both a miniport and a protocol ... can talk to any number of physical NICs. ...
    (microsoft.public.development.device.drivers)
  • Re: Tcpip.sys bug: FTP Upload. MiniportHalt isnt called untill it has
    ... cancel packets on the miniport driver. ... driver, this bug would have been discovered long, long ago. ... handler and that does return all unsent packets to Ndis. ... hanging the PnP manager with device ...
    (microsoft.public.development.device.drivers)