aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/my
Commit message (Collapse)AuthorAgeFilesLines
* MFC: Release driver lock at the end of the watchdog routine instead ofJohn Baldwin2009-03-271-1/+1
| | | | | | | | | trying to acquire it again. Approved by: re (kib) Notes: svn path=/stable/7/; revision=190467
* MFC r172568Andrew Thompson2008-07-281-1/+1
| | | | | | | Spelling fix for interupt -> interrupt Notes: svn path=/stable/7/; revision=180878
* my(4) doesn't need miibus(4).Christian Brueffer2007-03-111-5/+0
| | | | | | | | | Approved by: rwatson (mentor) Obtained from: DragonFly MFC after: 1 week Notes: svn path=/head/; revision=167453
* 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 Reviewed by: many Approved by: re@ Notes: svn path=/head/; revision=166901
* Fix fat-fingering in previous commit.John Baldwin2006-12-291-1/+1
| | | | | | | Pointy hat to: jhb Notes: svn path=/head/; revision=165640
* Various bpf(4) related fixes to catch places up to the new bpf(4)John Baldwin2006-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) Notes: svn path=/head/; revision=165632
* - Consistently use if_printf() only in interface methods: if_start(),Gleb Smirnoff2006-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> Notes: svn path=/head/; revision=162321
* Add altq(4) support.Christian Brueffer2006-06-051-4/+6
| | | | | | | | | Reviewed by: mlaier Approved by: rwatson (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=159291
* Since DELAY() was moved, most <machine/clock.h> #includes have beenPoul-Henning Kamp2006-05-161-1/+0
| | | | | | | unnecessary. Notes: svn path=/head/; revision=158651
* Fix -Wundef from compiling the amd64 LINT.Ruslan Ermilov2005-12-041-1/+1
| | | | Notes: svn path=/head/; revision=153084
* - Store pointer to the link-level address right in "struct ifnet"Ruslan Ermilov2005-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. Notes: svn path=/head/; revision=152315
* Fixup locking in if_my(4) and mark it MPSAFE:John Baldwin2005-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 Notes: svn path=/head/; revision=149151
* - Remove pre-new-bus code under #if 0 and some other rotted code underJohn Baldwin2005-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. Notes: svn path=/head/; revision=148946
* - Use if_printf() and device_printf() instead of outputting my%d:John Baldwin2005-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. Notes: svn path=/head/; revision=148945
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson2005-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 Notes: svn path=/head/; revision=148887
* Modify device drivers supporting multicast addresses to lock if_addr_mtxRobert Watson2005-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 Notes: svn path=/head/; revision=148654
* Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis2005-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 Notes: svn path=/head/; revision=147256
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386Yoshihiro Takahashi2005-05-291-2/+0
| | | | | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr) Notes: svn path=/head/; revision=146734
* Use BUS_PROBE_DEFAULT for pci probe return valueWarner Losh2005-03-051-1/+1
| | | | Notes: svn path=/head/; revision=143158
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-061-1/+1
| | | | Notes: svn path=/head/; revision=139749
* Replace handrolled CRC calculation with ether_crc32_[lb]e().Christian Weisgerber2004-06-091-30/+2
| | | | Notes: svn path=/head/; revision=130270
* 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
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-171-4/+3
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* Announce ethernet MAC addresss in ether_ifattach().Matthew N. Dodd2004-03-141-5/+0
| | | | Notes: svn path=/head/; revision=126966
* Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.David E. O'Brien2003-12-081-6/+6
| | | | | | | Requested by: bde,imp Notes: svn path=/head/; revision=123289
* Drop the driver lock around calls to if_input to avoid a LOR whenSam Leffler2003-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 Notes: svn path=/head/; revision=122689
* Try to create some sort of consistency in how the routings to find theDavid E. O'Brien2003-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). Notes: svn path=/head/; revision=122625
* Replace the if_name and if_unit members of struct ifnet with new membersBrooks Davis2003-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) Notes: svn path=/head/; revision=121816
* Use __FBSDID().David E. O'Brien2003-08-241-6/+3
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Prefer new location of pci include files (which have only been in theWarner Losh2003-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. Notes: svn path=/head/; revision=119285
* - Express hard dependencies on bus (pci, isa, pccard) andMatthew N. Dodd2003-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.) Notes: svn path=/head/; revision=113506
* Use __FBSDID rather than rcsid[].David E. O'Brien2003-04-031-2/+4
| | | | Notes: svn path=/head/; revision=113038
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-4/+4
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-4/+4
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* network interface driver changes:Sam Leffler2002-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 Notes: svn path=/head/; revision=106937
* Fix instances of macros with improperly parenthasized arguments.Alfred Perlstein2002-11-091-2/+2
| | | | | | | Verified by: md5 Notes: svn path=/head/; revision=106696
* Cast a pointer to a uintptr_t instead of a u_int.John Baldwin2002-11-071-1/+1
| | | | Notes: svn path=/head/; revision=106588
* Add missing unlockJulian Elischer2002-05-301-1/+3
| | | | | | | Submitted by: dirkx@covalent.net Notes: svn path=/head/; revision=97641
* Add missing UNLOCKsJulian Elischer2002-05-021-1/+9
| | | | | | | Submitted by: dirkx@covalent.net Notes: svn path=/head/; revision=95939
* Need more includes.Julian Elischer2002-04-301-0/+2
| | | | Notes: svn path=/head/; revision=95807
* Add the extra argument to mtx_init()Julian Elischer2002-04-301-1/+2
| | | | Notes: svn path=/head/; revision=95803
* Follow NetBSD and s/IFM_1000_TX/IFM_1000_T/Poul-Henning Kamp2002-04-281-9/+9
| | | | Notes: svn path=/head/; revision=95673
* diff reductionJulian Elischer2002-04-171-9/+0
| | | | Notes: svn path=/head/; revision=94905
* Slight diff-reduction to -stable.Julian Elischer2002-04-171-5/+5
| | | | Notes: svn path=/head/; revision=94904
* Diff reduction to 4.x version.Julian Elischer2002-04-161-44/+41
| | | | Notes: svn path=/head/; revision=94863
* Add the driver for "myson" ethernet cards.Julian Elischer2002-04-042-0/+2467
This driver was written by Myson and is made available by their courtesy. The 5.x version is not fully tested (I will be testing) but the 4.x version has been tested by many. I will commit it soon. Myson have their own chip design based on the DEC 214xx family but with several differences. Myson sells this chip to several EOMs in teh Chinese area so there may be many noname brand cards that respond to this driver. Myson will be supplying a list of some of these. Notes: svn path=/head/; revision=93746