Commit graph

21744 commits

Author SHA1 Message Date
Warner Losh 23b7b12ddc Add a detach method to allow this device to be unloaded. 2000-08-30 06:57:38 +00:00
Warner Losh f5c4d53efc Add comment about why the deletion of children is necessary in detach. 2000-08-30 06:56:03 +00:00
Poul-Henning Kamp a11828b271 fix ccd module. 2000-08-30 05:24:56 +00:00
Robert Watson 387d2c036b o Centralize inter-process access control, introducing:
int p_can(p1, p2, operation, privused)

  which allows specification of subject process, object process,
  inter-process operation, and an optional call-by-reference privused
  flag, allowing the caller to determine if privilege was required
  for the call to succeed.  This allows jail, kern.ps_showallprocs and
  regular credential-based interaction checks to occur in one block of
  code.  Possible operations are P_CAN_SEE, P_CAN_SCHED, P_CAN_KILL,
  and P_CAN_DEBUG.  p_can currently breaks out as a wrapper to a
  series of static function checks in kern_prot, which should not
  be invoked directly.

o Commented out capabilities entries are included for some checks.

o Update most inter-process authorization to make use of p_can() instead
  of manual checks, PRISON_CHECK(), P_TRESPASS(), and
  kern.ps_showallprocs.

o Modify suser{,_xxx} to use const arguments, as it no longer modifies
  process flags due to the disabling of ASU.

o Modify some checks/errors in procfs so that ENOENT is returned instead
  of ESRCH, further improving concealment of processes that should not
  be visible to other processes.  Also introduce new access checks to
  improve hiding of processes for procfs_lookup(), procfs_getattr(),
  procfs_readdir().  Correct a bug reported by bp concerning not
  handling the CREATE case in procfs_lookup().  Remove volatile flag in
  procfs that caused apparently spurious qualifier warnigns (approved by
  bde).

o Add comment noting that ktrace() has not been updated, as its access
  control checks are different from ptrace(), whereas they should
  probably be the same.  Further discussion should happen on this topic.

Reviewed by:	bde, green, phk, freebsd-security, others
Approved by:	bde
Obtained from:	TrustedBSD Project
2000-08-30 04:49:09 +00:00
Robert Watson c6fac29aff o Disable flagging of ASU in suser_xxx() authorization check. For the
time being, the ASU accounting flag will no longer be available, but
  may be reinstituted in the future once authorization have been redone.
  As it is, the kernel went through contortions in access control to
  avoid calling suser, which always set the flag.  This will also allow
  suser to accept const struct *{cred, proc} arguments.

Reviewed by:	bde, green, phk, freebsd-security, others
Approved by:	bde
Obtained from:	TrustedBSD Project
2000-08-30 04:35:32 +00:00
Brian Feldman 343079d9b2 Remove an extraneous setting of sb_hiwat. 2000-08-30 00:09:57 +00:00
Kenneth D. Merry 501468a517 Change the "Duplicate Wired Device entry" printout in camperiphnextunit to
also mention the peripheral name, bus, target and lun of the device we
attempted to put in that slot.  This gives the user a little more
information about what is going on.

Tested by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
Discussed with:	gibbs
2000-08-29 22:11:39 +00:00
Kenneth D. Merry b0f62f0c1c Add quirk entries from Andre Albsmeier to disable the sync cache command
for the Quantum "MAVERICK 540S" and "LPS525S".

Also, add common string variables, since we seem to have a few Quantum and
Micropolis drives in here.

Fix the 'quantum' variable usage in scsi_all.c that likely got broken when
someone staticized things in cam_xpt.c.  (That particular problem would
cause Quantum Fireball ST drives to not get spun up if they were not
already spinning.)

Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
2000-08-29 22:09:23 +00:00
Cameron Grant 16c8501c61 sigh, add opt_devfs.h 2000-08-29 22:00:50 +00:00
Andrey A. Chernov d9e630b592 strtok -> strsep (no strtok allowed in libraries)
add unsigned char cast to ctype macro
2000-08-29 21:34:55 +00:00
Cameron Grant f2d00399d1 remove stuff accidentally left in last commit 2000-08-29 20:53:56 +00:00
Cameron Grant 1088e98b00 suspend/resume for ds1 driver
PR:		misc/20891
Submitted by:	Ira L. Cooper <ira@mit.edu>
2000-08-29 20:50:42 +00:00
Mitsuru IWASAKI 51b6d45826 Refine implementation of PowerResource manipulation sub-routines.
- Add new funcions for device state stuff;
   acpi_get_current_device_state() and acpi_set_device_state()
 - Add new funcions for power resource stuff;
   acpi_powerres_init(), acpi_powerres_debug(),
   acpi_get_current_powerres_state() and acpi_set_powerres_state()

These were implemented based on 7.1, 7.2, 7.2.2, 7.2.3, 7.2.4, 7.3,
7.3.3, 7.4, 7.4.1, 7.4.2, 7.4.3 and 7.5 of ACPI spec 1.0b.
2000-08-29 20:38:31 +00:00
Mitsuru IWASAKI 001bdb7c40 A lot of changes on acpi driver code.
- The "Osd*" stuff went away from acpi driver code, use the bus_space
   functions directly instead.
 - Fix minor english bugs.
   acpi_registers_input  -> acpi_register_input
   acpi_registers_output -> acpi_register_output
 - Remove all magic numbers for the sleeping states.  We now have
   #defines for these.
 - NULL is treated the same as the return from aml_get_rootname in
   aml_find_from_namespace().

Suggested by:	msmith

Thanks mike!
2000-08-29 20:30:54 +00:00
Cameron Grant c07a337569 make the test for hwptr going backwards more picky- now it only triggers if
15/16 of the buffer is skipped or we go backwards by < 1/16 of buffer size.
2000-08-29 16:32:26 +00:00
Poul-Henning Kamp a6b1634eb2 Give ccd a cloning function. 2000-08-29 16:29:02 +00:00
Cameron Grant 7c438dbe9c add devfs support. when devfs is enabled, sysctl hw.sndunit is used to set
which sound unit the /dev/{dsp,mixer,dspW,audio} links point at.  this can
also be set from the loader.
2000-08-29 16:21:33 +00:00
Cameron Grant 2fa70abea5 activate fm801 2000-08-29 16:14:28 +00:00
Cameron Grant dacda62ff2 add driver for forte-media fm801
PR:             conf/20698
Submitted by:   dimmy the wild <diwil@dataart.com>
2000-08-29 16:12:28 +00:00
Robert Watson 012c643d3e o Restructure vaccess() so as to check for DAC permission to modify the
object before falling back on privilege.  Make vaccess() accept an
  additional optional argument, privused, to determine whether
  privilege was required for vaccess() to return 0.  Add commented
  out capability checks for reference.  Rename some variables to make
  it more clear which modes/uids/etc are associated with the object,
  and which with the access mode.
