Commit Graph

58 Commits

Author SHA1 Message Date
thorpej 463931b3ba Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc.  Those
platforms should be changed to use device_register().  In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.
2000-05-16 05:45:44 +00:00
scw c56f4bceb8 Fix some callout fallout. Hi Jason! 2000-04-14 19:31:50 +00:00
ws b7570cae85 Update several ports to at least work again without IPKDB
after the update of that.
Sorry for breaking this with my last changes :-(.
Fixes PR#9671 by Lennart Augustsson.
2000-03-24 17:05:30 +00:00
thorpej fc96443d15 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 07:01:25 +00:00
soren 95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
thorpej f98d358a1f Rework layer 2 protocol input routines. Instead of calling e.g. ether_input()
directly, call the function pointer (*if_input)(ifp, m).  The input routine
expects the packet header to be at the head of the packet, and will adjust
as necessary.  Privatize the layer 2 input and output routines, allowing
*_ifattach() to set them up as appropriate.
1999-05-18 23:52:51 +00:00
tsubai dc8d07a096 Fix OFW_PCI_PHYS_HI_DEVICEMASK value. 1999-05-05 08:09:34 +00:00
thorpej dbe4c0c061 Make this compile again. 1999-05-04 23:55:27 +00:00
thorpej 9382ef37c1 Define some things related to the PCI Bus binding to OpenFirmware. 1999-05-04 20:08:04 +00:00
mrg 1cfd38fb3e oops, fix previous. 1999-03-10 02:19:04 +00:00
mrg ab80268653 no need to use __P inside __P. 1999-03-09 00:42:41 +00:00
pk 6db0ff6627 Update last prototyping change. 1999-02-03 23:40:22 +00:00
pk 4bd6ed2a8b Make this pass the `strict prototype' test. 1999-02-02 22:23:44 +00:00
thorpej daf40e1b0b Add common OpenFirmware network interface functions. Currently supports
decoding the `supported-network-types' and `chosen-network-type' properties
into ifmedia words.
1998-07-22 22:04:14 +00:00
jonathan 3751946b97 defopt INET, NETATALK. 1998-07-05 00:51:04 +00:00
cgd 651b44e211 Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install.  (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.)  The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change.  Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
1998-06-12 23:22:30 +00:00
tv fe2278980b Missing include <sys/systm.h>. 1998-06-10 22:58:05 +00:00
mycroft 2ada4b4af1 Replace TS_WOPEN with t_wopen, per mail on tech-kern. 1998-03-21 04:02:47 +00:00
cgd 0a2c48d07f -Wall 1998-03-21 02:05:17 +00:00
cgd 3cc8b411d0 -Wall (one real bug, even!) 1998-03-21 02:04:55 +00:00
mycroft d36067b120 Forcibly NUL-terminate the path name, just to be sure. 1998-02-24 07:14:17 +00:00
mycroft 64d86b5934 Minor style change. 1998-02-24 07:10:39 +00:00
mycroft 310f6fefc3 Several things:
Clean up the name space here a bit.
Add a `busname' element to struct ofprobe (now struct ofbus_attach_args), and
check against it.
Nuke `ofroot'.
Rename the `openfirm' attribute to `ofbus'.
1998-02-24 05:44:39 +00:00
thorpej 8354e68508 Remove "class" declarations, and add "devclass" declarations where
appropriate.  Fix several inconsistencies between device class and
attributes.  Mostly from Chris Demetriou.
1998-02-16 22:12:45 +00:00
cgd 819d730e25 s/of_nodename/of_packagename/. Eventually, we'll probably want something
similar for instances.
1998-02-03 16:58:25 +00:00
cgd 9c46cdbef5 in ofbattach(), don't both doing an ofbprint() by hand if the root node.
The old ofbprint() wasn't particularly good (it forced the root node
to have a 'name' property, which apparently violates the OFW spec), and
the new one (though it normally prints more useful information) has
nothing useful to say about the root node.  It's not clear to me that
'ofroot' should exist at all.
1998-02-03 00:43:46 +00:00
cgd ac4b4ec31d make ofbprint() use of_nodename(). cleanup. 1998-02-02 22:00:07 +00:00
cgd 5169537359 add of_nodename(), a function to stuff the last component of a node's
name into a caller-provided buffer (helpful for generating
autoconfiguration output).  Also, other minor cleanup.
1998-02-02 21:56:16 +00:00
cgd c9249eced0 add a prototype for of_nodename(), a function to stuff the last
component of a node's name into a caller-provided buffer (helpful
for generating autoconfiguration output).
1998-02-02 21:55:23 +00:00
thorpej 69d33afe72 Prototype OF_getproplen(). 1998-02-02 21:00:13 +00:00
cgd 08af1cdbbc prototype of_compatible 1998-01-28 00:01:34 +00:00
cgd b4026f2974 clean up comments and includes. add an of_compatible() function
which checks for the presence of any of a set of caller-provided
strings in a node's "compatible" property (the _right_ way to
determine driver compatibility).
1998-01-28 00:01:01 +00:00
cgd 9e47d44515 Make sure the data after the Ethernet header is aligned. (It's been
in the Shark source tree for a while, but Jason's recent commit to
dp8390.c spurred me to check it in here.)
XXX Assumes the device is an ethernet, but then so does other code in
this driver.
1998-01-27 23:55:18 +00:00
cgd ed02c60bdd clean up for other changes (removal of ofnmmatch(), addition of
of_decode_int()), reorganize.
1998-01-26 21:49:13 +00:00
cgd b7c7fd66d0 of_decode_int() the stdin and stdout properties. 1998-01-26 21:49:00 +00:00
cgd cf90ace319 new file containing common OFW-related routines. Right now just contains
of_decode_int(), a function which decodes OFW integer properties.
1998-01-26 21:48:40 +00:00
cgd cdfa209843 (1) kill ofnmmatch(); nothing used it (and it's not clear that
anything _should_ use it).
(2) in the child properties check, also check for 'compatible,' and
    config_found() if the child has it.
