freebsd-nq/sys
Adrian Chadd 7190a55c3e Bump the port mask on the AR8327 ethernet switch from 0x3f to 0x7f.
So, it turns out that the AR8327 has 7 ports internally:

* GMAC0 / external (CPU) MAC0
* GMAC1 / port1 -> GMAC5 / port5: external switch port PHYs
* GMAC6 / external (CPU) MAC1

Now, depending upon how things are wired up, the second CPU port (MAC1)
can be wired to either the switch (port6), or through port5's PHY, bypassing
the GMAC+switch entirely.  Ie, it can pretend to be a boring PHY, saving
system designers from having to include a separate PHY for a "WAN" port.

Here's the rub - the AP135 board (QCA955x SoC) hooks up arge0 to
the second CPU port on the AR8327, but it's hooked up as RGMII.
So, in order to hook it up to the rest of the switch, it isn't configured
as a separate PHY - OpenWRT has it setup as connected via RGMII to
GMAC6 and (I'm guessing) it's set to be a WAN port by configuring up
port-based VLANs or something.

Thus, with a port mask of 0x3f, GMAC6 was never allowed to receive traffic
from any other port.  It could transmit fine, but not receive anything.

So, now it works enough for me to continue doing board bootstrapping.
Note, this isn't enough to make the QCA955x + AR8327 work - there's
a bunch of uncommitted work to both the platform SoC (interrupt handling,
ethernet, etc) and the ethernet switch (register access space, setup, etc)
that needs to happen.  However, this particular change is also relevant to
other SoCs, like the AR934x and AR7161, both of which can be glued to
this switch.

Tested:

* AP135 development board

TODO:

* Figure out whether I can somehow abuse another port mode to have this
  be a pass-through PHY, or whether I should just create some more boot
  time hints to explicitly set up port-based isolation so this works
  in a more useful way by default.
2015-03-01 20:22:28 +00:00
..
amd64 Implement interface to create SR-IOV Virtual Functions 2015-03-01 00:40:09 +00:00
arm Remove SMP support from the Wandboard-Solo and have it run as part of 2015-02-27 12:40:44 +00:00
boot sys/boot/userboot/libstand/libstand.a should also include strtoul.c; 2015-02-27 22:23:35 +00:00
bsm
cam Fix I/O size calculation for pass(4) driver requests and add latency 2015-02-27 21:35:36 +00:00
cddl Fix the dtrace ARM atomic compare-and-set functions. These functions are 2015-03-01 10:04:14 +00:00
compat Run make sysent. 2015-01-23 21:08:24 +00:00
conf Add infrastructure for exporting config schema from PF drivers 2015-03-01 00:40:42 +00:00
contrib Merge ACPICA 20141107 and 20150204. 2015-02-18 20:33:00 +00:00
crypto Add some new modes to OpenCrypto. These modes are AES-ICM (can be used 2014-12-12 19:56:36 +00:00
ddb ddb: ANSI-fy function declarations. 2014-10-12 18:01:52 +00:00
dev Bump the port mask on the AR8327 ethernet switch from 0x3f to 0x7f. 2015-03-01 20:22:28 +00:00
fs Do not leak 'copy' buffer if bmap_truncate_indirect fails. 2015-02-28 22:24:45 +00:00
gdb Add support for gdb's memory searching capabilities to our in-kernel gdb 2014-09-05 16:40:47 +00:00
geom Replace constant with proper sizeof(). 2015-02-25 10:18:11 +00:00
gnu Merge latest (commit c8c1b3a77934768c7f7a4a9c10140c8bec529059) files 2015-02-28 00:06:04 +00:00
i386 Implement interface to create SR-IOV Virtual Functions 2015-03-01 00:40:09 +00:00
isa
kern Move libnv into the kernel and hook it into the kernel build 2015-03-01 00:34:27 +00:00
kgssapi Avoid dynamic syscall overhead for statically compiled modules. 2014-10-26 19:42:44 +00:00
libkern Implement asprintf in libkern 2015-03-01 00:22:16 +00:00
mips Add very initial QCA955x awareness to the GPIO code. 2015-03-01 07:00:34 +00:00
modules sfxge: compile out LRO if kernel is compiled without IPv4 and IPv6 2015-02-28 19:01:43 +00:00
net Hide struct ifmultiaddr under _KERNEL, too. 2015-02-27 01:15:23 +00:00
net80211 Fix kern/196290 - don't announce 11n HTINFO rates if the channel is 2015-02-27 04:45:47 +00:00
netgraph Revise default limit for maximum of netgraph data items. 2015-02-12 22:20:34 +00:00
netinet Fix a special case in ip_fragment() to produce a more sensible chain 2015-02-25 13:58:43 +00:00
netinet6 Now that all users of _WANT_IFADDR are fixed, remove this crutch and 2015-02-19 23:16:10 +00:00
netipsec Fix possible memory leak and several races in the IPsec policy management 2015-02-24 10:35:07 +00:00
netnatm Provide includes that are needed in these files, and before were read 2013-10-26 18:18:50 +00:00
netpfil Even more fixes to !INET and !INET6 kernels. 2015-02-17 22:33:22 +00:00
netsmb
nfs Avoid closing unallocated socket in case socreate fails. 2015-02-28 20:30:29 +00:00
nfsclient Remove the old NFS client and server from head, 2014-12-23 00:47:46 +00:00
nfsserver Use M_SIZE() instead of hand-crafted (and mostly correct) NFSMSIZ() macro 2015-01-07 17:22:56 +00:00
nlm Avoid dynamic syscall overhead for statically compiled modules. 2014-10-26 19:42:44 +00:00
ofed Macro fixes: 2015-02-23 12:54:46 +00:00
opencrypto Add some new modes to OpenCrypto. These modes are AES-ICM (can be used 2014-12-12 19:56:36 +00:00
pc98 Factor out duplicated code from dumpsys() on each architecture into generic 2015-01-07 01:01:39 +00:00
powerpc Fix unitialized variable. 2015-02-27 20:32:09 +00:00
rpc rpc: Uninitialized pointer read 2015-02-02 16:07:07 +00:00
security Adjust printf format specifiers for dev_t and ino_t in kernel. 2014-12-17 07:27:19 +00:00
sparc64 Unbreak sparc64 after r276630 by calling __sparc_sigtramp_setup signal 2015-02-16 22:13:03 +00:00
sys vt(4): Add support to "downgrade" from eg. vt_fb to vt_vga 2015-03-01 12:54:22 +00:00
teken mdoc: improvements to SEE ALSO. 2014-12-27 07:07:37 +00:00
tools Allow the make_dtb script to work outside of a "make buildkernel" context 2014-08-30 22:39:15 +00:00
ufs Partially revert r277922, avoid sleeping and do flush if we a awaken, 2015-02-05 13:00:27 +00:00
vm Use RW_NEW rather than calling bzero(). 2015-03-01 05:18:02 +00:00
x86 Free up the IPI slot used by IPI_STOP_HARD. 2015-03-01 02:31:27 +00:00
xdr
xen Pacify clang 3.3 by ending the file with a newline. This is common 2015-01-06 21:26:35 +00:00
Makefile Remove "pci" from CSCOPEDIRS. 2014-09-23 06:32:19 +00:00