netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Two I/O memory regions in /proc/iomem for a NIC
@ 2006-07-02  7:24 John Que
  2006-07-02  9:12 ` Lennert Buytenhek
  2006-07-02 11:12 ` Jeff Garzik
  0 siblings, 2 replies; 5+ messages in thread
From: John Que @ 2006-07-02  7:24 UTC (permalink / raw)
  To: netdev

Hello,

I had noticed that there are machines where
if I ran cat /proc/iomem I see one I/O memory region for the NIC
I am using; while there are other machines where
I see 2 regions for the NIC I/O memory.

For example, on a machine with e1000 NIC adapter,
I see the following 2 I/O memory regions for the NIC:
fc9a0000-fc9bffff : 0000:03:04.0
    fc9a0000-fc9bffff : e1000
fc9c0000-fc9dffff : 0000:03:03.0
    fc9c0000-fc9dffff : e1000

while on a machine with realtek 8139too NIC I see only one region:
ec103000-ec1030ff : 0000:00:0a.0
  ec103000-ec1030ff : 8139too

But when looking at the code of both NICs, there
is only one call to pci_request_regions(), which seems
quite similiar in both cases and is called only once;

see the call to pci_request_regions() in drivers/net/e1000/e1000_main.c
and in drivers/net/8139too.c.

Any idea why is this so ? can anybody say 3-4 sentences
about this ?

TIA,
-- John

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Two I/O memory regions in /proc/iomem for a NIC
  2006-07-02  7:24 Two I/O memory regions in /proc/iomem for a NIC John Que
@ 2006-07-02  9:12 ` Lennert Buytenhek
  2006-07-02 11:12 ` Jeff Garzik
  1 sibling, 0 replies; 5+ messages in thread
From: Lennert Buytenhek @ 2006-07-02  9:12 UTC (permalink / raw)
  To: John Que; +Cc: netdev

On Sun, Jul 02, 2006 at 10:24:10AM +0300, John Que wrote:

> I had noticed that there are machines where
> if I ran cat /proc/iomem I see one I/O memory region for the NIC
> I am using; while there are other machines where
> I see 2 regions for the NIC I/O memory.
> 
> For example, on a machine with e1000 NIC adapter,
> I see the following 2 I/O memory regions for the NIC:
> fc9a0000-fc9bffff : 0000:03:04.0
>    fc9a0000-fc9bffff : e1000
> fc9c0000-fc9dffff : 0000:03:03.0
>    fc9c0000-fc9dffff : e1000

Is it a dual-port NIC by any chance?


cheers,
Lennert

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Two I/O memory regions in /proc/iomem for a NIC
  2006-07-02  7:24 Two I/O memory regions in /proc/iomem for a NIC John Que
  2006-07-02  9:12 ` Lennert Buytenhek
@ 2006-07-02 11:12 ` Jeff Garzik
  2006-07-02 15:37   ` John Que
  1 sibling, 1 reply; 5+ messages in thread
From: Jeff Garzik @ 2006-07-02 11:12 UTC (permalink / raw)
  To: John Que; +Cc: netdev

On Sun, Jul 02, 2006 at 10:24:10AM +0300, John Que wrote:
> Hello,
> 
> I had noticed that there are machines where
> if I ran cat /proc/iomem I see one I/O memory region for the NIC
> I am using; while there are other machines where
> I see 2 regions for the NIC I/O memory.
> 
> For example, on a machine with e1000 NIC adapter,
> I see the following 2 I/O memory regions for the NIC:
> fc9a0000-fc9bffff : 0000:03:04.0
>    fc9a0000-fc9bffff : e1000
> fc9c0000-fc9dffff : 0000:03:03.0
>    fc9c0000-fc9dffff : e1000

There could be 1001 reasons.  Overall, it's not important :)

e1000 driver will reserve all regions made available by the PCI device.

	Jeff




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Two I/O memory regions in /proc/iomem for a NIC
  2006-07-02 11:12 ` Jeff Garzik
@ 2006-07-02 15:37   ` John Que
  2006-07-03 21:30     ` Lennert Buytenhek
  0 siblings, 1 reply; 5+ messages in thread
