aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ep
Commit message (Collapse)AuthorAgeFilesLines
* These files were getting sys/malloc.h and vm/uma.h with header pollutionGleb Smirnoff2016-02-011-0/+1
| | | | | | | via sys/mbuf.h Notes: svn path=/head/; revision=295126
* Create a generic PCCARD_PNP_INFO from the MODULE_PNP_INFO buildingWarner Losh2015-12-111-0/+1
| | | | | | | | | | | | block. Use it in all the PNP drivers to export either the current PNP table. For uart, create a custom table and export it using MODULE_PNP_INFO since it's the only one that matches on function number. Differential Review: https://reviews.freebsd.org/D3461 Notes: svn path=/head/; revision=292079
* Mechanically convert to if_inc_counter().Gleb Smirnoff2014-09-181-8/+9
| | | | Notes: svn path=/head/; revision=271806
* Add missing locking.Adrian Chadd2014-08-211-0/+5
| | | | | | | | | | | Whilst here, assert that the lock is held when calling epstop(). Tested: ep0: <3com Megahertz 574B> Notes: svn path=/head/; revision=270254
* - Provide necessary includes.Gleb Smirnoff2013-10-291-1/+3
| | | | | | | | | | - Remove unnecessary includes. Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=257324
* 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 DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on ↵Sofian Brabez2013-01-304-4/+4
| | | | | | | | | | device_method_t arrays Reviewed by: cognet Approved by: cognet Notes: svn path=/head/; revision=246128
* Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff2012-12-041-4/+4
| | | | | | | 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
* Fix typos - remove duplicate "the".Rebecca Cran2011-02-211-1/+1
| | | | | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days Notes: svn path=/head/; revision=218909
* Add new tunable 'net.link.ifqmaxlen' to set default send interfaceMaxim Sobolev2010-05-031-2/+2
| | | | | | | | | | | | | queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value. MFC after: 1 month Notes: svn path=/head/; revision=207554
* Replace several instances of 'if (!a & b)' with 'if (!(a &b))' in orderEdward Tomasz Napierala2010-01-081-1/+1
| | | | | | | to silence newer GCC versions. Notes: svn path=/head/; revision=201794
* - Add a private timer to drive the transmit watchdog instead of usingJohn Baldwin2009-11-192-18/+44
| | | | | | | | | if_watchdog and if_timer. - Fix some issues in detach for sn(4), ste(4), and ti(4). Primarily this means calling ether_ifdetach() before anything else. Notes: svn path=/head/; revision=199559
* Cleanup tortured logic a big. Noticed by FlexLint, per phk.Warner Losh2009-09-081-8/+7
| | | | | | | | | # My reading of the docs suggests this can only happen on 10Base5 and # 10Base2 setups (and maybe only the former), which I can't test # adequately since I have nothing but 10BaseT, etc here. Notes: svn path=/head/; revision=196984
* Revert previous commit and add myself to the list of people who shouldPoul-Henning Kamp2009-09-082-6/+1
| | | | | | | know better than to commit with a cat in the area. Notes: svn path=/head/; revision=196970
* Add necessary include.Poul-Henning Kamp2009-09-082-1/+6
| | | | Notes: svn path=/head/; revision=196969
* Add a missing break in a switch statement.Christian Brueffer2009-05-151-0/+1
| | | | | | | | | Found with: Coverity Prevent(tm) CID: 4302 MFC after: 2 weeks Notes: svn path=/head/; revision=192158
* Two refinements to the 3c1 support:Warner Losh2009-04-113-8/+17
| | | | | | | | | | 1) Flag it and only access that command on the 3c1 2) The TX PLL appears to power down when not in use, so we have to power it back up when we've been idle. Do this at the start of ifstart. Otherwise we fall off the net. Notes: svn path=/head/; revision=190908
* o Report ethernet status for at least 10BaseT media. Since I don'tWarner Losh2009-04-112-1/+30
| | | | | | | | | | | | have other media to test against, I've left that media reporting unchanged. o Enable the TX_PLL when we enable TX. This is harmless on most cards, but required to get the 3c1 CF card working. Power savings could be had by managing this better, but for now it gets my card working. Notes: svn path=/head/; revision=190907
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-231-1/+1
| | | | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Approved by: re (implicit?) Notes: svn path=/head/; revision=166906
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-233-5/+5
| | | | | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@ Notes: svn path=/head/; revision=166901
* ALTQify ep(4).Max Laier2006-12-011-5/+7
| | | | | | | | Tested and Requested by: Andy Brook MFC after: 3 days Notes: svn path=/head/; revision=164810
* Remove ifdef notdef SIOCHWADDR vestige.Warner Losh2006-02-041-6/+0
| | | | Notes: svn path=/head/; revision=155281
* - Store pointer to the link-level address right in "struct ifnet"Ruslan Ermilov2005-11-111-2/+2
| | | | | | | | | | | | | rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr. - Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead. Notes: svn path=/head/; revision=152315
* Better use of gone.Warner Losh2005-09-201-9/+5
| | | | Notes: svn path=/head/; revision=150395
* Make sure that we call if_free(ifp) after bus_teardown_intr. Since weWarner Losh2005-09-191-1/+1
| | | | | | | | | | could get an interrupt after we free the ifp, and the interrupt handler depended on the ifp being still alive, this could, in theory, cause a crash. Eliminate this possibility by moving the if_free to after the bus_teardown_intr() call. Notes: svn path=/head/; revision=150306
* MFp4: Migrate from CARD_CIS_SCAN to pccard_cis_scanWarner Losh2005-09-131-1/+1
| | | | Notes: svn path=/head/; revision=150110
* Simplify names.Warner Losh2005-08-291-6/+6
| | | | Notes: svn path=/head/; revision=149559
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson2005-08-091-10/+10
| | | | | | | | | | | | | | | | | IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days Notes: svn path=/head/; revision=148887
* The isa attachment calls ep_free after it has already been called onceWarner Losh2005-07-311-1/+3
| | | | | | | | | | | in the resource error in ep_alloc case. This results in a panic. Zero resources to make it safe to call twice pending resolution of layering questions. MFC After: 3 days Notes: svn path=/head/; revision=148581
* Add newer commandsWarner Losh2005-07-311-2/+7
| | | | Notes: svn path=/head/; revision=148579
* Spell destroy in a more traditional wayWarner Losh2005-07-192-4/+4
| | | | Notes: svn path=/head/; revision=148164
* NitsWarner Losh2005-07-131-1/+0
| | | | Notes: svn path=/head/; revision=147960
* Upon relection, we shouldn't allow the tuple structs to be modified byWarner Losh2005-07-011-1/+1
| | | | | | | | | | the functor, so make it a const pointer, and chase down the resulting const-poisoning. Approved by: re (scottl) Notes: svn path=/head/; revision=147729
* Make a pass and cleanup the printfs from this driver.Warner Losh2005-07-013-21/+11
| | | | | | | Approved by: re (scottl) blanket ep Notes: svn path=/head/; revision=147717
* Minor cleanup of ep driver and pccard attachment:Warner Losh2005-07-013-45/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Grab the MAC address out of the CIS if the card has the special 3Com 0x88 tuple. Most 3Com cards don't have this tuple, but we prefer it to the eeprom since it only appears to be present when the eeprom doesn't have the info. So far, I've only observed this on my 3C362 and 3C362B cards, but the NetBSD driver implies that the 3C362C also has this tuple, and that some 3C574 cards do too (none of mine do). ep_pccard_mac was written after looking at the NetBSD code. o Store the enet addr in the softc for this device, so we can use the overridden MAC to set the station address. o Create a routine to set the station address and use it where we need it. o setup the cmd shitfs and such before we call ep_alloc(), and remove setting up the cmd shift value there. It initializes to 0, and those attachments that need to frob it do so before calling ep_alloc. o Remove some obsolete comments o No longer a need to export ep_get_macaddr, so make it static o ep_alloc already grabs the EEPROM id, so we don't need to grab it again in ep_pccard_attach. o eliminate unit, it isn't needed, fix some printfs to be device_printf instead. # All my pccards except the 3C1 work now. Didn't test ISA or cbus cards # that I have: 3C509B-TP or 3C569B-J-TPO Tested on: 3C589B, 3C589C, 3C589D, 3C589D-TP, 3C562, 3C562B/3C563B, 3C562D/3C563D, 3CCFE574BT, 3CXEM556, 3CCSH572BT, 3C574-TX, 3CCE589EC, 3CXE589EC, 3CCFEM556, 3C1 Approved by: re (scottl) Notes: svn path=/head/; revision=147715
* Add a chipset field to the lookup. Use this chipset type to determineWarner Losh2005-06-281-167/+57
| | | | | | | | | | | | | | | which command to use to read the eeprom and which devices have an MII. Simplify code by no longer using the OLDCARD compat rouintes (I don't know if this breaks OLDCARD on pc98 or not, but OLDCARD on pc98 days are numbered, I hope). This also removes a number of kludges that we had before because they are OBE. Add a convenience routine to lookup the device to avoid many casts in many places. Tested with: 3C589D-TP, 3CCSH572BT Approved by: re (scottl, blanket ep) Notes: svn path=/head/; revision=147649
* o When calling ep_get_macaddr(), provide it a local buffer. Add a commentWarner Losh2005-06-264-19/+22
| | | | | | | | | | | | that says why we do this (or rather, explains that it is some voodoo magic that's poorly understood). The local buffer fixes the crash on attach. o Rename get_e() to ep_get_e() to avoid namespace pollution. Submitted by: mux Approved by: re (scottl) Notes: svn path=/head/; revision=147607
* Eliminate unused argument in PCMCIA_CARD macro.Warner Losh2005-06-241-7/+7
| | | | | | | | | | | Provide a backwards compatible way to have the extra macro by defining PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that want/need to have the same driver on 5 and 6 with pccard attachments. Approved by: re (dwhite) Notes: svn path=/head/; revision=147580
* Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis2005-06-103-15/+20
| | | | | | | | | | | | | | | | | | | | | | | struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam Notes: svn path=/head/; revision=147256
* Make it clear that the statement following the conditional is a NOP.Matthew N. Dodd2005-04-131-1/+2
| | | | Notes: svn path=/head/; revision=144996
* Don't print 'unknown id' in the ep_pccard_identify routine. It isWarner Losh2005-01-201-2/+1
| | | | | | | | expected to be unknown in some cases, and printing it clutters up things too much. Notes: svn path=/head/; revision=140530
* u_intXX_t -> uintXX_t while I'm here.Warner Losh2005-01-206-33/+33
| | | | Notes: svn path=/head/; revision=140523
* Only attach to network functions.Warner Losh2005-01-201-0/+10
| | | | Notes: svn path=/head/; revision=140522
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-066-6/+6
| | | | Notes: svn path=/head/; revision=139749
* Remove duplicate $FreeBSD$Warner Losh2004-07-223-9/+0
| | | | | | | Noticed by: njl Notes: svn path=/head/; revision=132529
* Minor style nitWarner Losh2004-07-221-1/+1
| | | | Notes: svn path=/head/; revision=132518
* Fix disordering of pccarddevs.h noticed by bde. Also remove a fewWarner Losh2004-05-271-1/+1
| | | | | | | | | redundant includes and fix some of the include disordering. Submitted by: bde Notes: svn path=/head/; revision=129764
* Move to generating pccarddevs.h on the fly, both for the kernel andWarner Losh2004-05-261-1/+1
| | | | | | | | | | the modules. Also generate usbdevs.h automatically now, but a non-kernel file is stopping that at the moment. Notes: svn path=/head/; revision=129740
* We don't need to initialize if_output, ether_ifattach() does itMaxime Henrion2004-05-231-1/+0
| | | | | | | for us. Notes: svn path=/head/; revision=129616