summaryrefslogtreecommitdiffstats
path: root/sys/dev/mge
Commit message (Collapse)AuthorAgeFilesLines
* sys/dev: minor spelling fixes.pfg2016-05-031-1/+1
| | | | Most affect comments, very few have user-visible effects.
* [mdio] migrate mdiobus out of etherswitch and into a top-level device of its ↵adrian2015-12-261-1/+1
| | | | | | | | | | | own. The mdio driver interface is generally useful for devices that require MDIO without the full MII bus interface. This lifts the driver/interface out of etherswitch(4), and adds a mdio(4) man page. Submitted by: Landon Fuller <landon@landonf.org> Differential Revision: https://reviews.freebsd.org/D4606
* Improve style in mge driverzbb2015-10-251-19/+30
| | | | | | | | | | Minor improvements introduced to ensure code follows FreeBSD style guidelines. Reviewed by: adrian Obtained from: Semihalf Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D3904
* Change improper locking assertion in mgezbb2015-10-251-4/+2
| | | | | | | | | Assertion used here was invalid. If current thread helds any of locks, we never want to recurse on them. Obtained from: Semihalf Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D3903
* Add etherswitch support to mgezbb2015-10-252-64/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces support for etherswitch devices that utilize SMI as a way of accessing its registers. SMI register is located in address space of mge -- access to it was exported through MDIO interface. Attachment functions were enhanced so as to ensure proper initialisation in both cases: 1) PHYs attached directly to mge, 2) PHYs attached to switch device and switch attached to mge. Attachment of etherswitch device depends on dts entry with compatible="mrvl,sw" property. If none is found, typical PHY attachment procedure follows. In case of switch attached, PHYs' status and configuration is accessible via etherswitchcfg, and ifconfig shows always-up, non-configurable mge interfaces. Due to the fact that there may be simultaneous accessess to SMI registers (e.g. from PHY attached to one of mge instances and switch to the other), SMI access interlock was added. It is SX lock, because sleep ability is necessary -- busy-waiting would result in poor performance due to long delays required by hardware. Underlying switch driver is obliged to use sleepable locks as well. Reviewed by: adrian Obtained from: Semihalf Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Differential revision: https://reviews.freebsd.org/D3900
* Mechanically convert to if_inc_counter().glebius2014-09-191-5/+5
|
* Optim and Fix for mge driver:fabient2014-07-071-12/+35
| | | | | | | | | | - add missing rcvif in mbuf - add missing ipacket stat - remove uncessary mbuf copy on output path - fix deadlock of the TX engine in case of error Obtained from: NETASQ MFC after: 2 weeks
* Follow r261352 by updating all drivers which are children of simplebusian2014-02-021-0/+3
| | | | | | | | | | | | | to check the status property in their probe routines. Simplebus used to only instantiate its children whose status="okay" but that was improper behavior, fixed in r261352. Now that it doesn't check anymore and probes all its children; the children all have to do the check because really only the children know how to properly interpret their status property strings. Right now all existing drivers only understand "okay" versus something- that's-not-okay, so they all use the new ofw_bus_status_okay() helper.
* Fix undefined behavior: (1 << 31) is not defined as 1 is an int and thiseadler2013-11-301-3/+3
| | | | | | | | | | | | | shifts into the sign bit. Instead use (1U << 31) which gets the expected result. This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD. Discussed with: -arch, rdivacky Reviewed by: cperciva
* The r48589 promised to remove implicit inclusion of if_var.h soon. Prepareglebius2013-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.
* Remove unused and incomplete support for delayed fragment checksumsandre2013-08-191-3/+1
| | | | from bce(4), bxe(4), mge(4) and ti(4) drivers.
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-041-2/+2
| | | | malloc(9) flags in sys/dev.
* Merging of projects/armv6, part 6gonzo2012-08-152-25/+85
| | | | | | | r229271: Import files needed to build ARMADA XP kernel. Submitted by: Grzegorz Bernacki
* Add support for Marvell 88F6282.hrs2012-07-281-1/+3
| | | | Sponsored by: Plat'Home, Co.,Ltd.
* More conversions of drivers to use the PCI parent DMA tag.scottl2012-03-121-2/+2
|
* Respect phy-handle property in Ethernet nodes of the device tree.raj2012-03-042-13/+10
| | | | | | | | This lets specify whereabouts of the parent PHY for a given MAC node (and get rid of ugly kludges in mge(4) and tsec(4)). Obtained from: Semihalf MFC after: 1 week
* Convert the PHY drivers to honor the mii_flags passed down and convertmarius2010-10-152-13/+6
| | | | | | | | | | | | | | | | | | | | | | | the NIC drivers as well as the PHY drivers to take advantage of the mii_attach() introduced in r213878 to get rid of certain hacks. For the most part these were: - Artificially limiting miibus_{read,write}reg methods to certain PHY addresses; we now let mii_attach() only probe the PHY at the desired address(es) instead. - PHY drivers setting MIIF_* flags based on the NIC driver they hang off from, partly even based on grabbing and using the softc of the parent; we now pass these flags down from the NIC to the PHY drivers via mii_attach(). This got us rid of all such hacks except those of brgphy() in combination with bce(4) and bge(4), which is way beyond what can be expressed with simple flags. While at it, I took the opportunity to change the NIC drivers to pass up the error returned by mii_attach() (previously by mii_phy_probe()) and unify the error message used in this case where and as appropriate as mii_attach() actually can fail for a number of reasons, not just because of no PHY(s) being present at the expected address(es). Reviewed by: jhb, yongari
* Convert Marvell ARM platforms to FDT convention.raj2010-06-132-17/+47
| | | | | | | | | | | | | | | | | | | | | | | | | The following systems are involved: - DB-88F5182 - DB-88F5281 - DB-88F6281 - DB-78100 - SheevaPlug This overhaul covers the following major changes: - All integrated peripherals drivers for Marvell ARM SoC, which are currently in the FreeBSD source tree are reworked and adjusted so they derive config data out of the device tree blob (instead of hard coded / tabelarized values). - Since the common FDT infrastrucutre (fdtbus, simplebus) is used we say good by to obio / mbus drivers and numerous hard-coded config data. Note that world needs to be built WITH_FDT for the affected platforms. Reviewed by: imp Sponsored by: The FreeBSD Foundation.
* Assorted fixes for mge(4).raj2010-02-171-11/+3
| | | | | | | | | | | - Use proper map for the busdma sync on mge descriptor. - Remove unnecesary busdma sync. - Eliminate redundant locking in mge_reinit_rx() (just assert). - Kill unused variable. Submitted by: Grzegorz Bernacki Obtained from: Semihalf MFC after: 1 week
* Remove extraneous semicolons, no functional changes.mbr2010-01-071-1/+1
| | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
* Fix autonegotiation: tell the MAC where to find the PHY.philip2009-12-291-3/+9
| | | | | | | Fix crashes in the detach path. Submitted by: Kristof Provost <kristof@sigsegv.be> MFC after: 1 month
* Introduce MII_ADDR_BASE option on ARM, which allows to override the defaultraj2009-08-251-4/+7
| | | | | | | | | | | | | | per platform requirements. Notes: - Only used by mge(4) at the moment. - This is very simplified approach and should be replaced by some long-term solution for managing the board/platform configuration (among others the MAC-PHY binding info). Submitted by: Michal Hajduk Obtained from: Semihalf
* Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/rwatson2009-06-261-2/+2
| | | | | | | | | | | | | IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface. For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list. Approved by: re (kib) MFC after: 6 weeks
* strict kobj signatures: fix assortment of miibus_writereg implsavg2009-06-111-3/+4
| | | | | | | return type should be int, not void Reviewed by: imp, current@ Approved by: jhb (mentor)
* When user_frac in the polling subsystem is low it is going to busy theattilio2009-05-301-6/+10
| | | | | | | | | | | | | | | | | | | | | CPU for too long period than necessary. Additively, interfaces are kept polled (in the tick) even if no more packets are available. In order to avoid such situations a new generic mechanism can be implemented in proactive way, keeping track of the time spent on any packet and fragmenting the time for any tick, stopping the processing as soon as possible. In order to implement such mechanism, the polling handler needs to change, returning the number of packets processed. While the intended logic is not part of this patch, the polling KPI is broken by this commit, adding an int return value and the new flag IFCAP_POLLING_NOCOUNT (which will signal that the return value is meaningless for the installed handler and checking should be skipped). Bump __FreeBSD_version in order to signal such situation. Reviewed by: emaste Sponsored by: Sandvine Incorporated
* mge(4): fix two bugs, which were leading to crash/hang under very heavyraj2009-04-161-3/+11
| | | | | | | | | | | network load. 1. Leave the RX interrupt routine if there is no mbuf available. 2. Properly initialize and track tx_desc_used_count counter so as not to leak mbuf while traversing used descriptors. Obtained from: Semihalf
* Adjust Marvell Discovery (MV78xxx) support to recognize newest chip revisions,raj2009-04-161-1/+2
| | | | | | handle Z0 revision (early silicon) explicitly due to its quirks. Obtained from: Marvell, Semihalf
* Handle mge(4) chip revision differences at run-time rather then compile time,raj2009-01-082-52/+90
| | | | | | | which is more flexible for future revisions, and lets eliminate some #defines and compile conditionals. Obtained from: Semihalf
* Marvell Gigabit Ethernet controller driver.raj2008-10-142-0/+2123
This supports 1Gbps Ethernet engine found on ARM-based SOCs (Orion, Kirkwood, Discovery), as well as on system controllers for PowerPC processors (MV64430, MV6446x). The following advanced features are supported: - multicast - VLAN tagging - IP/TCP/UDP checksum calculation offloading - polling - interrupt coalescing Obtained from: Marvell, Semihalf
OpenPOWER on IntegriCloud