Commit Graph

55354 Commits

Author SHA1 Message Date
Søren Schmidt
bd442d2547 Try better this time at a patch that properly backspeeds on the Acer chips. 2001-01-07 17:00:09 +00:00
Søren Schmidt
dc194d46e4 On open try to close the drivetray and wait for drive ready.
Idea from PR24109 but implemented differently
2001-01-07 16:48:56 +00:00
Warner Losh
486d464d74 o Now that I've had time to test the new interface, reintegrate it back in.
o Fix OLDCARD to use the new interface.
o Rename the offsetp argument to deltap to more closely reflect what it
  is returning (it returns the delta from the requested value to the actual
  value).
o Remove duplicate $FreeBSD$ in pccbb.c
o Allow deltap to be NULL.
o Convert new isa pcic driver and add XXX comments that this function isn't
  actually implemented there (which means that NEWCARD pccard stuff won't
  work there until it is).
o Revert attempts to make old inferface work in NEWCARD.

Subitted by: peter (Parts of the new version code)
2001-01-07 16:31:09 +00:00
Peter Wemm
568ffd8885 The ep pccard code had newcard hooks added to it, but it isn't being
compiled under newcard yet.  ep works just fine under newcard with the
missing ID matching code added (not committed yet):
ep0: <3Com 3c589 10Mbps Ethernet> at port 0x300-0x30f irq 9 function 0
     config 1 on pccard1
ep0: Ethernet address 00:10:4b:df:48:57
2001-01-07 13:55:42 +00:00
Warner Losh
1bc96f7afd Undo the interface change to CARD_GET_MEMORY_OFFSET. It wasn't tested
by even a compile of the OLDCARD code, was unapproved by me the keeper
of OLDCARD and broke OLDCARD and the ray driver.

Adjust new code to cope with the older interface.

If the interface changes in the future, it ***MUST*** be cleared by me
so that the OLDCARD impacts taken into account.  It code in card_if.m
is used jointly by both OLDCARD and NEWCARD.
2001-01-07 08:08:54 +00:00
KATO Takenori
e93f5a3faa Merged from sys/i386/i386/machdep.c revision 1.426. 2001-01-07 07:59:19 +00:00
Boris Popov
005b575313 Common option '-N' do not require an argument. 2001-01-07 07:03:59 +00:00
Peter Wemm
57a0ee63f0 Fix gdb -k after jake's most recent commit. The gd_XXX symbols are now
offsets in all cases, and we have to find the base address (&__globaldata)
ourselves for the UP case as well as SMP.
2001-01-07 05:08:39 +00:00
Peter Wemm
7e6e7300d0 We do not, and hopefully never will, use the static pccard device table. 2001-01-07 03:58:57 +00:00
Benno Rice
199a2415c0 PowerPC atomic operation functions.
Some of these are dependant on an inline function (powerpc_mb()) that is
yet to come.

Reviewed by:	obrien
2001-01-07 03:46:01 +00:00
Benno Rice
6a76a4e1af PowerPC assembler #defines.
Reviewed by:	obrien
Obtained from:	NetBSD
2001-01-07 03:43:21 +00:00
Peter Wemm
e4b36f7dd8 It is unlikely that we'll be supporting old-style ZMAGIC linux a.out
binaries on anything but i386.. (ia64, sparc64, etc)  Invert the .if
so that it is inclusive of i386 platforms rather than excluding just
the alpha.
2001-01-07 03:10:15 +00:00
Peter Wemm
7020326332 Add the defines for the cardbus extensions for 32 bit addressing. This
gets the cardbus code to compile, and I was successfully able to map
the CIS into high memory and probe/attach a 16 bit pccard.

Jonathan: feel free to replace this with your version if you want -
this is an expedient hack to get things to build and appear to work.
2001-01-07 02:26:40 +00:00
John Baldwin
a2ef1c8726 Don't announce that rc.${MACHINE_ARCH} is doing the syscons configuration
as the previous line already tells us we are in rc.${MACHINE_ARCH}.  This
also allows more syscons configuration messages during startup to fit on
one line.

Reviewed by:	dougb
2001-01-07 01:11:44 +00:00
Archie Cobbs
dceab8ea63 When pcap_compile() detects an error, it longjmp()'s out of the
scanner/parser. FreeBSD recently made 'flex' its default implementation
of 'lex'. One of the incompatibilities of 'flex' vs. 'lex' is that
if you longjmp() out of the scanner, you must call yyrestart()
before doing another scan (as documented in flex(1)). So add an
invocation to yyrestart() in lex_init(). This change should be
backwards compatible with the original 'lex'.

