summaryrefslogtreecommitdiffstats
path: root/sys/dev/tsec
Commit message (Collapse)AuthorAgeFilesLines
* MFC r270945:ian2014-10-261-1/+1
| | | | | Rename OF_xref_phandle() to OF_node_from_xref() and add a new function that provides the inverse translation, OF_xref_from_node().
* MFC r261410ian2014-05-151-0/+3
| | | | | Follow r261352 by updating all drivers which are children of simplebus to check the status property in their probe routines.
* MFC r257991, r257992, 257993, 258504andreast2013-12-114-20/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | r257991: Consolidate Apple firmware hacks and improve them by switching on the presence of mac-io devices in the tree, which uniquely identifies Apple hardware. r257992: Allow OF_decode_addr() to also be able to map resources on big-endian devices. To this end, make PCI device detection rely on the device_type field rather than name, as per the standard. r257993: Make tsec work with the device tree present on the RB800. The previous code assumed that the MDIO bus was a direct child of the Ethernet interface. It may not be and indeed on many device trees is not. While here, add proper locking for MII transactions, which may be on a bus shared by several MACs. r258504: Save and restore the trap vectors when doing OF calls on pSeries machines. It turned out that on pSeries machines the call into OF modified the trap vectors and this made further behaviour unpredictable. With this commit I'm now able to boot multi user on a network booted environment on my IntelliStation 285. This is a POWER5+ machine.
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-041-3/+3
| | | | malloc(9) flags in sys/dev.
* Do not reinitialise the interface if it is already running, this prevents thethompsa2012-05-091-0/+3
| | | | | bootp+nfs code from working as it calls init on each dhcp send and rx fails to start in time.
* The DEVICE_POLLING dereference of sc->tsec_ifp needs to be checked for nullthompsa2012-05-081-7/+7
| | | | | first or this will panic. Condense three blocks that check sc->tsec_ifp into one while I am here.
* Respect phy-handle property in Ethernet nodes of the device tree.raj2012-03-043-22/+16
| | | | | | | | 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
* ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it againkevlo2012-01-071-1/+0
| | | | Reviewed by: yongari
* - There's no need to overwrite the default device method with the defaultmarius2011-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.
* Don't use the MAC address in the device tree if it's all zeroesmarcel2011-01-281-19/+10
| | | | | | | (i.e. 00-00-00-00-00-00). Use the currently programmed address instead. While here, simplify the function.
* Convert the PHY drivers to honor the mii_flags passed down and convertmarius2010-10-151-14/+5
| | | | | | | | | | | | | | | | | | | | | | | 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 Freescale PowerPC platforms to FDT convention.raj2010-07-113-56/+61
| | | | | | | | | | | | | | | | | | | | | | | | | The following systems are affected: - MPC8555CDS - MPC8572DS This overhaul covers the following major changes: - All integrated peripherals drivers for Freescale MPC85XX 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). - This includes: LBC, PCI / PCI-Express, I2C, DS1553, OpenPIC, TSEC, SEC, QUICC, UART, CFI. - Thanks to the common FDT infrastrucutre (fdtbus, simplebus) we retire ocpbus(4) driver, which was based on hard-coded config data. Note that world for these platforms has to be built WITH_FDT. Reviewed by: imp Sponsored by: The FreeBSD Foundation
* tsec: Use IFQ_DRV macros for managing interface packet queue.raj2009-11-201-3/+3
| | | | | | | This lets tsec(4) work with ALTQ. Submitted by: Marcin Ligenza MFC after: 1 week
* 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
* Fix Book-E/MPC85XX build. Some prototypes were wrong and got revealed withraj2009-06-132-4/+7
| | | | the recent kobj signature checking.
* When user_frac in the polling subsystem is low it is going to busy theattilio2009-05-301-6/+14
| | | | | | | | | | | | | | | | | | | | | 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
* tsec(4) cosmetics.raj2009-02-171-2/+1
|
* tsec(4): Always try to resume the receiver.raj2009-02-171-3/+10
| | | | | | This helps recover from RX stall under heavy loads. Submitted by: Piotr Ziecik kosmo ! semihalf dot com
* tsec(4): do not clear interrupt events register before use.raj2009-02-171-2/+2
| | | | | | | | | Prior to this fix, IEVENT register was always cleared before calling tsec_error_intr_locked(), which prevented error recovery actions from happening with polling enabled (and could lead to serious problems, including controller hang). Submitted by: Marcin Ligenza marcinl ! pacomp dot com dot pl
* Handle mbuf exhaustion scenario in tsec(4).raj2009-02-171-1/+6
| | | | | | Without this fix the system would hang under heavy networking load. Submitted by: Leon Theunissen leon ! parsec dot co dot za
* tsec(4) style improvements and clean-up.raj2009-02-173-73/+80
|
* Additional features for the tsec(4) Ethernet driver.raj2009-02-174-133/+774
| | | | | | | | | | | | | | - interrupt coalescing - polling - jumbo frames - multicast - VLAN tagging The enhanced version of the chip (eTSEC) can also take advantage of: - TCP/IP checksum calculation h/w offloading Obtained from: Freescale, Semihalf
* tsec: Refactor driver's structure.raj2008-08-263-557/+632
| | | | | | | | | | | | Split the driver into the core functionality part (sys/dev/tsec/if_tsec.c) and the bus attachment (sys/dev/tsec/if_tsec_ocp.c). This lets better integrate and maintain the driver in other environments with different attachment abstractions (there is at least one other FreeBSD port -- MPC83xx -- which uses this TSEC driver, but with different local bus model i.e. some OF derivative). While there, clean up and fix minor cosmetics. Obtained from: Semihalf
* tsec: Improve and clean up callouts.raj2008-08-262-19/+15
| | | | | | | | - eliminate the unused tsec_tick_ch callout - adjust and fix the main tsec callout handling - minor naming improvements Obtained from: Semihalf
* Convert TSEC watchdog to the new scheme.raj2008-03-122-18/+29
| | | | | Reviewed by: imp, marcel Approved by: cognet (mentor)
* Obtain TSEC h/w address from the parent bus (OCP) and not rely blindly on whatraj2008-03-121-10/+14
| | | | | | | | | | | | might be currently programmed into the registers. Underlying firmware (U-Boot) would typically program MAC address into the first unit only, and others are left uninitialized. It is now possible to retrieve and program MAC address for all units properly, provided they were passed on in the bootinfo metadata. Reviewed by: imp, marcel Approved by: cognet (mentor)
* Support for Freescale integrated Three-Speed Ethernet Controller (TSEC).raj2008-03-033-0/+2287
TSEC is the MAC engine offering 10, 100 or 1000 Mbps speed and is found on different Freescale parts (MPC83xx, MPC85xx). Depending on the silicon version there are up to four TSEC units integrated on the chip. This driver also works with the enhanced version of the controller (eTSEC), which is backwards compatible, but doesn't take advantage of its additional features (various off-loading mechanisms) at the moment. Approved by: cognet (mentor) Obtained from: Semihalf MFp4: e500
OpenPOWER on IntegriCloud