Re: athn(4) may start in "no carrier" state when a failover trunkport

2014-10-03 Thread Josh Grosse
Way back in July, I wrote:
> When using this hostname.trunk0:
> 
> ---
> trunkproto failover trunkport alc0 trunkport athn0
> -inet6
> dhcp
> ---
> 
> If the master trunkport is active on initial state, either at boot or
> upon resume from suspend, on occasion the athn0 NIC shows "no carrier". 
> Upon initiation of failover while in this state, it does not recover.
> 
> If the athn0 NIC is used as egress and not part of a trunk, it is always
> "active" and never enters the same state.  
> 
> A scan corrects the state, so this ifstated.conf has been implemented as
> an attempted circumvention.

While it still occurs with trunk participation, I think this may be a 
much simpler circumvention:

/etc/apm/resume:

#!/bin/sh
ifconfig athn0 down up



athn(4) may start in "no carrier" state when a failover trunkport

2014-07-08 Thread Josh Grosse
When using this hostname.trunk0:

---
trunkproto failover trunkport alc0 trunkport athn0
-inet6
dhcp
---

If the master trunkport is active on initial state, either at boot or
upon resume from suspend, on occasion the athn0 NIC shows "no carrier". 
Upon initiation of failover while in this state, it does not recover.

If the athn0 NIC is used as egress and not part of a trunk, it is always
"active" and never enters the same state.  

A scan corrects the state, so this ifstated.conf has been implemented as
an attempted circumvention.

---
wifi_up = "athn0.link.up"

state only {
init {
if ! $wifi_up
run "ifconfig athn0 scan > /dev/null"
}
if ! $wifi_up
run "ifconfig athn0 scan > /dev/null"
}
---

Any recommendatons for better problem identifaction/isolation steps would be 
appreciated.

---

trunk0: flags=28843 mtu 1500
lladdr 90:e6:ba:37:cf:5e
priority: 0
trunk: trunkproto failover
trunkport athn0 
trunkport alc0 master,active
groups: trunk egress
media: Ethernet autoselect
status: active
inet 10.0.1.130 netmask 0xff00 broadcast 10.0.1.255

athn0: flags=28943 mtu 
1500
lladdr 90:e6:ba:37:cf:5e
priority: 4
trunk: trunkdev trunk0
groups: wlan
media: IEEE802.11 autoselect (DS1 mode 11g)
status: active
ieee80211: nwid "nondescript black Escalade" chan 8 bssid 
d8:5d:4c:bd:fb:08 49dB wpakey  wpaprotos wpa1,wpa2 wpaakms psk 
wpaciphers tkip,ccmp wpagroupcipher tkip

alc0: 
flags=28b43 
mtu 1500
lladdr 90:e6:ba:37:cf:5e
priority: 0
trunk: trunkdev trunk0
media: Ethernet autoselect (100baseTX full-duplex,rxpause,txpause)
status: active

OpenBSD 5.5-current (GENERIC.MP) #219: Sun Jun 29 19:09:31 MDT 2014
dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel(R) Atom(TM) CPU N270 @ 1.60GHz ("GenuineIntel" 686-class) 1.60 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF
real mem  = 1064464384 (1015MB)
avail mem = 1034616832 (986MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 04/18/11, BIOS32 rev. 0 @ 0xf0010, SMBIOS 
rev. 2.5 @ 0xf0720 (30 entries)
bios0: vendor American Megatrends Inc. version "1601" date 04/18/2011
bios0: ASUSTeK Computer INC. 1005HA
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC MCFG OEMB HPET SSDT
acpi0: wakeup devices P0P2(S4) P0P1(S4) HDAC(S4) P0P4(S4) P0P8(S4) P0P5(S4) 
P0P7(S4) P0P9(S4) P0P6(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 133MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.0.2, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Atom(TM) CPU N270 @ 1.60GHz ("GenuineIntel" 686-class) 1.60 GHz
cpu1: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE,LAHF,PERF
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 1, remapped to apid 2
acpimcfg0 at acpi0 addr 0xe000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (P0P5)
acpiprt2 at acpi0: bus 1 (P0P7)
acpiprt3 at acpi0: bus -1 (P0P6)
acpiec0 at acpi0
acpicpu0 at acpi0: C2, C1, PSS
acpicpu1 at acpi0: C2, C1, PSS
acpitz0 at acpi0: critical temperature is 88 degC
acpibat0 at acpi0: BAT0 model "1005HA" serial   type LION oem "ASUS"
acpiac0 at acpi0: AC unit online
acpiasus0 at acpi0
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibtn2 at acpi0: PWRB
bios0: ROM list: 0xc/0xec00!
cpu0: Enhanced SpeedStep 1600 MHz: speeds: 1600, 1333, 1067, 800 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82945GME Host" rev 0x03
vga1 at pci0 dev 2 function 0 "Intel 82945GME Video" rev 0x03
intagp0 at vga1
agp0 at intagp0: aperture at 0xd000, size 0x1000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: 1024x600
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi
azalia0: codecs: Realtek ALC269
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: apic 2 int 16
pci1 at ppb0 bus 4
ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: apic 2 int 17
pci2 at ppb1 bus 2
athn0 at pci2 dev 0 function 0 "Atheros AR9285" rev 0x01: apic 2 int 17