PR:	bin/24116
2001-01-07 00:26:32 +00:00
Bosko Milekic
ad4032fe09 *Blush* Fix a dumb typo in previous commit.
Pointed out by: phk
2001-01-06 23:36:42 +00:00
Brian Feldman
39567f8cee Fix a long-standing bug that resulted in a dropped session sometimes
when an X11-forwarded client was closed.  For some reason, sshd didn't
disable the SIGPIPE exit handler and died a horrible death (well, okay,
a silent death really).  Set SIGPIPE's handler to SIG_IGN.
2001-01-06 21:15:07 +00:00
Archie Cobbs
42cebaa5c0 Fix bugs in the handling of > 8 positional arguments:
- The stack was getting smashed by __grow_type_table()
- reallocf() was being called with the wrong pointer
- The maximum argument number was being incorrectly computed

PR:	misc/23521
2001-01-06 20:48:00 +00:00
Bosko Milekic
e1a0b830b5 Make sure musycc driver deals with the possibility of any type of mbuf
allocation not succeeding.

In this case, make sure the driver doesn't leak any memory by freeing all
necessary buffers; make sure to loop and free all the previously allocated
mbufs in this routine.

Reviewed by: alfred
2001-01-06 20:44:39 +00:00
Jake Burkholder
f8761e53a7 Implement accessors for per-cpu variables which don't depend on the
symbols in globals.s.

	PCPU_GET(name) returns the value of the per-cpu variable
	PCPU_PTR(name) returns a pointer to the per-cpu variable
	PCPU_SET(name, val) sets the value of the per-cpu variable

In general these are not yet used, compatibility macros remain.

Unifdef SMP struct globaldata, this makes variables such as cpuid
available for UP as well.

Rebuilding modules is probably a good idea, but I believe old
modules will still work, as most of the old infrastructure
remains.
2001-01-06 19:55:42 +00:00
John Baldwin
12e275aaee Use a unified libgcc rather than a seperate one for threaded and
non-threaded programs.  This provides threaded programs with the
needed exception frame symbols.

parts submitted by:	Max Khon <fjoe@iclub.nsu.ru>
PR:	23252
2001-01-06 18:59:46 +00:00
Wilko Bulte
f994ec91d8 Try, as much as possible, the messy situation around SCSI adapters on the
EB164 family. The mess is such that it is hard to document, but try to do the
best we can.

Submitted by:	Christian Weisgerber <naddy@mips.inka.de>
2001-01-06 18:18:44 +00:00
Wolfram Schneider
47ecee5e83 Off by one error in reading mmap data.
Submitted by: Martin Kraemer <Martin.Kraemer@Fujitsu-Siemens.com>
2001-01-06 18:17:06 +00:00
Jonathan Chen
0c95c70577 * Better kld support in pccbb/cardbus
- pccbb no longer needs to remember whether a card is inserted.
  - pccbb reissues insertion on load of cardbus/pccard modules.
  - got rid of unnecessary delays in power functions.
  - Cardbus children are no longer deleted if probe/attach fails.
  - non-attached child devices are reprobed at driver_added.

* CARD interface to read CIS
  - added card_cis_read/card_cis_free interface to read arbitrary CIS
    data.  This currently is only implemented in cardbus.

* pccard begins to work
  - pccard can now use higher memory space (and uses it by default).
  - set_memory_offset interface changed.
  - fixed ccr access, which was broken at multiple locations.
  - implement an interrupt handler - pccard can now share interrupts.
  - resource alloc/release/activate/deactivate functions gutted: some
    resources are allocated by the bridge before the child device is
    probed or attached.  Thus the resource "belongs" to the bridge, and
    the pccard_*_resource functions need to fudge the owner/rid.
  - changed some error conditions to panics to speed debugging.

* Mutex fix - Giant is entered at the beginning of thread
2001-01-06 18:04:55 +00:00
Jake Burkholder
41ed17bfec Use %fs to access per-cpu variables in uni-processor kernels the same
as multi-processor kernels.  The old way made it difficult for kernel
modules to be portable between uni-processor and multi-processor
kernels.  It is no longer necessary to jump through hoops.

- always load %fs with the private segment on entry to the kernel
- change the type of the self referntial pointer from struct privatespace
  to struct globaldata
- make the globaldata symbol have value 0 in all cases, so the symbols
  in globals.s are always offsets, not aliases for fields in globaldata
- define the globaldata space used for uniprocessor kernels in C, rather
  than assembler
- change the assmebly language accessors to use %fs, add a macro
  PCPU_ADDR(member, reg), which loads the register reg with the address
  of the per-cpu variable member