o Update file system use of vaccess() to pass NULL as the optional
  privused argument.  Once additional patches are applied, suser()
  will no longer set ASU, so privused will permit passing of
  privilege information up the stack to the caller.

Reviewed by:	bde, green, phk, -security, others
Obtained from:	TrustedBSD Project
2000-08-29 14:45:49 +00:00
Poul-Henning Kamp e2ea84222c Many and sundry changes. Still alpha quality. 2000-08-29 12:32:01 +00:00
Brian Feldman 6aef685fbb Remove any possibility of hiwat-related race conditions by changing
the chgsbsize() call to use a "subject" pointer (&sb.sb_hiwat) and
a u_long target to set it to.  The whole thing is splnet().

This fixes a problem that jdp has been able to provoke.
2000-08-29 11:28:06 +00:00
Darren Reed 473998719e Apply appropriate patch.
PR:		20877
Submitted by:	Frank Volf (volf@oasis.IAEhv.nl)
2000-08-29 10:41:55 +00:00
Doug Rabson 7d9c133636 Remove a vestige of an older attempt at implementing this. 2000-08-29 08:50:17 +00:00
Warner Losh a7d5d6a892 Add TI-1031 id. It doesn't work yet, but it is nice to have it.
These were on cards that were pci pccard (not cardbus) bridges that
lived in SparcUltras that picked up on ebay.
2000-08-29 04:40:17 +00:00
Doug Rabson 21c3015a24 * Completely rewrite the alpha busspace to hide the implementation from
the drivers.
* Remove legacy inx/outx support from chipset and replace with macros
  which call busspace.
* Rework pci config accesses to route through the pcib device instead of
  calling a MD function directly.

With these changes it is possible to cleanly support machines which have
more than one independantly numbered PCI busses. As a bonus, the new
busspace implementation should be measurably faster than the old one.
2000-08-28 21:48:13 +00:00
Doug Rabson f80e454726 Add kobj_class_compile_static() to allow classes to be initialised
statically (i.e. without calling malloc). This allows kobj to be used
very early in the boot sequence.
2000-08-28 21:11:12 +00:00
Doug Rabson a4f9b116e3 * Remove a bogus call to kobj_init() from make_device().
* Add a non-empty implementation of root_print_child().
2000-08-28 21:08:12 +00:00
Doug Rabson e6171135a7 Fix disordered arguments to bus_space_barrier(). 2000-08-28 21:02:18 +00:00
Bill Paul 4e2499823f Add support for the 3Com 556 and 556B mini-pci adapters used on some
laptops. I've checked that this still works with the other cards and
it works with the 3c556 that I have access to, but I want to check that
it works with the 556B mentioned in PR #20878 before I close out the PR
and merge to -stable.
2000-08-28 20:40:03 +00:00
Hajimu UMEMOTO 222e221abc make sure we have IV that is random enough. memory allocator on
some of platforms give us almost constant number (oops).

Obtained from:	KAME
2000-08-28 08:24:46 +00:00
Marcel Moolenaar 3f4ab6537f Regen: fix prototypes for {o|}{g|s}etrlimit. 2000-08-28 07:56:38 +00:00
Marcel Moolenaar ae51d56ce1 Fix prototypes for {o|}{g|s}etrlimit. A recent change in the
Linuxulator caused this bug to trigger.
2000-08-28 07:50:44 +00:00
Warner Losh 5f2686b793 Define a pcic module version 2000-08-28 04:53:36 +00:00
Coleman Kane a436a79744 Removed detection for Voodoo Banshee and Voodoo3 cards. I forsee certain
possible complications with the forthcoming DRI code, and feel that DRI
should handle the device-level interaction. Read
http://people.FreeBSD.org/~cokane/3dfx.html
to find out more. Basically want to move toward using OpenGL and DRI for
everything on these cards. Added a few defines and spacing style fixes in
tdfx_vars.h
2000-08-28 04:28:53 +00:00
Marcel Moolenaar 05c313d4ec Don't enable Linuxulator support if not on an i386.
PR: 20873
Submitted by: Christian Weisgerber <naddy@mips.inka.de>
2000-08-28 03:17:49 +00:00
Matt Jacob 84267b9edd remove clause 3 licence 2000-08-27 23:39:23 +00:00
Matt Jacob b6b6ad2f23 various fixes 2000-08-27 23:38:44 +00:00
Matt Jacob 170fecb13c *fix* commented out DEVFS 2000-08-27 21:57:31 +00:00
Matt Jacob 8669ad2fe3 add commented out DEVFS 2000-08-27 21:56:40 +00:00
Poul-Henning Kamp c32d0a1dcd Reorder vop's alphabetically.
Smarter use of devfs_allocv() (from bp@)
 Introduce devfs_find()
 ".." fixes to devfs_lookup (from bp@)
2000-08-27 14:46:36 +00:00
Poul-Henning Kamp 62ddc84e08 Call destroy_dev() when sio devices go away. 2000-08-27 14:46:13 +00:00
Kazutaka YOKOTA 201e598bbc Fix ioctl MOUSE_SETMODE as defined in mouse(4).
(Do not return EINVAL when -1 is specified as a new value,
as it should mean "preserve the current value.")
2000-08-27 12:36:28 +00:00
Jun-ichiro itojun Hagino 06f879c7f2 warn that setsockopt/sysctl # spaces are shared among *BSD, and should better
be consulted with KAME guys if you want a number.
2000-08-27 00:58:13 +00:00
Alfred Perlstein c58b821e4c new sysctl 'kern.openfiles' (exports nfiles to userland) 2000-08-26 23:49:44 +00:00
Peter Wemm cffd8a1d93 Allow the DPT pci attachment to share IRQ's
Submitted by:	Jonathan Chen <jon@spock.org>
2000-08-26 22:19:53 +00:00
Robert Watson 877dd71fc6 o Correct spelling of ufs_exttatr_find_attr -> ufs_extattr_find_attr
o Add "const" qualifier to attrname argument of various calls to remove
  warnings

Obtained from:	TrustedBSD Project
2000-08-26 22:00:58 +00:00
Poul-Henning Kamp 749e1537ec Minor cleanups tp devfs_readdir();
Add devfs_read() for directories.  (inspired by bp@)
2000-08-26 16:20:57 +00:00
Warner Losh 1684d9d750 Make if_xe eepend on both xe and card. 2000-08-26 08:52:58 +00:00
Yoshihiro Takahashi 95ea0566b4 Enabled pcic, card and xe devices. 2000-08-26 07:38:43 +00:00
Marcel Moolenaar 3f3a4815f4 Whitespace change: (near) KNF 2000-08-26 05:12:16 +00:00
Masahide MAEKAWA d40690a5c9 Regen. 2000-08-26 05:08:11 +00:00
Marcel Moolenaar 4a22d85023 Fix bug in previous commit. We need to trim the limits to fit
the datatype (= long). Use ULONG_MAX and LONG_MAX to avoid
creating MD code.
2000-08-26 05:08:10 +00:00
Masahide MAEKAWA 6ba1312ec3 Add vendor IBM product USB CD-ROM Drive 2000-08-26 05:06:40 +00:00
David E. O'Brien ee2fd03885 Make the arguments match the functionality of the functions. 2000-08-26 04:51:39 +00:00
Marcel Moolenaar 31c8f3f0af Make this file compile again when COMPAT_43 has not been
defined. This boils down to conditionally compile the
old signal syscalls.

