Commit Graph

29930 Commits

Author SHA1 Message Date
Bruce Evans
0878983ab4 Escape $FreeBSD$ in a different way to avoid using the bogus escapes \$
and \F.  Awk just started warning about these.
2002-01-30 10:22:05 +00:00
Alfred Perlstein
eb20931127 Attempt to fixup select(2) and poll(2), this should fix some races with
other threads as well as speed up the interfaces.

To fix the race and accomplish the speedup, remove selholddrop and
pollholddrop.  The entire concept is somewhat bogus because holding
the individual struct file pointers offers us no guarantees that
another thread context won't close it on us thereby removing our
access to our own reference.

Selholddrop and pollholddrop also would do multiple locks and unlocks
of mutexes _per-file_ in the fd arrays to be scanned, this needed to
be sped up.

Instead of using selholddrop and pollholddrop, simply hold the
filedesc lock over the selscan and pollscan functions.  This should
protect us against close(2)'s on the files as reduce the multiple
lock/unlock pairs per fd into a single lock over the filedesc.
2002-01-29 22:54:19 +00:00
Alfred Perlstein
5980a85f08 Backout 1.120, EINVAL isn't a proper error return when the passed fd is
negative, the 'pointer' referred to by the manpage is actually the
struct file's f_offset field.

Pointed out by: bde
2002-01-29 17:12:10 +00:00
Warner Losh
a91e00697e Move cardaddr to memory structure.
Forgotten by: imp
Reminded by: Dave Cornejo
2002-01-29 16:57:50 +00:00
Warner Losh
2781c18f63 Add EDIMAX ethernet card for NEWCARD from NetBSD 2002-01-29 07:08:56 +00:00
Warner Losh
70fe064ad7 Module for exca. Eventually, this will be shared between pcic and pccbb. 2002-01-29 06:53:32 +00:00
Warner Losh
75e5462e30 pccbb needs exca now. 2002-01-29 06:51:09 +00:00
Warner Losh
473a3d8520 Migrate towards using the new exca module for 16bit stuff. This is a
WIP, but works for me.

