obrien [Sat, 20 Nov 1999 00:32:05 +0000 (00:32 +0000)]
mkstemps() has been brought into 3-STABLE, so this isn't needed here
anymore as building -CURRENT sources on 3-STABLE was the reason for the
previous revision adding this.
Note that since the GCC Project moved mkstemp.c from GCC's world to
libiberty, we no longer support building -CURRENT sources on non-FreeBSD
boxes unless that box has a very simular libc mix as FreeBSD.
obrien [Sat, 20 Nov 1999 00:28:03 +0000 (00:28 +0000)]
Remove the `sysctl' get osversion hack. There are issues with cross-hosting
builds, Also, `sysctl' is not a build-tool and I'd rather not make it one.
3-STABLE has been updated to deal with the main reason this came in.
brian [Fri, 19 Nov 1999 23:21:13 +0000 (23:21 +0000)]
Update the time delta of the first item in TimerList before
inserting a new item. Without this, it's possible to
mis-insert quite badly... but only by as much as the load of
the first item, which is almost always 1 second.
Initialise the timerservice with `restart' set if we're inserting
at the start of the list.
dillon [Fri, 19 Nov 1999 22:47:19 +0000 (22:47 +0000)]
Optimize two cases in the MP locking code. First, it is not necessary
to use a locked cmpexg when unlocking a lock that we already hold, since
nobody else can touch the lock while we hold it. Second, it is not
necessary to use a locked cmpexg when locking a lock that we already
hold, for the same reason. These changes will allow MP locks to be used
recursively without impacting performance.
Modify two procedures that are called only by assembly and are already
NOPROF entries to pass a critical argument in %edx instead of on the
stack, removing a significant amount of code from the critical path
as a consequence.
Reviewed by: Alfred Perlstein <bright@wintelcom.net>, Peter Wemm <peter@netplex.com.au>
phk [Fri, 19 Nov 1999 21:29:03 +0000 (21:29 +0000)]
The at_exit and at_fork functions currently use a 'roll your own'
linked list to store the callbak routines. The patch converts the
lists to queue(3) TAILQs, making the code slightly clearer and ensuring
that callbacks are executed in FIFO order.
Man page also updated as necesary.
(discontinued use of M_TEMP malloc type while here anyway /phk)
dillon [Fri, 19 Nov 1999 16:49:30 +0000 (16:49 +0000)]
Optimize two cases in the MP locking code. First, it is not necessary
to use a locked cmpexg when unlocking a lock that we already hold, since
nobody else can touch the lock while we hold it. Second, it is not
necessary to use a locked cmpexg when locking a lock that we already
hold, for the same reason. These changes will allow MP locks to be used
recursively without impacting performance.
Modify two procedures that are called only by assembly and are already
NOPROF entries to pass a critical argument in %edx instead of on the
stack, removing a significant amount of code from the critical path
as a consequence.
Reviewed by: Alfred Perlstein <bright@wintelcom.net>, Peter Wemm <peter@netplex.com.au>
n_hibma [Fri, 19 Nov 1999 13:13:28 +0000 (13:13 +0000)]
Make the event creation work
- Create the /dev/usb event queue device node.
- Add usbread to the cdevsw.
- Also hide the many minor() behind a USBUNIT macro.
roger [Fri, 19 Nov 1999 07:29:10 +0000 (07:29 +0000)]
Rename es1370.c to es137x.c and merge in the patches to support
ES1371 and ES1373 PCI Audio Sound Chips.
The 1371 and 1373 can be found on newer CreativeLabs/Ensoniq
sound cards such as the SoundBlaster PCI 16,64 and 128.
Submitted by: Russell Cattelan <cattelan@thebarn.com>
Obtained from: Parts obtained from linux, but rewritten by Russell
archie [Fri, 19 Nov 1999 04:27:53 +0000 (04:27 +0000)]
Remove the address and control field compression functionality of this
node type. ACF is device independent and therefore belongs in ng_ppp.c
(which already implements it).
n_hibma [Thu, 18 Nov 1999 18:04:17 +0000 (18:04 +0000)]
Cleanup of the code before we add a few thins.
- remove the use of NDEV. It is confusing. MAXUSBDEV should do.
- add some comments.
- add more explanation in usage()
- change the timeout value for undetected USB devices from 300 to 30
seconds. I don't think anyone wants to wait 5 minutes for broken
devices to show up. The overhead CPU wise is very little.
- print 'no controllers found' as a fatal error.
- remove inclusion of malloc.h. It's unused.
pb [Thu, 18 Nov 1999 10:20:45 +0000 (10:20 +0000)]
Make last commit bde-compliant:
- correct indentation
- change data types for consistency with the rest of ping.c
- create new variable separate from "answer" for clarity
peter [Thu, 18 Nov 1999 09:54:11 +0000 (09:54 +0000)]
Hack: comment out the pull-in of src/sys/../share/mk/bsd.kern.mk as
that breaks if you try and compile a kernel before building world, as
is presently required to get past the signal changes. I don't
particularly like doing this, but at least it will mean that a 'make world'
will activate the gcc 2.95.2-specific option in bsd.kern.mk.
peter [Thu, 18 Nov 1999 08:58:37 +0000 (08:58 +0000)]
If we have found pci devices via pci_cfgopen(), but don't find a
host->pci bridge specifically, then add a pcib0 device on the motherboard
for the pci bus to hang off.
Requested by: Anders Andersson <anders@sanyusan.se>
Obtained from: dfr
sheldonh [Thu, 18 Nov 1999 08:13:21 +0000 (08:13 +0000)]
Follow-up on mdoc fixes in rev 1.35; this includes things that I missed
in that revision as well as things I broke in that revision. A note-
worthy instance of the latter case was the inversion of -E and -V in the
subsection on Commandline Editing.
peter [Thu, 18 Nov 1999 07:22:41 +0000 (07:22 +0000)]
Merge some typo fixes from dev/sio/sio.c (siostop -> comstop)
Remove EXTRA_SIO/NSIOTOT and make it fully dynamic (from dev/sio/sio.c)
Make sio work for pccard here - pccardd doesn't activate interrupts
until after prove has succeeded.
Mark the initial reset of likely sio ports as broken as it depended on
config supplying a list of locations to probe, devices are now proved
standalone.
Optimize a bit of COM_NOAST4() logic.
Use bus_get_resource_start() etc rather than using isa-centric calls.
Reactivate the IIR_TXRDYBUG test, I've got a card here with it.
Try to be a bit smarter about activating interrupts (ie: don't panic
if polled)
Fix some style bugs that have crept in over time (there are still more).
peter [Thu, 18 Nov 1999 06:55:40 +0000 (06:55 +0000)]
Remove the non-functional "swap device" userland front-end to the
multiplexed underlying swap devices (/dev/drum). The only thing it did
was to allow root to open /dev/drum, but not do anything with it.
Various utilities used to grovel around in here, but Matt has written
a much nicer (and clean) front-end to this for libkvm, and nothing uses
the old system any more.
The VM system was calling VOP_STRATEGY() on the vp of the first underlying
swap device (not the /dev/drum one, the first real device), and using
the VOP system to indirectly (and only) call swstrategy() to choose
an underlying device and enqueue it on that device. I have changed it
to avoid diverting through the VOP system and to call the only possible
target directly, saving a little bit of time and some complexity.
In all, nothing much changes, except some scaffolding to support the
roundabout way of calling swstrategy() is gone.
Matt gave me the ok to do this some time ago, and I apologize for taking
so long to get around to it.
imp [Thu, 18 Nov 1999 06:54:19 +0000 (06:54 +0000)]
Hijack old, broken, obsolete, unsupported pcic module for the NEWCARD
code. You can now build the newcard's pcic driver as a module for all
the joy that will bring you, which currently isn't so much joy as it
is pain.
The old pccard module will never be made to work again, so I think
this is OK. Note, it still remains disabled in sys/modules/Makefile
on purpose.
peter [Thu, 18 Nov 1999 06:41:30 +0000 (06:41 +0000)]
Remove cdevsw_add() as the make_dev()'s are done in a clone-like fashion.
(ie: the next device is created with make_dev as the first is opened
and so on)
peter [Thu, 18 Nov 1999 06:39:47 +0000 (06:39 +0000)]
Remove cdevsw_add() - the make_dev() calls are already there.
Don't '#if NSNP > 0' around the thing as it's silly and not required.
config(8) only causes it to be compiled if NSNP is > 0 by definition.
peter [Thu, 18 Nov 1999 05:44:56 +0000 (05:44 +0000)]
Convert smb to use make_dev() rather than cdevsw_add(). This stops the
annoying 'smb is usurping smb's cdevsw' type messages. (Yes, there are
other ways to fix cdevsw_add(), but that is a doomed api)
peter [Thu, 18 Nov 1999 05:43:32 +0000 (05:43 +0000)]
Convert iic to use make_dev() rather than cdevsw_add(). This stops the
annoying 'iic is usurping iic's cdevsw' type messages. (Yes, there are
other ways to fix cdevsw_add(), but that is a doomed api)
peter [Thu, 18 Nov 1999 05:15:09 +0000 (05:15 +0000)]
Tidy up a few loose ends in the fifo setup code.
Don't use NFDC as an arbitary limit, it is not required and goes against
using PnP fdc devices (eg: when PNPBIOS is turned on, the motherboard
devices (sio, fdc, etc etc) are detected via PnP, not config(8).)
peter [Thu, 18 Nov 1999 04:31:31 +0000 (04:31 +0000)]
Use a common MAKEDEV between the Alpha and i386 - the only differences
of significance were due to the Alpha version going stale. We use common
device numbering for devices. Hopefully, this file's days are numbered.
jdp [Thu, 18 Nov 1999 03:01:06 +0000 (03:01 +0000)]
For the TCP transport, put the listening socket in non-blocking
mode. This addresses a well-known race condition that can cause
servers to hang in accept(). The relevant case is when somebody
connects to the server and then immediately kills the connection
by sending a TCP reset. On the server this causes select to report
a ready condition on the socket, after which the accept call blocks
because there is no longer any pending connection to accept.
In -current there is already a work-around for this in the kernel.
It was merged into -stable some time ago, but then David Greenman
reverted it because it seemed to be causing a socket leak in some
cases. (See uipc_socket.c revision 1.51.2.3.) Hence this userland
fix is needed in -stable, and I plan to merge it into that branch
soon because it fixes a potential DoS attack. It may also be needed
in -current if the suspected socket leak turns out to be real. In
any case, after thinking it over I believe the fix belongs in
userland. An application shouldn't assume that a ready return from
select guarantees that the subsequent I/O operation cannot block.
A lot can happen between the select and the accept.
A similar fix should most likely be applied to the Unix domain
socket transport too.
imp [Wed, 17 Nov 1999 23:54:39 +0000 (23:54 +0000)]
o Remove #if XXX from around the probe code.
o Rewrite probe code to work in the newbus world.
o Add preliminary pnp support. I have no clue what the pnp ids for
the older ISA machines/cards. I don't have any of these cards/machines
so I'll have to rely on the user community to give me help.
o Minor code reformatting.
Attach hasn't been touched, and there may be some config issues that
we need to deal with as well. These will follow in time.
ache [Wed, 17 Nov 1999 22:38:02 +0000 (22:38 +0000)]
Add network pass4 - after all local (/usr/local/etc/rc.d f.e.)
daemons started. Move log_in_vain option there. It is needed to avoid
lot of connections to port 80 logged on production WWW server prior
Apache started from /usr/local/etc/rc.d
n_hibma [Wed, 17 Nov 1999 22:33:51 +0000 (22:33 +0000)]
Synchronisation with NetBSD as of 1999/11/16:
Cleaning up the code:
- Declare many functions static
- Change variable names to make them more self explanatory
- Change usbd_request_handle -> usbd_xfer_handle
- Syntactical changes
- Remove some unused code
- Other KNF changes
Interrupt context handling
- Change delay to usbd_delay_ms were possible (takes polling mode into
account)
- Change detection mechanism for interrupt context
Add support for pre-allocation DMA-able memory by device driver
Add preliminary support for isochronous to the UHCI driver (not for OHCI
yet).
usb.c, uhci.c, ohci.c
- Initial attempt at detachable USB host controllers
- Handle the use_polling flag with a lttle more care and only set it if
we are cold booting.
usb.c, uhci.c ohci.c, usbdi.c usbdi_util.c usb_subr.c
- Make sure an aborted pipe is marked as not running.
- Start queued request in the right order.
- Insert some more DIAGNOSTIC sanity checks.
- Remove (almost) unused definitions USBD_XFER_OUT and USBD_XFER_IN.
usb.c, usb_subr.c
- Add an event mechanism so that a userland process can watch devices
come and go.
ohci.c
- Handle the case when a USB transfer is so long that it crosses two
page (4K) boundaries. OHCI cannot do that with a single TD so we make
a chain.
ulpt.c
- Use a bigger buffer when transferring data.
- Pre-allocate the DMA buffer. This makes the driver slightly more
efficient.
- Comment out the GET_DEVICE_ID code, because for some unknown reason it
causes printing to fail sometimes.
usb.h
- Add a macro to extract the isoc type.
- Add a macro to check whether the routine has been entered after splusb
and if not, complain.
usbdi.c
- Fix a glitch in dequeueing and aborting requests on interrupt pipes.
- Add a flag in the request to determine if the data copying is done by
the driver or the usbdi layer.