We might want to extend the types in syscalls.master to
make these syscalls conditionally on something more
appropriate than COMPAT_43.
2000-08-26 02:27:01 +00:00
Marcel Moolenaar eebc2a071f Re-implement linux_{g|s}etrlimit in terms of {g|s}etrlimit
instead of the o{g|s}etrlimit so that the dependency on
COMPAT_43 is removed.
2000-08-26 02:18:41 +00:00
Warner Losh 925c6cf689 Minor tweaks to have the card be properly enabled via the CCR.
Minor debug changes
Minor power management pessimizations
2000-08-26 00:07:40 +00:00
Peter Wemm 9579e8c145 m_mballoc_wait() had a spl/tsleep race. mbufs can be freed in interrupt
context, which can cause a wakeup.. which can race with this.
2000-08-25 22:28:08 +00:00
Peter Wemm 12db06a04f If the config program found a hints file and included it as a fallback,
then treat it as such.  This isn't perfect, but should do for things
like GENERIC.  When in fallback mode, they will be used if there are NO
other hints.
2000-08-25 19:48:10 +00:00
Peter Wemm 596feda554 If a ${KERNEL}.hints file exists, and no hints are specified explicitly,
then include the hints with a marker indicating that it is a fallback.
The kernel side of this is to come shortly.
2000-08-25 19:30:03 +00:00
Peter Wemm 6c243dd175 Add some anti-foot-shooting protection to the kernel install target.
Do not install a kernel unless a device.hints exists.  Yes, you can
create an empty hints file if you refuse to use them.
2000-08-25 19:16:43 +00:00
Mitsuru IWASAKI d7c0bff411 Move acpi_softc into acpi.h to be shared from additional files.
Add PowerResource manipulation code; acpi_powerres.c.  (more files to
be created something like acpi_battery, acpi_thermal.c...)
2000-08-25 19:04:16 +00:00
Bruce Evans ff4ad0c4d8 Quick fix for msdsofs_write() on alphas and other machines with either
longs larger than 32 bits or strict alignment requirements.

pm_fatmask had type u_long, but it must have a type that has precisely
32 bits and this type must be no smaller than int, so that ~pmp->pm_fatmask
has no bits above the 31st set.  Otherwise, comparisons between (cn
| ~pmp->pm_fatmask) and magic 32-bit "cluster" numbers always fail.
The correct fix is to use the C99 type uint_least32_t and mask with
0xffffffff.  The quick fix is to use u_int32_t and assume that ints
have

msdosfs metadata is riddled with unaligned fields, and on alphas,
unaligned_fixup() apparently has problems fixing up the unaligned
accesses caused by this.  The quick fix is to not comment out the
NetBSD code that sort of handles this, and define UNALIGNED_ACCESS on
i386's so that the code doesn't change on i386's.  The correct fix
would define UNALIGNED_ACCESS in a central machine-dependent header
and maybe add some extra cases to unaligned_fixup().  UNALIGNED_ACCESS
is also tested in isofs.

Submitted by:	parts by Mark Abene <phiber@radicalmedia.com>
PR:		19086
2000-08-25 09:03:58 +00:00
Jun Kuriyama 3eb2d54771 Correct messages for VIA Apollo Pro133A. 2000-08-25 08:30:51 +00:00
Marcel Moolenaar bc34729c47 Fix typo in license. 2000-08-25 07:32:24 +00:00
Takanori Watanabe 0efe857d1f Another file needed for ACPI,I forgot to commit.
Noticed by:iwasaki
2000-08-25 02:13:25 +00:00
John Baldwin 6bd9abd49a Add a new compile-time tweak to BTX. If you set the make(1) variable
BOOT_BTX_NOHANG, then BTX will be compiled with the appropriate flags so
that it reboots after a fault instead of hanging forever.

Requested by:	ps
Approved by:	rnordier
2000-08-24 20:57:44 +00:00
Peter Wemm cb2b40a0b4 Quick fix. <sys/conf.h> now depends on <sys/time.h>, which is not present
when libcam is building this in userland.
2000-08-24 19:23:09 +00:00
Peter Wemm 2422dd7973 Comment out the static wiring of hints for GENERIC - the release process
now installs the hints file into /boot.
2000-08-24 18:56:54 +00:00
Peter Wemm 5836b5e001 I should know better than to touch this without testing a 'make release'
but ${MACHINE_ARCH} should be ${MACHINE} here.  pc98 has its own
GENERIC.hints file and should not be used with the i386 version.
2000-08-24 18:53:09 +00:00
Poul-Henning Kamp d8cd1501f2 Dang, a _clone routine escaped #ifdef DEVFS containment. 2000-08-24 15:59:44 +00:00
Poul-Henning Kamp a481b90b82 Fix panic when removing open device (found by bp@)
Implement subdirs.
 Build the full "devicename" for cloning functions.
 Fix panic when deleted device goes away.
 Collaps devfs_dir and devfs_dirent structures.
 Add proper cloning to the /dev/fd* "device-"driver.
 Fix a bug in make_dev_alias() handling which made aliases appear
  multiple times.
 Use devfs_clone to implement getdiskbyname()
 Make specfs maintain the stat(2) timestamps per dev_t
2000-08-24 15:36:55 +00:00
Roger Hardiman dae49011e7 Fix newbus resource allocations
PR:		kern/18744
Submitted by:	Alexander Langer <alex@cichlids.com>
2000-08-24 14:17:06 +00:00
Takanori Watanabe 681cfb39e1 Add orthogonal part of ACPI support code.
This does not come effect until non-orthogonal part is commited.

