summaryrefslogtreecommitdiff
path: root/sys/dev/snc
AgeCommit message (Collapse)Author
2017-01-28Remove pc98 support completely.Yoshihiro Takahashi
I thank all developers and contributors for pc98. Relnotes: yes Notes: svn path=/head/; revision=312910
2016-05-03sys/dev: minor spelling fixes.Pedro F. Giffuni
Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
2016-02-27Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().Justin Hibbits
Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370 Notes: svn path=/head/; revision=296137
2016-01-27Convert rman to use rman_res_t instead of u_longJustin Hibbits
Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long. This is step one in migrating rman to use uintmax_t for resources instead of u_long. Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API. This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI. Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075 Notes: svn path=/head/; revision=294883
2015-12-11Create a generic PCCARD_PNP_INFO from the MODULE_PNP_INFO buildingWarner Losh
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
2015-01-06In order to reduce use of M_EXT outside of the mbuf allocator andRobert Watson
socket-buffer implementations, introduce a return value for MCLGET() (and m_cljget() that underlies it) to allow the caller to avoid testing M_EXT itself. Update all callers to use the return value. With this change, very few network device drivers remain aware of M_EXT; the primary exceptions lie in mbuf-chain pretty printers for debugging, and in a few cases, custom mbuf and cluster allocation implementations. NB: This is a difficult-to-test change as it touches many drivers for which I don't have physical devices. Instead we've gone for intensive review, but further post-commit review would definitely be appreciated to spot errors where changes could not easily be made mechanically, but were largely mechanical in nature. Differential Revision: https://reviews.freebsd.org/D1440 Reviewed by: adrian, bz, gnn Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=276750
2014-09-18Mechanically convert to if_inc_counter().Gleb Smirnoff
Notes: svn path=/head/; revision=271821
2013-10-30Include the now missing headers after untangling if.h and if_var.h.Sergey Kandaurov
This fixes pc98 build. Reviewed by: andre Notes: svn path=/head/; revision=257392
2013-10-30nclude missing net/if_var.h.Andre Oppermann
Due to header pollution it wasn't noticed before. Notes: svn path=/head/; revision=257391
2012-12-04Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff
malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
2012-11-10Use ANSI prototype to fix build with clang.Yoshihiro Takahashi
MFC after: 1 week Notes: svn path=/head/; revision=242871
2012-01-07ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it againKevin Lo
Reviewed by: yongari Notes: svn path=/head/; revision=229767
2010-05-03Add new tunable 'net.link.ifqmaxlen' to set default send interfaceMaxim Sobolev
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
2009-06-26Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/Robert Watson
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
2009-06-11strict kobj sigs: fix assortment of device_detach and device_shutdown implsAndriy Gapon
with common issue of having void return type instead of int Reviewed by: imp, current@ Approved by: jhb (mentor) Notes: svn path=/head/; revision=194023
2008-08-07Convert to new style PC Card front end driver. Add support for theWarner Losh
NEC PC-9801N-J02 and PC-9801N-J02R. I can't test the former because it requires resources that conflict with my laptop. I can't test the latter because my dog chewed up my -J02R card and it didn't survive well enough for me to test. Notes: svn path=/head/; revision=181393
2008-08-04Add locking to snc(4) so it is MPSAFE:John Baldwin
- Add a mutex to the softc to protect the softc and device hardware. - Use a private timer routine to drive the transmit watchdog timer instead of using if_watchdog/if_timer. - If if_alloc() fails during attach, fail the attach with an error rather than panic'ing. - Clear RUNNING and OACTIVE only in sncstop(). - Don't mess with IFF_UP. - Don't leak 'struct ifnet' on detach. - Setup interrupt handler after ether_ifattach(). - Call ether_ifdetach() rather than if_detach() in the pccard detach routine. Tested by: no one despite repeated requests Notes: svn path=/head/; revision=181298
2008-05-30Remove various and sundry NetBSDism's in preparation for adding locking.John Baldwin
Notes: svn path=/head/; revision=179442
2007-02-23o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati
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
2005-12-06Fix -Wundef warnings from compiling GENERIC and LINT kernels ofRuslan Ermilov
all architectures. Notes: svn path=/head/; revision=153165
2005-11-11- Store pointer to the link-level address right in "struct ifnet"Ruslan Ermilov
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
2005-09-22'PC Card' instead of other variantsWarner Losh
Notes: svn path=/head/; revision=150460
2005-08-09Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson
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
2005-08-03Modify device drivers supporting multicast addresses to lock if_addr_mtxRobert Watson
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
2005-06-12Build on pc98.Brooks Davis
Notes: svn path=/head/; revision=147318
2005-06-12change 'dev' to 'sc->sc_dev' to fix the build.Scott Long
Approved: re (implicit) Notes: svn path=/head/; revision=147316
2005-06-10Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis
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
2005-02-21Only send packet to bpf if we are committed to send it. Previously it wasMax Laier
possible that the same packet would show up multiple times. This poses some constraints on the TBD locking for snc(4) (see comment). Obtained from: DragonFlyBSD Submitted by: Joerg Sonnenberger Reviewed by: rwatson Notes: svn path=/head/; revision=142180
2005-01-20Remove now-stale commentWarner Losh
Notes: svn path=/head/; revision=140529
2005-01-06Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh
Notes: svn path=/head/; revision=139749
2004-08-13Since if_snc doesn't contain locking or run with INTR_MPSAFE, markRobert Watson
the interface as IFF_NEEDSGIANT so if_start is run holding Giant. Notes: svn path=/head/; revision=133698
2004-05-23We don't need to initialize if_output, ether_ifattach() does itMaxime Henrion
for us. Notes: svn path=/head/; revision=129616
2004-05-08It turns out that the module dependency on pccard is in error. SinceWarner Losh
there's not dependencies on pccard symboles, such a dependency is not necessary. This means that drivers that have multiple attachments can not drag bogus devices into the kernel at load time. We can't (yet) do this with pci and isa. Drivers written for them actually do seem to have symbols that depend on these busses' implementation code. ndis not touched until other things can be tested. Notes: svn path=/head/; revision=129046
2004-03-17Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson
Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
2004-03-14Announce ethernet MAC addresss in ether_ifattach().Matthew N. Dodd
Notes: svn path=/head/; revision=126966
2003-11-01Do if_xname conversion. I missed this one because it's pc98 only.Brooks Davis
Notes: svn path=/head/; revision=121867
2003-08-24Use __FBSDID().David E. O'Brien
Also some minor style cleanups. Notes: svn path=/head/; revision=119419
2003-08-07Consistently use the BSD u_int and u_short instead of the SYSV uint andJohn Baldwin
ushort. In most of these files, there was a mixture of both styles and this change just makes them self-consistent. Requested by: bde (kern_ktrace.c) Notes: svn path=/head/; revision=118607
2003-06-02Remove unused #ifdef BRIDGE.Maxim Konovalov
Reviewed by: nyan Notes: svn path=/head/; revision=115688
2003-05-03Fix off-by-one bug.Yoshihiro Takahashi
Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata) Notes: svn path=/head/; revision=114561
2003-04-15- Express hard dependencies on bus (pci, isa, pccard) andMatthew N. Dodd
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
2003-04-08Introduce an M_ASSERTPKTHDR() macro which performs the very common taskDag-Erling Smørgrav
of asserting that an mbuf has a packet header. Use it instead of hand- rolled versions wherever applicable. Submitted by: Hiten Pandya <hiten@unixdaemons.com> Notes: svn path=/head/; revision=113255
2003-02-19Back out M_* changes, per decision of the TRB.Warner Losh
Approved by: trb Notes: svn path=/head/; revision=111119
2003-02-10Use correct spl mask.Yoshihiro Takahashi
Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata) MFC after: 1 day Notes: svn path=/head/; revision=110644
2003-01-21Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
2002-11-14network interface driver changes:Sam Leffler
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
2002-03-20Remove __P.Alfred Perlstein
Notes: svn path=/head/; revision=92739
2001-02-06Convert if_multiaddrs from LIST to TAILQ so that it can be traversedPoul-Henning Kamp
backwards in the three drivers which want to do that. Reviewed by: mikeh Notes: svn path=/head/; revision=72084
2001-02-03Use LIST_FOREACH() to traverse ifp->if_multiaddrs list, instead ofPoul-Henning Kamp
<sys/queue.h> implementation details. Created with: /usr/sbin/sed Reviewed with: /sbin/md5 Notes: svn path=/head/; revision=71962
2000-10-31Remove unused #includes.Poul-Henning Kamp
Approved by: nyan Notes: svn path=/head/; revision=68054