Also do some minor code factoring and code cleanup while I'm here.
2002-01-29 06:50:18 +00:00
Warner Losh
c3ee5891b9 First draft of common code between pccbb and pcic drivers for talking
to ExCA register sets.  These registers exist in both ISA and PCI
devices in a couple different ways, and this will provide a common
base for future building.  This code is a rehash of the pccbb 16-bit
code, which was a rehash of the pcic code, which was a rehash of the
netbsd i82365 code.  More hashing to come.
2002-01-29 06:48:38 +00:00
Warner Losh
fa3433e1db Minor sorting orders 2002-01-29 06:15:07 +00:00
Warner Losh
dadd95dbbe Sync to 1.27 of pccarddevs 2002-01-29 06:10:15 +00:00
Warner Losh
a3cc3a9e83 MFNetBSD:
1.159: sorting (not relevant to us, since I'd done thie before)
	1.158: joda; Ericsson PRISM2 WIRELEASS LAN CARD.
	1.157: aymeric Edimax Technology ethernet card
2002-01-29 06:09:39 +00:00
Marcel Moolenaar
75387a278e Have SIOCGIFCONF return all (if any) AF_INET addresses for the
interfaces we encounter. In Linux, all addresses are returned for
which gifconf handlers are installed. This boils down to AF_DECnet
and AF_INET. We care mostly about AF_INET for now. Adding additional
families is simple enough.

Returning the addresses is important for RPC clients to function
properly. Andrew found in some reference code that the logic that
handles the retransmission looks for an interface that's up and has
an AF_INET address. This obviously failed as we didn't return any
addresses at all.

Note also that with this change we don't return interfaces that don't
have AF_INET addresses, whereas before we returned any interface
present in the system. This is in line with what Linux does (modulo
interfaces with only AF_DECnet addresses of course :-)

Reported by: "Andrew Atrens" <atrens@nortelnetworks.com>
MFC after: 1 week
2002-01-29 06:00:11 +00:00
Greg Lehey
93bbd4c8da Grr. The last commit contained update conflicts. It just goes to
show that you should check the code even for a forced commit.

Spotted by:	dd
2002-01-29 02:49:15 +00:00
Greg Lehey
60fc37994f Forced commit. The previous commit log was garbled and didn't even
apply to this file.  The correct message is:

throw_rude_remark: Make sure we're holding the config lock before
                   proceeding.  There's no reason to assume that this
                   has ever happened, but the alternative might be a
                   double fault.
2002-01-29 02:14:51 +00:00
Alfred Perlstein
60eda641fb Bump __FreeBSD_version for sendfile fix to properly send 'nbytes' of
file when headers are supplied (version 1.104 of src/sys/kern/uipc_syscalls.c)
2002-01-29 01:52:30 +00:00
Andrew Gallatin
350cb38b1f Simple fixes to get the powerpc kernel compiling again.
Reviewed by:	mp
2002-01-28 14:07:36 +00:00
Søren Schmidt
684c972cd6 Add support for the Promise TX4.
Rearrange the support for the VIA chips, and add experimental
support for ATA133 on the newest chips.
2002-01-28 13:17:10 +00:00
Søren Schmidt
2405c1cef4 Enable pccard support. 2002-01-28 13:13:14 +00:00
Søren Schmidt
d2e812582d Add support for pccard.
submitted by: imp
2002-01-28 13:12:16 +00:00
Josef Karthauser
a07e9d4af3 Merge from NetBSD.
uhub.c:     revision 1.37
    usb.4:      revision 1.30
    usb.c:      revision 1.38
    usb.h:      revision 1.40
    usb_port.h: revision 1.21
    usb_subr.c: revision 1.65
    usbdi.h:    revision 1.40

Split the attach/detach events up into device, driver and controller
attach and detach events.

The commit message from NetBSD was:
        date: 2000/02/02 07:34:00;  author: augustss;  state: Exp;
        Change the USB event mechanism to include more information
        about devices and drivers.  Partly from FreeBSD.

Also rework usbd to take these new event types into account.
2002-01-28 01:03:19 +00:00
Scott Long
60d1d6861b Recent changes to newpcm require that the CHANNEL_SETFORMAT op return 0
for success, non-zero otherwise.  The maestro and maestro3 drivers were
returning the format code, which was being interpreted as a failure code.
Fixed.  No one seems to have noticed that the maestro driver was broken,
but I'll fix it anyways.

MFC after:	2 weeks
2002-01-27 23:09:41 +00:00
Andrew Gallatin
694ff26473 Prevent the kernel from generating an unaligned sysctl data buffer on
64-bit platforms.  The unaligned access is caused by struct ifa_msghdr
not being a multiple of 8-bytes in size.  If an interface has an odd
number of addresses, this causes the next interface to generate an
unaligned access in the user-level app walking the interfaces (ifconfig).

Submitted by: Bernd Walter <ticso@cicely8.cicely.de>
2002-01-27 20:39:01 +00:00
Joerg Wunsch
87fa2d16c3 Unbreak pcvt, it suffered from common variables. Whoever added the
-fno-common could not have possibly compiled LINT afterwards with
this...
2002-01-27 09:17:27 +00:00
Greg Lehey
98912ee8cc vinumioctl: Fix a double fault caused by calling setjmp() without holding the config lock. The call was in fact superfluous. 2002-01-27 04:20:52 +00:00
John Polstra
586d7c2ef0 Add support for the Netgear GA302T 10/100/1000 adapter. Given that
it's a 32-bit card, it's quite nice for $75.

MFC after:	3 days
2002-01-27 01:00:16 +00:00
Cameron Grant
b8a3639565 * improve error handling
* be more specific in verbose boot messages
* allow the feeder subsystem to veto pcm* attaching if there is an error
  initialising the root feeder
* don't free/malloc a new tmpbuf when resizing a snd_dbuf to the same size as
  it currently is
* store the feeder description in the feeder structure instead of mallocing
  space for it
2002-01-26 22:13:24 +00:00
Josef Karthauser
67a2e47022 Rearrange the code in USB_DETACH, so that it's like NetBSD's. No
functional change.
2002-01-26 14:00:25 +00:00
Josef Karthauser
eb92aa3c3e Back out the last commit. I committed the wrong file by accident.
The commit message wasn't relevant to that change.  This code will
be committed later.
2002-01-26 13:57:08 +00:00
Josef Karthauser
7fac607b74 Rearrange the code in USB_DETACH, so that it's like NetBSD's.
No functional change.
2002-01-26 13:52:53 +00:00
Josef Karthauser
3d21044dd1 Update the $NetBSD$ ident. 2002-01-26 13:09:52 +00:00
Josef Karthauser
baf3f0817e Reduce the diffs between NetBSD and our version where appropriate
(comments, etc.)
2002-01-26 13:08:57 +00:00
Josef Karthauser
31c1f0005b Merge from NetBSD:
usb.c:	revision 1.39

	revision 1.39
	date: 2000/02/22 11:30:56;  author: augustss;  lines: +7 -1
	Prepare a little for having USB interrupt processing done
	outside the hard interrupt level (in a thread or a softintr).
	No real soft processing done yet.
2002-01-26 12:48:57 +00:00
Josef Karthauser
29ac7b3190 Merge from NetBSD:
usb.c:	revision 1.41

	revision 1.41
	date: 2000/03/16 00:46:38;  author: augustss;  lines: +2 -2
	Make the USB event queue longer.  Mine overflows before the
	(user-land) event handler has started.  But then I have
	about 25 devices connected. :)