Approved by: jkh
Obtained from:	ACPI for FreeBSD CVS repository.
2000-08-24 09:33:30 +00:00
Kazutaka YOKOTA 01819900ae Add spltty()/splx() in the watchdog timer routine. 2000-08-24 08:49:44 +00:00
KATO Takenori 42749d0d15 Fixed freeing wrong address.
Submitted by:	Nobuyuki Koganemaru <kogane@koganemaru.co.jp>
2000-08-24 08:01:49 +00:00
Sheldon Hearn 243782a80a List loader.conf and friends in the FILES section.
Requested by:	obrien
2000-08-24 08:00:29 +00:00
Warner Losh 90cb220e62 Sync to pccarddevs 1.5 2000-08-24 07:01:49 +00:00
Warner Losh 979ca3b327 o Fix unterminated comment
o Sync to NetBSD (rev NetBSD-user edited-log):
	1.97 onoe add Samsung MagicLAN SWL-2000N
	1.96 gmcgarry Add entries for all Xircom ethernet models.
	1.95 onoe Add Farallon SkyLINE 11mb card as Intersil Prism2 [...]
	1.94 joda add 3Com 3CRWE737A (AirConnect)
	1.93 soren Include vendor name for IBM products.
	1.92 onoe Add Farallon SkyLINE Wireless LAN Card for awi(4) [...]
	1.91 soren Add Olicom GoCard.
	1.90 gmcgarry Clean up XIRCOM entries
	- Add entry for Xircom CreditCard Ethernet + Modem 28
	- Add entry for Intel EtherExpress PRO/100
	- Add entry for Compaq Netelligent 10/100 Ethernet
	1.89 is RATOC REX-R280 (another if_mbe_pcmcia card) support by [...]
	1.88 joda Panasonic KXLC003
	1.87 scw [...] SOHOware PCMCIA Ethernet card, model ND5100-E [...]
	1.86 itojun add CIS for Corega Wireless LAN PCC-11 [...]
o Minor diffs between the two files corrected to aid future sync.
2000-08-24 07:01:12 +00:00
Brian Feldman 0a7d171157 Revert the suser -> suser_xxx change made previously. It was right
before.
2000-08-24 04:54:31 +00:00
Paul Saab 03f808c55a Add a sysctl which hides all process except those that belong to
the user asking for the process list.

Reviewed by:	peter
2000-08-23 21:41:25 +00:00
Sheldon Hearn ec81f5f05a Fix the matcd driver for the new world order. This basically just
renames matcdc to matcd.

This change is reported to work by two independent PR originators.
In the absence of further feedback on the freebsd-bugs list, we
may as well get this working for its two users.

PR:		20296
Submitted by:	George Russell <george.russell@clara.net>,
		Remi Guyomarch <rguyom@mail.dotcom.fr>
2000-08-23 09:29:05 +00:00
Mike Smith 153cbcc323 Add entries for the 'mly' driver. Re-group 'mly' and 'dpt' into a new
classification for RAID controllers that have CAM interfaces.
2000-08-23 03:29:49 +00:00
Mike Smith e07acca5f0 This is the initial import of a new driver for the current family of
PCI:SCSI RAID controllers from Mylex.
2000-08-23 03:22:41 +00:00
Bill Paul 343d203cf1 Fix up the sis driver, largely to improve the NatSemi DP83815 support:
- Modify the driver to poll the link state and positively set the
  MAC to full or half duplex as needed. Previously, it was possible
  for the MAC to remain in half duplex even though the PHY had negotiated
  full duplex with its link partner, which would result in bursty
  performance.

- Program some of the NatSemi's registers as specified by the datasheet.
  The manual says these are necessary for "optimum perofrmance," though
  a couple of them are marked as reserved in the register map. *shrug*

- Select the TX DMA burst size correctly for 10 and 100mbps modes.
  Previously I was using 64 bytes in both modes, which worked in
  100mbps mode, but resulting in spotty performance in 10mbps.
  32 bytes works much better; without this change, the natsemi
  chip yields piss poor performance at 10mbps.

With these fixes, the NatSemi chip finally performs to my satisfaction.
I should be merging the support for this controller into -stable shortly.

Phew.
2000-08-22 23:26:51 +00:00
Marcel Moolenaar 3ed7f6a56f Finish the Linuxulator MD/MI split.
In summary:
o  This file has been moved to sys/compat/linux,
o  Any MD syscalls in this file are moved to
   linux_machdep.c in sys/i386/linux,
o  Include directives, makefiles and config files
   have been updated.
2000-08-22 07:08:33 +00:00
Marcel Moolenaar 0ec24f5a8a Connect the new sources in /sys/compat/linux and the new file
in /sys/i386/linux.
2000-08-22 06:02:01 +00:00
Marcel Moolenaar 322bfdc330 Update include directives for Linuxulator headers after the
MD/MI split.
2000-08-22 05:57:55 +00:00
Marcel Moolenaar e19f2fdaad Style fixes:
o  Put the backslash in a fixed column by preference,
o  Sort the list of files.
2000-08-22 05:01:08 +00:00
Warner Losh bd6dd21e8d Save a pointer to the dev, if any, that each function attach.
Remove some bogus printfs.
2000-08-22 04:25:57 +00:00
Marcel Moolenaar 146aad745b Collect the MD syscalls from /sys/compat/linux here. Since this
is a new file, fix most of the style bugs at the same time.
2000-08-22 02:24:02 +00:00
Marcel Moolenaar ac951e620c Update include directives. 2000-08-22 01:51:54 +00:00
Marcel Moolenaar ba9ef45b54 Update include directives.
Make linux_to_bsd_sigset and linux_do_sigaction non-static.

Move linux_sigaction. linux_sigsuspend, linux_rt_sigsuspend,
linux_pause and linux_sigaltstack to MD code.
2000-08-22 01:49:54 +00:00
Marcel Moolenaar a751315ca8 Update include directives.
Move linux_select to MD code (i386 compat. syscall).

Move linux_fork, linux_vfork, linux_clone, linux_mmap,
linux_pipe, linux_ioperm, linux_iopl and linux_modify_ldt
to MD code.
2000-08-22 01:46:50 +00:00
Marcel Moolenaar 607d46ef28 Update include directives. 2000-08-22 01:32:14 +00:00
Marcel Moolenaar afa66fa8ca Update include directives.
Make the sem*, msg* and shm* function non-static as they are
called from MD code.

Move linux_ipc to MD code.
2000-08-22 01:31:23 +00:00
Marcel Moolenaar 6fd44518f2 Update include directives and remove linux_execve. 2000-08-22 01:27:36 +00:00
Marcel Moolenaar 51705ff7da Provide prototypes for functions used by MD code. 2000-08-22 01:24:36 +00:00
Archie Cobbs 11840b0692 Remove obsolete comment. 2000-08-22 00:32:52 +00:00
Poul-Henning Kamp fcc9b84ca5 Fix devfs_access() bug on directories.
Remove unused #includes.

Bug spotted by:	markm
2000-08-21 14:45:19 +00:00
Seigo Tanimura 2e2ed5f6e2 Fix a bug upon initialization. (_INDX_ADDR -> _INDX_DATA) 2000-08-21 13:18:56 +00:00
Sheldon Hearn fcb2a26dfc Synchronize the poll() prototype with the one provided in the
poll(2) manual page.

PR:		20677
Submitted by:	"Ralf S. Engelschall" <rse@engelschall.com>
2000-08-21 12:25:09 +00:00
Nick Hibma 50b37103a2 Fix up the command in the destination buffer, not the source.
This makes the conversion from Test-Unit-Ready to Start-Stop-Unit in the case
of SCSI (Iomega Zip drive) actually work.
2000-08-21 09:39:07 +00:00
Poul-Henning Kamp 055aefb1bc Add dummy opt_devfs.h file. 2000-08-21 07:45:37 +00:00
Cameron Grant 513693be6c rework feeder sytem to allow feeders in klds
modify driver capability reporting format to list every audio format
seperately- required for above and because we could not previously indicate
that mono was unsupported.

