mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
net: starfire: fix ioaddr sign-extension causing ioremap() failure
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 resource_size_t, matching both the return type of pci_resource_start() and the type ioremap() expects for its physical address argument, rather than unsigned long, which is not guaranteed to be wide enough on all configurations. Switch the associated error print to %pa accordingly. Link: https://bugzilla.kernel.org/show_bug.cgi?id=198035 Signed-off-by: Ivy Lopez <skunkolee@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260909002829.224639-1-skunkolee@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
99d76b4da8
commit
f5f0fcfcb3
1 changed files with 3 additions and 3 deletions
Loading…
Add table
Add a link
Reference in a new issue