1998-01-26 21:48:07 +00:00
cgd 0aee587bbf add ofw_subr.c, a file containing common OFW routines. 1998-01-26 21:47:35 +00:00
cgd ff65e57285 fix typo: s/max-address/mac-address/ 1998-01-22 01:47:43 +00:00
thorpej d02585cf36 Update for config changes. 1998-01-12 09:33:30 +00:00
thorpej 26a5591b8a Oops, fix a couple of typos. 1997-10-08 23:35:41 +00:00
thorpej 5e05593163 Implement DIOCGDEFLABEL. 1997-10-08 23:23:13 +00:00
thorpej a0d7686340 RCS id police. 1997-07-23 18:45:03 +00:00
thorpej 6dce360f0e Fix an oversight and a typo. 1997-07-23 18:42:40 +00:00
thorpej a9710d488d Three changes to ofdsize():
- If the partition is already open, skip the open/close step.  (Sync
  with other disk drivers.)
- foosize()'s return value is in DEV_BSIZE units; adjust the size obtained
  from the disklabel accordingly.
- Pass correct arguments to ofdopen() and ofdclose().
1997-06-24 00:27:18 +00:00
mycroft 37cb09ba66 DTRT if OF_read() returns 0 when no data is available. 1997-04-28 18:33:57 +00:00
mycroft d8615e4fb9 Oops; forgot to GC the last mbuf allocated when out of clusters.
Also, DTRT if OF_read() returns 0 when no data is available..
1997-04-28 18:32:58 +00:00
mycroft 91a808523c Fix typo in previous. 1997-04-24 08:05:13 +00:00
mycroft 030c7010ee If we fail to allocate a cluster to hold a large packet, simply
drop it rather than using a chain of tiny mbufs.
1997-04-24 02:04:33 +00:00
thorpej 48b6d2a6f3 Update for no __BROKEN_INDIRECT_CONFIG. 1997-04-16 23:41:53 +00:00