USB nix axen not working reliable

2014-11-29 Thread Remi Locherer
Synopsis:  USB nic axen not working reliable
Category:  kernel
Environment:
System  : OpenBSD 5.6
Details : OpenBSD 5.6-current (GENERIC.MP) #607: Mon Nov 24 
14:23:38 MST 2014
 
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

Architecture: OpenBSD.amd64
Machine : amd64
Description:
My USB3 Edimax Gigabit Ethernet adapter (axen) does not work reliable
anymore.

When plugged in into the USB 2 port ifconfig shows status: active
for a few seconds. Then it changes to status: no carrier while still
connected and does not changes its status anymore. If dhclient configures 
axen0 during the first few seconds it stays active and works fine. 

When connected to the USB 3 port it also shows status: active for the
first few seconds. If it then gets configured with dhclient it either
freezes the hole system or fills dmesg with checksum err and does not
work. Somethimes the system panics instead.

o The details when attached to the USB 2 port:

# dmesg | grep axen | tail -3
axen0 at uhub2 port 2 configuration 1 interface 0 ASIX Elec. Corp. AX88179 
rev 2.10/1.00 addr 3
axen0: AX88179, address 80:1f:02:75:cc:86
rgephy1 at axen0 phy 3: RTL8169S/8110S PHY, rev. 5

# usbdevs
addr 1: xHCI root hub, Renesas
addr 1: EHCI root hub, Intel
 addr 2: Rate Matching Hub, Intel
  addr 3: AX88179, ASIX Elec. Corp.
  addr 4: product 0x3004, Atheros Communications
  addr 5: WebCam SC-13HDL11624N, Namugaÿ

ifconfig output immediately after plugging in the axen nic. Ethernet
cable allready connected (no STP involved).
# ifconfig axen0 
axen0: flags=28802BROADCAST,SIMPLEX,MULTICAST,NOINET6 mtu 1500
lladdr 80:1f:02:75:cc:86
priority: 0
media: Ethernet autoselect (none)
status: no carrier

After about 1 second:
# ifconfig axen0 
axen0: flags=28802BROADCAST,SIMPLEX,MULTICAST,NOINET6 mtu 1500
lladdr 80:1f:02:75:cc:86
priority: 0
media: Ethernet autoselect (1000baseT full-duplex)
status: active

After a few seconds:
# ifconfig axen0 
axen0: flags=28802BROADCAST,SIMPLEX,MULTICAST,NOINET6 mtu 1500
lladdr 80:1f:02:75:cc:86
priority: 0
media: Ethernet autoselect (10baseT half-duplex)
status: no carrier

Starting dhclient immediately after plugging in the axen nic (via hotplugd):
# ifconfig axen0
axen0: flags=28843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,NOINET6 mtu 1500
lladdr 80:1f:02:75:cc:86
priority: 0
groups: egress
media: Ethernet autoselect (1000baseT full-duplex,master)
status: active
inet 192.168.201.28 netmask 0xff00 broadcast 192.168.201.255


o Details when plugged into the USB 3 port.

# dmesg | grep axen
axen0 at uhub0 port 1 configuration 1 interface 0 ASIX Elec. Corp. AX88179 
rev 3.00/1.00 addr 2
axen0: AX88179, address 80:1f:02:75:cc:86
rgephy1 at axen0 phy 3: RTL8169S/8110S PHY, rev. 5

# usbdevs
addr 1: xHCI root hub, Renesas
 addr 2: AX88179, ASIX Elec. Corp.
addr 1: EHCI root hub, Intel
 addr 2: Rate Matching Hub, Intel
  addr 3: 802.11n WLAN Adapter, Realtek
  addr 4: product 0x3004, Atheros Communications
  addr 5: WebCam SC-13HDL11624N, Namugaÿ

# ifconfig axen0
axen0: flags=28802BROADCAST,SIMPLEX,MULTICAST,NOINET6 mtu 1500
lladdr 80:1f:02:75:cc:86
priority: 0
media: Ethernet autoselect (10baseT half-duplex)
status: no carrier

