netdev
[Top] [All Lists]

Re: [PATCH] eepro100 device name <-> pci bus/slot/func mapping

To: Anton Blanchard <anton@xxxxxxxxxxxxx>
Subject: Re: [PATCH] eepro100 device name <-> pci bus/slot/func mapping
From: Jeff Garzik <jgarzik@xxxxxxxxxxxxxxxx>
Date: Wed, 31 May 2000 17:57:59 -0400
Cc: linux-kernel@xxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
Organization: MandrakeSoft
References: <20000531114830.J1417@linuxcare.com>
Sender: owner-netdev@xxxxxxxxxxx
Anton Blanchard wrote:
> --- linux/drivers/net/eepro100.c        Tue May 23 13:11:19 2000
> +++ linux_work/drivers/net/eepro100.c   Wed May 31 11:20:47 2000
> @@ -838,6 +844,10 @@
> 
>         pdev->driver_data = dev;
> 
> +#ifndef USE_IO
> +       dev->mem_start = pci_resource_start(pdev, 0);
> +       dev->mem_end = dev->mem_start + pci_resource_len(pdev, 0);

Use pci_resource_end, avoid the unnecessary addition.


> +#endif
>         dev->base_addr = ioaddr;
>         dev->irq = irq;

Why is the dev->base_addr assignment not conditional on USE_IO as well?

Or be more specific,
1) What are the semantics of mem_{start,end} versus base_addr?  And,
2) Why does ifconfig truncate a valid 32-bit address, when
dev->base_addr equals something like 0xF1234567?  I noticed this but
never got around to looking into the reason.

In any case, you point out something that needs to be fixed in many
drivers...

        Jeff




-- 
Jeff Garzik              | Liberty is always dangerous, but
Building 1024            | it is the safest thing we have.
MandrakeSoft, Inc.       |      -- Harry Emerson Fosdick

<Prev in Thread] Current Thread [Next in Thread>