2002-01-26 12:40:03 +00:00
Josef Karthauser
c2e0959f73 Update the $NetBSD$ ident to show that some patches have been applied
in the past.
2002-01-26 12:25:32 +00:00
Josef Karthauser
b7e4eb198d Merge from NetBSD:
ohci.c:	revision 1.72 and 1.73
    ohcivar.h:	revision 1.19 and 1.20
    uhci.c:	revision 1.85
    usbdi.h:	a small part of revision 1.40
    usbdivar.h:	revision 1.47

Relevant commit messages from NetBSD are:

	date: 2000/02/22 11:30:54;  author: augustss;  state: Exp;
	Prepare a little for having USB interrupt processing done
	outside the hard interrupt level (in a thread or a softintr).
	No real soft processing done yet.
	----------------------------
	date: 2000/02/01 05:42:53;  author: augustss;  state: Exp;
	Put some #ifdefs around power and shutdown hooks.
2002-01-26 12:04:22 +00:00
Crist J. Clark
56962689cc The ipfw(8) 'tee' action simply hasn't worked on incoming packets for
some time. _All_ packets, regardless of destination, were accepted by
the machine as if addressed to it.

Jump back to 'pass' processing for a teed packet instead of falling
through as if it was ours.

PR:		kern/31130
Reviewed by:	-net, luigi
MFC after:	2 weeks
2002-01-26 10:14:08 +00:00
David Malone
d2979f90e7 Remove a parameter name from a prototype. 2002-01-25 21:33:10 +00:00
Poul-Henning Kamp
05a2f79888 Be more conservative about interrupt latency, it aint getting better it seems. 2002-01-25 21:22:34 +00:00
Poul-Henning Kamp
3e72822404 Make st_blksize default to PAGE_SIZE instead of zero. 2002-01-25 16:39:57 +00:00
Scott Long
436c9b651a Fix code that had rotted behind debugging macros.
Approved by:	cg (in principle)
MFC after:	2 weeks
2002-01-25 04:14:12 +00:00
Cameron Grant
be27d718c0 a buffer offset equal to the buffer size is illegal too, fix assertion in
sndbuf_getbufofs()
2002-01-25 02:39:34 +00:00
Cameron Grant
f8db81f347 cosmetic change, free b instead of c->bufhard for consistency within
chn_kill()
2002-01-25 02:36:22 +00:00
Matthew Dillon
4fbd563eb8 Make the 'maxusers 0' auto-sizing code slightly more conservative. Change
from 1 megabyte of ram per user to 2 megabytes of ram per user, and
reduce the cap from 512 to 384.  512 leaves around 240 MB of KVM available
while 384 leaves 270 MB of KVM available.  Available KVM is important
in order to deal with zalloc and kernel malloc area growth.

Reviewed by:	mckusick
MFC: either before 4.5 if re's agree, or after 4.5
2002-01-25 01:54:16 +00:00
Crist J. Clark
f7a54d06e5 Have sysctl() return the correct errno(2) as documented in the
sysctl(3) manpage.

Submitted by:	ru
Obtained from:	BSD/OS
2002-01-25 00:50:49 +00:00
Poul-Henning Kamp
9118ec5a27 Yet a bug with extensible sbufs being marked as OVERFLOWED. This time
because of a signed/unsigned problem.

Approved by:	DES
2002-01-24 20:57:56 +00:00
Josef Karthauser
46d0cbc2cd Merge from NetBSD:
usb.c:	-r1.35 - 1.37
    usb_port.h:	tiny bit of -r1.26 + an extra bit in the FreeBSD config section.

	revision 1.37
	date: 2000/01/24 18:35:51;  author: thorpej;  state: Exp;  lines: +7 -1
	Use config_pending.
	----------------------------
	revision 1.36
	date: 1999/12/22 23:54:09;  author: augustss;  state: Exp;  lines: +2 -2
	Use the flags `locator' to govern if devices are detected early or
	late during cold boot.
	----------------------------
	revision 1.35
	date: 1999/12/20 02:12:23;  author: augustss;  state: Exp;  lines: +8 -5
	Make sure tsleep() is not called during cold boot.
2002-01-24 20:21:17 +00:00
Jonathan Lemon
cd75bfa75f Add entry for EVFILT_NETDEV, which was inadverdently omitted back in Sept. 2002-01-24 17:20:55 +00:00
Guido van Rooij
a3e5380a47 1) Fix a debug statement by filling in its data before the printf in
stead of after
2) Honour NO_TEST_UNIT_READY quirk for atapi devices as well
3) Actually support FujiFilm FinePix 6800 camera's. Will very likely also
work for other FinePix models.

Based on a debug session about half a year ago with Nik Hibma.
MFC after:	2 weeks
2002-01-24 15:10:53 +00:00
Andrew Gallatin
ae967e6461 Regenerated file from previous commit to syscalls.master 2002-01-23 22:47:47 +00:00