there should be no functional impact.
2000-08-20 22:18:56 +00:00
Poul-Henning Kamp 3f54a085a6 Remove all traces of Julians DEVFS (incl from kern/subr_diskslice.c)
Remove old DEVFS support fields from dev_t.

  Make uid, gid & mode members of dev_t and set them in make_dev().

  Use correct uid, gid & mode in make_dev in disk minilayer.

  Add support for registering alias names for a dev_t using the
  new function make_dev_alias().  These will show up as symlinks
  in DEVFS.

  Use makedev() rather than make_dev() for MFSs magic devices to prevent
  DEVFS from noticing this abuse.

  Add a field for DEVFS inode number in dev_t.

  Add new DEVFS in fs/devfs.

  Add devfs cloning to:
        disk minilayer (ie: ad(4), sd(4), cd(4) etc etc)
        md(4), tun(4), bpf(4), fd(4)

  If DEVFS add -d flag to /sbin/inits args to make it mount devfs.

  Add commented out DEVFS to GENERIC
2000-08-20 21:34:39 +00:00
Hajimu UMEMOTO e0faad6850 Add UNIX domain socket feature to pccardd. This makes pccard
related PAO3/ports such as gxcardmon work.

Reviewed by:	imp
Obtained from:	PAO3
2000-08-20 16:16:57 +00:00
Nick Hibma 59e8700a14 Unbreak LINT. 2000-08-20 15:30:15 +00:00
Poul-Henning Kamp 4fe6d43729 Fix typo in last commit. 2000-08-20 11:46:39 +00:00
Poul-Henning Kamp e39c53eda5 Centralize the canonical vop_access user/group/other check in vaccess().
Discussed with: bde
2000-08-20 08:36:26 +00:00
David Malone a893217258 A slight restyling of the previous fix and make the way the
reference count is initialised to zero to be more kosher.

Reviewed by:	Bosko Milekic <bmilekic@technokratis.com>
Spotted by:	jdp and Jake Burkholder <jburkhol@home.com> respectively
2000-08-20 00:02:48 +00:00
John Polstra 2550f17d1c Fix logic error which caused a page fault in kernel mode immediately
on boot up.

Submitted by:	Bosko Milekic <bmilekic@technokratis.com>
2000-08-19 23:50:41 +00:00
Bruce Evans 4153a3a323 Fixed a missing splx() in if_addmulti(). Was broken in rev.1.28. 2000-08-19 22:10:10 +00:00
Warner Losh c0c32537e3 Don't build pccard for now until I can resolve the linker interaction
issue that I'm seeing.
2000-08-19 19:26:03 +00:00
Warner Losh 9489712614 Work around a possible kernel linker bug. It appears that the data
elements defined by foo_if.c aren't sharable amoung modules (I'm
working on a bug report for it now), or else I don't understand
something.  It showed up as kobj functions not being called.

In any event, link in the pcic and pccard parts of the modules to work
around the problem for now.
2000-08-19 19:25:23 +00:00
Warner Losh c8ce264e17 o Move to using PCCARD_SOFTC(dev)
o fill in the size of the actual softc, rather than 1 in data structure
o minor debugging improvements.
2000-08-19 19:22:04 +00:00
Warner Losh 943e2bf6f6 o move to using PCIC_SOFTC(dev) to get the softc
o move pcic_deactivate into pcic_detach
o Better debug messages
2000-08-19 19:20:25 +00:00
Cameron Grant fa06efc7e6 fix SNDCTL_DSP_GETODELAY
PR:		kern/20340
Submitted by:	Takashi SHIRAI <shirai@nintendo.co.jp>
2000-08-19 18:29:46 +00:00
Cameron Grant 4e77c04865 don't complain about bad irqs if using a shared irq 2000-08-19 18:22:20 +00:00
Cameron Grant becc0678b7 Recognize ESS 1888 in Dell Latitude XPi
PR:		kern/18714
Submitted by:	Sean O'Connell <sean@stat.Duke.EDU>
2000-08-19 18:17:15 +00:00
Yoshihiro Takahashi ac1140b8d5 Disabled serial console. 2000-08-19 10:19:43 +00:00
David Malone a5c4836d39 Replace the mbuf external reference counting code with something
that should be better.

The old code counted references to mbuf clusters by using the offset
of the cluster from the start of memory allocated for mbufs and
clusters as an index into an array of chars, which did the reference
counting. If the external storage was not a cluster then reference
counting had to be done by the code using that external storage.

NetBSD's system of linked lists of mbufs was cosidered, but Alfred
felt it would have locking issues when the kernel was made more
SMP friendly.

The system implimented uses a pool of unions to track external
storage. The union contains an int for counting the references and
a pointer for forming a free list. The reference counts are
incremented and decremented atomically and so should be SMP friendly.
This system can track reference counts for any sort of external
storage.

Access to the reference counting stuff is now through macros defined
in mbuf.h, so it should be easier to make changes to the system in
the future.

The possibility of storing the reference count in one of the
referencing mbufs was considered, but was rejected 'cos it would
often leave extra mbufs allocated. Storing the reference count in
the cluster was also considered, but because the external storage
may not be a cluster this isn't an option.

The size of the pool of reference counters is available in the
stats provided by "netstat -m".

PR:		19866
Submitted by:	Bosko Milekic <bmilekic@dsuper.net>
Reviewed by:	alfred (glanced at by others on -net)
2000-08-19 08:32:59 +00:00
Warner Losh 546eb2b18e Call bus_generic_detach on pcic before deleting the children. This
has the side effect of detaching the children before I delete them.
When I put the last commits in a loop for loop it died after 5 or so
iterations.  After this change, I lasted 50 before I stopped the test.
2000-08-19 05:01:07 +00:00
Warner Losh 2a30553ef2 Remove pcic_isa_identify. I don't think it is needed.
Add pcic_detach which removes all of the pcic's children.

