summaryrefslogtreecommitdiffstats
path: root/sys/dev/my
Commit message (Collapse)AuthorAgeFilesLines
* MFC: r266270brueffer2014-05-311-2/+0
| | | | Remove some unused variables.
* MFC r260042:dim2014-01-041-5/+0
| | | | | Remove superfluous old-style rcsid[] from if_my.c. There is already an __FBSDID() at the top of the file.
* Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on ↵sbz2013-01-301-1/+1
| | | | | | | device_method_t arrays Reviewed by: cognet Approved by: cognet
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-041-4/+4
| | | | malloc(9) flags in sys/dev.
* ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it againkevlo2012-01-071-1/+0
| | | | Reviewed by: yongari
* Remove duplicate header includeskevlo2011-06-281-1/+0
|
* Add new tunable 'net.link.ifqmaxlen' to set default send interfacesobomax2010-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
* - This driver used the if_watchdog timer both as a watchdog on transmit andjhb2009-11-192-23/+43
| | | | | | | auto-negotiation. To make this simpler and easier to understand I have split this out into two separate timers. One just manages the auto-neg side of things and one is a transmit watchdog. Neither uses if_watchdog. - Call ether_ifdetach() at the start of detach.
* 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
* Release driver lock at the end of the watchdog routine instead of trying tojhb2009-03-231-1/+1
| | | | | | | acquire it again. Submitted by: bland MFC after: 3 days
* Shutdown returns an int.imp2009-02-051-3/+3
|
* Spelling fix for interupt -> interruptkevlo2007-10-121-1/+1
|
* my(4) doesn't need miibus(4).brueffer2007-03-111-5/+0
| | | | | | Approved by: rwatson (mentor) Obtained from: DragonFly MFC after: 1 week
* o break newbus api: add a new argument of type driver_filter_t topiso2007-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 Reviewed by: many Approved by: re@
* Fix fat-fingering in previous commit.jhb2006-12-291-1/+1
| | | | Pointy hat to: jhb
* Various bpf(4) related fixes to catch places up to the new bpf(4)jhb2006-12-291-2/+2
| | | | | | | | | | | | | semantics. - Stop testing bpf pointers for NULL. In some cases use bpf_peers_present() and then call the function directly inside the conditional block instead of the macro. - For places where the entire conditional block is the macro, remove the test and make the macro unconditional. - Use BPF_MTAP() in if_pfsync on FreeBSD instead of an expanded version of the old semantics. Reviewed by: csjp (older version)
* - Consistently use if_printf() only in interface methods: if_start(),glebius2006-09-152-25/+35
| | | | | | | | if_watchdog, etc., or in functions used only in these methods. In all other functions in the driver use device_printf(). - Use __func__ instead of typing function name. Submitted by: Alex Lyashkov <umka sevcity.net>
* Add altq(4) support.brueffer2006-06-051-4/+6
| | | | | | Reviewed by: mlaier Approved by: rwatson (mentor) MFC after: 2 weeks
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-161-1/+0
| | | | unnecessary.
* Fix -Wundef from compiling the amd64 LINT.ru2005-12-041-1/+1
|
* - Store pointer to the link-level address right in "struct ifnet"ru2005-11-111-1/+1
| | | | | | | | | | 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.
* Fixup locking in if_my(4) and mark it MPSAFE:jhb2005-08-162-104/+96
| | | | | | | | | | | | | | | | - Add locked variants of my_start() and my_init(). - Assert that the lock is held in several places rather than recursing. - Overhaul failure case handling in my_attach() so that it will actually clean up completely in each of the failure cases. - Setup the interrupt after ether_ifattach() in my_attach(). - Remove unused callout handle from softc. - Free the metadata for the descriptors my_in detach() (we leaked it before). - Fix locking in my_ioctl(). - Remove spls. Tested by: brueffer MFC after: 3 days
* - Remove pre-new-bus code under #if 0 and some other rotted code underjhb2005-08-101-55/+2
| | | | | | | | | #if 0. - Use pci_enable_busmaster() to enable busmastering instead of frobbing the command register directly. - Don't check to see if memory or I/O can be enabled by writing to the command register. The PCI bus driver's bus_alloc_resource() method already checks this and will fail if it can't enable the bit.
* - Use if_printf() and device_printf() instead of outputting my%d:jhb2005-08-102-68/+47
| | | | | | | | everywhere. This means that my_unit is no longer used as well. The watchdog routine now also prints 'my0: ...' rather than 'm0x0: ...'. - Don't bzero the softc and don't try to free it in detach or if attach fails. - A whitespace fix.
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-6/+6
| | | | | | | | | | | | | | 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
* Modify device drivers supporting multicast addresses to lock if_addr_mtxrwatson2005-08-031-0/+2
| | | | | | | | over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list. Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> MFC after: 1 week
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-102-21/+23
| | | | | | | | | | | | | | | | | | | | 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
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-291-2/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-1/+1
|
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Replace handrolled CRC calculation with ether_crc32_[lb]e().naddy2004-06-091-30/+2
|
* We don't need to initialize if_output, ether_ifattach() does itmux2004-05-231-1/+0
| | | | for us.
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-4/+3
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Announce ethernet MAC addresss in ether_ifattach().mdodd2004-03-141-5/+0
|
* Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.obrien2003-12-081-6/+6
| | | | Requested by: bde,imp
* Drop the driver lock around calls to if_input to avoid a LOR whensam2003-11-141-0/+2
| | | | | | | | the packets are immediately returned for sending (e.g. when bridging or packet forwarding). There are more efficient ways to do this but for now use the least intrusive approach. Reviewed by: imp, rwatson
* Try to create some sort of consistency in how the routings to find theobrien2003-11-131-11/+9
| | | | | | | multicast hash are written. There are still two distinct algorithms used, and there actually isn't any reason each driver should have its own copy of this function as they could all share one copy of it (if it grew an additional argument).
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-2/+1
| | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
* Use __FBSDID().obrien2003-08-241-6/+3
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-3/+3
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* - Express hard dependencies on bus (pci, isa, pccard) andmdodd2003-04-151-1/+3
| | | | | | | | network layer (ether). - Don't abuse module names to facilitate ifconfig module loading; such abuse isn't really needed. (And if we do need type information associated with a module then we should make it explicit and not use hacks.)
* Use __FBSDID rather than rcsid[].obrien2003-04-031-2/+4
|
* Back out M_* changes, per decision of the TRB.imp2003-02-191-4/+4
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-4/+4
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* network interface driver changes:sam2002-11-141-14/+6
| | | | | | | | | | | | | | o don't strip the Ethernet header from inbound packets; pass packets up the stack intact (required significant changes to some drivers) o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN) o track ether_ifattach/ether_ifdetach API changes o track bpf changes (use BPF_TAP and BPF_MTAP) o track vlan changes (ifnet capabilities, revised processing scheme, etc.) o use if_input to pass packets "up" o call ether_ioctl for default handling of ioctls Reviewed by: many Approved by: re
* Fix instances of macros with improperly parenthasized arguments.alfred2002-11-091-2/+2
| | | | Verified by: md5
* Cast a pointer to a uintptr_t instead of a u_int.jhb2002-11-071-1/+1
|
* Add missing unlockjulian2002-05-301-1/+3
| | | | Submitted by: dirkx@covalent.net
* Add missing UNLOCKsjulian2002-05-021-1/+9
| | | | Submitted by: dirkx@covalent.net
* Need more includes.julian2002-04-301-0/+2
|
OpenPOWER on IntegriCloud