aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ppbus
Commit message (Collapse)AuthorAgeFilesLines
* MFC r223741:Bjoern A. Zeeb2012-02-101-0/+6
| | | | | | | | | | | | Tag mbufs of all incoming frames or packets with the interface's FIB setting (either default or if supported as set by SIOCSIFFIB, e.g. from ifconfig). Submitted by: Alexander V. Chernikov (melifaro ipfw.ru) Reviewed by: julian Notes: svn path=/stable/7/; revision=231390
* MFC: r226116Christian Brueffer2011-10-151-0/+1
| | | | | | | Add missing va_end() to clean up after va_start(). Notes: svn path=/stable/7/; revision=226391
* MFC r207554:Maxim Sobolev2010-11-161-1/+1
| | | | | | | | | | | | Add new tunable 'net.link.ifqmaxlen' to set default send interface 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. Notes: svn path=/stable/7/; revision=215368
* MFC r212413: bus_add_child: change type of order parameter to u_intAndriy Gapon2010-09-201-1/+1
| | | | Notes: svn path=/stable/7/; revision=212893
* MFC 197772:John Baldwin2009-11-041-1/+1
| | | | | | | | | When the timeout backoff hits the maximum value, leave it capped at the maximum value rather than setting it to the result of a boolean expression that is always true. Notes: svn path=/stable/7/; revision=198908
* MFC: Use a dummy interrupt handler to work around lpt(4) interruptJohn Baldwin2008-01-152-0/+40
| | | | | | | | | problems. Approved by: re (gnn) Notes: svn path=/stable/7/; revision=175370
* Prepare for future integration between CAM and newbus. xpt_bus_registerScott Long2007-06-171-1/+1
| | | | | | | | | | now takes a device_t to be the parent of the bus that is being created. Most SIMs have been updated with a reasonable argument, but a few exceptions just pass NULL for now. This argument isn't used yet and the newbus integration likely won't be ready until after 7.0-RELEASE. Notes: svn path=/head/; revision=170872
* Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willScott Long2007-04-151-1/+3
| | | | | | | | | | | | | | use to synchornize and protect all data objects that are used for that SIM. Drivers that are not yet MPSAFE register Giant and operate as usual. RIght now, no drivers are MPSAFE, though a few will be changed in the coming week as this work settles down. The driver API has changed, so all CAM drivers will need to be recompiled. The userland API has not changed, so tools like camcontrol do not need to be recompiled. Notes: svn path=/head/; revision=168752
* Remove a useless cast from void * to struct ppb_device *.Paolo Pisati2007-03-061-1/+1
| | | | Notes: svn path=/head/; revision=167265
* Catchup with filtersWarner Losh2007-02-231-2/+3
| | | | Notes: svn path=/head/; revision=166914
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-234-8/+9
| | | | | | | | | | | | | | | | 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-5/+5
| | | | | | | | | | | | | | | | 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
* Add MODULE_DEPENDS for cam, pci, mca, eisa and isa where needed.Matt Jacob2006-12-111-0/+2
| | | | | | | | PR: 106543 MFC after: 3 days Notes: svn path=/head/; revision=165102
* Since DELAY() was moved, most <machine/clock.h> #includes have beenPoul-Henning Kamp2006-05-161-1/+0
| | | | | | | unnecessary. Notes: svn path=/head/; revision=158651
* Import ACPI Dock Station support. Note that this is still very young.Mitsuru IWASAKI2006-04-152-0/+34
| | | | | | | | | | | Additional detach implementaions (or maybe improvement) for other deivce drivers is required. Reviewed by: njl, imp MFC after: 1 week Notes: svn path=/head/; revision=157774
* - Use bus_setup_intr() and bus_teardown_intr() to register device driverJohn Baldwin2006-02-223-5/+5
| | | | | | | | | | | | | interrupt handlers rather than BUS_SETUP_INTR() and BUS_TEARDOWN_INTR(). Uses of the BUS_*() versions in the implementation of foo_intr methods in bus drivers were not changed. Mostly this just means that some drivers might start printing diagnostic messages like [FAST] when appropriate as well as honoring mpsafenet=0. - Fix two more of the ppbus drivers' identify routines to function correctly in the mythical case of a machine with more than one ppbus. Notes: svn path=/head/; revision=155921
* Use a wildcard unit (-1) to device_find_child() in our identify routine toJohn Baldwin2006-02-131-1/+1
| | | | | | | match the wildcard unit passed to BUS_ADD_CHILD(). Notes: svn path=/head/; revision=155606
* Add missing MODULE_DEPEND() so that ppbus.ko and these .ko's can beRuslan Ermilov2005-12-215-0/+5
| | | | | | | loaded dynamically. Notes: svn path=/head/; revision=153610
* bandaid assumption that char is signedSam Leffler2005-12-211-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=153586
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson2005-08-091-6/+8
| | | | | | | | | | | | | | | | | 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
* Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis2005-06-101-21/+25
| | | | | | | | | | | | | | | | | | | | | | | 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
* In ppsintr, we needed ppsdev to get to the softc and nothing else.Warner Losh2005-04-141-11/+7
| | | | | | | | | | | | | | | | | | Save a memory dereference in the ISR by passing this in directly. Calling pps_capture is MP safe for all other operations on struct pps_state, so there's no need to aquire the lock before we do this, even from a fast ISR. Avoid dereferencing sc->ppbus until after pps_capture is called as well. These actions reduce somewhat the cache effects that cause variance in interrupt times. On an especially slow test machine (300MHz Cyrix GXm), this reduces the interrupt latency about about 10% (from 21us to 19us) and helps a little with the variance (although most of the variance seems to be caused by lots of interrupt masking). This also happens fixes one or two of bde's style issues. Notes: svn path=/head/; revision=145075
* When locking a MTX_SPIN, one needs to use mtx_lock_spin.Warner Losh2005-03-171-5/+7
| | | | | | | | | Lock the timeout routine as well. Submitted by: bde Notes: svn path=/head/; revision=143766
* Remove unused variable.Poul-Henning Kamp2005-03-171-6/+0
| | | | | | | Detected by: Coverity (ID#704) Notes: svn path=/head/; revision=143741
* Make the pps interrupt register as MPSAFE and FAST. Use a spin lockWarner Losh2005-03-111-6/+15
| | | | | | | | | | | to syncrhonize access to the data as a result. This makes the pps less likely to miss the 1ms pulse that I'm feeding it, but not entirely reliable yet on my 133MHz P5. Reviewed by: phk Notes: svn path=/head/; revision=143398
* Kill trailing white spaceWarner Losh2005-03-101-3/+3
| | | | Notes: svn path=/head/; revision=143390
* Back out previous commit. The description didn't match the commit,Warner Losh2005-03-061-1/+1
| | | | | | | | and marking this interrupt as fast isn't quite right. It also needs to be MP Safe, and I've not done that work (yet). Notes: svn path=/head/; revision=143169
* 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-065-5/+5
| | | | Notes: svn path=/head/; revision=139749
* Apply error and success logic consistently to the function netisr_queue() andAndre Oppermann2004-08-271-2/+2
| | | | | | | | | | | | | | | | | | | | | its users. netisr_queue() now returns (0) on success and ERRNO on failure. At the moment ENXIO (netisr queue not functional) and ENOBUFS (netisr queue full) are supported. Previously it would return (1) on success but the return value of IF_HANDOFF() was interpreted wrongly and (0) was actually returned on success. Due to this schednetisr() was never called to kick the scheduling of the isr. However this was masked by other normal packets coming through netisr_dispatch() causing the dequeueing of waiting packets. PR: kern/70988 Found by: MOROHOSHI Akihiko <moro@remus.dti.ne.jp> MFC after: 3 days Notes: svn path=/head/; revision=134391
* Since if_plip doesn't contain locking or run with INTR_MPSAFE, markRobert Watson2004-08-131-1/+2
| | | | | | | the interface as IFF_NEEDSGIANT so if_start is run holding Giant. Notes: svn path=/head/; revision=133695
* Do not bzero() the softc, as newbus does it for us.Olivier Houchard2004-07-095-5/+0
| | | | Notes: svn path=/head/; revision=131882
* Newbus returns a zeroed softc, so there's no need to call bzero() here.Olivier Houchard2004-07-091-2/+0
| | | | Notes: svn path=/head/; revision=131874
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-164-22/+22
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* Add missing <sys/module.h> includesPoul-Henning Kamp2004-05-301-0/+1
| | | | Notes: svn path=/head/; revision=129879
* Prevent the strange situation that after each load/unload of a ppbusGuido van Rooij2004-03-187-7/+34
| | | | | | | | | | | | | | | | | | device, the device is probed multiple times (so each device is detected N times after unloading/loading the module N-1 times). The real fix is (quote Doug and Warner): > : In an ideal world, there should be some kind of BUS_UNIDENTIFY method > : which a driver could use to delete the devices it created in > : BUS_IDENTIFY. > > Or the bus would have a driver deleted routine that got called and it > would remove all instances of the devclass attached to it. Reviewed by: Doug Rabson & Warner Losh Notes: svn path=/head/; revision=127189
* Device megapatch 4/6:Poul-Henning Kamp2004-02-214-0/+8
| | | | | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags. Notes: svn path=/head/; revision=126080
* Device megapatch 1/6:Poul-Henning Kamp2004-02-214-8/+0
| | | | | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number. Notes: svn path=/head/; revision=126076
* Apparently there's a good reason why M_WAITOK malloc() is done beforeRuslan Ermilov2004-01-181-2/+2
| | | | | | | xpt_create_path(). Notes: svn path=/head/; revision=124673
* Fixed a memory leak.Ruslan Ermilov2004-01-181-1/+2
| | | | | | | Submitted by: Stanford Metacompilation research group Notes: svn path=/head/; revision=124670
* o eliminate widespread on-stack mbuf use for bpf by introducingSam Leffler2003-12-281-12/+1
| | | | | | | | | | | | | | | | a new bpf_mtap2 routine that does the right thing for an mbuf and a variable-length chunk of data that should be prepended. o while we're sweeping the drivers, use u_int32_t uniformly when when prepending the address family (several places were assuming sizeof(int) was 4) o return M_ASSERTVALID to BPF_MTAP* now that all stack-allocated mbufs have been eliminated; this may better be moved to the bpf routines Reviewed by: arch@ and several others Notes: svn path=/head/; revision=123922
* Replace the if_name and if_unit members of struct ifnet with new membersBrooks Davis2003-10-311-4/+3
| | | | | | | | | | | | | | | | 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
* Remove unused lp_unit member from softc.Brooks Davis2003-10-301-3/+0
| | | | Notes: svn path=/head/; revision=121775
* Use __FBSDID().David E. O'Brien2003-08-2413-16/+40
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Define a module version.Warner Losh2003-08-221-0/+2
| | | | Notes: svn path=/head/; revision=119284
* Consistently use the BSD u_int and u_short instead of the SYSV uint andJohn Baldwin2003-08-071-3/+3
| | | | | | | | | | 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
* Fix a printf warning from the recent CAM changes.John Baldwin2003-05-011-2/+2
| | | | Notes: svn path=/head/; revision=114451
* Centralize the devstat handling for all GEOM disk device driversPoul-Henning Kamp2003-03-081-2/+0
| | | | | | | | | | | in geom_disk.c. As a side effect this makes a lot of #include <sys/devicestat.h> lines not needed and some biofinish() calls can be reduced to biodone() again. Notes: svn path=/head/; revision=111979
* Update netisr handling; Each SWI now registers its queue, and all queueJonathan Lemon2003-03-041-10/+2
| | | | | | | | | | | | | drain routines are done by swi_net, which allows for better queue control at some future point. Packets may also be directly dispatched to a netisr instead of queued, this may be of interest at some installations, but currently defaults to off. Reviewed by: hsu, silby, jayanth, sam Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=111888