This lets me load/unload pcic multiple times w/o having multiple
instances of each slot attached to pcic.
2000-08-19 04:47:09 +00:00
Mike Smith 8ade16819d Increase the default NAPIC from 1 to 2 as a bandaid until we allocate
these dynamically (ie. typically you shouldn't have to set NAPIC at all)
2000-08-18 20:09:15 +00:00
Poul-Henning Kamp 39f70682ae Introduce vop_stdinactive() and make it the default if no vop_inactive
is declared.

Sort and prune a few vop_op[].
2000-08-18 10:01:02 +00:00
KATO Takenori a19d469b8a Merged from sys/i386/i386/machdep.c revision 1.402. 2000-08-18 09:22:01 +00:00
David Malone 432b948f76 The slip driver used to allocate a mbuf cluster without attaching
it to a mbuf. This patch makes it attach it to mbuf.  This patch
is in preperation for Bosko Milekic's mbuf external reference
counting patches.

PR:		19866 (first stage)
Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
Reviewed by:	alfred
2000-08-18 08:02:31 +00:00
Brian S. Dean 39a59b1de6 Don't let an illegal value for dr7 get set, which can lead to an
unexpected TRCTRAP.

Reported by: John W. De Boskey <jwd@FreeBSD.org>
2000-08-17 14:35:23 +00:00
Yoshihiro Takahashi 82583dd564 - Fixed the conversion to bus_space interface.
- Added PC-98 Cbus devices support.
  The original patch is submitted by chi@bd.mbn.or.jp (Chiharu Shibata)
- Removed old ed driver.
2000-08-17 12:15:45 +00:00
Warner Losh 928db2a912 Add support for loading this as a module (before there were some
problems).  Also pick an irq if one isn't specified.  Ditto for
memory.

Add additional printfs in the error paths.  These will disappear in time.

There are still some panics, but this is a good checkpoint.
2000-08-17 05:52:18 +00:00
John Baldwin e25cb01d28 Add in a hack that installs 'src/sys/${MACHINE_ARCH}/GENERIC.hints' as
/boot/device.hints in the bin dist during releases so that current snapshots
have a chance of booting up ok after installing.  The real fix for this
problem is to rewrite userconfig in Forth, stick it in the loader, axe
userconfig from the kernel, and extract the hints from the booted kernel in
sysinstall similar to the way we generate /boot/kernel.conf right now.  For
now, however, this will have to do.
2000-08-17 05:43:41 +00:00
Brian Feldman 9b96968623 Fix a couple cases where p_trespass wasn't transitioned into place.
Make RTP_SET (rtprio) only accessible to real root, not root in jails.
2000-08-16 23:28:54 +00:00
Tor Egge d9b05734cc Prepare for a cleanup of pmap module API pollution introduced by the
suggested fix in PR 12378.

Keep track of all existing pmaps independent of existing processes.

This allows for a process to temporarily connect to a different address
space without the risk of missing an update of the original address space if
the kernel grows.

pmap_pinit2() is no longer needed on the i386 platform but is left as a
stub until the alpha pmap code is updated.

PR:		12378
2000-08-16 21:24:44 +00:00
Darren Reed 6c292daf22 backout previous change for now 2000-08-16 13:59:50 +00:00
Darren Reed 48f0e05128 add extern for inetsw 2000-08-16 13:54:56 +00:00
Jun-ichiro itojun Hagino 0150f3ec9b add missing splx(), when outgoing interface queue is full on tunnelled
IPsec packet output.  KAME PR 280.
2000-08-16 09:56:45 +00:00
Søren Schmidt b0bb0aeb95 Rearrange the probe a bit, hopefully this will help to eleminate
some of the fake devices sometimes seen on single device ATA
channels.

Proberly fail on failures in ata-disk.c, retry instead of hang.

Cleanup the VIA probe/init code a bit.

Fix a couble of missing free's in atapi-cd.c in the changer code.
2000-08-16 07:09:04 +00:00
Greg Lehey 7a598eabdd open_drive:
Add support for AMD RAID controllers as "disks".

Requested-by:  Marius Bendiksen <mbendiks@eunet.no>

  Remove potential panic when attempting to open non-existent drivers.

init_drive: Return error codes correctly.  Previously it would
            occasionally return 0.  The error was redetected
            elsewhere, but this was causing a number of confusing
            error messages.
2000-08-16 04:31:37 +00:00
Peter Wemm d7db4e569d Add another USR modem.
PR: 20621
Submitted by: Masanori Taira <mtaira@logicaleffect.com>
2000-08-15 21:03:28 +00:00
Kris Kennaway 0f336aa5db Install mode 644, not mode 664 during kernel compile. Yes, Peter, I am
psycho :-)
2000-08-15 11:06:56 +00:00
KATO Takenori 77dff523b3 Fixed determination method for sector size of the 2nd IDE HDD. 2000-08-15 08:17:03 +00:00
Jun-ichiro itojun Hagino d1d1144bd7 repair endianness issue in IN_MULTICAST().
again, *BSD difference...

From: Nick Sayer <nsayer@quack.kfu.com>
2000-08-15 07:34:08 +00:00
Archie Cobbs 56045c6673 Add three more control messages to complement their opposites:
NGM_ETHER_SET_ENADDR, NGM_ETHER_GET_PROMISC, and NGM_ETHER_GET_AUTOSRC.
Alter parsing algorithm so the EN address really looks like one.
2000-08-15 01:05:50 +00:00
Archie Cobbs 66ce51cec7 Export the functionality of SIOCSIFLLADDR with if_setlladdr()
and add some more rigorous sanity checking in the process.

Reviewed by:	freebsd-net
2000-08-15 00:48:38 +00:00
Ruslan Ermilov a05f06d79f Fixed PunchFW code segmentation violation bug.
Reported by:	Christian Schade <chris@cube.sax.de>
2000-08-14 15:24:47 +00:00
Ruslan Ermilov b834663f47 Use queue(3) LIST_* macros for doubly-linked lists. 2000-08-14 14:18:16 +00:00
Atsushi Onoe e05d1af60e awictl configuration interface is never used and now it is replaced by
wicontrol(8).
2000-08-14 14:10:10 +00:00
Atsushi Onoe 7b2182ad4e add dev/awi/awi_wicfg.c to support wi(4) compatible configuration interface.
add dev/awi/awi_wep.c to support WEP for awi.
add dependency for awi to crypto/rc4/rc4.c
2000-08-14 13:45:42 +00:00
Atsushi Onoe 3b65d03e0a Add support for WEP functionality.
Add support for wi(4) compatible configuration interface.  It enables
wicontrol(8) to configure some 802.11 specific parameters.
Some minor fixes from NetBSD.
Obtained from:  NetBSD current
2000-08-14 13:42:38 +00:00
Atsushi Onoe 853f381335 Change the argument for SIOCG80211NWID/SIOCS80211NWID to include the
length of NWID.  This breaks binary compatibility but only the awi driver
refers this ioctl; no userland tools refers it.
Add WEP stuff.
Obtained from:	NetBSD current
2000-08-14 13:29:49 +00:00
KATO Takenori 64145a4abe Merged from sys/i386/i386/machdep.c revision 1.401. 2000-08-14 07:27:10 +00:00
Atsushi Onoe 149348ccc3 This file contains a shim just for NetBSD, and not used in FreeBSD at all. 2000-08-14 05:44:35 +00:00
Seigo Tanimura 8f4fec9c36 Newbusify ed driver.
Partly submitted by:	alex
2000-08-14 04:31:07 +00:00
Nick Sayer 6ba60b3c4a This patch appears to solve the problems with recording resulting
in bogus hwptr warnings. Further comments sought on -hackers
were not forthcoming. I can only hope that calling DELAY() like
this doesn't cause any heartburn.
2000-08-13 19:20:02 +00:00
Nick Hibma 74bd1c1038 CAM, the module: scbus, da, cd, and st wrapped in one module.
Make the umass driver depend on this module.

