XPe miniport with dual ports

Basic question - shouldn’t a Windows XP embedded NDIS 5 miniport driver’s initialization routine be called twice if the hardware has dual ports?

I am assuming the PCI bus driver is aware of both ports. The MiniportInitialize routine is only called once. I have been called in to fix this.

I can supply a lot more information, but I thought I would leave it as the simple question as to how NDIS 5 and the PCI bus driver handle an Ethernet card with dual ports.

The DriverEntry routine calls NdisMInitializeWrapper, allocates an NDIS_MINIPORT_CHARACTERISTICS structure and fills it in for NDIS 5, calls NdisMRegisterMiniport and if successful allocates some memory for h/w function pointers, calls NdisMRegisterUnloadHandler, returns either STATUS_SUCCESS or STATUS_UNSUCCESSFUL.

Later on, the initialize routine is called once.

Am I correct in my assumption that PCI should see dual ports and that MiniportInitialize will be called twice?

Paul

I have been told that it works fine in Linux.

I don’t know ndis, but in storage we would only do that if there were two separate controllers on the chip/card, with separate PCI functions or devices for each controller

One controller with two ports would have been one call for the driver to initialize and the driver would then report the number of ports it had.

-p

Sent from my Windows Phone


From: xxxxx@gmail.commailto:xxxxx
Sent: ?3/?24/?2015 7:59 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] XPe miniport with dual ports

Basic question - shouldn’t a Windows XP embedded NDIS 5 miniport driver’s initialization routine be called twice if the hardware has dual ports?

I am assuming the PCI bus driver is aware of both ports. The MiniportInitialize routine is only called once. I have been called in to fix this.

I can supply a lot more information, but I thought I would leave it as the simple question as to how NDIS 5 and the PCI bus driver handle an Ethernet card with dual ports.

The DriverEntry routine calls NdisMInitializeWrapper, allocates an NDIS_MINIPORT_CHARACTERISTICS structure and fills it in for NDIS 5, calls NdisMRegisterMiniport and if successful allocates some memory for h/w function pointers, calls NdisMRegisterUnloadHandler, returns either STATUS_SUCCESS or STATUS_UNSUCCESSFUL.

Later on, the initialize routine is called once.

Am I correct in my assumption that PCI should see dual ports and that MiniportInitialize will be called twice?

Paul

I have been told that it works fine in Linux.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

Does your Nic show up once or twice in device manager?

d

Bent from my phone


From: Peter Wielandmailto:xxxxx
Sent: ?3/?24/?2015 8:23 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE: [ntdev] XPe miniport with dual ports

I don’t know ndis, but in storage we would only do that if there were two separate controllers on the chip/card, with separate PCI functions or devices for each controller

One controller with two ports would have been one call for the driver to initialize and the driver would then report the number of ports it had.

-p

Sent from my Windows Phone
________________________________
From: xxxxx@gmail.commailto:xxxxx
Sent: ?3/?24/?2015 7:59 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] XPe miniport with dual ports

Basic question - shouldn’t a Windows XP embedded NDIS 5 miniport driver’s initialization routine be called twice if the hardware has dual ports?

I am assuming the PCI bus driver is aware of both ports. The MiniportInitialize routine is only called once. I have been called in to fix this.

I can supply a lot more information, but I thought I would leave it as the simple question as to how NDIS 5 and the PCI bus driver handle an Ethernet card with dual ports.

The DriverEntry routine calls NdisMInitializeWrapper, allocates an NDIS_MINIPORT_CHARACTERISTICS structure and fills it in for NDIS 5, calls NdisMRegisterMiniport and if successful allocates some memory for h/w function pointers, calls NdisMRegisterUnloadHandler, returns either STATUS_SUCCESS or STATUS_UNSUCCESSFUL.

Later on, the initialize routine is called once.

Am I correct in my assumption that PCI should see dual ports and that MiniportInitialize will be called twice?

Paul

I have been told that it works fine in Linux.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

Doron,
Thanks for your response. It is appreciated.

Only one NIC shows up in device manager.

I was suspecting that I was wrong about dual port cards being seen as two devices. I will attempt to report both ports in MiniportInitialize.

Thanks,
Paul

It is possible that you will need to write a driver to expose two children that will then be the individual miniports for each port. The parent driver would own the hardware and expose some interface to the children for TX, rx, and control

Good luck,
Dave Cattley

Sent from my Windows Phone


From: xxxxx@gmail.commailto:xxxxx
Sent: ‎3/‎24/‎2015 12:26 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] XPe miniport with dual ports

Doron,
Thanks for your response. It is appreciated.

Only one NIC shows up in device manager.

I was suspecting that I was wrong about dual port cards being seen as two devices. I will attempt to report both ports in MiniportInitialize.

Thanks,
Paul


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>