Xconsole quickly filled with the message below and the pc did not react
anymore.
splassert: asserwaitok: want -1 have 1

Output from kernel debugger:

ddb ps screen 1
https://relo.ch/axen_usb3_panic/IMG_20141125_221425.jpg
ddb ps screen 2
https://relo.ch/axen_usb3_panic/IMG_20141125_221443.jpg
ddb ps screen 3
https://relo.ch/axen_usb3_panic/IMG_20141125_221456.jpg
ddb ps screen 4
https://relo.ch/axen_usb3_panic/IMG_20141125_221507.jpg
ddb trace cpu 0
https://relo.ch/axen_usb3_panic/IMG_20141125_221531.jpg
ddb trace cpu 1, 2, 3
https://relo.ch/axen_usb3_panic/IMG_20141125_221816.jpg

After a reboot and starting dhclient immediately when plugging in the
axen nic (via hotplugd):

axen0: flags=28843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,NOINET6 mtu 1500
lladdr 80:1f:02:75:cc:86
priority: 0
groups: egress
media: Ethernet autoselect (1000baseT full-duplex)
status: active
inet 192.168.201.28 netmask 0xff00 broadcast 192.168.201.255

dmesg is then full of the following, network does not work anymore: 

invalid buffer(pkt#65535), continue
checksum err (pkt#0)
invalid buffer(pkt#65535), continue
checksum err (pkt#0)
invalid buffer(pkt#65535), continue
checksum err (pkt#0)
invalid buffer(pkt#65535), continue
checksum err (pkt#0)
invalid buffer(pkt#65535), continue
checksum err (pkt#0)
invalid buffer(pkt#65535), continue



dmesg:
OpenBSD 5.6-current (GENERIC.MP) #607: Mon Nov 24 14:23:38 MST 2014

Re: [patch] pkg_add cosmetic issue when asking for dependency

2014-11-29 Thread Carlin Bingham
On Sat, 25 Oct 2014, at 02:00 AM, Carlin Bingham wrote:
 If pkg_add asks for a dependency immediately the No change in quirks
 text isn't cleared, and the Ambiguous... message prints on the same 
 line.
 

 
 Index: usr.sbin/pkg_add/OpenBSD/Dependencies.pm
 ===
 RCS file: /cvs/src/usr.sbin/pkg_add/OpenBSD/Dependencies.pm,v
 retrieving revision 1.152
 diff -u -p -u -r1.152 Dependencies.pm
 --- usr.sbin/pkg_add/OpenBSD/Dependencies.pm1 Feb 2014 11:37:58 -
   1.152
 +++ usr.sbin/pkg_add/OpenBSD/Dependencies.pm24 Oct 2014 11:21:47
 -
 @@ -577,6 +577,7 @@ sub find_dep_in_repositories
 # put default first if available
 @pkgs = ((grep {$_ eq $dep-{def}} @pkgs),
 (sort (grep {$_ ne $dep-{def}} @pkgs)));
 +   $state-progress-clear;
 my $good = $state-ask_list(
 'Ambiguous: choose dependency for
 '.$self-{set}-print.': ',
 $state-{interactive}, @pkgs);
 
 

Was there a problem with this or is it too trivial to worry about?


--
Carlin



yacc buffer overflow

2014-11-29 Thread Andrey Skvortsov
Hello.

I'v faced with yacc segmentation fault error while trying to build
TkGate-2.0b10 from tkgate.org
(http://www.tkgate.org/downloads/tkgate-2.0-b10.tgz) on OpenBSD-5.6. Error
appears when yacc parses ./src/tkgate/vgrammar.y file (attached).
I have no any tests and knowledge about yacc structure, but the attached
patch seems to fix the problem in this particular case at least.

Yours sincerely,
Andrey V. Skvortsov


vgrammar.y.gz
Description: GNU Zip compressed data
605c605
 			if (loc = maxtable) {
---
 			if (loc = maxtable - 1) {
612c612
 } while (newmax = loc);
---
 } while (newmax = loc + 1);