Makes it possible to compile the kernel without SCSI support and load it
when for example a USB floppy is conencted.
2000-08-13 18:49:40 +00:00
Nick Hibma 028d28adb8 From NetBSD:
Make it possible to move a device to its unconfigured state by
using config #0.

Add some comments.

Change error reporting in port reset function.

usbd_devinfo_vp(): search the know devs array also if the device doesn't
return product description (e.g. Kye's Genius NetScroll mouse returns
vendor, but not product); the strings returned by device are still
preferred to those in the array, though
2000-08-13 18:39:24 +00:00
Nick Hibma 3f0148fee0 Add more CDC defines. 2000-08-13 18:23:07 +00:00
Nick Hibma 048f89016c Fake the Power On command on the virtual hub.
This removes the two IOERROR's on startup a many has been seeing on UHCI
controllers.

Taken from NetBSD.
2000-08-13 18:21:18 +00:00
Hajimu UMEMOTO 8ad6d022ca Add output of per battery information to apm(1).
New ioctl APMIO_GETPWSTATUS is introduced.

Reviewed by:	-mobile and -current folks (no objection)
2000-08-13 17:05:27 +00:00
Alexander Langer 6d04301d4f Add PAO devices supported by drivers. 2000-08-13 14:25:33 +00:00
Søren Schmidt 710591b796 Fix off by one error in track# calculation. 2000-08-13 09:08:19 +00:00
John Baldwin 597d9a21d9 Include machine/cputypes.h so we get the cpu_class variable. This is needed
if I386_CPU is defined in the kernel config file.
2000-08-13 05:17:46 +00:00
Darren Reed 5e90b39cba resolve conflicts 2000-08-13 04:31:06 +00:00
Bruce Evans c6e4d7c5ba Fixed null pointer panic for accessing "meminfo" when there is no swap. 2000-08-12 21:08:42 +00:00
Hajimu UMEMOTO 1469c4346f Make compilable with -DIPFILTER.
Because I don't use ipfilter at all, this is not tested.
I don't know if ipfilter is work for IPv6.

Submitted by:	yoshiaki@kt.rim.or.jp
2000-08-12 18:14:13 +00:00
KATO Takenori 9300e1bae2 Merged from sys/boot/i386/Makefile.inc revision 1.2. 2000-08-12 07:37:19 +00:00
KATO Takenori e2c9a41a3c Merged from sys/i386/i386/machdep.c revision 1.400. 2000-08-12 07:35:12 +00:00
Peter Wemm 5aef48a16b Add -mpreferred-stack-boundary=2 to CFLAGS for i386. This and libstand
reduces /boot/loader from 163840 bytes to 155648 and pxeboot from 165888
bytes to 157696 bytes.
2000-08-11 23:23:20 +00:00
Peter Wemm babff34a27 Oops, forgot this file. Log message for completeness:
Clean up some low level bootstrap code:

- stop using the evil 'struct trapframe' argument for mi_startup()
  (formerly main()).  There are much better ways of doing it.
- do not use prepare_usermode() - setregs() in execve() will do it
  all for us as long as the p_md.md_regs pointer is set.  (which is
  now done in machdep.c rather than init_main.c.  The Alpha port did it
  this way all along and is much cleaner).
- collect all the magic %cr0 etc register settings into one place and
  have the AP's call that instead of using magic numbers (!!) that keep
  changing over and over again.
- Make it safe to call kthread_create() earlier, including during the
  device probe sequence.  It doesn't need the callback mechanism that
  NetBSD's version uses.
- kthreads created this way are root-less as they exist before the root
  filesystem is mounted.  init(1) is set up so that it aquires the root
  pointers prior to running.  If other kthreads want filesystem acccess
  we can make this code more generic.
- set all threads start times once we have decided what time it is.
- init uses a trampoline rather than the evil prepare_usermode() hack.
- kern_descrip.c has a couple of tweaks to deal with forking when there
  is no rootdir or cwd etc.
- adjust the early SYSINIT() sequence so that a few prereqisites are in
  place. eg: make sure the run queue is initialized before doing forks.

With this, the USB code can easily create a kthread to do the device
tree discovery.  (I have tested it, it works nicely).

There are still some open issues before this is truely useful.
- tsleep() does not like working before the clock is running.  It
  sort-of tries to spin wait, but it can do more useful things now.
- stopping a kthread in kld code at unload time is "interesting" but
  we have a solution for that.

The Alpha code needs no changes for this.  It already uses pretty much the
same strategies, but a little cleaner.
2000-08-11 18:54:47 +00:00
Bill Paul 069363018f Fix a bug brought to light by the people working on SMPng. I don't quite
understand exactly what it is about SMPng that tickles this bug. What I
do know is that the foo_init() routine in most drivers is often called
twice when an interface is brought up. One time is due to the ifconfig(8)
command calling the SIOCSIFFLAGS ioctl to set the IFF_UP flag, and another
is probably due to the kernel calling ifp->if_init at some point. In any
case, the SMPng changes seem to affect the timing of these two events in
such a way that there is a significant delay before any packets are sent
onto the wire after the interface is first brought up. This manifested
itself locally as an SMPng test machine which failed to obtain an address
via DHCP when booting up.

It looks like the second call to fxp_init() is happening faster now than
it did before, and I think it catches the chip while it's in the process
of dealing with the configuration command from the first call. Whatever
the case, a FXP_CSR_SCB_CNA interrupt event is now generated shortly after
the second fxp_init() call. (This interrupt is apparently never generated
by a non-SMPng kernel, so nobody noticed.)

There are two problems with this: first, fxp_intr() does not handle the
FXP_CSR_SCB_CNA interrupt event (it never tests for it or does anything
to deal with it), and second, the meaning of FXP_CSR_SCB_CNA is not
documented in the driver. (Apparently it means "command unit not active.")
Bad coder. No biscuit.

The fix is to have the FXP_CSR_SCB_CNA interrupt handled just like the
FXP_SCB_STATACK_CXTNO interrupt. This prevents the state machine for
the configuration/RX filter programming stuff from getting wedged for
several seconds and preventing packet transmission.

