summaryrefslogtreecommitdiff
path: root/sys/arch/mac68k/dev
AgeCommit message (Collapse)Author
2014-01-30Add missing cast (to make it compilable)martin
2014-01-26kill VM_DEFAULT_ADDRESS usechristos
2013-10-25Simplifymartin
2013-10-25Mark potentially unused variablemartin
2013-10-25Mark a potentially unused variablemartin
2013-10-25Remove unused variablesmartin
2013-10-19Remove an unused variablemartin
2013-10-19Mark a potentially unused variablemartin
2013-10-19comment out unused code (for documentation purposes)martin
2013-10-19Make sure we don't accidently pass an unsolicited packet as "ack only"martin
(which would dereference unitialized pointers)
2013-10-18Remove set but unused variables.martin
2012-12-07Remove the R1 syntactic sugar, since it collides with a #define inhauke
<m68k/regs.h>, breaking the build. The R1s serve to bring the buffer pointer to a 4 byte boundary, but that should be clear from the context.
2012-12-06Remove the R1 syntactic sugar, since it collides with a #define inhauke
<m68k/regs.h>, breaking the build. The R1s serve to bring the buffer pointer to a 4 byte boundary, but that should be clear from the context.
2012-10-27split device_t/softc for all remaining drivers.chs
replace "struct device *" with "device_t". use device_xname(), device_unit(), etc.
2011-07-17Retire varargs.h support. Move machine/stdarg.h logic into MIjoerg
sys/stdarg.h and expect compiler to provide proper builtins, defaulting to the GCC interface. lint still has a special fallback. Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and derive va_list as required by standards.
2011-07-09avoid inconsistent inline usage to appease gcc 4.5.mrg
2011-06-06CFATTACH_DECL(..., sizeof(struct device), -> CFATTACH_DECL_NEW(..., 0matt
struct device * -> device_t struct cfdata * -> cfdata_t use bool when appropriate
2011-02-08Remove clause 3 (UCB advertising clause) from the University of Utahrmind
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks! Also, merge UCB and Utah copyright texts back into one, as they originally were. Extra verification by snj@.
2010-12-10return the right values for ioctl(WSKBDIO_GTYPE) and ioctl(WSMOUSEIO_GTYPE)macallan
fixes PR 23991
2010-06-06defflag GRF_COMPAT.mrg
2010-04-05Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpfjoerg
check into the inline functions as well the fourth argument for bpf_attach.
2010-02-28Fight the ever-increasing size of src checkouts by spelling "useful"snj
without an extra l.
2010-01-19Redefine bpf linkage through an always present op vector, i.e.pooka
#if NBPFILTER is no longer required in the client. This change doesn't yet add support for loading bpf as a module, since drivers can register before bpf is attached. However, callers of bpf can now be modularized. Dynamically loadable bpf could probably be done fairly easily with coordination from the stub driver and the real driver by registering attachments in the stub before the real driver is loaded and doing a handoff. ... and I'm not going to ponder the depths of unload here. Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
2009-11-23Use lwp_getpcb() on m68k ports, clean from struct user usage.rmind
2009-11-01Drop 3rd and 4th clauses. Approved by Brad Grantham (copyright holder).snj
2009-10-27Drop 3rd and 4th clauses. Approved by gwr@ and wrstuden@ (copyrightsnj
holders).
2009-10-20Remove 3rd and 4th clause on Leo Weppelman's license. OK leo@.snj
2009-03-18bcmp -> memcmpcegger
2009-03-18Ansify function definitions w/o arguments. Generated with sed.cegger
2008-11-07*** Summary ***dyoung
When a link-layer address changes (e.g., ifconfig ex0 link 02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor Advertisement to update the network-/link-layer address bindings on our LAN peers. Refuse a change of ethernet address to the address 00:00:00:00:00:00 or to any multicast/broadcast address. (Thanks matt@.) Reorder ifnet ioctl operations so that driver ioctls may inherit the functions of their "class"---ether_ioctl(), fddi_ioctl(), et cetera---and the class ioctls may inherit from the generic ioctl, ifioctl_common(), but both driver- and class-ioctls may override the generic behavior. Make network drivers share more code. Distinguish a "factory" link-layer address from others for the purposes of both protecting that address from deletion and computing EUI64. Return consistent, appropriate error codes from network drivers. Improve readability. KNF. *** Details *** In if_attach(), always initialize the interface ioctl routine, ifnet->if_ioctl, if the driver has not already initialized it. Delete if_ioctl == NULL tests everywhere else, because it cannot happen. In the ioctl routines of network interfaces, inherit common ioctl behaviors by calling either ifioctl_common() or whichever ioctl routine is appropriate for the class of interface---e.g., ether_ioctl() for ethernets. Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR. In the user->kernel interface, SIOCSIFADDR's argument was an ifreq, but on the protocol->ifnet interface, SIOCSIFADDR's argument was an ifaddr. That was confusing, and it would work against me as I make it possible for a network interface to overload most ioctls. On the protocol->ifnet interface, replace SIOCSIFADDR with SIOCINITIFADDR. In ifioctl(), return EPERM if userland tries to invoke SIOCINITIFADDR. In ifioctl(), give the interface the first shot at handling most interface ioctls, and give the protocol the second shot, instead of the other way around. Finally, let compatibility code (COMPAT_OSOCK) take a shot. Pull device initialization out of switch statements under SIOCINITIFADDR. For example, pull ..._init() out of any switch statement that looks like this: switch (...->sa_family) { case ...: ..._init(); ... break; ... default: ..._init(); ... break; } Rewrite many if-else clauses that handle all permutations of IFF_UP and IFF_RUNNING to use a switch statement, switch (x & (IFF_UP|IFF_RUNNING)) { case 0: ... break; case IFF_RUNNING: ... break; case IFF_UP: ... break; case IFF_UP|IFF_RUNNING: ... break; } unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and #ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4). In ipw(4), remove an if_set_sadl() call that is out of place. In nfe(4), reuse the jumbo MTU logic in ether_ioctl(). Let ethernets register a callback for setting h/w state such as promiscuous mode and the multicast filter in accord with a change in the if_flags: ether_set_ifflags_cb() registers a callback that returns ENETRESET if the caller should reset the ethernet by calling if_init(), 0 on success, != 0 on failure. Pull common code from ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(), and register if_flags callbacks for those drivers. Return ENOTTY instead of EINVAL for inappropriate ioctls. In zyd(4), use ENXIO instead of ENOTTY to indicate that the device is not any longer attached. Add to if_set_sadl() a boolean 'factory' argument that indicates whether a link-layer address was assigned by the factory or some other source. In a comment, recommend using the factory address for generating an EUI64, and update in6_get_hw_ifid() to prefer a factory address to any other link-layer address. Add a routing message, RTM_LLINFO_UPD, that tells protocols to update the binding of network-layer addresses to link-layer addresses. Implement this message in IPv4 and IPv6 by sending a gratuitous ARP or a neighbor advertisement, respectively. Generate RTM_LLINFO_UPD messages on a change of an interface's link-layer address. In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address that is broadcast/multicast or equal to 00:00:00:00:00:00. Make ether_ioctl() call ifioctl_common() to handle ioctls that it does not understand. In gif(4), initialize if_softc and use it, instead of assuming that the gif_softc and ifp overlap. Let ifioctl_common() handle SIOCGIFADDR. Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels that certain invariants on a struct route are satisfied. In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit about the ioctls that we do not allow on an agr(4) member interface. bzero -> memset. Delete unnecessary casts to void *. Use sockaddr_in_init() and sockaddr_in6_init(). Compare pointers with NULL instead of "testing truth". Replace some instances of (type *)0 with NULL. Change some K&R prototypes to ANSI C, and join lines.
2008-06-11use device_lookup_private to get softccegger
2008-04-28Remove clause 3 and 4 from TNF licensesmartin
2008-04-04Split devict_t/softc for ncr5380sbc SCSI, and misc cosmetic changes.tsutsui
2008-04-04adb_read_date_time: remove an unused variable.yamt
2008-04-03Factor out ADB spin-wait timeout loop, and use it for synchronousscottr
operations to access the PRAM RTC, etc. in the IIsi and Cuda cases. Thanks to Martin Husemann for pointing out the flaw. This is a slightly more thorough workaround for the issue Martin found in PR 37611, as it affected more than just adb_read_date_time().
2008-04-01Add timeout to busy loops waiting for ADB command completition.martin
Turns the hard hang in PR port-mac68k/37611 into a warning.
2008-03-29Split softc and device_t for zsc(4) and its children.tsutsui
XXX we should restructure MI APIs and make it really machine independent.
2008-03-01Welcome to 4.99.55:rmind
- Add a lot of missing selinit() and seldestroy() calls. - Merge selwakeup() and selnotify() calls into a single selnotify(). - Add an additional 'events' argument to selnotify() call. It will indicate which event (POLL_IN, POLL_OUT, etc) happen. If unknown, zero may be used. Note: please pass appropriate value of 'events' where possible. Proposed on: <tech-kern>
2008-01-25fallout from v_specinfo removaldogcow
2007-12-03Interrupt handling changes, in discussion since February:ad
- Reduce available SPL levels for hardware devices to none, vm, sched, high. - Acquire kernel_lock only for interrupts at IPL_VM. - Implement threaded soft interrupts.
2007-11-09Call zs_lock_init() to set up the chanstate's lock.ad
2007-10-17Merge the ppcoea-renovation branch to HEAD.garbled
This branch was a major cleanup and rototill of many of the various OEA cpu based PPC ports that focused on sharing as much code as possible between the various ports to eliminate near-identical copies of files in every tree. Additionally there is a new PIC system that unifies the interface to interrupt code for all different OEA ppc arches. The work for this branch was done by a variety of people, too long to list here. TODO: bebox still needs work to complete the transition to -renovation. ofppc still needs a bunch of work, which I will be looking at. ev64260 still needs to be renovated amigappc was not attempted. NOTES: pmppc was removed as an arch, and moved to a evbppc target.
2007-09-01Fix build after dyoung's changes.jmmv
2007-09-01Change a bazillion occurrences of code resembling this,dyoung
error = (cmd == SIOCADDMULTI) ? ether_addmulti(ifr, &sc->sc_ec) : ether_delmulti(ifr, &sc->sc_ec); if (error == ENETRESET) { to this, if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) { which does the same thing. (A bazillion is a very large number. This seems to make the i386 ALL kernel smaller by 3kB to 4kB.) Use ifreq_getaddr() twice in es(4). Whitespace nits.
2007-08-29Pack all global video-related variables into a structure for clarity.jmmv
A comment said that they weren't in a struct for speed reasons but... this should not affect performance because these variables are mostly used to set other variables (hence they are read few times).
2007-08-29Move the definition of multiple video-related variables into a newjmmv
header file (machine/video.h) so that we can kill all the "manual" externs spread around the code (which were inconsistent among them).
2007-08-29Split the global videosize variable into videowidth and videoheight:jmmv
makes the code clearer and avoids multiple parts of it having to know how videosize was encoded.
2007-07-09Merge some of the less invasive changes from the vmlocking branch:ad
- kthread, callout, devsw API changes - select()/poll() improvements - miscellaneous MT safety improvements
2007-06-23Fix a warning from gcc 4 about stripping the volatile qualifier by a casthauke
by doing the proper __UNVOLATILE() dance.
2007-06-10Switch mac68k's sn(4) Ethernet to MI SONIC driver.tsutsui
Tested with Apple Ethernet CS Twisted-Pare Card on LC630 by me and Quadra 650 on-board Ethernet by hauke@. NuBus based cards and PowerBook variants are still untested.