From: David Miller <davem@davemloft.net>
To: linus.walleij@linaro.org
Cc: netdev@vger.kernel.org, arnd@arndb.de, jakub.kicinski@netronome.com
Subject: Re: [PATCH net-next 09/10 v2] net: ethernet: ixp4xx: Get port ID from base address
Date: Sun, 03 Nov 2019 17:43:11 -0800 (PST) [thread overview]
Message-ID: <20191103.174311.1939967870267945019.davem@davemloft.net> (raw)
In-Reply-To: <20191101130224.7964-10-linus.walleij@linaro.org>
From: Linus Walleij <linus.walleij@linaro.org>
Date: Fri, 1 Nov 2019 14:02:23 +0100
> @@ -1388,13 +1387,15 @@ static int ixp4xx_eth_probe(struct platform_device *pdev)
> regs_phys = res->start;
> port->regs = devm_ioremap_resource(dev, res);
>
> - switch (port->id) {
> - case IXP4XX_ETH_NPEA:
> + switch (res->start) {
> + case 0xc800c000:
This is extremely non-portable.
The resource values are %100 opaque architecture specific values.
On sparc64 for example, it is absolutely not the bus address but rather
the physical address that the cpu needs to use to perform MMIO's to what
is behind that resource.
I'm not applying this, sorry.
next prev parent reply other threads:[~2019-11-04 1:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-01 13:02 [PATCH net-next 00/10 v2] IXP4xx networking cleanups Linus Walleij
2019-11-01 13:02 ` [PATCH net-next 01/10 v2] wan: ixp4xx_hss: fix compile-testing on 64-bit Linus Walleij
2019-11-01 13:02 ` [PATCH net-next 02/10 v2] wan: ixp4xx_hss: prepare compile testing Linus Walleij
2019-11-01 13:02 ` [PATCH net-next 03/10 v2] ptp: ixp46x: move adjacent to ethernet driver Linus Walleij
2019-11-01 13:02 ` [PATCH net-next 04/10 v2] ixp4xx_eth: move platform_data definition Linus Walleij
2019-11-01 13:02 ` [PATCH net-next 05/10 v2] net: ethernet: ixp4xx: Standard module init Linus Walleij
2019-11-01 13:02 ` [PATCH net-next 06/10 v2] net: ethernet: ixp4xx: Use distinct local variable Linus Walleij
2019-11-01 13:02 ` [PATCH net-next 07/10 v2] net: ehernet: ixp4xx: Use netdev_* messages Linus Walleij
2019-11-01 13:02 ` [PATCH net-next 08/10 v2] ARM/net: ixp4xx: Pass ethernet physical base as resource Linus Walleij
2019-11-01 13:02 ` [PATCH net-next 09/10 v2] net: ethernet: ixp4xx: Get port ID from base address Linus Walleij
2019-11-04 1:43 ` David Miller [this message]
2019-11-05 10:27 ` Linus Walleij
2019-11-05 17:18 ` David Miller
2019-11-01 13:02 ` [PATCH net-next 10/10 v2] net: ethernet: ixp4xx: Use parent dev for DMA pool Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191103.174311.1939967870267945019.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=arnd@arndb.de \
--cc=jakub.kicinski@netronome.com \
--cc=linus.walleij@linaro.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).