lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a15869500810220005h76149fd1w5d325ff18659fa74@mail.gmail.com>
Date:	Wed, 22 Oct 2008 09:05:20 +0200
From:	"Eliezer Tamir" <eliezer.tamir@...il.com>
To:	"Arjan van de Ven" <arjan@...radead.org>
Cc:	netdev@...r.kernel.org, davem@...emloft.net,
	"Eilon Greenstein" <eilong@...adcom.com>
Subject: Re: [PATCH] pci: use pci_ioremap_bar() in drivers/net

BNX2X devices have two BARs.
You might want to convert both.

Cheers,
Eliezer

On Tue, Oct 21, 2008 at 6:42 AM, Arjan van de Ven <arjan@...radead.org> wrote:
> Now that Linus added the pci_ioremap_bar() helper macro, this can go through
>
>
> From: Arjan van de Ven <arjan@...ux.intel.com>
> Date: Sun, 28 Sep 2008 16:17:08 -0700
> Subject: [PATCH] pci: use pci_ioremap_bar() in drivers/net
>
> Use the newly introduced pci_ioremap_bar() function in drivers/net.
> pci_ioremap_bar() just takes a pci device and a bar number, with the goal
> of making it really hard to get wrong, while also having a central place
> to stick sanity checks.
>
> CC: netdev@...r.kernel.org
> Signed-off-by: Arjan van de Ven <arjan@...ux.intel.com>
> ---
>  drivers/net/bnx2x_main.c                 |    3 +--

...
>
> diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
> index fce7451..8f7c3e9 100644
> --- a/drivers/net/bnx2x_main.c
> +++ b/drivers/net/bnx2x_main.c
> @@ -10090,8 +10090,7 @@ static int __devinit bnx2x_init_dev(struct pci_dev *pdev,
>
>        dev->irq = pdev->irq;
>
> -       bp->regview = ioremap_nocache(dev->base_addr,
> -                                     pci_resource_len(pdev, 0));
> +       bp->regview = pci_ioremap_bar(pdev, 0);
>        if (!bp->regview) {
>                printk(KERN_ERR PFX "Cannot map register space, aborting\n");
>                rc = -ENOMEM;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