Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 304265 - 5906 patch in sys-kernel/gentoo-sources-2.6.32-r4 breaks tg3 driver
Summary: 5906 patch in sys-kernel/gentoo-sources-2.6.32-r4 breaks tg3 driver
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2010-02-10 09:42 UTC by Emond Papegaaij
Modified: 2010-02-19 17:22 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
New patch for 5906 hang (2400_5906-transmit-hang-fix.patch,3.25 KB, patch)
2010-02-13 23:09 UTC, Mike Pagano
Details | Diff
Final patch with recommendations from upstream developer (2400_5906-transmit-hang-fix.patch,3.09 KB, patch)
2010-02-17 18:18 UTC, Mike Pagano
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Emond Papegaaij 2010-02-10 09:42:08 UTC
After upgrading to 2.6.32-r4, my NIC no longer works. When NetworkManager tries to bring the interface up, the messages log shows:

kernel: tg3 0000:09:00.0: firmware: using built-in firmware tigon/tg3_tso.bin
kernel: tg3 0000:09:00.0: irq 29 for MSI/MSI-X
kernel: tg3: tg3_load_firmware_cpu: Trying to load TX cpu firmware on eth0 which is 5705.

Where it previously only reported the second line. Downgrading to -r3 fixed the problem for me.

Reproducible: Always

Steps to Reproduce:
Comment 1 Pacho Ramos gentoo-dev 2010-02-10 13:33:31 UTC
Same problem here, maybe related with bug 301091
$ /usr/sbin/lspci -vv | grep Ethernet
02:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5784M Gigabit Ethernet PCIe (rev 10)

Portage 2.1.7.16 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.10.1-r1, 2.6.32-gentoo-r3 x86_64)
=================================================================
System uname: Linux-2.6.32-gentoo-r3-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E7500_@_2.93GHz-with-gentoo-1.12.13
Timestamp of tree: Wed, 10 Feb 2010 12:00:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/distfiles"
FEATURES="assume-digests autoaddcvs ccache cvs distlocks fixpackages multilib-strict news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org"
LANG="es_ES.UTF-8"
LC_ALL="es_ES.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="es es_ES en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa amd64 avahi bash-completion berkdb branding bzip2 cairo cdda cddb cdr cleartype cli consolekit cracklib crypt css cups cxx dbus djvu dri dts dvd dvdr dvi eds emboss encode evo exif fam ffmpeg firefox flac foomaticdb fortran gdbm gif gimp glitz gmail gnome gnome-keyring gpm gstreamer gtk hal iconv imap ipod java jpeg jpeg2k kdehiddenvisibility kpathsea latex libnotify lzma mad mbox mikmod mmx mmxext mng modules mono mp3 mp4 mpeg mudflap multilib musepack musicbrainz nautilus ncurses network network-cron nls nptl nptlonly ogg opengl openmp pam pch pcre pdf perl png policykit pop ppds pppd python qt3support qt4 quicktime raw readline reflection sdl session smp spell spl sse sse2 ssl ssse3 startup-notification svg sysfs t1lib tcpd theora thunar tiff truetype unicode usb vcd vorbis x264 xml xmp xorg xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es es_ES en_US" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel vesa nvidia" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Mike Pagano gentoo-dev 2010-02-10 18:14:35 UTC
This is from upstream broadcom developer. Who has been extremely helpful and responsive on this, btw.

"I don't think your patch has anything to do with the above problem.

If the device is really a 5705, it should be using tigon/tg3_tso5.bin,
not tigon/tg3_tso.bin.  The 5705 does not have a TX cpu, so that could
explain a lot."

So in the code we have this:

   if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) {
        cpu_base = RX_CPU_BASE;
        cpu_scratch_base = NIC_SRAM_MBUF_POOL_BASE5705;
    } else {
        cpu_base = TX_CPU_BASE;
        cpu_scratch_base = TX_CPU_SCRATCH_BASE;
        cpu_scratch_size = TX_CPU_SCRATCH_SIZE;
    }

Which says if you have a 5705, the cpu_base = RX_CPU_BASE.

But, we get here:

