aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/tl
Commit message (Collapse)AuthorAgeFilesLines
* 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/+1
| | | | | | | | | | | | | 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
* Remove variable initialized but no longer actually used since r226995.Marius Strobl2011-11-021-3/+0
| | | | | | | | Found with: Coverity Prevent(tm) CID: 10044 Notes: svn path=/head/; revision=227042
* - Import the common MII bitbang'ing code from NetBSD and convert drivers toMarius Strobl2011-11-012-249/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | take advantage of it instead of duplicating it. This reduces the size of the i386 GENERIC kernel by about 4k. The only potential in-tree user left unconverted is xe(4), which generally should be changed to use miibus(4) instead of implementing PHY handling on its own, as otherwise it makes not much sense to add a dependency on miibus(4)/mii_bitbang(4) to xe(4) just for the MII bitbang'ing code. The common MII bitbang'ing code also is useful in the embedded space for using GPIO pins to implement MII access. - Based on lessons learnt with dc(4) (see r185750), add bus barriers to the MII bitbang read and write functions of the other drivers converted in order to ensure the intended ordering. Given that register access via an index register as well as register bank/window switching is subject to the same problem, also add bus barriers to the respective functions of smc(4), tl(4) and xl(4). - Sprinkle some const. Thanks to the following testers: Andrew Bliznak (nge(4)), nwhitehorn@ (bm(4)), yongari@ (sis(4) and ste(4)) Thanks to Hans-Joerg Sirtl for supplying hardware to test stge(4). Reviewed by: yongari (subset of drivers) Obtained from: NetBSD (partially) Notes: svn path=/head/; revision=226995
* - Add IFM_10_2 and IFM_10_5 media via tlphy(4) only in case the respectiveMarius Strobl2010-10-242-7/+18
| | | | | | | | | | | | | | | interface also has such connectors. - In tl_attach() unify three different ways of obtaining the device and vendor IDs and remove the now obsolete tl_dinfo from tl_softc. - Given that tlphy(4) only handles the integrated PHYs of NICs driven by tl(4) make it only probe on the latter. - Switch mlphy(4) and tlphy(4) to use mii_phy_add_media()/mii_phy_setmedia(). - Simplify looking for the respective companion PHY in mlphy(4) and tlphy(4) by ignoring the native one by just comparing the device_t's directly rather than the device name. Notes: svn path=/head/; revision=214264
* Converted the remainder of the NIC drivers to use the mii_attach()Marius Strobl2010-10-151-2/+4
| | | | | | | | | | introduced in r213878 instead of mii_phy_probe(). Unlike r213893 these are only straight forward conversions though. Reviewed by: yongari Notes: svn path=/head/; revision=213894
* - Hook into the existing stat timer to drive the transmit watchdog insteadJohn Baldwin2009-11-192-11/+13
| | | | | | | | | of using if_watchdog and if_timer. - Reorder detach to call ether_ifdetach() before anything else in tl(4) and wb(4). Notes: svn path=/head/; revision=199560
* Use the bus_*() routines rather than bus_space_*() for register operations.John Baldwin2009-11-172-18/+7
| | | | Notes: svn path=/head/; revision=199414
* Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/Robert Watson2009-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 Notes: svn path=/head/; revision=195049
* Fix shutdown prototypes.Warner Losh2009-02-101-3/+3
| | | | Notes: svn path=/head/; revision=188463
* Move the tl driver form sys/pci to sys/dev/tl.Warner Losh2008-08-142-0/+2955
Notes: svn path=/head/; revision=181738