Commit Graph

42825 Commits

Author SHA1 Message Date
Peter Wemm 609d21b734 Fix some warnings. 1999-11-18 08:32:02 +00:00
Peter Wemm 45d3a132c4 Fix a warning and a potential panic if TCPDEBUG is active. (tp is
a wild pointer and used by TCPDEBUG2())
1999-11-18 08:28:24 +00:00
Peter Wemm 3078c786f8 Fix a warning (unused variable RCSid) 1999-11-18 08:18:13 +00:00
Matthew Dillon 91921bd597 Ensure that garbage from the kernel stack does not wind up being
returned to user mode in the spare fields of the stat structure.

PR:		kern/14966
Reviewed by:	dillon@freebsd.org
Submitted by:	Kelly Yancey kbyanc@posi.net
1999-11-18 08:14:20 +00:00
Sheldon Hearn e918fc8f72 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.
1999-11-18 08:13:21 +00:00
Matthew Dillon 151f7a5d8a Only bother converting the stat structure if we intend to return it,
when no error occurs.

PR:		kern/14966
Reviewed by:	dillon@freebsd.org
Submitted by:	Kelly Yancey kbyanc@posi.net
1999-11-18 08:08:28 +00:00
Peter Wemm 50c15101a9 Zap nsio 1999-11-18 07:34:58 +00:00
Warner Losh 6698366077 Sync to latest cardbusdevs file 1999-11-18 07:22:59 +00:00
Peter Wemm 1447114333 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).
1999-11-18 07:22:41 +00:00
Warner Losh c6793aa821 Raw import of newconfig cardbus code. This is effectively an import,
so the code doesn't compile.  I added $FreeBSD$ headers.
1999-11-18 07:21:51 +00:00
Warner Losh 64369dfb59 Initial import of cardbus bridge driver (cbb) from the latest
newconfig code.  This is a raw import and doesn't compile yet.

Obtained from: newconfig project
1999-11-18 07:14:54 +00:00
Warner Losh 10534a60e8 Add modules for cardbus and the cardbus bridge driver. Files needed
to build these to be committed next.

Again, not added to sys/modules/Makefile
1999-11-18 07:11:16 +00:00
Warner Losh d4f495ae99 Newcard's pccard module. It compiles, but doesn't work. This should
make development easier and push the ability of newbus to load busses
to the test.

Not added to sys/modules/Makefile because it isn't ready to break the
nightly snapshots for alpha yet :-).

NOTE: This is only for NEWCARD.  The old pccard stuff will not build
as a loadable module.
1999-11-18 07:02:18 +00:00
Peter Wemm cdacc6ab42 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.
1999-11-18 06:55:40 +00:00
Warner Losh 9e2ba5d186 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.
1999-11-18 06:54:19 +00:00
Peter Wemm e79f2d5bfc 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)
1999-11-18 06:41:30 +00:00
Peter Wemm e92f63a277 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.
1999-11-18 06:39:47 +00:00
Peter Wemm 7fb0a8412a Remove cdevsw_add() - the necessary make_dev() is already there. 1999-11-18 06:37:00 +00:00
Peter Wemm 2c77a71d3d Remove cdevsw_add() - the necessary make_dev() calls appear to be there
already.
1999-11-18 06:34:47 +00:00
Peter Wemm eed9fd425d Fix a warning. 1999-11-18 06:29:57 +00:00
Peter Wemm efa726dd8f 'const'ify a bunch of pointers in the resource_*() functions for accessing
the config hint tables.  This fixes a few warnings elsewhere (eg: fd).
1999-11-18 06:05:30 +00:00
Peter Wemm 71718a6a22 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)
1999-11-18 05:44:56 +00:00
Peter Wemm 38703ed315 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)
1999-11-18 05:43:32 +00:00
Peter Wemm 8de0675c61 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).)
1999-11-18 05:15:09 +00:00
Peter Wemm fb59bcdfa5 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.
1999-11-18 04:31:31 +00:00
Brian Feldman b4ee0d49a3 For now, disable umodem module building, because it doesn't. Don't
want to break the snapshots :)
1999-11-18 04:27:10 +00:00
Peter Wemm 806983a7c0 Move Alpha conflicting entries (98,99) to 135,136. Renumber the zsc
CDEV_MAJOR entry to match..  Is "ipr" in the tree?  I can't find it.
1999-11-18 04:20:23 +00:00
David E. O'Brien f06f71af59 Don't ask about SCO/IBSC2 binary support on the Alpha. 1999-11-18 03:03:01 +00:00
John Polstra e2e3d0a401 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.