if (cpu_base == TX_CPU_BASE &&
        (tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) {
        printk(KERN_ERR PFX "tg3_load_firmware_cpu: Trying to load "
               "TX cpu firmware on %s which is 5705.\n",
               tp->dev->name);
        return -EINVAL;
    }

Which is interesting, since cpu_base should NOT be TX_CPU_BASE. 
Is the device a 5705 ?


Comment 3 Mike Pagano gentoo-dev 2010-02-10 18:15:46 UTC
Ok, I see the devices are not 5705, let me look further.
Comment 4 Mike Pagano gentoo-dev 2010-02-10 20:00:04 UTC
I'm going to pull this out of genpatches and release a new kernel.

If I have a new patch to try, I will ask here for testers.
Comment 5 Mike Pagano gentoo-dev 2010-02-10 22:09:46 UTC
Patch removed in gentoo-sources-2.6.32-r5
Comment 6 Pacho Ramos gentoo-dev 2010-02-11 21:11:36 UTC
Thanks a lot :-D
Comment 7 Iain Buchanan 2010-02-11 23:30:40 UTC
Same with tuxonice-sources-2.6.32-r4.  What patch did you remove & I'll try it for tuxonice.

$ dmesg | grep tg3
tg3 0000:09:00.0: firmware: requesting tigon/tg3_tso.bin
tg3: tg3_load_firmware_cpu: Trying to load TX cpu firmware on eth0 which is 5705.
tg3: tg3_load_firmware_cpu: Trying to load TX cpu firmware on eth0 which is 5705.
tg3 0000:09:00.0: restoring config space at offset 0xc (was 0x0, writing 0x20050000)

$ lspci
09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5756ME Gigabit Ethernet PCI Express

$ lspci -n
09:00.0 0200: 14e4:1674

thanks :)
Comment 8 Mike Pagano gentoo-dev 2010-02-12 00:33:48 UTC
(In reply to comment #7)
> Same with tuxonice-sources-2.6.32-r4.  What patch did you remove & I'll try it
> for tuxonice.
> 

http://sources.gentoo.org/viewcvs.py/linux-patches/genpatches-2.6/tags/2.6.32-5/2400_5906-transmit-hang-fix.patch?view=markup
Comment 9 Emond Papegaaij 2010-02-12 07:40:33 UTC
With -r5, my NIC works fine again. Thanks!

Btw, I forgot to mention my controller in the bug report:
09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5755M Gigabit Ethernet PCI Express (rev 02)
09:00.0 0200: 14e4:1673 (rev 02)
Comment 10 Mike Pagano gentoo-dev 2010-02-13 23:09:06 UTC
Created attachment 219537 [details, diff]
New patch for 5906 hang

Can everyone try this patch, please?
Comment 11 Mike Pagano gentoo-dev 2010-02-13 23:14:54 UTC
Aleksey, can you please also test this patch and tell me if you still have hangs on the 5906 card.
Comment 12 Guillaume Castagnino 2010-02-14 01:03:35 UTC
this patch is OK with my 5754, the loading firmware bug is fixed !
Comment 13 Mike Pagano gentoo-dev 2010-02-14 01:37:03 UTC
(In reply to comment #12)
> this patch is OK with my 5754, the loading firmware bug is fixed !
> 

Thanks,  Guillaume. As soon as I hear from someone with  a 5906, I'll send it upstream.

Comment 14 Iain Buchanan 2010-02-16 00:54:18 UTC
5756 here as well, but tuxonice-sources-2.6.32-r5 with new genpatches now works.
Comment 15 Mike Pagano gentoo-dev 2010-02-16 01:46:10 UTC
(In reply to comment #14)
> 5756 here as well, but tuxonice-sources-2.6.32-r5 with new genpatches now
> works.
> 

Thanks for testing this patch.

I'm not sure what's in tuxonice-sources-2.6.32-r5.

Still looking for someone with a 5906 to test, please.
Comment 16 Aleksey Kunitskiy 2010-02-17 16:00:33 UTC
Patch works for me. gentoo-sources-2.6.32-r5 + patch above

10:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5906M Fast Ethernet PCI Express (rev 02)
Comment 17 Mike Pagano gentoo-dev 2010-02-17 18:18:56 UTC
Created attachment 220069 [details, diff]
Final patch with recommendations from upstream developer

This is the final (I swear) patch.  Aleksey, can you try this one. And someone without the 5906, can you also test.

Thanks for your patience.
Mike
Comment 18 Guillaume Castagnino 2010-02-17 22:27:42 UTC
(In reply to comment #17)
> This is the final (I swear) patch.  Aleksey, can you try this one. And someone
> without the 5906, can you also test.

Just posting from a kernel with this new patch version. So it's OK with 5754, no regression.
Comment 19 Aleksey Kunitskiy 2010-02-18 22:34:42 UTC
Works for me
Comment 20 Mike Pagano gentoo-dev 2010-02-18 23:11:40 UTC
Thanks, everyone
Comment 21 Mike Pagano gentoo-dev 2010-02-19 17:22:59 UTC
Released in gentoo-sources-2.6.32-r6