summaryrefslogtreecommitdiffstats
path: root/sys/dev/ppbus
Commit message (Collapse)AuthorAgeFilesLines
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-161-1/+0
| | | | unnecessary.
* Import ACPI Dock Station support. Note that this is still very young.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
* - Use bus_setup_intr() and bus_teardown_intr() to register device driverjhb2006-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.
* Use a wildcard unit (-1) to device_find_child() in our identify routine tojhb2006-02-131-1/+1
| | | | match the wildcard unit passed to BUS_ADD_CHILD().
* Add missing MODULE_DEPEND() so that ppbus.ko and these .ko's can beru2005-12-215-0/+5
| | | | loaded dynamically.
* bandaid assumption that char is signedsam2005-12-211-1/+1
| | | | MFC after: 1 week
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-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
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-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
* In ppsintr, we needed ppsdev to get to the softc and nothing else.imp2005-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.
* When locking a MTX_SPIN, one needs to use mtx_lock_spin.imp2005-03-171-5/+7
| | | | | | Lock the timeout routine as well. Submitted by: bde
* Remove unused variable.phk2005-03-171-6/+0
| | | | Detected by: Coverity (ID#704)
* Make the pps interrupt register as MPSAFE and FAST. Use a spin lockimp2005-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
* Kill trailing white spaceimp2005-03-101-3/+3
|
* Back out previous commit. The description didn't match the commit,imp2005-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).
* 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-065-5/+5
|
* Apply error and success logic consistently to the function netisr_queue() andandre2004-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
* Since if_plip doesn't contain locking or run with INTR_MPSAFE, markrwatson2004-08-131-1/+2
| | | | the interface as IFF_NEEDSGIANT so if_start is run holding Giant.
* Do not bzero() the softc, as newbus does it for us.cognet2004-07-095-5/+0
|
* Newbus returns a zeroed softc, so there's no need to call bzero() here.cognet2004-07-091-2/+0
|
* Do the dreaded s/dev_t/struct cdev */phk2004-06-164-22/+22
| | | | Bump __FreeBSD_version accordingly.
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Prevent the strange situation that after each load/unload of a ppbusguido2004-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
* Device megapatch 4/6:phk2004-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.
* Device megapatch 1/6:phk2004-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.
* Apparently there's a good reason why M_WAITOK malloc() is done beforeru2004-01-181-2/+2
| | | | xpt_create_path().
* Fixed a memory leak.ru2004-01-181-1/+2
| | | | Submitted by: Stanford Metacompilation research group
* o eliminate widespread on-stack mbuf use for bpf by introducingsam2003-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
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-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)
* Remove unused lp_unit member from softc.brooks2003-10-301-3/+0
|
* Use __FBSDID().obrien2003-08-2413-16/+40
| | | | Also some minor style cleanups.
* Define a module version.imp2003-08-221-0/+2
|
* Consistently use the BSD u_int and u_short instead of the SYSV uint andjhb2003-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)
* Fix a printf warning from the recent CAM changes.jhb2003-05-011-2/+2
|
* Centralize the devstat handling for all GEOM disk device driversphk2003-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.
* Update netisr handling; Each SWI now registers its queue, and all queuejlemon2003-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
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-034-52/+24
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).des2003-03-021-6/+6
|
* Back out M_* changes, per decision of the TRB.imp2003-02-193-4/+4
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-213-4/+4
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-302-14/+14
| | | | Add FreeBSD Id tag where missing.
* Synchronize mode for ppsX devices to that found previously in MAKEDEVrwatson2002-12-271-2/+2
| | | | | | for consistency. Submitted by: kris
* Synchronize make_dev() for pcfclock devices to the values in MAKEDEVrwatson2002-12-271-1/+1
| | | | | | for consistency. Submitted by: kris
* network interface driver changes:sam2002-11-141-1/+1
| | | | | | | | | | | | | | 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-21/+21
| | | | Verified by: md5
* d_read_t functions return an int, not a ssize_t. (Considering the factjhb2002-11-071-1/+1
| | | | that read(2) returns a ssize_t perhaps this is a bug in d_read_t?)
* Warning fixes for sizeof(int) != sizeof(void *).jhb2002-11-071-6/+6
|
* - Make 'irq' intptr_t instead of uintptr_t so it handles a value of -1jhb2002-11-071-2/+2
| | | | | properly. - Add a cast to quiet a printf warning.
* Remove empty #if*/#endif clauses.phk2002-09-211-3/+0
|
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-251-1/+1
|
OpenPOWER on IntegriCloud