2001-01-06 17:40:04 +00:00
David E. O'Brien
c68159a6d8 Use a consistent style and one much closer to the rest of /usr/src 2001-01-06 14:00:42 +00:00
Alexander Langer
e2a2e8c7e0 gethostbyname2() is able to lookup AF_INET6.
PR:		23823
Noticed by:	Andrew Arensburger <arensb@ooblick.com>
2001-01-06 12:48:43 +00:00
Jeroen Ruigrok van der Werven
cbfa684843 We don't use += for SRCS in Makefiles, we simply use the
line continuation character and state the rest of the sourcefiles
on the next line.
2001-01-06 09:44:30 +00:00
Alfred Perlstein
0bad156a91 Limit size of passed in data for utrace function.
Requested by: rwatson
Obtained from: NetBSD
2001-01-06 09:34:20 +00:00
John Baldwin
0189f472ae Add commented out examples for the new KTR loader tunables. 2001-01-06 06:52:49 +00:00
John Baldwin
a0a7328bb0 - Move all of the KTR sysctl's under a new debug.ktr mib.
- Provide TUNABLE_INT() hooks for ktr_cpumask, ktr_mask, and ktr_verbose
  so that they can be set from the loader by their respective sysctl names.
  For example, to turn on KTR_INTR and KTR_PROC in ktr_mask, one could
  stick 'debug.ktr.mask="0x1200"' in /boot/loader.conf.
2001-01-06 06:51:43 +00:00
Jun Kuriyama
33dc87aa84 Fix typo.
Pointed out by:	Motomichi Matsuzaki <mzaki@e-mail.ne.jp>
2001-01-06 06:20:54 +00:00
David E. O'Brien
3f6014e672 Use a unified libgcc rather than a seperate one for threaded and
non-threaded programs.  This provides threaded programs with the
needed exception frame symbols.

parts submitted by:	Max Khon <fjoe@iclub.nsu.ru>
PR:	23252
2001-01-06 06:16:31 +00:00
David E. O'Brien
cad1dd7bb4 Force strong references to several pthread_* functions which are weakly
referenced to by libgcc.a.

This is needed when linking statically as SVR4 (ie, ELF) behavior is to only
link in a module if it satisfies an undefined strong reference from somewhere.
(this surprises a lot of people) Things are different when using shared libs,
the entire library and its modules and their symbols are available at run-time
(when the weak reference is seen to still be unsatisfied and is satisfied on
the spot), this is not the case with static libs.

Thus one can have a static binary with unresolved week references, and at
run-time dereference a NULL pointer.

Submitted by:	eischen
2001-01-06 06:07:52 +00:00
Julian Elischer
069154d55f Rewrite of netgraph to start getting ready for SMP.
This version is functional and is aproaching solid..
notice I said APROACHING. There are many node types I cannot test
I have tested: echo hole ppp socket vjc iface tee bpf async tty
The rest compile and "Look" right.  More changes to follow.
DEBUGGING is enabled in this code to help if people have problems.
2001-01-06 00:46:47 +00:00
Alfred Perlstein
3269187d41 provide a sysctl 'net.link.ether.inet.log_arp_wrong_iface' to allow one
to supress logging when ARP replies arrive on the wrong interface:
 "/kernel: arp: 1.2.3.4 is on dc0 but got reply from 00:00:c5:79:d0:0c on dc1"

the default is to log just to give notice about possibly incorrectly
configured networks.
2001-01-06 00:45:08 +00:00
John Baldwin
5192404af2 Protect p_nice and P_TRACED in psignal() above the switch statement with
sched_lock.
2001-01-06 00:08:39 +00:00
Justin T. Gibbs
f8838555e8 aic7xxx.c:
aic7xxx.h:
	First pass at big-endian support in the Core.

	Capture state for second channel on TWIN channel adapters
	for suspend and resume.

aic7xxx_freebsd.h:
	Stubs for endian conversion functions.  These will get filled
	out once we get an official kernel api for this kind of thing
	that is something more elegant and efficient than a bunch of
	manual swaps #ifdefed by platform.

aic7xxx_pci.c
	Allow the second channel of motherboard aic7896 chips to be attached.
	It turns out that the encoding of the subdevice id differs between
	PCI cards and MB based controllers and our check to see, via
	the subvendor id, if the second channel was "stuffed" always
	turned out negative.
2001-01-05 19:15:37 +00:00
Will Andrews
f697348034 Reinstate revision 1.11:
BDECFLAGS; ANSIfy; use EXEC instead of "exec " where appropriate; use
proper types (size_t, int); use proper variable names for certain things;
get rid of static 'cache' style stuff by moving and sanitizing the
original SHELL checking code to main(), this also makes it easier to
free() the string; rename file-scope system() to exec_shell(); use
snprintf() everywhere instead of sprintf(); actually remember to free()
other malloc()'d char pointers in main().