From: John Que @ 2006-07-02 15:37 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev

Hello,
Thanks for your answers.

I  checked again:  On the machine with e1000 driver, it was in fact a
machine with 2
e1000 NICs.

However, if I am not wrong, it happened I also saw 2 I/O regions on a
machine with one NIC
(RealTek 8139too) when typing cat /proc/iomem. I am not sure though.

Let me please rephrase my question:
As I understand , the NIC "probe" method is called only ONCE
(also when we have 2 NICs , which are identical so have the same
vendor ID; I hope I am not ).
So:
Could a single call to
pci_request_regions(pdev, driver_name)
result in that we see 2 regions afterwards when running
cat /proc/iomem?

As I understand, indeed this is the case.
Regards,
John




On 7/2/06, Jeff Garzik <jeff@garzik.org> wrote:
> On Sun, Jul 02, 2006 at 10:24:10AM +0300, John Que wrote:
> > Hello,
> >
> > I had noticed that there are machines where
> > if I ran cat /proc/iomem I see one I/O memory region for the NIC
> > I am using; while there are other machines where
> > I see 2 regions for the NIC I/O memory.
> >
> > For example, on a machine with e1000 NIC adapter,
> > I see the following 2 I/O memory regions for the NIC:
> > fc9a0000-fc9bffff : 0000:03:04.0
> >    fc9a0000-fc9bffff : e1000
> > fc9c0000-fc9dffff : 0000:03:03.0
> >    fc9c0000-fc9dffff : e1000
>
> There could be 1001 reasons.  Overall, it's not important :)
>
> e1000 driver will reserve all regions made available by the PCI device.
>
>         Jeff
>
>
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Two I/O memory regions in /proc/iomem for a NIC
  2006-07-02 15:37   ` John Que
@ 2006-07-03 21:30     ` Lennert Buytenhek
  0 siblings, 0 replies; 5+ messages in thread
From: Lennert Buytenhek @ 2006-07-03 21:30 UTC (permalink / raw)
  To: John Que; +Cc: netdev

On Sun, Jul 02, 2006 at 06:37:18PM +0300, John Que wrote:

> Could a single call to
> pci_request_regions(pdev, driver_name)
> result in that we see 2 regions afterwards when running
> cat /proc/iomem?

Sure.  Take a look at the output of 'lspci -v' some time.  On my
machine, for example, I have:

05:11.0 Ethernet controller: Intel Corporation 82546GB Gigabit Ethernet Controller (rev 03)
        Subsystem: Intel Corporation PRO/1000 MT Dual Port Network Connection
        Flags: bus master, 66Mhz, medium devsel, latency 64, IRQ 10
        Memory at cffc0000 (64-bit, non-prefetchable) [size=128K]   <===
        Memory at cff00000 (64-bit, non-prefetchable) [size=256K]   <===
        I/O ports at e400 [size=64]
        Expansion ROM at cfec0000 [disabled] [size=256K]
        Capabilities: <available only to root>

05:11.1 Ethernet controller: Intel Corporation 82546GB Gigabit Ethernet Controller (rev 03)
        Subsystem: Intel Corporation PRO/1000 MT Dual Port Network Connection
        Flags: bus master, 66Mhz, medium devsel, latency 64, IRQ 11
        Memory at cffe0000 (64-bit, non-prefetchable) [size=128K]   <===
        Memory at cff80000 (64-bit, non-prefetchable) [size=256K]   <===
        I/O ports at e800 [size=64]
        Expansion ROM at cff40000 [disabled] [size=256K]
        Capabilities: <available only to root>

As you can see, each port of the dual-port card has two memory regions,
four a total of 4 memory regions.


cheers,
Lennert

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-07-03 21:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-02  7:24 Two I/O memory regions in /proc/iomem for a NIC John Que
2006-07-02  9:12 ` Lennert Buytenhek
2006-07-02 11:12 ` Jeff Garzik
2006-07-02 15:37   ` John Que
2006-07-03 21:30     ` Lennert Buytenhek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).