adaptec starfire fails to initializewith recent kernels

Bug #1717259 reported by Steve Holton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linux
Confirmed
Medium
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Re-opening https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1473200 (expired)

Adaptec ethernet adapter using starfire driver fails to initialize when recent kernels are used.

This hardware/driver can be successfully initialized under a 3.2.0-126-generic kernel (from precise) but initialization is known to fail under 3.13.0-129-generic kernel and under -pae kernel builds of many vintages. initialization also fails under current 4.x series kernel. Full kernel bisect is not yet complete.

Specific indication from dmesg:

[ 3.536508] starfire.c:v1.03 7/26/2000 Written by Donald Becker <email address hidden>
                (unofficial 2.2/2.4 kernel port, version 2.1, July 6, 2008)
[ 3.536509] starfire: polling (NAPI) enabled
[ 3.536771] ioremap: invalid physical address fffffffffe480000
[ 3.536773] ------------[ cut here ]------------
[ 3.536784] WARNING: CPU: 1 PID: 115 at /build/linux-CK3pdl/linux-4.4.0/arch/x86/mm/ioremap.c:104 __ioremap_caller+0x40f/0x440()
[ 3.536790] Modules linked in: starfire(+) mii fjes floppy(+)
[ 3.536795] CPU: 1 PID: 115 Comm: systemd-udevd Not tainted 4.4.0-93-generic #116-Ubuntu
[ 3.536797] Hardware name: Intel /SE7501BR2S, BIOS SBR20.86B.0082.P23.0504071730 04/07/2005
[ 3.536805] c1ae9967 73b5a5ce 00000286 c01ddb90 c13add2f 00000000 c19d0e40 c01ddbc0
[ 3.536811] c1070387 c19d8dd4 00000001 00000073 c19d0e40 00000068 c105fe2f c105fe2f
[ 3.536818] 0fffffff fe4fffff ffffffff c01ddbd0 c1070492 00000009 00000000 c01ddc3c
[ 3.536819] Call Trace:
[ 3.536829] [<c13add2f>] dump_stack+0x58/0x79
[ 3.536835] [<c1070387>] warn_slowpath_common+0x87/0xc0
[ 3.536840] [<c105fe2f>] ? __ioremap_caller+0x40f/0x440
[ 3.536843] [<c105fe2f>] ? __ioremap_caller+0x40f/0x440
[ 3.536847] [<c1070492>] warn_slowpath_null+0x22/0x30
[ 3.536850] [<c105fe2f>] __ioremap_caller+0x40f/0x440
[ 3.536855] [<c13f9db4>] ? __pci_request_region+0xb4/0x180
[ 3.536861] [<f845d896>] ? starfire_init_one+0xc6/0x680 [starfire]
[ 3.536866] [<f845d896>] ? starfire_init_one+0xc6/0x680 [starfire]
[ 3.536869] [<c105fe7f>] ioremap_nocache+0x1f/0x30
[ 3.536874] [<f845d896>] ? starfire_init_one+0xc6/0x680 [starfire]
[ 3.536879] [<f845d896>] starfire_init_one+0xc6/0x680 [starfire]
[ 3.536885] [<c1513011>] ? __pm_runtime_resume+0x51/0x80
[ 3.536889] [<c13ff96b>] pci_device_probe+0x7b/0xf0
[ 3.536894] [<c1504a0d>] ? devices_kset_move_last+0x2d/0xa0
[ 3.536899] [<c1508399>] driver_probe_device+0x1f9/0x4a0
[ 3.536904] [<c1251227>] ? sysfs_create_dir_ns+0x37/0x90
[ 3.536907] [<c13ff63c>] ? pci_match_device+0xdc/0x100
[ 3.536911] [<c15086b9>] __driver_attach+0x79/0x80
[ 3.536915] [<c1508640>] ? driver_probe_device+0x4a0/0x4a0
[ 3.536918] [<c1506357>] bus_for_each_dev+0x57/0xa0
[ 3.536921] [<c1507bce>] driver_attach+0x1e/0x20
[ 3.536925] [<c1508640>] ? driver_probe_device+0x4a0/0x4a0
[ 3.536928] [<c150777f>] bus_add_driver+0x1ef/0x290
[ 3.536931] [<f8465000>] ? 0xf8465000
[ 3.536933] [<f8465000>] ? 0xf8465000
[ 3.536936] [<c1508f3d>] driver_register+0x5d/0xf0
[ 3.536939] [<c13fe103>] __pci_register_driver+0x33/0x40
[ 3.536944] [<f846502b>] starfire_init+0x2b/0x1000 [starfire]
[ 3.536948] [<c100211a>] do_one_initcall+0xaa/0x200
[ 3.536951] [<f8465000>] ? 0xf8465000
[ 3.536955] [<c11c2fd0>] ? kfree+0x120/0x130
[ 3.536958] [<c11c3da5>] ? kmem_cache_alloc_trace+0x185/0x1e0
[ 3.536964] [<c1170a3a>] ? do_init_module+0x21/0x1a6
[ 3.536967] [<c1170a3a>] ? do_init_module+0x21/0x1a6
[ 3.536970] [<c1170a69>] do_init_module+0x50/0x1a6
[ 3.536975] [<c10f8b23>] load_module+0x1533/0x1a40
[ 3.536979] [<c10f56e9>] ? copy_module_from_fd.isra.53+0xf9/0x190
[ 3.536984] [<c10f9265>] SyS_finit_module+0xa5/0xf0
[ 3.536988] [<c118df13>] ? vm_mmap_pgoff+0xa3/0xc0
[ 3.536993] [<c100385d>] do_fast_syscall_32+0x8d/0x150
[ 3.536998] [<c17c55dc>] sysenter_past_esp+0x3d/0x61
[ 3.537001] ---[ end trace 2c05306d6389bc20 ]---
[ 3.537005] starfire 0000:08:04.0: cannot remap 0x80000 @ 0xfe480000, aborting
[ 3.537162] ioremap: invalid physical address fffffffffe380000
[ 3.537166] starfire 0000:08:05.0: cannot remap 0x80000 @ 0xfe380000, aborting
[ 3.537308] ioremap: invalid physical address fffffffffe300000
[ 3.537313] starfire 0000:08:06.0: cannot remap 0x80000 @ 0xfe300000, aborting
[ 3.537453] ioremap: invalid physical address fffffffffe200000