Submitted by:	peter
Reviewed by:	jdp
1999-11-18 03:01:06 +00:00
Julian Elischer 1815eed869 fix up a whitespace screwup I made. 1999-11-18 01:23:06 +00:00
Warner Losh e1a0be5f8c 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.
1999-11-17 23:54:39 +00:00
Greg Lehey 26909c8019 Allow octal or hex input.
Suggested-by:	Geoff Steckel <gwes@sitaranetworks.com>
1999-11-17 23:42:09 +00:00
Nick Hibma bdf1e3f204 Add the entry for usb (as opposed to usb<number>). It's minor is equivalent
to usb255 and will be used for the event queue of the usb daemon.
1999-11-17 23:02:34 +00:00
Nick Hibma f83cfc1b03 Change the name of the modules from <name>_mod to <name>
Suggested by:	David O'Brien <obrien@FreeBSD.ORG>
1999-11-17 22:47:11 +00:00
Andrey A. Chernov 08221ae7d5 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
1999-11-17 22:38:02 +00:00
Nick Hibma 3241be7550 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.
1999-11-17 22:33:51 +00:00
Poul-Henning Kamp 6a54425c86 "b_unused1" was.
Fix comment for b_caller[12] fields.

Spotted by:     grog
1999-11-17 21:43:00 +00:00
Poul-Henning Kamp 119ce71e82 Do timeouts in terms of hz
Spotted by:     julian
1999-11-17 21:40:14 +00:00
Poul-Henning Kamp 6153cb2048 Make proc/*/cmdline use the cached argv if available.
Submitted by:   Paul Saab <paul@mu.org>
Reviewed by:    phk
1999-11-17 21:35:07 +00:00
Poul-Henning Kamp 3cf5d0fd07 The function `procfs_getattr()' in procfs doesn't set the value of
vap->va_fsid, so we cannot get valid information about procfs.

Submitted by:   SAWADA Mizuki miz@pa.aix.or.jp
Reviewed by:    phk
PR:     1654
1999-11-17 21:33:25 +00:00
Brian Somers b08210f5fa modfind(char *) -> modfind(const char *)
Reminded by:	dfr
1999-11-17 21:32:40 +00:00
Brian Somers cf0a39401d Fix ``set proctitle'' by using setproctitle(). 1999-11-17 21:12:35 +00:00
Brian Somers 0675e24de0 Make setproctitle(NULL) restore all of the original arguments
(if it's able).
1999-11-17 21:12:17 +00:00
Poul-Henning Kamp 12b4fd063c The logic for blackhole processing does not free mbufs if the
blackhole flag is set.

PR:		14958
Submitted by:	Larry Baird <lab@gta.com>
Reviewed by:	phk
1999-11-17 20:57:49 +00:00
Andrey A. Chernov 0e98576f36 purity change for name length checking code 1999-11-17 20:51:35 +00:00
Andrey A. Chernov 2053e9a314 Merge with OpenBSD whois (with bugfixes missed there)
New features are:
Automatic lookup using *.whois-servers.net
Recursive lookup using Registrar's name
Fallback to InterNIC for non-domains
-m for RADB database
-Q to turn recursion/fallback off

Obtained from:	OpenBSD
1999-11-17 19:11:51 +00:00
Warner Losh 1a50e0c7fe gcc 2.95.2 1999-11-17 18:06:56 +00:00
Archie Cobbs 4e256e6e1b When allocating a new PKTHDR mbuf, always set m->m_pkthdr.rcvif = NULL. 1999-11-17 17:41:22 +00:00
Matt Jacob 44198f294c Fix a couple of boo-boos in the last delta. 1999-11-17 17:11:21 +00:00
Martin Cracauer 6d9efc2432 The pipleline problem introduced in version 1.22 wasn't fully fixed in
1.23. This revision should work for long pipes both in
here-documents/backquote and in normal cases.

Fix works for jmz, bde.
1999-11-17 16:53:34 +00:00