NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-sparc/46572: Invalid argument accessing qe* (qec) interfaces w/NetBSD-6.0_BETA2/sparc



>Number:         46572
>Category:       port-sparc
>Synopsis:       Invalid argument accessing qe* (qec) interfaces 
>w/NetBSD-6.0_BETA2/sparc
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 10 03:15:00 +0000 2012
>Originator:     John D. Baker
>Release:        NetBSD-6.0_BETA2/sparc
>Organization:
>Environment:
NetBSD ossian.technoskunk.fur 6.0_BETA2 NetBSD 6.0_BETA2 (GENERIC) #5: Thu Jun  
7 09:29:58 CDT 2012  
sysop%verthandi.technoskunk.fur@localhost:/d0/build/netbsd-6/obj/sparc/sys/arch/sparc/compile/GENERIC
 sparc

>Description:
network configuration utilities, namely 'ifconfig' and 'dhclient' fail
when accessing qe* interfaces on qec (Quad Ethernet Controller) with
Invalid argument.

Device enumeration from 'dmesg':

[...]
qec0 at sbus0 slot 1 offset 0x20000 level 4 (ipl 7): 128K memory
qe0 at qec0 slot 0 offset 0x0 rev 1 address c0:ff:ee:c0:ff:ee
qe1 at qec0 slot 1 offset 0x0 rev 1 address c0:ff:ee:c0:ff:ee
qe2 at qec0 slot 2 offset 0x0 rev 1 address c0:ff:ee:c0:ff:ee
qe3 at qec0 slot 3 offset 0x0 rev 1 address c0:ff:ee:c0:ff:ee
[...]


Example with 'ifconfig':

$ ifconfig -l
le0 qe0 qe1 qe2 qe3 eon0 lo0 stf0 pflog0
$ ifconfig -a
le0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: c0:ff:ee:c0:ff:ee
        media: Ethernet autoselect (10baseT)
        status: active
        inet 192.168.17.8 netmask 0xffffff00 broadcast 192.168.17.255
        inet6 fe80::a00:20ff:fe77:2960%le0 prefixlen 64 scopeid 0x1
ifconfig: status: getifinfo: Invalid argument
$ ifconfig qe2 
ifconfig: SIOCGIFFLAGS qe2: Invalid argument


Snippets from ktruss:

$ ktruss -i ifconfig qe2 | tee /tmp/ifconfig.ktruss
[...]
    73      1 ifconfig emul(netbsd)
    73      1 ifconfig mmap(0, 0x8000, 0x3, 0x1002, 0xffffffff, 0, 0, 0) = 
0x20034000
    73      1 ifconfig open("/etc/ld.so.conf", 0, 0xefffeed8) = 3
[...]
    73      1 ifconfig close(0x3)                  = 0, 3
[...]
    73      1 ifconfig __socket30(0x2, 0x2, 0)     = 3, 2
    73      1 ifconfig ioctl(0x3, SIOCGIFFLAGS, 0xefffe838) Err#22 EINVAL
       "qe2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
    73      1 ifconfig write(0x2, 0xefffe008, 0xa) = 10, -268443640
       "ifconfig: "
    73      1 ifconfig write(0x2, 0xefffe070, 0x10) = 16, -268443536
       "SIOCGIFFLAGS qe2"
    73      1 ifconfig write(0x2, 0x201e3aa0, 0x2) = 2, 538852000
       ": "
    73      1 ifconfig issetugid()                 = 0, 47
    73      1 ifconfig issetugid()                 = 0, 10356
    73      1 ifconfig open("/usr/share/nls/nls.alias.db", 0x400000, 
0xefffd9ec) Err#2 ENOENT
    73      1 ifconfig open("/usr/share/nls/nls.alias", 0x400000, 0x201e1048) = 
5, 4194304
    73      1 ifconfig __fstat50(0x5, 0xefffdd70)  = 0, -268444304
    73      1 ifconfig mmap(0, 0x5f0, 0x1, 0x2, 0x5, 0, 0, 0) = 0x2003c000
    73      1 ifconfig close(0x5)                  = 0, 1520
    73      1 ifconfig munmap(0x2003c000, 0x5f0)   = 0, 1520
    73      1 ifconfig open("/usr/share/nls/C/libc.cat", 0, 0xefffdecc) = 5
    73      1 ifconfig __fstat50(0x5, 0xefffde40)  = 0, -268444096
    73      1 ifconfig mmap(0, 0x10be, 0x1, 0x1, 0x5, 0, 0, 0) = 0x2003c000
    73      1 ifconfig close(0x5)                  = 0, 4286
    73      1 ifconfig munmap(0x2003c000, 0x10be)  = 0, 4286
    73      1 ifconfig write(0x2, 0xefffe008, 0x11) = 17, -268443640
       "Invalid argument\n"

>How-To-Repeat:
On SPARCstation equipped with qec/qe interfaces, install NetBSD-6.0_BETA2
and attempt to configure one of the qe* interfaces with 'ifconfig' or
'dhclient'.

May also affect "be*" interfaces on qec base board, but this is
untested.

These worked fine in all Netbsd up to 5.1_STABLE...
>Fix:



Home | Main Index | Thread Index | Old Index