Bug 198035 - incorrect declaration in starfire.c
Summary: incorrect declaration in starfire.c
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: i386 Linux
: P1 normal
Assignee: drivers_network@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-29 14:30 UTC by Steve Holton
Modified: 2017-11-30 02:42 UTC (History)
2 users (show)

See Also:
Kernel Version: linux 4.x and 3.x pae kernels
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Steve Holton 2017-11-29 14:30:48 UTC
In drivers/net/ethernet/adaptec/starfire.c at line 653, ioaddr is declared as a (signed) long. This should instead be declared as an unsigned long, as memory addresses cannot really be negative. This allows ioremap() to correctly remap the address in a >32 bit context. 

See additional bug details in https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1717259

Impact: Adaptec ethernet hardware utilizing the starfire driver fails to initialize with 4.x series kernels and 3.x pae kernels.

Steps to reproduce:
Attempt to load current starfire module on a system with this hardware installed: 
   modprobe -v starfire

Actual Results:
Output from dmesg when loading current starfire module on system with this hardware equipped:
[ 1109.362648] ioremap: invalid physical address fffffffffe480000
[ 1109.362657] starfire 0000:08:04.0: cannot Remap 0x80000 @ 0xfe480000, aborting

Proposed patch:
Modify line 653 to declare ioaddr as an unsigned long int.

653     unsigned long ioaddr;

Expected Results:
Output from dmesg when loading modified starfire module on system with this hardware equipped:
[ 1237.456827] eth2: Adaptec Starfire 6915 at f8a00000, 00:00:d1:ef:f6:d1, IRQ 25.
[ 1237.488583] starfire 0000:08:04.0 eth23: renamed from eth2
[ 1237.655434] eth23: MII PHY found at address 1, status 0x7809 advertising 0x01e1.
[ 1237.655441] eth23: scatter-gather and hardware TCP cksumming enabled.

Note You need to log in before you can comment on or make changes to this bug.