Additional information:
~# lsb_release -rd
Description: Ubuntu 16.04.3 LTS
Release: 16.04

# uname -a
Linux trafcap4 4.4.0-93-generic #116-Ubuntu SMP Fri Aug 11 21:17:52 UTC 2017 i686 i686 i686 GNU/Linux

# cat /proc/version_signature
Ubuntu 4.4.0-93.116-generic 4.4.79

# dmidecode -s bios-version && dmidecode -s bios-release-date
SBR20.86B.0082.P23.0504071730
04/07/2005
---
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Sep 14 09:39 seq
 crw-rw---- 1 root audio 116, 33 Sep 14 09:39 timer
AplayDevices: aplay: device_list:268: no soundcards found...
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: i386
ArecordDevices: arecord: device_list:268: no soundcards found...
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
DistroRelease: Ubuntu 16.04
HibernationDevice: RESUME=UUID=4d6b9af9-f0eb-431f-915e-13d8f25c182e
InstallationDate: Installed on 2013-04-11 (1616 days ago)
InstallationMedia: Ubuntu-Server 12.04 LTS "Precise Pangolin" - Release i386 (20120424.1)
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.

 eth1 no wireless extensions.
JournalErrors:
 Error: command ['journalctl', '-b', '--priority=warning', '--lines=1000'] failed with exit code 1: Hint: You are currently not seeing messages from other users and the system.
       Users in the 'systemd-journal' group can see all messages. Pass -q to
       turn off this notice.
 No journal files were opened due to insufficient permissions.
Lsusb:
 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 002 Device 002: ID 413c:2005 Dell Computer Corp. RT7D50 Keyboard
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 002: ID 046d:c016 Logitech, Inc. Optical Wheel Mouse
 Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Package: linux (not installed)
PciMultimedia:

ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-93-generic root=UUID=f683df2b-5513-4e3c-92a3-a6a1d4afdc32 ro cli console=ttyS0,115200
ProcVersionSignature: Ubuntu 4.4.0-93.116-generic 4.4.79
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 linux-restricted-modules-4.4.0-93-generic N/A
 linux-backports-modules-4.4.0-93-generic N/A
 linux-firmware 1.157.12
RfKill: Error: [Errno 2] No such file or directory
Tags: xenial
Uname: Linux 4.4.0-93-generic i686
UpgradeStatus: Upgraded to xenial on 2017-09-13 (1 days ago)
UserGroups: lxd sudo
WifiSyslog:

