Commit Graph

23838 Commits

Author SHA1 Message Date
Peter Wemm
6f39832c71 This cannot possibly be right:
foo(int *nret)
{
   for (i = 0; i < nret; i++) {
      free(array[i], ....
Fix to do the logically correct thing..  (s/nret/*nret/)
2001-01-07 20:52:42 +00:00
Warner Losh
584d978729 This file follows style(9), so adjust various nits in the last few commits
to conform to style(9), plus one other convention that I use:
o Declare variables at the start of the function, rather than in blocks
  when it doesn't help understanding (mine).
o 80 column limit.
o BSD style statement continuation, rather than "gnu" style.
2001-01-07 20:40:23 +00:00
Warner Losh
2f58d9cc31 For bus_setup_intr, cookiep is a pointer to storage for the parent
bus to use.  We need to set it here.

This fixes the problem where a probe routine establishes and
disestablishes the interrupt and then we get a panic in the probe
routine.

However, we pass the pointer to the interrupt hanlder count to the
parent bus, which writes its own cookie there, so there may be some
problems with that which isn't apparent at the moment.

Commit made from: laptop running NEWCARD with sn driver (which works,
but gets the wrong ethernet address).
2001-01-07 20:36:27 +00:00
Robert Watson
077689ad05 o Correct typos in comment fields.
o Update copyright to 2001.

Submitted by:	jedgar
2001-01-07 19:21:06 +00:00
Nick Hibma
f778f0c79c Remove cdevsw when unloading the vn module.
Submitted by:	dunno... :-(
2001-01-07 19:03:14 +00:00
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
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
Bosko Milekic
ad4032fe09 *Blush* Fix a dumb typo in previous commit.
Pointed out by: phk
2001-01-06 23:36:42 +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
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
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
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
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
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
Matthew Dillon
d2d00d11be NFS O_EXCL file create semantics temporarily uses file attributes to store
the file verifier.  The NFS client is supposed to do a SETATTR after a
successful O_EXCL open/create to clean up the attributes.  FreeBSD's
client code was generating a SETATTR rpc but was not generating an access
or modification time update within that rpc, leaving the file with a
broken access time that solaris chokes on (and it doesn't look very
nice when you ls -lua under FreeBSD either!).    Fixed.
2001-01-04 22:45:19 +00:00
Peter Wemm
8a10dafbd8 use 'profile 2' instead of 1, since it causes more code to be tested. 2001-01-04 19:23:33 +00:00
Warner Losh
94648ce60d Add the ES1681, as found in my Digital HiNote UltraII. It works with
the ES18xx DSP code and is now my MP3 juke box engine.

Reviewed by:	cg
2001-01-04 17:12:57 +00:00
Nick Hibma
f0b8108f1d Fix a bug in both scripts: HEADER sections were not emitted to the header
file.

While there fix the layout of function headers (noticable in long headers)

Fix up some style nits. It's Perl and should be written in that style.
2001-01-04 13:41:24 +00:00
Søren Schmidt
b4de9f62a4 Add support for using BurnProff(tm) on drives that support it.
This is experimental as I dont have such a drive, reports welcome!!
2001-01-04 12:43:39 +00:00
Nick Hibma
1458cde760 Readd the id removed by sheldon in the previous commit to uscanner.c.
Change the ID in if_aue.c to match the new name in usbdevs.h.
2001-01-04 11:55:24 +00:00
Nick Hibma
95e5d98749 UMASS_DEBUG implemented panic(9).
PR:		24044
Submitted by:	Mike Bristow <mike@urgle.com>
2001-01-04 11:27:41 +00:00
Nick Hibma
5a5b0c4efa Regen.
(Sorry for forgetting that).
2001-01-04 11:23:21 +00:00
Sheldon Hearn
63ccc06ffe Revert rev 1.8, which broke the installkernel target. 2001-01-04 11:12:15 +00:00
Søren Schmidt
6ddc41c034 Proberly calculate the RAID structure on the Promise Fasttrak. 2001-01-04 09:11:00 +00:00
David E. O'Brien
d4cfb42174 StrongARM platform-specific definitions. 2001-01-04 05:23:06 +00:00
Garrett Wollman
fe8df3b66e Move `struct selinfo' and related functions to <sys/selinfo.h>.
Bump __FreeBSD_version to reflect the move.
For the moment, <sys/select.h> includes <sys/selinfo.h> to allow
clients time to catch up.

Changes made in preparation for SUSv2/POSIX <sys/select.h> requirements.
2001-01-04 03:29:16 +00:00
Alfred Perlstein
da289f07ee Fix incorrect logic wouldn't disconnect incomming connections that had been
disconnected because they were not full.

Submitted by: David Filo
2001-01-03 19:50:23 +00:00
Nick Hibma
7b58790dbf Add the Id of the Epson 1640 scanner.
Submitted by:	Chris Shenton <chris@shenton.org>
2001-01-03 11:46:09 +00:00
Nick Hibma
801a3c8a40 Add a few Ids. From NetBSD. 2001-01-03 11:45:03 +00:00
John Hay
121a47e264 Make sppp a kld. 2001-01-03 08:12:30 +00:00
Nicolas Souchu
c89863e8b9 Remove alpm numbering. 2001-01-03 07:39:07 +00:00
John Baldwin
fa465e99e0 Rename the loader tunable from hw.sndunit to hw.snd.unit.
Submitted by:	cg
2001-01-03 02:09:31 +00:00
John Baldwin
1b40801722 - When acknowledging interrupts, write the value 0xff to the interrupt
status register rather than 0.  Without this, a single hardware volume
  event triggers an interrupt storm.
- Implement hardware volume control for the Maestro chips.  This version
  only handles the case where both channels are adjusted at the same time.

Reviewed by:	cg
2001-01-03 01:32:57 +00:00
John Baldwin
d0d4e34743 Add a new API for soundcards that have hardware volume control:
- The mixer_hwmute() function can be called when a soundcard receives a
  mute request.
- The mixer_hwstep() function can be used to adjust the volume of one or
  both channels.
- The 'hw.snd.hwvol_step' sysctl determines the amount that mixer_hwstep()
  adjusts the volume by on each call.
- The 'hw.snd.hwvol_mixer' sysctl specifies the mixer device to adjust the
  volume on for both functions.  The values used correspond to the
  SOUNDCARD_MIXER_* constants.
2001-01-03 01:29:47 +00:00
John Baldwin
b3b7ccfe38 Create a new sysctl node 'hw.snd' and move 'hw.sndunit' to
'hw.snd.unit'.

Reviewed by:	cg
2001-01-03 01:25:26 +00:00
Warner Losh
a5eccf28a8 Add device id for the OZ Micro 6832. I didn't try to init it like the
Cirrus Logic parts that end in 6832, but maybe some machines will need
that in the future.
2001-01-02 21:42:48 +00:00
Warner Losh
e2f9e1a37f add pcic_p to the list of things built 2001-01-02 21:40:41 +00:00
Nicolas Souchu
adb50a3799 Cleanup and improve mode detection. Now, you should get what you actually
want according to the modes set with the ppc(4) flags. Especially, it
should fix some problems with mode detection of parallel chipsets
configured to EPP but which have timing troubles with the drives. In such
a case, the driver should now fall back to slower modes (PS2, NIBBLE).
2001-01-02 21:29:06 +00:00
Nicolas Souchu
a4401cc62f Remove old PCI compatibility.
Submitted by:	Andrew Gallatin <gallatin@freebsd.org>
2001-01-02 21:19:32 +00:00
Duncan Barclay
2ae2c42c38 Tidy up if_init routine so that it does not return an error. 2001-01-02 20:29:25 +00:00
John Baldwin
3e6831f510 The previous commit wasn't entirely correct. At least one goto to the
out: label in psignal() did not grab sched_lock before trying to release
it.  Also, the previous version had several cases where it grabbed
sched_lock before jumping to out: unneccessarily, so rework this a bit.
The runfast: and out: labels must be called with sched_lock released, and
the run: label must be called with it held.  Appropriate mtx_assert()'s
have been added that should catch any bugs that may still be in this
code.

Noticed by:	bde
2001-01-02 18:54:09 +00:00
Hajimu UMEMOTO
41027e03dd do not touch ra_addr if it is NULL. from IIJ SEIL team
Obtained from:	KAME
2001-01-02 15:17:19 +00:00
Poul-Henning Kamp
1550c317bf Fix the <sys/queue.h> abuse.
Submitted by:	Dima Dorfman <dima@unixfreak.org>
Reviewed by:	/sbin/md5
2001-01-02 11:51:55 +00:00
Noriaki Mitsunaga
925c0d6804 Remove conflicts between unsinged char *s and int s.
It was possible cause of kernel panic.

Pointed Out by: phk@FreeBSD.ORG
2001-01-02 10:41:50 +00:00
Poul-Henning Kamp
7f9cb01893 Add an XXX about a <sys/queue.h> transgression which needs cleaned up. 2001-01-02 10:34:09 +00:00
Poul-Henning Kamp
637f671a3d Either cvs(1) or I forgot this file in my last commit.
Please see commit log for rev 1.4 of src/sbin/mdconfig/mdconfig.c
2001-01-02 09:42:47 +00:00
Peter Wemm
e6de111aca Newbusify the PCI PDQ (fddi) attachment. This isn't as clean as
the EISA attachment and has not been tested (no hardware!), but at least
it stands a chance at working.  At least it compiles now.
2001-01-02 09:30:48 +00:00
Takanori Watanabe
7a1d55dfd0 Change Embedded Controller lock to ACPI Global Lock.This is needed for
mutual execution between  BIOS and OS.
2001-01-02 05:22:35 +00:00
David E. O'Brien
27499504db PowerPC platform-specific definitions (modeled on sys/i386/include/setjmp.h) 2001-01-02 00:34:24 +00:00
David E. O'Brien
fc6766687f PowerPC platform-specific definitions (modeled on sys/i386/include/types.h) 2001-01-02 00:30:49 +00:00
David E. O'Brien
dfeade78eb Minor style tweaks. 2001-01-02 00:11:41 +00:00
David E. O'Brien
445c6d2051 PowerPC platform-specific definitions (modeled on sys/i386/include/param.h) 2001-01-02 00:06:45 +00:00
David E. O'Brien
1519f58fef MP shells for the PowerPC platform. 2001-01-01 23:45:11 +00:00
David E. O'Brien
f91f288d42 PowerPC platform-specific page size setting. 2001-01-01 23:26:39 +00:00
David E. O'Brien
fa561e1e20 PowerPC platform-specific definitions.
Obtained from:	NetBSD (parts)
2001-01-01 23:19:22 +00:00
Poul-Henning Kamp
8eb6e436e8 Remove a bogus #ifdef KTR stanza.
Noticed by:	Alexander Langer <alex@big.endian.de>
2001-01-01 23:09:53 +00:00
Poul-Henning Kamp
e06b153abe Add padding space and a version number to the md_ioctl structre for future
extension.

Add ability to create a preload disk giving an address and a length
(suggested by imp)

Fix bug relating to very small md(4) devices.

Update md.c copyright to reflect the status of code copied from vn.c.
(noticed by dillon)
2001-01-01 23:08:26 +00:00
David E. O'Brien
b5073b49d9 Shells for the atomic operations FreeBSD needs.
This is just waiting for a budding PowerPC ASM guy to fill in the blanks.
2001-01-01 23:06:59 +00:00
David E. O'Brien
8501ea26ea PowerPC platform-specific type definitions. 2001-01-01 22:43:52 +00:00
David E. O'Brien
e91cf05816 Sort some of the _BSD_* types. 2001-01-01 22:26:56 +00:00
David E. O'Brien
68a2ed01fd Update the e_machine values to include x86-64, PowerPC and [Strong]ARM;
and fix the Sparc values.  Also update the ELFOSABI list while I'm here.
2001-01-01 21:56:57 +00:00
David E. O'Brien
a0ff0188c2 PowerPC specific ELF ABI definitions. 2001-01-01 21:54:48 +00:00
Matt Jacob
afd27fce94 Sanity check ptr for legal values so it is less likely
(but not impossible) to get stuck in an infinite loop.

Obtained from:	msmith@freebsd.org
2001-01-01 16:49:31 +00:00
Poul-Henning Kamp
924836d50e Add a missing vnode_if.h.
Submitted by:	Jim Bloom <bloom@acm.org>
2001-01-01 11:28:32 +00:00
Maxim Sobolev
1ed369095d We are now in the year 2001, so ajust copyrights.
Happy New Year!
2001-01-01 08:05:48 +00:00
John Baldwin
4bfba0cf19 Push down sched_lock in psignal(). sched_lock was being held across
recursive calls into psignal() as well as calls to signotify(),
forward_signal(), etc.
2001-01-01 02:31:08 +00:00
John Baldwin
ef8294075b Add in a missing release of the proctree lock.
Submitted by:	Sja <sakari.jalovaara@eqonline.fi>
2001-01-01 02:19:51 +00:00
Matt Jacob
32f73b1c3e Add a dopey makefile to do the tags dance, which is probably not perfect
but is better than nothing by a good deal.
2000-12-31 23:26:34 +00:00
Matt Jacob
56f29ddd1e there is no more miscfs/devfs 2000-12-31 23:12:20 +00:00
Matt Jacob
91f1caa2d8 Fix problems with incomplete conversions from printf to isp_prt. 2000-12-31 20:50:56 +00:00
Matt Jacob
23dc42d12f Oops, I'm such an idiot. For reasons I don't really agree with,
all devices are by default known by their 'cooked' name, so
my change was wrong. I thought it was a hangover from old 'block
tape device' support which hasn't worked (if it ever did) since
v6/PWB.

So, the default tape name is now the same as Linux. Far out, man....
2000-12-31 20:29:56 +00:00
Poul-Henning Kamp
8f8def9e2c This is the first snapshot of the new all-singing-and-dancing md(4).
Using the mdconfig(8) program you can now configure memory disks
on malloc(9), swap or a file/vnode.  preloaded md disks also work
as usual.
2000-12-31 13:03:42 +00:00
Poul-Henning Kamp
49851cc706 Use macro API to <sys/queue.h> 2000-12-31 10:24:19 +00:00
Poul-Henning Kamp
e33941c787 Add compress option at the instigation of rgrimes. 2000-12-31 10:22:52 +00:00
Matt Jacob
dcf516de13 Unbelievable how this slipped through. There is
no such device as /dev/nsa0. The DEFTAPE should
"/dev/nrsa0". *Groan*.
2000-12-31 08:17:19 +00:00
Seigo Tanimura
338c0bc664 Ignore a net interrupt if the corresponding handler is not
registered.

This fixes panic on my laptop where a spurious arp packet
is received when arp is not ready to run.
2000-12-31 01:31:55 +00:00
Paul Saab
e9df486f0a Backout rev 1.57 & 1.58. While the previous revisions fixed
attaching to running processes, it completely breaks normal debugging.
A better fix is in the works, but cannot be properly tested until
the problem with gdb hanging the system in -current is solved.
2000-12-31 01:30:27 +00:00
Matthew Dillon
08c0a67b2e Fix a lockup problem that occurs with 'cvs update'. specfs's fsync can
get into the same sort of infinite loop that ffs's fsync used to get
into, probably due to background bitmap writes.  The solution is
the same.
2000-12-30 23:32:24 +00:00
Poul-Henning Kamp
6214433089 Use macro API for <sys/queue.h> 2000-12-30 22:06:19 +00:00
Poul-Henning Kamp
0d7b8d16dc Use <sys/queue.h> macro API.
Submitted by:	"Jason" <jsmethers@pdq.net>
Reviewed by:	/sbin/md5
2000-12-30 20:40:16 +00:00
Matt Jacob
56c6d0d775 Change the modification of what could be a const string. Apparently the
construct:

	char *foo;
	...
	foo = "XXX";
	...
	foo[1] = 'Y';

is wrong. IT blew up on NetBSD-sparc64 because that platform write-protects
constant strings.
2000-12-30 20:09:26 +00:00
Doug Rabson
15c2c12d0d Don't include <stddef.h> for offsetof() - its also defined in <sys/types.h> 2000-12-30 13:07:58 +00:00
Doug Rabson
48dd241687 Merge ALIGN changes from alpha code. 2000-12-30 13:06:01 +00:00
Doug Rabson
c8cf198085 Fix typo. 2000-12-30 13:04:20 +00:00
Paul Saab
894653d6fa Pass me the pointy hat. Do not hold sched_lock over psignal.
Submitted by:	alfred
2000-12-30 00:44:44 +00:00
Matt Jacob
e9423e211e Add in Bill Sommerfeld's -Wformat stuff. Add a ISP_CFG_NOINIT option
to keep from completing initialization when isp_init is called.
2000-12-29 19:17:18 +00:00
Matt Jacob
8ead30564e Add in Bill Sommerfelds -Wformat changes. Set up default node && port
WWNs correctly (Again!) - this time for the case that we're not going
to fully init the adapter if isp_init is called (with ISP_CFG_NOINIT
set in options). The pupose for this is to bring the adapter up to
almost ready to go, get info out of NVRAM, but to not start it up- leaving
it until later to actually start things up if wanted (and possibly with
different roles selected).
2000-12-29 19:12:44 +00:00
Matt Jacob
f09b192280 Set up to do a local interrupt fielding before calling common code-
allows us to grab lock as we should.
2000-12-29 19:10:16 +00:00
Matt Jacob
c40e096ed6 Make sure we do locking if we call isp_intr.
Make sure we enter Giant for now if we call into cam for completion.
2000-12-29 19:06:32 +00:00
Takanori Watanabe
ccf67a960f Remove the old acpi stuff entry.
Submitted by:kurinyma
2000-12-29 15:39:45 +00:00
Alfred Perlstein
030f23696c fix comment which was outdated 3 years ago
remove useless assignment
purge entire file of 'register' keyword
2000-12-29 13:49:05 +00:00
Alfred Perlstein
6e4f51d1ac clean up kmem_suballoc():
remove useless assignment
remove 'register' variables
2000-12-29 13:05:22 +00:00
Paul Richards
8fcbbfe4a3 The pci and isa drivers were meant to share the same devclass but
the devclass definitions were all wrong so they had their own private
ones with the same name.

Fix it so they all use the same global devclass.
2000-12-29 11:59:41 +00:00
Paul Richards
2d1a798869 Change the module name from lnc to if_lnc so that ifconfig works. 2000-12-29 11:46:17 +00:00
Paul Richards
7716c31841 Set a lower probe return value for PCI cards so that the pcn driver wins. 2000-12-29 11:41:18 +00:00
Poul-Henning Kamp
24b85d18c5 CIRCLEQs are a disgrace to everything Knuth taught us in Volume 1 Chapter 2.
Retire them before anybody starts to use them again.

Use TAILQ instead, it provides the same functionality.
2000-12-29 09:55:40 +00:00
Mike Smith
39a8493ac0 Hack in interrupt routing support (using the core $PIR support, not using
ACPICA properly).  This makes it possible to use ACPICA in conjunction with
CardBus before I get around to implementing ACPI/PCI interrupt routing.
2000-12-29 09:42:05 +00:00
Greg Lehey
7fcd0cb31a Partially revert revision 1.7: Only use getnanotime instead of
nanotime if we would run into trouble with nanotime (i.e. if we are
tracing KTR_LOCK).

Reviewed by: 	jhb
2000-12-29 06:27:39 +00:00
Paul Richards
b31d9f17b1 Fix a legacy issue. The offset for reading the MAC address is 0 using
bus space, not iosize which is what it was when using inb().
2000-12-29 04:41:52 +00:00
Paul Richards
7842f151ba Map FreeBSD character device hard disks to Linux block device hard disks.
This fixes the problem with VMWARE not being able to use raw disks.
2000-12-29 00:44:42 +00:00
Matt Jacob
7325560821 add a couple off offset defines for ATIO2s 2000-12-28 23:27:54 +00:00
Matt Jacob
355981d7c6 roll to 2.01.26 level 2000-12-28 23:23:28 +00:00
Matt Jacob
932269b52e remove MAINTAINER file 2000-12-28 23:23:11 +00:00
Poul-Henning Kamp
e159de56fb This is repo-copied from vnioctl.h 2000-12-28 20:59:55 +00:00
David E. O'Brien
ca1d6e0610 Move all VCS ids to a consistent location. 2000-12-28 18:21:32 +00:00
David E. O'Brien
ebf7598b4d Add multiple inclusion protection.
PR:		23902
Submitted by:	Christian Weisgerber <naddy@mips.inka.de>
2000-12-28 18:18:23 +00:00
Dag-Erling Smørgrav
dd488b6dd8 Retire kernfs (kernel part). 2000-12-28 12:17:35 +00:00
Paul Saab
6a10f299b9 Send a SIGCONT when detaching or continuing the excution of a traced
process.  This fixes a problem when attaching to a process in gdb
and the process staying in the STOP'd state after quiting gdb.
This whole process seems a bit suspect, but this seems to work.

Reviewed by:	peter
2000-12-28 08:34:21 +00:00
Peter Wemm
4058c0f013 Pull out the module path from the loader. ie: if you boot from
/boot/kernel.foobar/* then that had better be in the path ahead of the
others.

Submitted by:  Daniel J. O'Connor <darius@dons.net.au>
PR: 23662
2000-12-28 08:14:58 +00:00
Bosko Milekic
e3b4e866a5 Small fix for bpf compat:
Make malloc() use M_NOWAIT istead of M_DONTWAIT and in the
bpf_compat case, define M_NOWAIT to be M_DONTWAIT.
2000-12-27 22:20:13 +00:00
Ruslan Ermilov
f53fadafee Prepare for mdoc(7)NG. 2000-12-27 16:37:32 +00:00
Mike Smith
0b94a66e3f Major bugfix and minor update. This should resolve the current issues
with the driver locking up under load.

 - Restructure so that we use a static pool of commands/FIBs, rather than
   allocating them in clusters.  The cluster allocation just made things
   more complicated, and allowed us to waste more memory in peak load
   situations.
 - Make queueing macros more like my other drivers.  This adds queue stats
   for free.  Add some debugging to take advantage of this.
 - Reimplement the periodic timeout scan.  Kick the interrupt handler
   and the start routine every scan as well, just to be safe.  Track busy
   commands properly.
 - Bring resource cleanup into line with resource allocation.  We should
   now clean up correctly after a failed probe/unload/etc.
 - Try to start new commands when old ones are completed.  We weren't doing
   this before, which could lead to deadlock when the controller was full.
 - Don't try to build a new command if we have found a deferred command.
   This could cause us to lose the deferred command.
 - Use diskerr() to report I/O errors.
 - Don't bail if the AdapterInfo structure is the wrong size.  Some variation
   seems to be normal.  We need to improve our handing of 2.x firmware sets.
 - Improve some comments in an attempt to try to make things clearer.
 - Restructure to avoid some warnings.
2000-12-27 13:14:56 +00:00
Cameron Grant
826737698c change irq handler slightly, get rid of superflous messages 2000-12-27 04:04:36 +00:00
Assar Westerlund
598ce68dbd include tcp header files to get the prototype for tcp_seq_vs_sess 2000-12-27 03:02:29 +00:00
Assar Westerlund
68d74cd044 Make zalloc and zfree non-inline functions. This avoids having to
have the code calling these be compiled with the same setting for
INVARIANTS and SMP.

Reviewed by:	dillon
2000-12-27 02:54:37 +00:00
Matthew Dillon
2b6b0df712 This implements a better launder limiting solution. There was a solution
in 4.2-REL which I ripped out in -stable and -current when implementing the
low-memory handling solution.  However, maxlaunder turns out to be the saving
grace in certain very heavily loaded systems (e.g. newsreader box).  The new
algorithm limits the number of pages laundered in the first pageout daemon
pass.  If that is not sufficient then suceessive will be run without any
limit.

Write I/O is now pipelined using two sysctls, vfs.lorunningspace and
vfs.hirunningspace.  This prevents excessive buffered writes in the
disk queues which cause long (multi-second) delays for reads.  It leads
to more stable (less jerky) and generally faster I/O streaming to disk
by allowing required read ops (e.g. for indirect blocks and such) to occur
without interrupting the write stream, amoung other things.

NOTE: eventually, filesystem write I/O pipelining needs to be done on a
per-device basis.  At the moment it is globalized.
2000-12-26 19:41:38 +00:00
Søren Schmidt
590a0be036 Add CDR progress ioctl. 2000-12-26 15:24:53 +00:00
Søren Schmidt
6cf4911dd6 Use M_ZERO flag on malloc when approbiate. 2000-12-26 12:05:49 +00:00
Søren Schmidt
dec35f9164 Update the burncd interface a bit, dont block the ATA channel on
blank & fixate commands and provide a progress interface for the
blank command (for now)
2000-12-26 11:55:44 +00:00
Søren Schmidt
ce3598adfe Use diskerr for printing disk hard/soft errors. 2000-12-26 11:49:57 +00:00
Seigo Tanimura
307afaf3c6 Add OZO8008 - Zoom (33.6k Modem).
PR:		kern/23336
Submitted by:	Paulo Menezes <root@samurai.dee.uc.pt>
2000-12-26 06:52:57 +00:00
Warner Losh
cc9e9343cd Minor newbus/style(9) cleanups.
o Move the ax88190 code to its own function.
o Move all device_method_t, driver_t and DRIVER_MODULE definitions to the
  end of files.
o Wrap a few lines > 80 characters.
o Use the same devclass for all ed drivers.  This allows machines with
  multiple types of cards to have their cards numbered correctly.  Before,
  you could wind up with two ed0's.
o Protect if_edvar.h from multiple includes because I was there.
2000-12-26 06:38:04 +00:00
Cameron Grant
b87eb3b531 move parametric defines and structure definitions from .h to .c 2000-12-25 02:49:28 +00:00
Cameron Grant
a6b5683876 indent debugging printfs, change a couple of messages slightly 2000-12-25 02:21:16 +00:00
Cameron Grant
6a2e12e0dd update to return correct blocksize- these chips have a fixed irq rate, so
block size varies only with format and rate.
2000-12-25 01:42:13 +00:00
Mitsuru IWASAKI
917d44c856 Add ioctls to acpi_cmbat and acpi_acad. These use mike's acpi_register_ioctl().
Fix wrong AML method calling in acpi_cmbat.
2000-12-24 19:12:10 +00:00
KATO Takenori
dfec8c70fa Disabled boot2 for the moment, because it needs aout tools. 2000-12-24 14:54:34 +00:00
David E. O'Brien
1bc9ef1684 Back out the modules `make obj' speedup.
I cannot find a way to do this with the more esoteric source dir schemes
I thought of.
2000-12-24 13:29:58 +00:00
Poul-Henning Kamp
442fad6798 Update the "icmp_admin_prohib_like_rst" code to check the tcp-window and
to be configurable with respect to acting only in SYN or in all TCP states.

PR:		23665
Submitted by:	Jesper Skriver <jesper@skriver.dk>
2000-12-24 10:57:21 +00:00
Cameron Grant
f0fb042e84 fairly substantial rewrite- seperate out play/record code, implement
setblocksize, simplify resource allocation
2000-12-24 03:56:41 +00:00
Cameron Grant
6a6ee5bb35 compensate for broken codecs that return 0xffff on unimplemented registers
instead of 0.
2000-12-24 03:33:21 +00:00
Cameron Grant
ac083c91f8 implement setblocksize properly 2000-12-23 22:24:43 +00:00
Jake Burkholder
98f03f9030 Protect proc.p_pptr and proc.p_children/p_sibling with the
proctree_lock.

linprocfs not locked pending response from informal maintainer.

Reviewed by:	jhb, -smp@
2000-12-23 19:43:10 +00:00
Matt Jacob
661f2768f4 Make sure we have a non-null proc pointer before referring to fields
off of it.
2000-12-23 07:33:32 +00:00
Cameron Grant
f4084c4526 fix a panic if the requested blocksize was greater than the data rate,
resulting in a divide by 0.
2000-12-23 06:09:43 +00:00
Cameron Grant
e246070f8a kill a warning 2000-12-23 05:19:32 +00:00
Cameron Grant
b4f8389d56 fix a typo 2000-12-23 05:16:39 +00:00
Cameron Grant
a906b37278 add sys/dev/sound/pcm/buffer.c, lefo out of last commit 2000-12-23 03:27:09 +00:00
Cameron Grant
350a5fafb1 update code dealing with snd_dbuf objects to do so using a functional interface
modify chn_setblocksize() to pick a default soft-blocksize appropriate to the
sample rate and format in use.  it will aim for a power of two size small
enough to generate block sizes of at most 20ms.  it will also set the
hard-blocksize taking into account rate/format conversions in use.

update drivers to implement setblocksize  correctly:
updated, tested: 	sb16, emu10k1, maestro, solo
updated, untested: 	ad1816, ess, mss, sb8, csa
not updated: 		ds1, es137x, fm801, neomagic, t4dwave, via82c686

i lack hardware to test: ad1816, csa, fm801, neomagic
others will be updated/tested in the next few days.
2000-12-23 03:16:13 +00:00
David E. O'Brien
45c27b729e *sigh* The `pecoff' module was added to all arches w/out testing a compile
on all arches.  This fixes the Alpha kernel build.
2000-12-22 22:33:15 +00:00
Mike Smith
29e79e51ee Probe generic i960 devices for the old AMI signature as well as the current
one, in order to support adapters with older firmware.

Submitted by:	"Prasanth S." <prasanths@ami.co.in>
2000-12-22 22:23:56 +00:00
Takanori Watanabe
d8c616aedc Add ACPI AC adaptor and ACPI Control Method Battery.
And install notify handler for thermal zone .
2000-12-22 14:41:55 +00:00
KATO Takenori
7b6cd188ea Merged from Makefile.i386 revision 1.217. 2000-12-22 10:24:55 +00:00
KATO Takenori
384a1c1a81 Merged from Makefile.i386 revision 1.216. 2000-12-22 10:21:33 +00:00
KATO Takenori
6b46b4c7e1 Merged from files.i386 and options.i386 revisions 1.341 and 1.141,
respectively.
2000-12-22 10:18:00 +00:00
David E. O'Brien
c59a148d05 Use the canonical spelling for the path to sys. 2000-12-22 10:05:07 +00:00
Bosko Milekic
2a0c503e7a * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT.
This is because calls with M_WAIT (now M_TRYWAIT) may not wait
  forever when nothing is available for allocation, and may end up
  returning NULL. Hopefully we now communicate more of the right thing
  to developers and make it very clear that it's necessary to check whether
  calls with M_(TRY)WAIT also resulted in a failed allocation.
  M_TRYWAIT basically means "try harder, block if necessary, but don't
  necessarily wait forever." The time spent blocking is tunable with
  the kern.ipc.mbuf_wait sysctl.
  M_WAIT is now deprecated but still defined for the next little while.

* Fix a typo in a comment in mbuf.h

* Fix some code that was actually passing the mbuf subsystem's M_WAIT to
  malloc(). Made it pass M_WAITOK instead. If we were ever to redefine the
  value of the M_WAIT flag, this could have became a big problem.
2000-12-21 21:44:31 +00:00
David E. O'Brien
b3a120de36 Greatly speed up the modules `make obj' phase. 2000-12-21 20:21:24 +00:00
David E. O'Brien
ded454a135 Greatly speed up the module `depend' phase. 2000-12-21 20:01:27 +00:00
Takanori Watanabe
6ef9f30dfd Add pecoff directory.
Submitted by:nyan
2000-12-21 15:33:30 +00:00
Takanori Watanabe
e3c6e05e3c Re-Enable OSD_PRIORITY_GPE. Now 20001215 has been commited. 2000-12-21 07:47:43 +00:00
Mike Smith
88c6b9ae21 Resolve conflicts from the ACPI CA 20001215 vendor import. 2000-12-21 07:04:32 +00:00
Mike Smith
7f33f28ba4 This commit was generated by cvs2svn to compensate for changes in r70243,
which included commits to RCS files with non-trunk default branches.
2000-12-21 06:56:46 +00:00
Mike Smith
68466b4675 Update to the Intel 20001215 ACPI CA snapshot. 2000-12-21 06:56:46 +00:00
Poul-Henning Kamp
b80e3b4191 A last minute brucification resulted in syntax errors in the previous commit. 2000-12-20 22:07:59 +00:00
Poul-Henning Kamp
e2a09b2649 Replace logwakeup() with "int msgbuftrigger". There is little
point in calling a function just to set a flag.

Keep better track of the syslog FAC/PRI code and try to DTRT if
they mingle.

Log all writes to /dev/console to syslog with <console.info>
priority.  The formatting is not preserved, there is no robust,
way of doing it.  (Ideas with patches welcome).
2000-12-20 21:50:37 +00:00
Mitsuru IWASAKI
441a762864 Disable my previous committed code for a moment.
Note to myself: this needs to be enabled again when newer version of
ACPI is imported.
2000-12-20 20:22:47 +00:00
Mitsuru IWASAKI
912c8c65d2 Add task priority definition for OSD_PRIORITY_GPE in AcpiOsQueueForExecution().
This is needed to next ACPICA import.
2000-12-20 19:15:38 +00:00
Toshihiko ARAI
eb13a47275 Fix my previous commit. Remove ed_get_Linksys() function prototypes. 2000-12-20 17:10:28 +00:00
Takanori Watanabe
b37c9b907b Change priority of procedure queueing.
This is needed to next ACPICA import.
2000-12-20 17:00:33 +00:00
Justin T. Gibbs
98f89aa0a9 Add PCIR_CAP_PTR as a define for the location of the capability
pointer of type 0 devices.  This is required by my last aic7xxx change.
2000-12-20 14:36:52 +00:00
Takanori Watanabe
bffb191efe Add PECOFF (WIN32 Execution file format) support.
To use it, some dll is needed. And currently, the dll is only for NetBSD.
So one more kernel module is needed.
For more infomation,
http://chiharu.haun.org/peace/ .

Reviewed by:	bp
2000-12-20 12:51:08 +00:00
Paul Richards
3164c5878a Re-enable the lnc driver in GENERIC. 2000-12-20 11:24:47 +00:00
Dag-Erling Smørgrav
a8513d6f69 Re-commit revision 1.32, which grog incorrectly backed out in revision 1.33. 2000-12-20 11:17:09 +00:00
Nick Hibma
ad979802f6 Initialise rcmdlen.
Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
2000-12-20 09:37:35 +00:00
Cameron Grant
688ca063da fix a debugging leftover (min speed=48khz) 2000-12-20 05:21:17 +00:00
Greg Lehey
7509f91aba revive_block: Don't go beyond the end of the stripe when reviving
striped plexes.

Submitted by:   des

Don't lock buffers before calls to sdio, sdio does it by itself.

Submitted by:	tegge

parityops:	Use correct casts when returning error information.
2000-12-20 05:18:58 +00:00
Greg Lehey
06694e9333 build_rq_buffer: Note which buffer headers we lock.
sdio: Unlock the buffer if we fail.

Submitted by:	tegge
2000-12-20 05:18:09 +00:00
Greg Lehey
e8c0649946 Rearrange #includes to make more sense. This is still not the reform
that bde is waiting to see, but at least it works.
2000-12-20 05:17:29 +00:00
Greg Lehey
3daf911efe Rename detached plexes and subdisks correctly (off by one error)
Submitted by:	Terry Glanfield <Terry.Glanfield@program-products.co.uk>
2000-12-20 05:16:46 +00:00
Greg Lehey
ed4963f8e1 open_drive: Add support for more than 32 devices of a particular kind.
Requested by:	Bernd Walter <ticso@cicely8.cicely.de>
		Cor Bosman <cor@xs4all.net>
		Kai Storbeck <kai@xs4all.net>
		Joe Greco <jgreco@ns.sol.net>

	     Add support for Compaq SMART-2 RAID (idad) as storage
	     device for Vinum subdisks.

Reported by:	Aaron Hill <hillaa@hotmail.com>
2000-12-20 05:15:50 +00:00
Greg Lehey
e872ce018e give_plex_to_volume: Recalculate volume size after attaching.
Cosmetics.
2000-12-20 05:13:26 +00:00