Noticed by: jhb
2000-08-11 17:47:55 +00:00
Nick Hibma cad823f463 Fix indentation ruined by previous commit. 2000-08-11 16:37:43 +00:00
Warner Losh 2c6b3ec454 Define get_memory_offset method 2000-08-11 15:51:51 +00:00
Jun-ichiro itojun Hagino 42915d02a3 backout ND6_USE_RTSOCK change in previous 2000-08-11 12:29:04 +00:00
Jun-ichiro itojun Hagino 2022007008 avoid duplicated rtfree() on default router list change (could cause panic).
sync with kame 1.46 -> 1.47.
2000-08-11 12:27:07 +00:00
Søren Schmidt ae97e232fb Backout the tsleep on probe, it breaks in resume mode as tsleep
not always has a context to sleep on.
Back to the drawing board...
2000-08-11 10:34:22 +00:00
Daniel C. Sobral e7b7c050c7 Add missing "is".
PR:		20524
Submitted by:	Peter Pentchev <roam@orbitel.bg>
2000-08-11 10:32:23 +00:00
Søren Schmidt 071e6e581e Add support for accessing individual tracks on a CD.
This is done by misusing the device minor a bit to encode the
track no there.

So to read track #4 just use /dev/acdNt4 where N is the device #.

The driver no automatically sets the blocksize (sectorsize) to
what the track is set to in the TOC.

This has the nice effect that you can now rip audioi tracks
by simply doing:

dd if=/dev/acdNt2 of=audiotrack2.raw bs=2352

it cant be much simpler than that :)

NOTE: the original acdNa & acdNc device still work as usual,
except the blocksize is set according to track0.
2000-08-11 09:21:36 +00:00
Peter Wemm 37b087a645 Clean up some low level bootstrap code:
- stop using the evil 'struct trapframe' argument for mi_startup()
  (formerly main()).  There are much better ways of doing it.
- do not use prepare_usermode() - setregs() in execve() will do it
  all for us as long as the p_md.md_regs pointer is set.  (which is
  now done in machdep.c rather than init_main.c.  The Alpha port did it
  this way all along and is much cleaner).
- collect all the magic %cr0 etc register settings into one place and
  have the AP's call that instead of using magic numbers (!!) that keep
  changing over and over again.
- Make it safe to call kthread_create() earlier, including during the
  device probe sequence.  It doesn't need the callback mechanism that
  NetBSD's version uses.
- kthreads created this way are root-less as they exist before the root
  filesystem is mounted.  init(1) is set up so that it aquires the root
  pointers prior to running.  If other kthreads want filesystem acccess
  we can make this code more generic.
- set all threads start times once we have decided what time it is.
- init uses a trampoline rather than the evil prepare_usermode() hack.
- kern_descrip.c has a couple of tweaks to deal with forking when there
  is no rootdir or cwd etc.
- adjust the early SYSINIT() sequence so that a few prereqisites are in
  place. eg: make sure the run queue is initialized before doing forks.

With this, the USB code can easily create a kthread to do the device
tree discovery.  (I have tested it, it works nicely).

There are still some open issues before this is truely useful.
- tsleep() does not like working before the clock is running.  It
  sort-of tries to spin wait, but it can do more useful things now.
- stopping a kthread in kld code at unload time is "interesting" but
  we have a solution for that.

The Alpha code needs no changes for this.  It already uses pretty much the
same strategies, but a little cleaner.
2000-08-11 09:05:12 +00:00
Paul Saab 646cf5017b Add support to send the string 'PXEClient' as the Vendor class
identifier to the DHCP server.  Now you can check for this string
in your dhcp configuration to decide whether you will hand out a
lease to the client or not.
2000-08-11 08:36:17 +00:00
Paul Saab f6940c1842 Pass along the interesting variables we were given from DHCP so we
can utilize them in the kernel and with kenv.
2000-08-11 05:31:59 +00:00
Archie Cobbs a604c8808e Oops, previous commit fixed a bug that was already fixed before.
Back it out.
2000-08-10 23:04:46 +00:00
Archie Cobbs 0521578550 Add new control message to atomically get and clear statistics. 2000-08-10 22:52:40 +00:00
Archie Cobbs a8f6d55e95 Increase the maximum allowable datagram length. 2000-08-10 22:51:57 +00:00
Archie Cobbs cac2a7de76 "u_int32_t" should have been "int32_t". 2000-08-10 22:51:26 +00:00
Archie Cobbs 7133ac27ef Use a bigger buffer for NGM_BINARY2ASCII conversion, to handle really
long ASCII control messages.
2000-08-10 22:50:38 +00:00
Archie Cobbs 656485a2c6 - Add new control message NGM_VJC_GET_CONFIG
- Implement control message ASCII'fication for all control messages
2000-08-10 22:48:03 +00:00
Archie Cobbs 57b57be3ec Take advantage of the new unsigned and hex integer types. 2000-08-10 22:45:54 +00:00
Archie Cobbs 8fccb7e954 - Make statistics unsigned.
- Add new control message to atomically get and clear statistics.
2000-08-10 22:44:41 +00:00
Archie Cobbs 7b3bf3f9aa - Add new unsigned and hex integer parse types
- Fix bug in commented example code
2000-08-10 22:43:38 +00:00
Archie Cobbs 8db3c6cd29 - Add new unsigned and hex integer parse types; this allows simplifying
the bytearray parse type.
- Allocate (larger) temporary work buffer dynamically instead of on the
  stack when comparing to the default value.
2000-08-10 22:42:25 +00:00
Hajimu UMEMOTO 0f6b9b3fe2 Make ip6fw zero work.
PR:		bin/20522
2000-08-10 20:41:33 +00:00
Archie Cobbs 7b38c4e4d9 RFC 1661 requires that all LCP packets are sent with no address and
control field compression. The ng_ppp(4) node correctly follows this
rule. However, PPPoE is an exception: when doing PPPoE *all* frames
are sent with address and control field compression.

Alter this node's behavior so that when an outgoing frame is received,
any leading address and control field bytes are removed. This makes
this node compatible with ng_ppp(4).
2000-08-10 20:05:12 +00:00
Warner Losh 2563e6f5b8 Add some infrastructure support for dealing with large attribute
memory space needed by the raylink driver (in progress, nearing
completion).

This is a minorly cleaned up diff from Duncan to help him reduce the
diffs from stock FreeBSD.

Submitted by: Duncan Barclay <dmlb@ragnet.demon.co.uk>
2000-08-10 17:35:11 +00:00
Tor Egge 4428d39d63 Don't skip IOAPIC id conflict detection when only one pci bus is present.
PR:		20312
Reviewed by:	Steve Roome <steve@sse0691.bri.hp.com>
2000-08-10 17:33:24 +00:00
Søren Schmidt 4466a3504d Fix the ICH2 ATA100 support, and proberly downgrade the chip setup when
going to slower DMA modes on all Intel chips.
2000-08-10 07:34:49 +00:00
Archie Cobbs 1baeddb81b In a struct sockaddr, sa->sa_len can be zero if uninitialized.
Make sure that this doesn't cause a problem when parsing.
2000-08-09 23:57:44 +00:00
Nick Sayer fc35953a16 Missed a step when activating the solo driver. 2000-08-09 20:28:19 +00:00
Cameron Grant 4873b46dc7 change irq handling slightly
add another non-ac97 256av
2000-08-09 18:51:27 +00:00