Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 710938 - sys-kernel/mips-sources -IP28 sgiseeq driver initialization problem (PATCH)
Summary: sys-kernel/mips-sources -IP28 sgiseeq driver initialization problem (PATCH)
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: MIPS Linux
: Normal normal (vote)
Assignee: Joshua Kinard
Depends on:
Reported: 2020-02-27 14:36 UTC by Barnabás Virágh
Modified: 2022-10-07 17:45 UTC (History)
2 users (show)

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

sgiseeq driver patch (mips_ip28_sgiseeq_driver_dma_mask.patch,722 bytes, text/plain)
2020-02-27 14:36 UTC, Barnabás Virágh

Note You need to log in before you can comment on or make changes to this bug.
Description Barnabás Virágh 2020-02-27 14:36:36 UTC
Created attachment 616188 [details]
sgiseeq driver patch

Netbooting the kernel sys-kernel/mips-sources-4.19.79::gentoo on Indigo2 Impact 10000 machine shows sgiseeq network driver
1.) warning with stack trace from include/linux/dma-mapping.h:516 (in dma_alloc_attrs())
called from drivers/net/ethernet/seeq/sgiseeq.c:742 (in sgiseeq_probe())
2.) The exiting with "Sgiseeq: Page alloc failed, aborting.", -ENOMEM

With the attached patch, the ethernet driver initializes, and works. Can mount NFS root filesystem, and already running for several hours (13+) building a kernel. Though, I don't know if it would interfere with other systems.
Comment 1 Barnabás Virágh 2020-02-27 16:07:47 UTC
# emerge --info sys-kernel/mips-sources:
Portage 2.3.84 (python 2.7.17-final-0, default/linux/mips/17.0/n64, gcc-9.2.0, glibc-2.29-r7, 4.19.97-gentoo-x86_64 mips64)
                         System Settings
System uname: Linux-4.19.97-gentoo-x86_64-mips64-with-gentoo-2.6
KiB Mem:    32864032 total,  30432604 free
KiB Swap:   33554424 total,  33554424 free
Timestamp of repository gentoo: Wed, 19 Feb 2020 02:45:01 +0000
Head commit of repository gentoo: cec727ad614986ca1e6b9468eea7f1a5a9183382
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p3) 2.32.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17::gentoo, 3.6.9::gentoo, 3.7.5-r1::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r2::gentoo
sys-devel/gcc:            9.2.0-r2::gentoo
sys-devel/gcc-config:     2.2::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r7::gentoo

    location: /var/db/repos/gentoo                                                                                                                                                                                                               sync-type: rsync
    sync-uri: rsync://
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: -L
    sync-rsync-verify-max-age: 24

Installed sets: @favorites
ACCEPT_KEYWORDS="* mips"                                                                                                                                                                                                                     ACCEPT_LICENSE="@FREE"
CFLAGS="-O2 -pipe -mabi=64 -mplt -march=mips4 -mtune=r10k -mfix-r10000 -mr10k-cache-barrier=none"                                                                                                                                            CHOST="mips64-unknown-linux-gnu"                                                                                                                                                                                                             CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"                                                                                                                                                                                         CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"                                                                                                   CXXFLAGS="-O2 -pipe -mabi=64 -mplt -march=mips4 -mtune=r10k -mfix-r10000 -mr10k-cache-barrier=none"                                                                                                                                          DISTDIR="/var/cache/distfiles"                                                                                                                                                                                                               EMERGE_DEFAULT_OPTS="--quiet-build=y --keep-going=y --buildpkg --usepkg --binpkg-respect-use=y --buildpkg-exclude 'virtual/*' --jobs=6 --load-average 10"                                                                                    ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -mabi=64 -mplt -march=mips4 -mtune=r10k -mfix-r10000 -mr10k-cache-barrier=none"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync multilib-strict news parallel-fetch parallel-install preserve-libs protect-
owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersync xattr"
FFLAGS="-O2 -pipe -mabi=64 -mplt -march=mips4 -mtune=r10k -mfix-r10000 -mr10k-cache-barrier=none"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
USE="acl alsa berkdb big-endian bzip2 cli crypt cryptsetup cups curl cxx gdbm gpg iconv icu kerberos libinput ljr mips ncurses nfs nls nptl openssl pam pcre radius readline seccomp snmp split-usr ssl syslog tcpd threads tls udev unicode usb xattr zlib" ABI_MIPS="n64" ADA_TARGET="gnat_2018" ALSA_CARDS="au1x00" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="hu en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="fbdev impact dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

                        Package Settings

sys-kernel/mips-sources-4.19.79::gentoo was built with the following:
USE="ip28 -build -experimental -ip27 -ip30 -symlink"
Comment 2 Joshua Kinard gentoo-dev 2020-02-28 03:48:40 UTC
This sounds like something that really ought to go upstream.  If you haven't already, I encourage you to join the linux-mips kernel mailing list here:

And you can learn more about submitting patches to the Linux Kernel here:

Although this is a MIPS-specific driver, it touches the networking subsystem, so you'll need to involve the Linux networking subsystem maintainers.  They maintain a FAQ here:

An actual patch submission for this fix will need to go upstream via the netdev mailing list (which you don't have to join to actually submit to), with the linux-mips ML CC'ed.
Comment 3 Barnabás Virágh 2020-02-28 10:24:25 UTC
But for that, first I will have to try it also on vanilla kernel, haven't I?
Thanks for the directions anyway. Can you/someone try out the scenario/dirty patch of mine, to confirm that it not only works for me? Probably on a different machine which also uses the same net driver?