aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/rt
Commit message (Collapse)AuthorAgeFilesLines
* Add compat strings used by OpenWRT to some Mediatek/Ralink driversStanislav Galabov2016-04-201-0/+1
| | | | | | | | | Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision: https://reviews.freebsd.org/D5995 Notes: svn path=/head/; revision=298350
* Mediatek/Ralink: Get our drivers closer to OpenWRT dts definitionsStanislav Galabov2016-04-151-7/+8
| | | | | | | | | | | | | This revision gets our Mediatek/Ralink drivers closer to OpenWRT's dts definitions, so we can reuse them with less modifications later in order to bring support for a lot of boards at once. Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision: https://reviews.freebsd.org/D5961 Notes: svn path=/head/; revision=298059
* Cleanup unnecessary semicolons from the kernel.Pedro F. Giffuni2016-04-101-1/+1
| | | | | | | Found with devel/coccinelle. Notes: svn path=/head/; revision=297793
* This revision adds support to if_rt for more SoCs.Stanislav Galabov2016-04-072-44/+83
| | | | | | | | | | | | | | | | | | | | The SoCs I've tried the driver with include the following: RT3050, RT5350, RT3662, RT3883, MT7620, MT7621, MT7688. On boards, based on the above SoCs traffic is passing through correctly and the boards survive a flood ping with very little or no drops (drops may be caused elsewhere in my test setup, however). One issue still remains and needs to be fixed in the future: if_rt does not survive an ifconfig rt0 down/ifconfig rt0 up cycle. This issue existed before this commit as well, however. Reviewed by: ray Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision: https://reviews.freebsd.org/D5864 Notes: svn path=/head/; revision=297646
* As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toSvatopluk Kraus2016-02-221-1/+0
| | | | | | | | | | include it explicitly when <vm/pmap.h> is already included. Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D5373 Notes: svn path=/head/; revision=295880
* Eliminate code for walking through the early static env data. This codeIan Lepore2016-01-031-22/+2
| | | | | | | | is called from a device attach routine, and thus cannot be called before the cutover from static to dynamic kernel env. Notes: svn path=/head/; revision=293105
* [rt] add support for the RT5350 and MT7620 SoCs.Adrian Chadd2015-12-243-117/+417
| | | | | | | | | | | | This is a work in progress; bringing the interface down stops further use. It only happens on RT5350/MT7620. This is based on work by Alexander A. Mityaev <sansan@adm.ua>. Submitted by: Stanislav Galabov <galabov@gmail.com> Notes: svn path=/head/; revision=292704
* Fix multiple incorrect SYSCTL arguments in the kernel:Hans Petter Selasky2014-10-211-66/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Wrong integer type was specified. - Wrong or missing "access" specifier. The "access" specifier sometimes included the SYSCTL type, which it should not, except for procedural SYSCTL nodes. - Logical OR where binary OR was expected. - Properly assert the "access" argument passed to all SYSCTL macros, using the CTASSERT macro. This applies to both static- and dynamically created SYSCTLs. - Properly assert the the data type for both static and dynamic SYSCTLs. In the case of static SYSCTLs we only assert that the data pointed to by the SYSCTL data pointer has the correct size, hence there is no easy way to assert types in the C language outside a C-function. - Rewrote some code which doesn't pass a constant "access" specifier when creating dynamic SYSCTL nodes, which is now a requirement. - Updated "EXAMPLES" section in SYSCTL manual page. MFC after: 3 days Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=273377
* Follow up to r225617. In order to maximize the re-usability of kernel codeDavide Italiano2014-10-161-2/+2
| | | | | | | | | | | in userland rename in-kernel getenv()/setenv() to kern_setenv()/kern_getenv(). This fixes a namespace collision with libc symbols. Submitted by: kmacy Tested by: make universe Notes: svn path=/head/; revision=273174
* Mechanically convert to if_inc_counter().Gleb Smirnoff2014-09-191-7/+7
| | | | Notes: svn path=/head/; revision=271849
* Use define from if_var.h to access a field inside struct if_data,Gleb Smirnoff2014-08-301-1/+1
| | | | | | | | | that resides in struct ifnet. Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=270856
* Pull in r267961 and r267973 again. Fix for issues reported will follow.Hans Petter Selasky2014-06-281-2/+1
| | | | Notes: svn path=/head/; revision=267992
* Revert r267961, r267973:Glen Barber2014-06-271-1/+2
| | | | | | | | | | | | | These changes prevent sysctl(8) from returning proper output, such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory Notes: svn path=/head/; revision=267985
* Extend the meaning of the CTLFLAG_TUN flag to automatically check ifHans Petter Selasky2014-06-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel. Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change. MFC after: 2 weeks Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=267961
* More BUS_PROBE_NOWILDCARD sweeping. Some devices here (if_ath_ahb and siba)Nathan Whitehorn2013-10-291-1/+1
| | | | | | | | | resist easy conversion since they implement a great deal of their attach logic inside probe(). Some of this could be fixed by moving it to attach(), but some requires something more subtle than BUS_PROBE_NOWILDCARD. Notes: svn path=/head/; revision=257341
* The r48589 promised to remove implicit inclusion of if_var.h soon. PrepareGleb Smirnoff2013-10-261-0/+1
| | | | | | | | | | | to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=257176
* - Use the consistenly PHY-specific reset routine PHY_RESET() rather thanKevin Lo2013-06-141-8/+4
| | | | | | | | | | | | generic mii_phy_reset(). - Return the result of mii_mediachg() rather than blindly returning 0. - on smsc(4), driver lock should be held to get current mii_media_active/mii_media_status value. Reviewed by: yongari Notes: svn path=/head/; revision=251734
* Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff2012-12-041-3/+3
| | | | | | | malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
* ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it againKevin Lo2012-01-071-1/+0
| | | | | | | Reviewed by: yongari Notes: svn path=/head/; revision=229767
* - There's no need to overwrite the default device method with the defaultMarius Strobl2011-11-221-5/+2
| | | | | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID. Notes: svn path=/head/; revision=227843
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.Ed Schouten2011-11-071-1/+1
| | | | | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static. Notes: svn path=/head/; revision=227309
* Fix typo, lost 0 in SYSCTL_ADD_INT usage.Aleksandr Rybalko2011-07-111-1/+1
| | | | Notes: svn path=/head/; revision=223929
* Support of Ralink Ethernet MAC, used in RT3050F/RT3052F and I belive in ↵Aleksandr Rybalko2011-07-113-0/+3187
other Ralink SoCs. Approved by: adrian (mentor) Notes: svn path=/head/; revision=223927