Bug 211462

Summary: AR8327 Etherswitch led control patch
Product: Base System Reporter: Dan Nelson <dnelson_1901>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me CC: pi
Priority: --- Keywords: patch
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
userland and kernel patch none

Description Dan Nelson 2016-07-30 16:53:06 UTC
Created attachment 173123 [details]
userland and kernel patch

The attached patch extends the etherswitch code to support controlling the LEDs associated with switch ports.  An etherswitchcfg "led" subcommand is added, and led(4) device nodes are created for each led as well.  There is backend code for the AR8327 switch, and support other switches should be easy to add.

Example usage: 

etherswitchcfg port1 led 1 on port2 led 1 on port3 led 1 blink port4 led 1 off port5 led 1 default
echo 0 > /dev/led/arswitch0port1led1