_MarkForUpload: True
dmi.bios.date: 04/07/2005
dmi.bios.vendor: Intel Corporation
dmi.bios.version: SBR20.86B.0082.P23.0504071730
dmi.board.name: SE7501BR2S
dmi.board.vendor: Intel
dmi.board.version: A95686-502
dmi.chassis.type: 23
dmi.chassis.vendor: Intel Corporation
dmi.modalias: dmi:bvnIntelCorporation:bvrSBR20.86B.0082.P23.0504071730:bd04/07/2005:svnIntel:pn:pvr:rvnIntel:rnSE7501BR2S:rvrA95686-502:cvnIntelCorporation:ct23:cvr:
dmi.sys.vendor: Intel

Revision history for this message
Steve Holton (sph0lt0n) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1717259

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: precise
Revision history for this message
Steve Holton (sph0lt0n) wrote : CRDA.txt

apport information

tags: added: apport-collected xenial
description: updated
Revision history for this message
Steve Holton (sph0lt0n) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Steve Holton (sph0lt0n) wrote : Lspci.txt

apport information

Revision history for this message
Steve Holton (sph0lt0n) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Steve Holton (sph0lt0n) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Steve Holton (sph0lt0n) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Steve Holton (sph0lt0n) wrote : ProcModules.txt

apport information

Revision history for this message
Steve Holton (sph0lt0n) wrote : UdevDb.txt

apport information

Revision history for this message
Steve Holton (sph0lt0n) wrote :

Status change by original submitter after apport-collect per bot request.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.14 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.14-rc1/

Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Steve Holton (sph0lt0n) wrote :

Tested against v4.14-rc1 kernel, and the problem is evident.

Also tested against:
   v3.4.112-precise/ FAILED

   v3.4-precise/ NEED TO TEST

   v3.3-precise/ PASSED
   v3.2.93/ PASSED
   v3.2.79-precise/ PASSED

   v3.3-precise-pae/ FAILED
   v3.2.79-precise-pae/ FAILED

Observations: kernel versions tagged "-pae" show the fault while the equivalent non-pae kernel do not show the fault.
For example: v3.3-precise : PASSED
              v3.3-precise-pae : FAILED

I'll continue to look for:
a) latest 'generic' kernel with correct initialization
b) earliest '-pae' kernel exhibiting the problem.

tags: added: kernel-bug-exists-upstream
Revision history for this message
Steve Holton (sph0lt0n) wrote :

Driver correctly initializes under v3.4-rc6-precise (3.4.0-030400)
Driver fails to initialize under v3.4-rc6-precise-pae (3.4.0-030400)
Driver fails to initialize under v3.4.1-quantal (3.4.1-030401)

v3.4-rc6-precise/
 From: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-rc6-precise/
 linux-headers-3.4.0-030400rc6-generic_3.4.0-030400rc6.201205061835_i386.deb
 linux-headers-3.4.0-030400rc6_3.4.0-030400rc6.201205061835_all.deb
 linux-image-3.4.0-030400rc6-generic_3.4.0-030400rc6.201205061835_i386.deb

v3.4-rc6-precise-pae/
 From: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-rc6-precise/
 linux-headers-3.4.0-030400rc6-generic-pae_3.4.0-030400rc6.201205061835_i386.deb
 linux-headers-3.4.0-030400rc6_3.4.0-030400rc6.201205061835_all.deb
 linux-image-3.4.0-030400rc6-generic-pae_3.4.0-030400rc6.201205061835_i386.deb
 linux-image-3.4.0-030400rc6-generic_3.4.0-030400rc6.201205061835_i386.deb

v3.4.1-quantal/
 From: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4.1-quantal/
 linux-headers-3.4.1-030401-generic_3.4.1-030401.201206041411_i386.deb
 linux-headers-3.4.1-030401_3.4.1-030401.201206041411_all.deb
 linux-image-3.4.1-030401-generic_3.4.1-030401.201206041411_i386.deb
 linux-image-extra-3.4.1-030401-generic_3.4.1-030401.201206041411_i386.deb

Revision history for this message
In , sph0lt0n (sph0lt0n-linux-kernel-bugs) wrote :

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.

Revision history for this message
Steve Holton (sph0lt0n) wrote :

Potential Fix:

In starfire.c at line 653, ioaddr is declared as a (signed) long:

 653 long ioaddr;

This should instead be declared as an unsigned long, as memory addresses cannot really be negative.

 653 unsigned long ioaddr;

This allows ioremap() to correctly remap the address in a 64 bit context.

I'll pursue a kernel patch. Filed in bugzilla as:
   https://bugzilla.kernel.org/show_bug.cgi?id=198035

Changed in linux:
importance: Unknown → Medium
status: Unknown → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.