From: Ivy Lopez <skunkolee@gmail.com>
To: Ion Badulescu <ionut@badula.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Ivy Lopez <skunkolee@gmail.com>
Subject: [PATCH] net: starfire: fix ioaddr sign-extension causing ioremap() failure
Date: Sat, 15 Aug 2026 13:24:32 -0600 [thread overview]
Message-ID: <20260815192432.38951-1-skunkolee@gmail.com> (raw)
ioaddr is declared as a signed long, but is assigned the result of
pci_resource_start(), which returns an unsigned resource_size_t.
On configurations where the BAR address has its high bit set, the
value sign-extends when passed to ioremap(), producing a bogus
64-bit address and causing device probe to fail:
ioremap: invalid physical address fffffffffe480000
starfire 0000:08:04.0: cannot Remap 0x80000 @ 0xfe480000, aborting
Change ioaddr to unsigned long so pci_resource_start()'s value is
preserved correctly.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=198035
Signed-off-by: Ivy Lopez <skunkolee@gmail.com>
Signed-off-by: Ivy Lopez <skunkolee@gmail.com>
---
drivers/net/ethernet/adaptec/starfire.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/adaptec/starfire.c b/drivers/net/ethernet/adaptec/starfire.c
index f1109d90e1fc..b72b393e6fb2 100644
--- a/drivers/net/ethernet/adaptec/starfire.c
+++ b/drivers/net/ethernet/adaptec/starfire.c
@@ -634,7 +634,7 @@ static int starfire_init_one(struct pci_dev *pdev,
int i, irq, chip_idx = ent->driver_data;
struct net_device *dev;
u8 addr[ETH_ALEN];
- long ioaddr;
+ unsigned long ioaddr;
void __iomem *base;
int drv_flags, io_size;
int boguscnt;
--
2.55.0
next reply other threads:[~2026-08-15 19:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-15 19:24 Ivy Lopez [this message]
2026-08-19 8:37 ` [PATCH] net: starfire: fix ioaddr sign-extension causing ioremap() failure Simon Horman
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=20260815192432.38951-1-skunkolee@gmail.com \
--to=skunkolee@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ionut@badula.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.