I left out the -s option in this revision along with getusershell()
checking because of objections made by Warner Losh <imp> and Garrett
Wollman <wollman>.  I agreed with their assertions that such code was
unnecessary in a program like this.

I dare people to make this coredump now.

Some suggestions:	nectar (snprintf() truncate checking)
Reviewed by:		markm, eivind, jedgar
Tortured by:		examples in apply(1), fuzz(1),
			and a lot of random ideas I came up with
2001-01-05 18:15:17 +00:00
Nicolas Souchu
c05aa33cb0 Add the VESA S3 linear framebuffer driver. It works on top of VESA by replacing
the video switch by another. Exactly as VESA does on top of VGA.

It adds linear framebuffer to S3 VESA 1.2 cards.

Obtained from:	The original S3 ISA code comes from
                Peter Horton <pdh@colonel-panic.com>
2001-01-05 16:53:10 +00:00
Nicolas Souchu
b3fc615726 Remove vga_pci generic driver.
Approved by:	Mike Smith <msmith@freebsd.org>
2001-01-05 16:40:30 +00:00
Søren Schmidt
f0915b3708 Oops the test in the Acer code should be >= not >. 2001-01-05 15:23:06 +00:00
Nick Hibma
3b980312b4 Bugfix: device_resume should be connected to bus_generic_resume not
*_suspend.

Submitted by:	kazu
2001-01-05 10:25:47 +00:00
Warner Losh
38c490a10f Make this file conform mostly to style(9):
o Use 8 space hard tabs
o Eliminate trailing white space (while I'm here, just in a couple of places)
o wrap mostly at 80 columns (printf literal strings being the notable
  exception)
o use return (foo) consistantly
o use 0 vs NULL more consistantly
o use queue(3) xxx_FOREACH macros where appropriate (some places used it
  before, others didn't).
o use BSD line continuation parameters

Pendants will likely notice minor style(9) violations, but for the
most part the file now looks much much closer to style(9) and is
mostly self-consistant.

Approved in principle by: dfr
Reviewed by: md5 (no changes to the .o)
2001-01-05 07:29:54 +00:00
John Baldwin
0f32b57ac4 Call mixer_hwinit() when attaching. 2001-01-05 07:07:48 +00:00
John Baldwin
cc486d8061 - Make the 'hwvol_mixer' and 'hwvol_step' variables be specific to a
specific snd_mixer device rather than global across all mixers.
- Add per-mixer mute status and saved mute_level so that the mixer_hwmute()
  function can now toggle the mute state when the mute button is pressed.
- Create a dynamic sysctl tree hw.snd.pcmX when a pcm device is registered.
- Move the hw.snd.hwvol_* sysctl's to hw.snd.pcmX.hwvol_* so that they
  are now properly device-specific.  Eventually when the mixers become
  their own devices these sysctl's will move to live under a mixerX tree.
- Change the interface of the hwvol_mixer sysctl so that it reports the
  name of the current mixer device instead of the number and is settable
  with the name instead of the number.
- Add a new function mixer_hwinit() used to setup the dynamic sysctl's
  needed for the hwvol support that can be called by drivers that support
  hwvol.

Reviewed by:	cg
2001-01-05 07:07:03 +00:00
John Baldwin
c5f9b6d075 - For dynamic sysctl's added at runtime, don't assume that the name passed
to the SYSCTL_ADD_FOO() macros is a constant that should be turned into
  a string via the pre-processor.  Instead, require it to be an explicit
  string so that names can be generated on the fly.
- Make some of the char * arguments to sysctl_add_oid() const to quiet
  warnings.
2001-01-05 07:00:45 +00:00
John Polstra
27e2c03506 Fix a bug in which a program called dlclose from a destructor and
got an assert failure in the dynamic linker.
2001-01-05 04:36:17 +00:00
Sergey Babkin
e3fc8aba7f Changed the copyright notice to BSD-style. The original GPL copyright
was used due to confusion. Now this code should be moved out of the
gnu ghetto subdirectory.
2001-01-05 02:12:02 +00:00
John Baldwin
6d97297a6a The 'maxchans' count is one more than the number of channels, so
'chancount' never got up to equaling 'maxchans'.  As a result,
pcm_makelinks() was never called, and one always had to set the sysctl to
get the /dev/mixer and other symlinks generated in the DEVFS case.  Instead,
change the test in pcm_addchan() to call pcm_makelinks() after the first
channel is initialized, since the aliases are linked to channel 0.

Reviewed by:	cg
2001-01-04 23:49:00 +00:00